aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BSF/about.php70
-rw-r--r--BSF/action.php203
-rw-r--r--BSF/admin.php172
-rw-r--r--BSF/admin/advanced_feature.php107
-rw-r--r--BSF/admin/cat_list.php253
-rw-r--r--BSF/admin/cat_modify.php553
-rw-r--r--BSF/admin/cat_move.php104
-rw-r--r--BSF/admin/cat_options.php312
-rw-r--r--BSF/admin/cat_perm.php330
-rw-r--r--BSF/admin/comments.php179
-rw-r--r--BSF/admin/configuration.php301
-rw-r--r--BSF/admin/element_set.php232
-rw-r--r--BSF/admin/element_set_global.php382
-rw-r--r--BSF/admin/element_set_unit.php274
-rw-r--r--BSF/admin/group_list.php207
-rw-r--r--BSF/admin/group_perm.php185
-rw-r--r--BSF/admin/help.php32
-rw-r--r--BSF/admin/history.php685
-rw-r--r--BSF/admin/images/index.php30
-rw-r--r--BSF/admin/include/c13y_internal.class.php249
-rw-r--r--BSF/admin/include/check_integrity.class.php345
-rw-r--r--BSF/admin/include/functions.php1872
-rw-r--r--BSF/admin/include/functions_history.inc.php179
-rw-r--r--BSF/admin/include/functions_metadata.php298
-rw-r--r--BSF/admin/include/functions_notification_by_mail.inc.php522
-rw-r--r--BSF/admin/include/functions_permalinks.php204
-rw-r--r--BSF/admin/include/functions_plugins.inc.php64
-rw-r--r--BSF/admin/include/functions_upgrade.php98
-rw-r--r--BSF/admin/include/functions_waiting.inc.php41
-rw-r--r--BSF/admin/include/index.php30
-rw-r--r--BSF/admin/include/pclzip.lib.php5872
-rw-r--r--BSF/admin/include/plugins.class.php484
-rw-r--r--BSF/admin/include/tabsheet.class.php146
-rw-r--r--BSF/admin/index.php30
-rw-r--r--BSF/admin/intro.php285
-rw-r--r--BSF/admin/maintenance.php142
-rw-r--r--BSF/admin/notification_by_mail.php738
-rw-r--r--BSF/admin/permalinks.php179
-rw-r--r--BSF/admin/picture_modify.php437
-rw-r--r--BSF/admin/plugin.php62
-rw-r--r--BSF/admin/plugins_list.php154
-rw-r--r--BSF/admin/plugins_new.php139
-rw-r--r--BSF/admin/plugins_update.php169
-rw-r--r--BSF/admin/profile.php46
-rw-r--r--BSF/admin/rating.php258
-rw-r--r--BSF/admin/site_manager.php307
-rw-r--r--BSF/admin/site_reader_local.php265
-rw-r--r--BSF/admin/site_reader_remote.php250
-rw-r--r--BSF/admin/site_update.php991
-rw-r--r--BSF/admin/stats.php514
-rw-r--r--BSF/admin/tags.php246
-rw-r--r--BSF/admin/thumbnail.php352
-rw-r--r--BSF/admin/upload.php209
-rw-r--r--BSF/admin/user_list.php688
-rw-r--r--BSF/admin/user_perm.php223
-rw-r--r--BSF/admin/ws_checker.php334
-rw-r--r--BSF/category.php65
-rw-r--r--BSF/comments.php394
-rw-r--r--BSF/doc/COPYING340
-rw-r--r--BSF/doc/ChangeLog822
-rw-r--r--BSF/doc/README_en.txt105
-rw-r--r--BSF/doc/README_fr.txt116
-rw-r--r--BSF/doc/index.php30
-rw-r--r--BSF/feed.php202
-rw-r--r--BSF/galleries/.cvsignore1
-rw-r--r--BSF/galleries/index.php30
-rw-r--r--BSF/identification.php93
-rw-r--r--BSF/include/calendar_base.class.php351
-rw-r--r--BSF/include/calendar_monthly.class.php515
-rw-r--r--BSF/include/calendar_weekly.class.php136
-rw-r--r--BSF/include/category_cats.inc.php298
-rw-r--r--BSF/include/category_default.inc.php170
-rw-r--r--BSF/include/class_smtp_mail.inc.php157
-rw-r--r--BSF/include/common.inc.php283
-rw-r--r--BSF/include/config_default.inc.php700
-rw-r--r--BSF/include/constants.php112
-rw-r--r--BSF/include/feedcreator.class.php1541
-rw-r--r--BSF/include/filter.inc.php141
-rw-r--r--BSF/include/functions.inc.php1557
-rw-r--r--BSF/include/functions_calendar.inc.php295
-rw-r--r--BSF/include/functions_category.inc.php509
-rw-r--r--BSF/include/functions_comment.inc.php228
-rw-r--r--BSF/include/functions_cookie.inc.php115
-rw-r--r--BSF/include/functions_filter.inc.php63
-rw-r--r--BSF/include/functions_group.inc.php26
-rw-r--r--BSF/include/functions_html.inc.php751
-rw-r--r--BSF/include/functions_mail.inc.php822
-rw-r--r--BSF/include/functions_metadata.inc.php142
-rw-r--r--BSF/include/functions_notification.inc.php608
-rw-r--r--BSF/include/functions_picture.inc.php330
-rw-r--r--BSF/include/functions_plugins.inc.php284
-rw-r--r--BSF/include/functions_rate.inc.php134
-rw-r--r--BSF/include/functions_search.inc.php560
-rw-r--r--BSF/include/functions_session.inc.php225
-rw-r--r--BSF/include/functions_tag.inc.php323
-rw-r--r--BSF/include/functions_url.inc.php740
-rw-r--r--BSF/include/functions_user.inc.php1340
-rw-r--r--BSF/include/functions_xml.inc.php141
-rw-r--r--BSF/include/index.php30
-rw-r--r--BSF/include/menubar.inc.php311
-rw-r--r--BSF/include/page_header.php90
-rw-r--r--BSF/include/page_tail.php74
-rw-r--r--BSF/include/php_compat/array_intersect_key.php35
-rw-r--r--BSF/include/php_compat/file_put_contents.php14
-rw-r--r--BSF/include/php_compat/hash_hmac.php25
-rw-r--r--BSF/include/php_compat/index.php30
-rw-r--r--BSF/include/php_compat/preg_last_error.php41
-rw-r--r--BSF/include/picture_comment.inc.php183
-rw-r--r--BSF/include/picture_metadata.inc.php99
-rw-r--r--BSF/include/picture_rate.inc.php91
-rw-r--r--BSF/include/section_init.inc.php620
-rw-r--r--BSF/include/smarty/COPYING.lib458
-rw-r--r--BSF/include/smarty/NEWS1024
-rw-r--r--BSF/include/smarty/README85
-rw-r--r--BSF/include/smarty/libs/Config_File.class.php389
-rw-r--r--BSF/include/smarty/libs/Smarty.class.php1968
-rw-r--r--BSF/include/smarty/libs/Smarty_Compiler.class.php2325
-rw-r--r--BSF/include/smarty/libs/debug.tpl157
-rw-r--r--BSF/include/smarty/libs/internals/core.assemble_plugin_filepath.php67
-rw-r--r--BSF/include/smarty/libs/internals/core.assign_smarty_interface.php43
-rw-r--r--BSF/include/smarty/libs/internals/core.create_dir_structure.php79
-rw-r--r--BSF/include/smarty/libs/internals/core.display_debug_console.php61
-rw-r--r--BSF/include/smarty/libs/internals/core.get_include_path.php44
-rw-r--r--BSF/include/smarty/libs/internals/core.get_microtime.php23
-rw-r--r--BSF/include/smarty/libs/internals/core.get_php_resource.php80
-rw-r--r--BSF/include/smarty/libs/internals/core.is_secure.php59
-rw-r--r--BSF/include/smarty/libs/internals/core.is_trusted.php47
-rw-r--r--BSF/include/smarty/libs/internals/core.load_plugins.php125
-rw-r--r--BSF/include/smarty/libs/internals/core.load_resource_plugin.php74
-rw-r--r--BSF/include/smarty/libs/internals/core.process_cached_inserts.php71
-rw-r--r--BSF/include/smarty/libs/internals/core.process_compiled_include.php37
-rw-r--r--BSF/include/smarty/libs/internals/core.read_cache_file.php101
-rw-r--r--BSF/include/smarty/libs/internals/core.rm_auto.php71
-rw-r--r--BSF/include/smarty/libs/internals/core.rmdir.php54
-rw-r--r--BSF/include/smarty/libs/internals/core.run_insert_handler.php71
-rw-r--r--BSF/include/smarty/libs/internals/core.smarty_include_php.php50
-rw-r--r--BSF/include/smarty/libs/internals/core.write_cache_file.php96
-rw-r--r--BSF/include/smarty/libs/internals/core.write_compiled_include.php91
-rw-r--r--BSF/include/smarty/libs/internals/core.write_compiled_resource.php35
-rw-r--r--BSF/include/smarty/libs/internals/core.write_file.php54
-rw-r--r--BSF/include/smarty/libs/plugins/block.textformat.php103
-rw-r--r--BSF/include/smarty/libs/plugins/compiler.assign.php40
-rw-r--r--BSF/include/smarty/libs/plugins/function.assign_debug_info.php40
-rw-r--r--BSF/include/smarty/libs/plugins/function.config_load.php142
-rw-r--r--BSF/include/smarty/libs/plugins/function.counter.php80
-rw-r--r--BSF/include/smarty/libs/plugins/function.cycle.php102
-rw-r--r--BSF/include/smarty/libs/plugins/function.debug.php35
-rw-r--r--BSF/include/smarty/libs/plugins/function.eval.php49
-rw-r--r--BSF/include/smarty/libs/plugins/function.fetch.php221
-rw-r--r--BSF/include/smarty/libs/plugins/function.html_checkboxes.php143
-rw-r--r--BSF/include/smarty/libs/plugins/function.html_image.php142
-rw-r--r--BSF/include/smarty/libs/plugins/function.html_options.php122
-rw-r--r--BSF/include/smarty/libs/plugins/function.html_radios.php156
-rw-r--r--BSF/include/smarty/libs/plugins/function.html_select_date.php331
-rw-r--r--BSF/include/smarty/libs/plugins/function.html_select_time.php194
-rw-r--r--BSF/include/smarty/libs/plugins/function.html_table.php177
-rw-r--r--BSF/include/smarty/libs/plugins/function.mailto.php165
-rw-r--r--BSF/include/smarty/libs/plugins/function.math.php84
-rw-r--r--BSF/include/smarty/libs/plugins/function.popup.php119
-rw-r--r--BSF/include/smarty/libs/plugins/function.popup_init.php40
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.capitalize.php43
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.cat.php33
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.count_characters.php32
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.count_paragraphs.php29
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.count_sentences.php29
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.count_words.php33
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.date_format.php58
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.debug_print_var.php90
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.default.php32
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.escape.php93
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.indent.php28
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.lower.php26
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.nl2br.php35
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.regex_replace.php37
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.replace.php30
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.spacify.php30
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.string_format.php29
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.strip.php33
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.strip_tags.php32
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.truncate.php50
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.upper.php26
-rw-r--r--BSF/include/smarty/libs/plugins/modifier.wordwrap.php29
-rw-r--r--BSF/include/smarty/libs/plugins/outputfilter.trimwhitespace.php75
-rw-r--r--BSF/include/smarty/libs/plugins/shared.escape_special_chars.php31
-rw-r--r--BSF/include/smarty/libs/plugins/shared.make_timestamp.php46
-rw-r--r--BSF/include/template.class.php385
-rw-r--r--BSF/include/upload.class.php41
-rw-r--r--BSF/include/user.inc.php74
-rw-r--r--BSF/include/ws_core.inc.php619
-rw-r--r--BSF/include/ws_functions.inc.php1103
-rw-r--r--BSF/include/ws_protocols/index.php30
-rw-r--r--BSF/include/ws_protocols/json_encoder.php87
-rw-r--r--BSF/include/ws_protocols/php_encoder.php54
-rw-r--r--BSF/include/ws_protocols/rest_encoder.php281
-rw-r--r--BSF/include/ws_protocols/rest_handler.php57
-rw-r--r--BSF/include/ws_protocols/xmlrpc_encoder.php115
-rw-r--r--BSF/index.php292
-rw-r--r--BSF/install.php409
-rw-r--r--BSF/install/config.sql29
-rw-r--r--BSF/install/db/1-database.php42
-rw-r--r--BSF/install/db/10-database.php52
-rw-r--r--BSF/install/db/11-database.php65
-rw-r--r--BSF/install/db/12-database.php99
-rw-r--r--BSF/install/db/13-database.php69
-rw-r--r--BSF/install/db/14-database.php59
-rw-r--r--BSF/install/db/15-database.php46
-rw-r--r--BSF/install/db/16-database.php50
-rw-r--r--BSF/install/db/17-database.php60
-rw-r--r--BSF/install/db/18-database.php88
-rw-r--r--BSF/install/db/19-database.php149
-rw-r--r--BSF/install/db/2-database.php74
-rw-r--r--BSF/install/db/20-database.php87
-rw-r--r--BSF/install/db/21-database.php48
-rw-r--r--BSF/install/db/22-database.php54
-rw-r--r--BSF/install/db/23-database.php46
-rw-r--r--BSF/install/db/24-database.php46
-rw-r--r--BSF/install/db/25-database.php47
-rw-r--r--BSF/install/db/26-database.php43
-rw-r--r--BSF/install/db/27-database.php43
-rw-r--r--BSF/install/db/28-database.php42
-rw-r--r--BSF/install/db/29-database.php42
-rw-r--r--BSF/install/db/3-database.php53
-rw-r--r--BSF/install/db/30-database.php50
-rw-r--r--BSF/install/db/31-database.php43
-rw-r--r--BSF/install/db/32-database.php43
-rw-r--r--BSF/install/db/33-database.php51
-rw-r--r--BSF/install/db/34-database.php56
-rw-r--r--BSF/install/db/35-database.php58
-rw-r--r--BSF/install/db/36-database.php43
-rw-r--r--BSF/install/db/37-database.php63
-rw-r--r--BSF/install/db/38-database.php46
-rw-r--r--BSF/install/db/39-database.php40
-rw-r--r--BSF/install/db/4-database.php50
-rw-r--r--BSF/install/db/40-database.php40
-rw-r--r--BSF/install/db/41-database.php61
-rw-r--r--BSF/install/db/42-database.php84
-rw-r--r--BSF/install/db/43-database.php47
-rw-r--r--BSF/install/db/44-database.php47
-rw-r--r--BSF/install/db/45-database.php48
-rw-r--r--BSF/install/db/46-database.php46
-rw-r--r--BSF/install/db/47-database.php52
-rw-r--r--BSF/install/db/48-database.php48
-rw-r--r--BSF/install/db/49-database.php54
-rw-r--r--BSF/install/db/5-database.php46
-rw-r--r--BSF/install/db/50-database.php50
-rw-r--r--BSF/install/db/51-database.php57
-rw-r--r--BSF/install/db/52-database.php69
-rw-r--r--BSF/install/db/53-database.php57
-rw-r--r--BSF/install/db/54-database.php69
-rw-r--r--BSF/install/db/55-database.php59
-rw-r--r--BSF/install/db/56-database.php49
-rw-r--r--BSF/install/db/57-database.php63
-rw-r--r--BSF/install/db/58-database.php48
-rw-r--r--BSF/install/db/59-database.php79
-rw-r--r--BSF/install/db/6-database.php53
-rw-r--r--BSF/install/db/60-database.php86
-rw-r--r--BSF/install/db/61-database.php50
-rw-r--r--BSF/install/db/62-database.php48
-rw-r--r--BSF/install/db/63-database.php73
-rw-r--r--BSF/install/db/64-database.php50
-rw-r--r--BSF/install/db/65-database.php319
-rw-r--r--BSF/install/db/66-database.php48
-rw-r--r--BSF/install/db/67-database.php48
-rw-r--r--BSF/install/db/68-database.php55
-rw-r--r--BSF/install/db/69-database.php58
-rw-r--r--BSF/install/db/7-database.php65
-rw-r--r--BSF/install/db/70-database.php53
-rw-r--r--BSF/install/db/71-database.php58
-rw-r--r--BSF/install/db/8-database.php83
-rw-r--r--BSF/install/db/9-database.php86
-rw-r--r--BSF/install/db/index.php30
-rw-r--r--BSF/install/index.php30
-rw-r--r--BSF/install/piwigo_structure.sql457
-rw-r--r--BSF/install/upgrade_1.3.0.php126
-rw-r--r--BSF/install/upgrade_1.3.1.php601
-rw-r--r--BSF/install/upgrade_1.4.0.php292
-rw-r--r--BSF/install/upgrade_1.5.0.php469
-rw-r--r--BSF/install/upgrade_1.6.0.php54
-rw-r--r--BSF/install/upgrade_1.6.2.php346
-rw-r--r--BSF/language/en_UK/about.html10
-rw-r--r--BSF/language/en_UK/admin.lang.php649
-rw-r--r--BSF/language/en_UK/common.lang.php368
-rw-r--r--BSF/language/en_UK/help.html259
-rw-r--r--BSF/language/en_UK/help/advanced_feature.html16
-rw-r--r--BSF/language/en_UK/help/cat_modify.html141
-rw-r--r--BSF/language/en_UK/help/cat_move.html14
-rw-r--r--BSF/language/en_UK/help/cat_options.html36
-rw-r--r--BSF/language/en_UK/help/cat_perm.html15
-rw-r--r--BSF/language/en_UK/help/configuration.html135
-rw-r--r--BSF/language/en_UK/help/group_list.html22
-rw-r--r--BSF/language/en_UK/help/history.html45
-rw-r--r--BSF/language/en_UK/help/index.php30
-rw-r--r--BSF/language/en_UK/help/maintenance.html46
-rw-r--r--BSF/language/en_UK/help/notification_by_mail.html15
-rw-r--r--BSF/language/en_UK/help/permalinks.html7
-rw-r--r--BSF/language/en_UK/help/search.html24
-rw-r--r--BSF/language/en_UK/help/site_manager.html51
-rw-r--r--BSF/language/en_UK/help/synchronize.html13
-rw-r--r--BSF/language/en_UK/help/thumbnail.html28
-rw-r--r--BSF/language/en_UK/help/user_list.html43
-rw-r--r--BSF/language/en_UK/help/web_service.html47
-rw-r--r--BSF/language/en_UK/index.php30
-rw-r--r--BSF/language/en_UK/install.lang.php70
-rw-r--r--BSF/language/en_UK/iso.txt1
-rw-r--r--BSF/language/es_ES/about.html8
-rw-r--r--BSF/language/es_ES/admin.lang.php655
-rw-r--r--BSF/language/es_ES/common.lang.php368
-rw-r--r--BSF/language/es_ES/help.html183
-rw-r--r--BSF/language/es_ES/help/advanced_feature.html16
-rw-r--r--BSF/language/es_ES/help/cat_modify.html117
-rw-r--r--BSF/language/es_ES/help/cat_move.html12
-rw-r--r--BSF/language/es_ES/help/cat_options.html30
-rw-r--r--BSF/language/es_ES/help/cat_perm.html11
-rw-r--r--BSF/language/es_ES/help/configuration.html101
-rw-r--r--BSF/language/es_ES/help/group_list.html21
-rw-r--r--BSF/language/es_ES/help/history.html51
-rw-r--r--BSF/language/es_ES/help/index.php30
-rw-r--r--BSF/language/es_ES/help/maintenance.html27
-rw-r--r--BSF/language/es_ES/help/notification_by_mail.html15
-rw-r--r--BSF/language/es_ES/help/permalinks.html7
-rw-r--r--BSF/language/es_ES/help/search.html23
-rw-r--r--BSF/language/es_ES/help/site_manager.html42
-rw-r--r--BSF/language/es_ES/help/synchronize.html12
-rw-r--r--BSF/language/es_ES/help/thumbnail.html25
-rw-r--r--BSF/language/es_ES/help/user_list.html33
-rw-r--r--BSF/language/es_ES/help/web_service.html46
-rw-r--r--BSF/language/es_ES/index.php30
-rw-r--r--BSF/language/es_ES/install.lang.php68
-rw-r--r--BSF/language/es_ES/iso.txt1
-rw-r--r--BSF/language/fr_FR/about.html8
-rw-r--r--BSF/language/fr_FR/admin.lang.php649
-rw-r--r--BSF/language/fr_FR/common.lang.php368
-rw-r--r--BSF/language/fr_FR/help.html250
-rw-r--r--BSF/language/fr_FR/help/advanced_feature.html16
-rw-r--r--BSF/language/fr_FR/help/cat_modify.html149
-rw-r--r--BSF/language/fr_FR/help/cat_move.html15
-rw-r--r--BSF/language/fr_FR/help/cat_options.html42
-rw-r--r--BSF/language/fr_FR/help/cat_perm.html16
-rw-r--r--BSF/language/fr_FR/help/configuration.html137
-rw-r--r--BSF/language/fr_FR/help/group_list.html21
-rw-r--r--BSF/language/fr_FR/help/history.html52
-rw-r--r--BSF/language/fr_FR/help/index.php30
-rw-r--r--BSF/language/fr_FR/help/maintenance.html51
-rw-r--r--BSF/language/fr_FR/help/notification_by_mail.html15
-rw-r--r--BSF/language/fr_FR/help/permalinks.html7
-rw-r--r--BSF/language/fr_FR/help/search.html27
-rw-r--r--BSF/language/fr_FR/help/site_manager.html56
-rw-r--r--BSF/language/fr_FR/help/synchronize.html19
-rw-r--r--BSF/language/fr_FR/help/thumbnail.html36
-rw-r--r--BSF/language/fr_FR/help/user_list.html39
-rw-r--r--BSF/language/fr_FR/help/web_service.html48
-rw-r--r--BSF/language/fr_FR/index.php30
-rw-r--r--BSF/language/fr_FR/install.lang.php68
-rw-r--r--BSF/language/fr_FR/iso.txt1
-rw-r--r--BSF/language/index.php30
-rw-r--r--BSF/language/nl_NL/about.html10
-rw-r--r--BSF/language/nl_NL/admin.lang.php655
-rw-r--r--BSF/language/nl_NL/common.lang.php368
-rw-r--r--BSF/language/nl_NL/help.html227
-rw-r--r--BSF/language/nl_NL/help/advanced_feature.html16
-rw-r--r--BSF/language/nl_NL/help/cat_modify.html128
-rw-r--r--BSF/language/nl_NL/help/cat_move.html15
-rw-r--r--BSF/language/nl_NL/help/cat_options.html30
-rw-r--r--BSF/language/nl_NL/help/cat_perm.html14
-rw-r--r--BSF/language/nl_NL/help/configuration.html105
-rw-r--r--BSF/language/nl_NL/help/group_list.html22
-rw-r--r--BSF/language/nl_NL/help/index.php30
-rw-r--r--BSF/language/nl_NL/help/maintenance.html37
-rw-r--r--BSF/language/nl_NL/help/notification_by_mail.html15
-rw-r--r--BSF/language/nl_NL/help/permalinks.html7
-rw-r--r--BSF/language/nl_NL/help/search.html19
-rw-r--r--BSF/language/nl_NL/help/site_manager.html36
-rw-r--r--BSF/language/nl_NL/help/synchronize.html8
-rw-r--r--BSF/language/nl_NL/help/thumbnail.html25
-rw-r--r--BSF/language/nl_NL/help/user_list.html39
-rw-r--r--BSF/language/nl_NL/help/web_service.html45
-rw-r--r--BSF/language/nl_NL/index.php30
-rw-r--r--BSF/language/nl_NL/install.lang.php67
-rw-r--r--BSF/language/nl_NL/iso.txt1
-rw-r--r--BSF/nbm.php87
-rw-r--r--BSF/notification.php91
-rw-r--r--BSF/password.php165
-rw-r--r--BSF/picture.php877
-rw-r--r--BSF/plugins/LocalFilesEditor/admin.php304
-rw-r--r--BSF/plugins/LocalFilesEditor/admin.tpl49
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/edit_area_full.js38
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/close.gifbin102 -> 0 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/fullscreen.gifbin198 -> 0 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/go_to_line.gifbin1053 -> 0 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/help.gifbin295 -> 0 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/highlight.gifbin256 -> 0 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/index.php30
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/load.gifbin1041 -> 0 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/move.gifbin257 -> 0 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/newdocument.gifbin170 -> 0 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/opacity.pngbin147 -> 0 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/processing.gifbin825 -> 0 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/redo.gifbin169 -> 0 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/reset_highlight.gifbin168 -> 0 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/save.gifbin285 -> 0 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/search.gifbin191 -> 0 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/smooth_selection.gifbin174 -> 0 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/spacer.gifbin43 -> 0 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/statusbar_resize.gifbin79 -> 0 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/images/undo.gifbin175 -> 0 bytes
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/index.php30
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/cs.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/de.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/dk.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/en.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/es.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/fr.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/hr.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/index.php30
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/it.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/ja.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/mk.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/nl.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/pl.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/pt.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/ru.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/langs/sk.js61
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/reg_syntax/css.js84
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/reg_syntax/html.js50
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/reg_syntax/index.php30
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/reg_syntax/js.js60
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/reg_syntax/php.js75
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/reg_syntax/sql.js55
-rw-r--r--BSF/plugins/LocalFilesEditor/editarea/reg_syntax/xml.js56
-rw-r--r--BSF/plugins/LocalFilesEditor/functions.inc.php70
-rw-r--r--BSF/plugins/LocalFilesEditor/index.php30
-rw-r--r--BSF/plugins/LocalFilesEditor/language/en_UK/index.php30
-rw-r--r--BSF/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php45
-rw-r--r--BSF/plugins/LocalFilesEditor/language/es_ES/index.php30
-rw-r--r--BSF/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php45
-rw-r--r--BSF/plugins/LocalFilesEditor/language/fr_FR/index.php30
-rw-r--r--BSF/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php45
-rw-r--r--BSF/plugins/LocalFilesEditor/language/index.php30
-rw-r--r--BSF/plugins/LocalFilesEditor/main.inc.php46
-rw-r--r--BSF/plugins/LocalFilesEditor/show_default.php68
-rw-r--r--BSF/plugins/LocalFilesEditor/show_default.tpl13
-rw-r--r--BSF/plugins/add_index/admin/index.php30
-rw-r--r--BSF/plugins/add_index/admin/main_page.php205
-rw-r--r--BSF/plugins/add_index/admin/main_page.tpl15
-rw-r--r--BSF/plugins/add_index/index.php30
-rw-r--r--BSF/plugins/add_index/language/en_UK/help/advanced_feature.html7
-rw-r--r--BSF/plugins/add_index/language/en_UK/help/index.php30
-rw-r--r--BSF/plugins/add_index/language/en_UK/help/site_manager.html7
-rw-r--r--BSF/plugins/add_index/language/en_UK/index.php30
-rw-r--r--BSF/plugins/add_index/language/en_UK/plugin.lang.php39
-rw-r--r--BSF/plugins/add_index/language/es_ES/help/advanced_feature.html7
-rw-r--r--BSF/plugins/add_index/language/es_ES/help/index.php30
-rw-r--r--BSF/plugins/add_index/language/es_ES/help/site_manager.html7
-rw-r--r--BSF/plugins/add_index/language/es_ES/index.php30
-rw-r--r--BSF/plugins/add_index/language/es_ES/plugin.lang.php39
-rw-r--r--BSF/plugins/add_index/language/fr_FR/help/advanced_feature.html7
-rw-r--r--BSF/plugins/add_index/language/fr_FR/help/index.php30
-rw-r--r--BSF/plugins/add_index/language/fr_FR/help/site_manager.html7
-rw-r--r--BSF/plugins/add_index/language/fr_FR/index.php30
-rw-r--r--BSF/plugins/add_index/language/fr_FR/plugin.lang.php39
-rw-r--r--BSF/plugins/add_index/language/index.php30
-rw-r--r--BSF/plugins/add_index/main.admin.inc.php93
-rw-r--r--BSF/plugins/add_index/main.base.inc.php39
-rw-r--r--BSF/plugins/add_index/main.inc.php53
-rw-r--r--BSF/plugins/add_index/main.normal.inc.php60
-rw-r--r--BSF/plugins/admin_advices/admin_advices.tpl39
-rw-r--r--BSF/plugins/admin_advices/default-layout.css19
-rw-r--r--BSF/plugins/admin_advices/en_UK/index.php30
-rw-r--r--BSF/plugins/admin_advices/en_UK/lang.adv.php447
-rw-r--r--BSF/plugins/admin_advices/fr_FR/index.php30
-rw-r--r--BSF/plugins/admin_advices/fr_FR/lang.adv.php480
-rw-r--r--BSF/plugins/admin_advices/index.php30
-rw-r--r--BSF/plugins/admin_advices/main.inc.php127
-rw-r--r--BSF/plugins/admin_multi_view/controller.php221
-rw-r--r--BSF/plugins/admin_multi_view/index.php30
-rw-r--r--BSF/plugins/admin_multi_view/is_admin.inc.php47
-rw-r--r--BSF/plugins/admin_multi_view/main.inc.php42
-rw-r--r--BSF/plugins/c13y_upgrade/index.php30
-rw-r--r--BSF/plugins/c13y_upgrade/initialize.inc.php142
-rw-r--r--BSF/plugins/c13y_upgrade/language/en_UK/index.php30
-rw-r--r--BSF/plugins/c13y_upgrade/language/en_UK/plugin.lang.php32
-rw-r--r--BSF/plugins/c13y_upgrade/language/es_ES/index.php30
-rw-r--r--BSF/plugins/c13y_upgrade/language/es_ES/plugin.lang.php32
-rw-r--r--BSF/plugins/c13y_upgrade/language/fr_FR/index.php30
-rw-r--r--BSF/plugins/c13y_upgrade/language/fr_FR/plugin.lang.php32
-rw-r--r--BSF/plugins/c13y_upgrade/language/index.php30
-rw-r--r--BSF/plugins/c13y_upgrade/main.inc.php46
-rw-r--r--BSF/plugins/event_tracer/event_list.php90
-rw-r--r--BSF/plugins/event_tracer/event_list.tpl17
-rw-r--r--BSF/plugins/event_tracer/index.php30
-rw-r--r--BSF/plugins/event_tracer/main.inc.php137
-rw-r--r--BSF/plugins/event_tracer/maintain.inc.php9
-rw-r--r--BSF/plugins/event_tracer/tracer_admin.php31
-rw-r--r--BSF/plugins/event_tracer/tracer_admin.tpl29
-rw-r--r--BSF/plugins/extended_description/index.php30
-rw-r--r--BSF/plugins/extended_description/main.inc.php69
-rw-r--r--BSF/plugins/hello_world/index.php30
-rw-r--r--BSF/plugins/hello_world/main.inc.php56
-rw-r--r--BSF/plugins/index.php30
-rw-r--r--BSF/plugins/language_switch/icons/cz_CZ.gifbin903 -> 0 bytes
-rw-r--r--BSF/plugins/language_switch/icons/de_DE.gifbin899 -> 0 bytes
-rw-r--r--BSF/plugins/language_switch/icons/en_UK.gifbin1161 -> 0 bytes
-rw-r--r--BSF/plugins/language_switch/icons/es_AR.gifbin1166 -> 0 bytes
-rw-r--r--BSF/plugins/language_switch/icons/es_ES.gifbin1025 -> 0 bytes
-rw-r--r--BSF/plugins/language_switch/icons/fr_FR.gifbin236 -> 0 bytes
-rw-r--r--BSF/plugins/language_switch/icons/hu_HU.gifbin1033 -> 0 bytes
-rw-r--r--BSF/plugins/language_switch/icons/index.php30
-rw-r--r--BSF/plugins/language_switch/icons/it_IT.gifbin959 -> 0 bytes
-rw-r--r--BSF/plugins/language_switch/icons/nl_NL.gifbin103 -> 0 bytes
-rw-r--r--BSF/plugins/language_switch/icons/pl_PL.gifbin156 -> 0 bytes
-rw-r--r--BSF/plugins/language_switch/index.php30
-rw-r--r--BSF/plugins/language_switch/language_switch.inc.php92
-rw-r--r--BSF/plugins/language_switch/main.inc.php36
-rw-r--r--BSF/popuphelp.php80
-rw-r--r--BSF/profile.php271
-rw-r--r--BSF/qsearch.php74
-rw-r--r--BSF/random.php63
-rw-r--r--BSF/register.php91
-rw-r--r--BSF/search.php226
-rw-r--r--BSF/search_rules.php243
-rw-r--r--BSF/tags.php101
-rw-r--r--BSF/template-common/csshover.htc120
-rw-r--r--BSF/template-common/default-layout.css82
-rw-r--r--BSF/template-common/favicon.icobin1150 -> 0 bytes
-rw-r--r--BSF/template-common/index.php30
-rw-r--r--BSF/template-common/inputfix.htc42
-rw-r--r--BSF/template-common/jquery.accordion.js311
-rw-r--r--BSF/template-common/jquery.accordion.min.js14
-rw-r--r--BSF/template-common/jquery.accordion.pack.js15
-rw-r--r--BSF/template-common/lib/chili-1.7.pack.js1
-rw-r--r--BSF/template-common/lib/jquery.dimensions.js116
-rw-r--r--BSF/template-common/lib/jquery.easing.js102
-rw-r--r--BSF/template-common/lib/jquery.js11
-rw-r--r--BSF/template-common/pngfix.js37
-rw-r--r--BSF/template-common/scripts.js74
-rw-r--r--BSF/template-common/tooltipfix.htc31
-rw-r--r--BSF/template-extension/index.php30
-rw-r--r--BSF/template-extension/yoga/index.php30
-rw-r--r--BSF/template-extension/yoga/local/README19
-rw-r--r--BSF/template-extension/yoga/local/index.php30
-rw-r--r--BSF/template/index.php30
-rw-r--r--BSF/template/yoga/about.tpl19
-rw-r--r--BSF/template/yoga/admin.tpl103
-rw-r--r--BSF/template/yoga/admin/advanced_feature.tpl13
-rw-r--r--BSF/template/yoga/admin/cat_list.tpl65
-rw-r--r--BSF/template/yoga/admin/cat_modify.tpl229
-rw-r--r--BSF/template/yoga/admin/cat_move.tpl38
-rw-r--r--BSF/template/yoga/admin/cat_options.tpl16
-rw-r--r--BSF/template/yoga/admin/cat_perm.tpl68
-rw-r--r--BSF/template/yoga/admin/check_integrity.tpl84
-rw-r--r--BSF/template/yoga/admin/comments.tpl33
-rw-r--r--BSF/template/yoga/admin/configuration.tpl179
-rw-r--r--BSF/template/yoga/admin/default-layout.css245
-rw-r--r--BSF/template/yoga/admin/double_select.tpl20
-rw-r--r--BSF/template/yoga/admin/element_set_global.tpl190
-rw-r--r--BSF/template/yoga/admin/element_set_unit.tpl93
-rw-r--r--BSF/template/yoga/admin/group_list.tpl46
-rw-r--r--BSF/template/yoga/admin/group_perm.tpl8
-rw-r--r--BSF/template/yoga/admin/history.tpl151
-rw-r--r--BSF/template/yoga/admin/index.php30
-rw-r--r--BSF/template/yoga/admin/intro.tpl46
-rw-r--r--BSF/template/yoga/admin/maintenance.tpl25
-rw-r--r--BSF/template/yoga/admin/notification_by_mail.tpl124
-rw-r--r--BSF/template/yoga/admin/permalinks.tpl70
-rw-r--r--BSF/template/yoga/admin/picture_modify.tpl190
-rw-r--r--BSF/template/yoga/admin/plugins_list.tpl51
-rw-r--r--BSF/template/yoga/admin/plugins_new.tpl37
-rw-r--r--BSF/template/yoga/admin/plugins_update.tpl71
-rw-r--r--BSF/template/yoga/admin/profile.tpl6
-rw-r--r--BSF/template/yoga/admin/rating.tpl64
-rw-r--r--BSF/template/yoga/admin/site_manager.tpl73
-rw-r--r--BSF/template/yoga/admin/site_update.tpl109
-rw-r--r--BSF/template/yoga/admin/stats.tpl38
-rw-r--r--BSF/template/yoga/admin/tabsheet.tpl8
-rw-r--r--BSF/template/yoga/admin/tags.tpl54
-rw-r--r--BSF/template/yoga/admin/thumbnail.tpl123
-rw-r--r--BSF/template/yoga/admin/upload.tpl53
-rw-r--r--BSF/template/yoga/admin/user_list.tpl312
-rw-r--r--BSF/template/yoga/admin/user_perm.tpl23
-rw-r--r--BSF/template/yoga/admin/ws_checker.tpl218
-rw-r--r--BSF/template/yoga/comments.tpl99
-rw-r--r--BSF/template/yoga/content.css241
-rw-r--r--BSF/template/yoga/default-colors.css112
-rw-r--r--BSF/template/yoga/default-layout.css270
-rw-r--r--BSF/template/yoga/fix-ie5-ie6.css23
-rw-r--r--BSF/template/yoga/fix-ie7.css22
-rw-r--r--BSF/template/yoga/fix-khtml.css20
-rw-r--r--BSF/template/yoga/footer.tpl32
-rw-r--r--BSF/template/yoga/header.tpl84
-rw-r--r--BSF/template/yoga/icon/add_tag.pngbin59 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/admin/errors.pngbin3249 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/admin/index.php30
-rw-r--r--BSF/template/yoga/icon/admin/infos.pngbin2250 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/admin/plugin_active.gifbin108 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/admin/plugin_inactive.gifbin107 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/caddie_add.pngbin1186 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/calendar.pngbin844 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/calendar_created.pngbin1230 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/category_children.pngbin1554 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/category_delete.pngbin1752 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/category_edit.pngbin1606 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/category_elements.pngbin1681 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/category_jump-to.pngbin1604 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/category_permissions.pngbin1839 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/category_representant_random.pngbin3171 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/check.pngbin367 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/dec_period.pngbin1230 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/dec_period_unactive.pngbin1042 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/del_favorite.pngbin1424 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/delete.pngbin778 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/edit_s.pngbin585 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/exit.pngbin1432 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/favorite.pngbin1457 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/first.pngbin1645 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/first_unactive.pngbin1573 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/flat.pngbin754 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/help.pngbin1994 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/home.pngbin1591 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/inc_period.pngbin1209 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/inc_period_unactive.pngbin1039 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/index.php30
-rw-r--r--BSF/template/yoga/icon/last.pngbin1642 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/last_unactive.pngbin1556 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/left.pngbin1644 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/left_unactive.pngbin1574 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/lost_password.pngbin1717 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/metadata.pngbin1520 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/mimetypes/avi.pngbin4284 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/mimetypes/index.php30
-rw-r--r--BSF/template/yoga/icon/mimetypes/mp3.pngbin3902 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/mimetypes/mpg.pngbin4271 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/mimetypes/ogg.pngbin4063 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/mimetypes/zip.pngbin3721 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/normal_mode.pngbin360 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/note.pngbin1862 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/page_end.pngbin536 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/page_top.pngbin555 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/pause.pngbin1597 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/permissions.pngbin729 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/play.pngbin1568 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/preferences.pngbin1606 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/rating-stars.gifbin251 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/recent.pngbin757 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/recent_by_child.pngbin738 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/register.pngbin1445 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/remove_s.pngbin451 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/representative.pngbin1556 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/right.pngbin1661 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/right_unactive.pngbin1556 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/save.pngbin961 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/search_rules.pngbin1509 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/start_filter.pngbin1064 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/start_repeat.pngbin1691 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/start_slideshow.pngbin1344 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/stop_filter.pngbin1083 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/stop_repeat.pngbin1683 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/stop_slideshow.pngbin1149 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/sync_metadata.pngbin1797 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/toggle_is_default_group.pngbin571 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/uncheck.pngbin213 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/up.pngbin1641 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/validate_s.pngbin315 -> 0 bytes
-rw-r--r--BSF/template/yoga/icon/virt_category.pngbin796 -> 0 bytes
-rw-r--r--BSF/template/yoga/identification.tpl71
-rw-r--r--BSF/template/yoga/index.php30
-rw-r--r--BSF/template/yoga/index.tpl119
-rw-r--r--BSF/template/yoga/install.tpl255
-rw-r--r--BSF/template/yoga/layout.css15
-rw-r--r--BSF/template/yoga/mail/index.php30
-rw-r--r--BSF/template/yoga/mail/text/html/admin/cat_group_info.tpl9
-rw-r--r--BSF/template/yoga/mail/text/html/admin/index.php30
-rw-r--r--BSF/template/yoga/mail/text/html/admin/notification_by_mail.tpl57
-rw-r--r--BSF/template/yoga/mail/text/html/footer.tpl20
-rw-r--r--BSF/template/yoga/mail/text/html/global-mail-css.tpl12
-rw-r--r--BSF/template/yoga/mail/text/html/header.tpl19
-rw-r--r--BSF/template/yoga/mail/text/html/images/footer-bg.pngbin15656 -> 0 bytes
-rw-r--r--BSF/template/yoga/mail/text/html/images/header-bg.pngbin30525 -> 0 bytes
-rw-r--r--BSF/template/yoga/mail/text/html/images/index.php30
-rw-r--r--BSF/template/yoga/mail/text/html/images/mailbody-bg.pngbin924 -> 0 bytes
-rw-r--r--BSF/template/yoga/mail/text/html/index.php30
-rw-r--r--BSF/template/yoga/mail/text/index.php30
-rw-r--r--BSF/template/yoga/mail/text/plain/admin/cat_group_info.tpl9
-rw-r--r--BSF/template/yoga/mail/text/plain/admin/index.php30
-rw-r--r--BSF/template/yoga/mail/text/plain/admin/notification_by_mail.tpl42
-rw-r--r--BSF/template/yoga/mail/text/plain/footer.tpl4
-rw-r--r--BSF/template/yoga/mail/text/plain/header.tpl4
-rw-r--r--BSF/template/yoga/mail/text/plain/index.php30
-rw-r--r--BSF/template/yoga/mainpage_categories.tpl27
-rw-r--r--BSF/template/yoga/menubar.css149
-rw-r--r--BSF/template/yoga/menubar.tpl165
-rw-r--r--BSF/template/yoga/month_calendar.tpl70
-rw-r--r--BSF/template/yoga/nbm.tpl31
-rw-r--r--BSF/template/yoga/not-ie.css24
-rw-r--r--BSF/template/yoga/notification.tpl15
-rw-r--r--BSF/template/yoga/password.tpl54
-rw-r--r--BSF/template/yoga/picture.css143
-rw-r--r--BSF/template/yoga/picture.tpl230
-rw-r--r--BSF/template/yoga/picture_content.tpl9
-rw-r--r--BSF/template/yoga/picture_nav_buttons.tpl103
-rw-r--r--BSF/template/yoga/popuphelp.tpl6
-rw-r--r--BSF/template/yoga/print.css14
-rw-r--r--BSF/template/yoga/profile.tpl22
-rw-r--r--BSF/template/yoga/profile_content.tpl109
-rw-r--r--BSF/template/yoga/rating.js90
-rw-r--r--BSF/template/yoga/redirect.tpl3
-rw-r--r--BSF/template/yoga/register.tpl69
-rw-r--r--BSF/template/yoga/search.tpl126
-rw-r--r--BSF/template/yoga/search_rules.tpl56
-rw-r--r--BSF/template/yoga/slideshow.tpl23
-rw-r--r--BSF/template/yoga/tags.tpl19
-rw-r--r--BSF/template/yoga/theme/admin/images/bottom-left-bg.pngbin22748 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/content-bg.pngbin170 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/header_bottom.pngbin190 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/index.php54
-rw-r--r--BSF/template/yoga/theme/admin/images/internal_onglet.pngbin239 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/list-hover.pngbin273 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/list-image.pngbin279 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/menubar-bg.jpgbin694 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/menubar-bg.pngbin165 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/menubar-bottom.pngbin275 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/menubar-detail.pngbin196 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/menubar-top.pngbin375 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/onglet_actif.pngbin1168 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/onglet_actif_transp.pngbin1456 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/onglet_inactif.pngbin1250 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/onglet_inactif_transp.pngbin1498 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/piwigo_logo_sombre_214x100.pngbin12154 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/pre-menubar-bg.pngbin720 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/tableh1_bg.pngbin150 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/tableh2_bg.pngbin141 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/images/top-left-bg.pngbin54307 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/admin/index.php54
-rw-r--r--BSF/template/yoga/theme/admin/mail-css.tpl19
-rw-r--r--BSF/template/yoga/theme/admin/theme.css468
-rw-r--r--BSF/template/yoga/theme/admin/themeconf.inc.php72
-rw-r--r--BSF/template/yoga/theme/clear/index.php30
-rw-r--r--BSF/template/yoga/theme/clear/mail-css.tpl13
-rw-r--r--BSF/template/yoga/theme/clear/theme.css94
-rw-r--r--BSF/template/yoga/theme/clear/themeconf.inc.php11
-rw-r--r--BSF/template/yoga/theme/dark/images/index.php30
-rw-r--r--BSF/template/yoga/theme/dark/images/tableh1_bg.pngbin271 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/dark/images/tableh2_bg.pngbin307 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/dark/index.php30
-rw-r--r--BSF/template/yoga/theme/dark/mail-css.tpl13
-rw-r--r--BSF/template/yoga/theme/dark/theme.css92
-rw-r--r--BSF/template/yoga/theme/dark/themeconf.inc.php11
-rw-r--r--BSF/template/yoga/theme/index.php30
-rw-r--r--BSF/template/yoga/theme/p0w0/images/button-bg.pngbin233 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/p0w0/images/index.php30
-rw-r--r--BSF/template/yoga/theme/p0w0/index.php30
-rw-r--r--BSF/template/yoga/theme/p0w0/mail-css.tpl12
-rw-r--r--BSF/template/yoga/theme/p0w0/theme.css269
-rw-r--r--BSF/template/yoga/theme/p0w0/themeconf.inc.php11
-rw-r--r--BSF/template/yoga/theme/wipi/images/index.php30
-rw-r--r--BSF/template/yoga/theme/wipi/images/tableh1_bg.pngbin142 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/wipi/images/tableh2_bg.pngbin141 -> 0 bytes
-rw-r--r--BSF/template/yoga/theme/wipi/index.php30
-rw-r--r--BSF/template/yoga/theme/wipi/mail-css.tpl19
-rw-r--r--BSF/template/yoga/theme/wipi/theme.css322
-rw-r--r--BSF/template/yoga/theme/wipi/themeconf.inc.php16
-rw-r--r--BSF/template/yoga/thumbnails-fix-ie5-ie6.css27
-rw-r--r--BSF/template/yoga/thumbnails.css60
-rw-r--r--BSF/template/yoga/thumbnails.tpl38
-rw-r--r--BSF/template/yoga/upgrade.tpl44
-rw-r--r--BSF/template/yoga/upload.tpl110
-rw-r--r--BSF/tools/config_local.inc.php8
-rw-r--r--BSF/tools/create_listing_file.php1696
-rw-r--r--BSF/tools/create_listing_file_local.inc.php14
-rw-r--r--BSF/tools/fill_history.pl336
-rw-r--r--BSF/tools/index.php30
-rw-r--r--BSF/tools/local-layout.css10
-rw-r--r--BSF/tools/metadata.php97
-rw-r--r--BSF/tools/prototype.js3277
-rw-r--r--BSF/tools/pwg_rel_create.sh61
-rw-r--r--BSF/tools/release_creation.readme50
-rw-r--r--BSF/tools/ws.htm402
-rw-r--r--BSF/upgrade.php316
-rw-r--r--BSF/upgrade_feed.php93
-rw-r--r--BSF/upload.php438
-rw-r--r--BSF/ws.php235
780 files changed, 0 insertions, 94595 deletions
diff --git a/BSF/about.php b/BSF/about.php
deleted file mode 100644
index c44520f45..000000000
--- a/BSF/about.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-//----------------------------------------------------------- include
-define('PHPWG_ROOT_PATH','./');
-include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_GUEST);
-
-//----------------------------------------------------- template initialization
-//
-// Start output of page
-//
-$title= l10n('about_page_title');
-$page['body_id'] = 'theAboutPage';
-include(PHPWG_ROOT_PATH.'include/page_header.php');
-
-/**
- * set in ./language/en_UK.iso-8859-1/local.lang.php (maybe to create)
- * for example for clear theme:
- $lang['Theme: clear'] = 'This is the clear theme based on yoga template. '.
- ' A standard template/theme of PhpWebgallery.';
- *
- * Don't forget php tags !!!
- *
- * Another way is to code it thru the theme itself in ./themeconf.inc.php
- */
-@include(PHPWG_ROOT_PATH.'template/'.$user['template'].
- '/theme/'.$user['theme'].'/themeconf.inc.php');
-
-$template->set_filenames(
- array(
- 'about'=>'about.tpl',
- )
- );
-if ( isset($lang['Theme: '.$user['theme']]) )
-{
- $template->assign(
- 'THEME_ABOUT',l10n('Theme: '.$user['theme'])
- );
-}
-
-$template->assign('ABOUT_MESSAGE', load_language('about.html','','',true) );
-
-$template->pparse('about');
-include(PHPWG_ROOT_PATH.'include/page_tail.php');
-?>
diff --git a/BSF/action.php b/BSF/action.php
deleted file mode 100644
index 3d16b1bd9..000000000
--- a/BSF/action.php
+++ /dev/null
@@ -1,203 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-define('PHPWG_ROOT_PATH','./');
-include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
-
-// Check Access and exit when user status is not ok
-check_status(ACCESS_GUEST);
-
-function guess_mime_type($ext)
-{
- switch ( strtolower($ext) )
- {
- case "jpe": case "jpeg":
- case "jpg": $ctype="image/jpeg"; break;
- case "png": $ctype="image/png"; break;
- case "gif": $ctype="image/gif"; break;
- case "tiff":
- case "tif": $ctype="image/tiff"; break;
- case "txt": $ctype="text/plain"; break;
- case "html":
- case "htm": $ctype="text/html"; break;
- case "xml": $ctype="text/xml"; break;
- case "pdf": $ctype="application/pdf"; break;
- case "zip": $ctype="application/zip"; break;
- case "ogg": $ctype="application/ogg"; break;
- default: $ctype="application/octet-stream";
- }
- return $ctype;
-}
-
-function do_error( $code, $str )
-{
- set_status_header( $code );
- echo $str ;
- exit();
-}
-
-
-if (!isset($_GET['id'])
- or !is_numeric($_GET['id'])
- or !isset($_GET['part'])
- or !in_array($_GET['part'], array('t','e','i','h') ) )
-{
- do_error(400, 'Invalid request - id/part');
-}
-
-$query = '
-SELECT * FROM '. IMAGES_TABLE.'
- WHERE id='.$_GET['id'].'
-;';
-
-$result = pwg_query($query);
-$element_info = mysql_fetch_assoc($result);
-if ( empty($element_info) )
-{
- do_error(404, 'Requested id not found');
-}
-
-// $filter['visible_categories'] and $filter['visible_images']
-// are not used because it's not necessary (filter <> restriction)
-$query='
-SELECT id
- FROM '.CATEGORIES_TABLE.'
- INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON category_id = id
- WHERE image_id = '.$_GET['id'].'
-'.get_sql_condition_FandF(
- array(
- 'forbidden_categories' => 'category_id',
- 'forbidden_images' => 'image_id',
- ),
- ' AND'
- ).'
- LIMIT 1
-;';
-if ( mysql_num_rows(pwg_query($query))<1 )
-{
- do_error(401, 'Access denied');
-}
-
-include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php');
-$file='';
-switch ($_GET['part'])
-{
- case 't':
- $file = get_thumbnail_path($element_info);
- break;
- case 'e':
- $file = get_element_path($element_info);
- break;
- case 'i':
- $file = get_image_path($element_info);
- break;
- case 'h':
- if ( $user['enabled_high']!='true' )
- {
- do_error(401, 'Access denied h');
- }
- $file = get_high_path($element_info);
- break;
-}
-
-if ( empty($file) )
-{
- do_error(404, 'Requested file not found');
-}
-
-if ($_GET['part'] == 'h') {
- pwg_log($_GET['id'], 'high');
-}
-else if ($_GET['part'] == 'e')
-{
- pwg_log($_GET['id'], 'other');
-}
-
-$http_headers = array();
-
-$ctype = null;
-if (!url_is_remote($file))
-{
- if ( !@is_readable($file) )
- {
- do_error(404, "Requested file not found - $file");
- }
- $http_headers[] = 'Content-Length: '.@filesize($file);
- if ( function_exists('mime_content_type') )
- {
- $ctype = mime_content_type($file);
- }
-
- $gmt_mtime = gmdate('D, d M Y H:i:s', filemtime($file)).' GMT';
- $http_headers[] = 'Last-Modified: '.$gmt_mtime;
-
- // following lines would indicate how the client should handle the cache
- /* $max_age=300;
- $http_headers[] = 'Expires: '.gmdate('D, d M Y H:i:s', time()+$max_age).' GMT';
- // HTTP/1.1 only
- $http_headers[] = 'Cache-Control: private, must-revalidate, max-age='.$max_age;*/
-
- if ( isset( $_SERVER['HTTP_IF_MODIFIED_SINCE'] ) )
- {
- set_status_header(304);
- foreach ($http_headers as $header)
- {
- header( $header );
- }
- exit();
- }
-}
-
-if (!isset($ctype))
-{ // give it a guess
- $ctype = guess_mime_type( get_extension($file) );
-}
-
-$http_headers[] = 'Content-Type: '.$ctype;
-
-if (!isset($_GET['view']))
-{
- $http_headers[] = 'Content-Disposition: attachment; filename="'
- .basename($file).'";';
- $http_headers[] = 'Content-Transfer-Encoding: binary';
-}
-else
-{
- $http_headers[] = 'Content-Disposition: inline; filename="'
- .basename($file).'";';
-}
-
-foreach ($http_headers as $header)
-{
- header( $header );
-}
-
-// Looking at the safe_mode configuration for execution time
-if (ini_get('safe_mode') == 0)
-{
- @set_time_limit(0);
-}
-
-@readfile($file);
-
-?> \ No newline at end of file
diff --git a/BSF/admin.php b/BSF/admin.php
deleted file mode 100644
index f932b53a4..000000000
--- a/BSF/admin.php
+++ /dev/null
@@ -1,172 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-//----------------------------------------------------------- include
-define('PHPWG_ROOT_PATH','./');
-define('IN_ADMIN', true);
-include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/functions_plugins.inc.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | synchronize user informations |
-// +-----------------------------------------------------------------------+
-
-sync_users();
-
-// +-----------------------------------------------------------------------+
-// | variables init |
-// +-----------------------------------------------------------------------+
-
-if (isset($_GET['page'])
- and preg_match('/^[a-z_]*$/', $_GET['page'])
- and is_file(PHPWG_ROOT_PATH.'admin/'.$_GET['page'].'.php'))
-{
- $page['page'] = $_GET['page'];
-}
-else
-{
- $page['page'] = 'intro';
-}
-
-$page['errors'] = array();
-$page['infos'] = array();
-
-$link_start = PHPWG_ROOT_PATH.'admin.php?page=';
-$conf_link = $link_start.'configuration&amp;section=';
-//----------------------------------------------------- template initialization
-$title = l10n('Piwigo Administration'); // for include/page_header.php
-$page['page_banner'] = '<h1>'.l10n('Piwigo Administration').'</h1>';
-$page['body_id'] = 'theAdminPage';
-
-$template->set_filenames(array('admin' => 'admin.tpl'));
-
-$template->assign(
- array(
- 'U_SITE_MANAGER'=> $link_start.'site_manager',
- 'U_HISTORY_STAT'=> $link_start.'stats',
- 'U_FAQ'=> $link_start.'help',
- 'U_SITES'=> $link_start.'remote_site',
- 'U_MAINTENANCE'=> $link_start.'maintenance',
- 'U_NOTIFICATION_BY_MAIL'=> $link_start.'notification_by_mail',
- 'U_ADVANCED_FEATURE'=> $link_start.'advanced_feature',
- 'U_CONFIG_GENERAL'=> $link_start.'configuration',
- 'U_CONFIG_DISPLAY'=> $conf_link.'default',
- 'U_CATEGORIES'=> $link_start.'cat_list',
- 'U_MOVE'=> $link_start.'cat_move',
- 'U_CAT_OPTIONS'=> $link_start.'cat_options',
- 'U_CAT_UPDATE'=> $link_start.'site_update&amp;site=1',
- 'U_WAITING'=> $link_start.'comments',
- 'U_RATING'=> $link_start.'rating',
- 'U_CADDIE'=> $link_start.'element_set&amp;cat=caddie',
- 'U_TAGS'=> $link_start.'tags',
- 'U_THUMBNAILS'=> $link_start.'thumbnail',
- 'U_USERS'=> $link_start.'user_list',
- 'U_GROUPS'=> $link_start.'group_list',
- 'U_PERMALINKS'=> $link_start.'permalinks',
- 'U_RETURN'=> make_index_url(),
- 'U_ADMIN'=> PHPWG_ROOT_PATH.'admin.php'
- )
- );
-if ($conf['ws_access_control']) // Do we need to display ws_checker
-{
- $template->assign('U_WS_CHECKER', $link_start.'ws_checker' );
-}
-
-//---------------------------------------------------------------- plugin menus
-$plugin_menu_links = trigger_event('get_admin_plugin_menu_links', array() );
-
-function UC_name_compare($a, $b)
-{
- return strcmp(strtolower($a['NAME']), strtolower($b['NAME']));
-}
-usort($plugin_menu_links, 'UC_name_compare');
-
-array_unshift($plugin_menu_links,
- array(
- 'NAME' => l10n('admin'),
- 'URL' => $link_start.'plugins_list'
- )
- );
-
-$template->assign('plugin_menu_items', $plugin_menu_links);
-
-include(PHPWG_ROOT_PATH.'admin/'.$page['page'].'.php');
-
-//------------------------------------------------------------- content display
-
-// +-----------------------------------------------------------------------+
-// | errors & infos |
-// +-----------------------------------------------------------------------+
-
-if (count($page['errors']) != 0)
-{
- $template->assign('errors', $page['errors']);
-}
-
-if (count($page['infos']) != 0)
-{
- $template->assign('infos', $page['infos']);
-}
-
-// Add the Piwigo Official menu
- $template->assign( 'pwgmenu', pwg_URL() );
-
-include(PHPWG_ROOT_PATH.'include/page_header.php');
-$template->pparse('admin');
-
-// +-----------------------------------------------------------------------+
-// | order permission refreshment |
-// +-----------------------------------------------------------------------+
-// Only for pages witch change permissions
-if (
- in_array($page['page'],
- array(
- 'site_manager', // delete site
- 'site_update', // ?only POST
- 'cat_list', // delete cat
- 'cat_modify', // delete cat; public/private; lock/unlock
- 'cat_move', // ?only POST
- 'cat_options', // ?only POST; public/private; lock/unlock
- 'cat_perm', // ?only POST
- 'element_set', // ?only POST; associate/dissociate
- 'picture_modify', // ?only POST; associate/dissociate
- 'user_list', // ?only POST; group assoc
- 'user_perm',
- 'group_perm',
- 'group_list', // delete group
- )
- )
- )
-{
- invalidate_user_cache();
-}
-
-include(PHPWG_ROOT_PATH.'include/page_tail.php');
-?>
diff --git a/BSF/admin/advanced_feature.php b/BSF/admin/advanced_feature.php
deleted file mode 100644
index da3452e84..000000000
--- a/BSF/admin/advanced_feature.php
+++ /dev/null
@@ -1,107 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die ("Hacking attempt!");
-}
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | Actions |
-// +-----------------------------------------------------------------------+
-
-/*$action = (isset($_GET['action']) and !is_adviser()) ? $_GET['action'] : '';
-
-switch ($action)
-{
- case '???' :
- {
- break;
- }
- default :
- {
- break;
- }
-}*/
-
-// +-----------------------------------------------------------------------+
-// | Define advanced features |
-// +-----------------------------------------------------------------------+
-
-$advanced_features = array();
-
-// Add advanced features
-/*array_push($advanced_features,
- array
- (
- 'CAPTION' => l10n('???'),
- 'URL' => $start_url.'???'
- ));*/
-
-array_push($advanced_features,
- array
- (
- 'CAPTION' => l10n('Elements_not_linked'),
- 'URL' => get_root_url().'admin.php?page=element_set&amp;cat=not_linked'
- ));
-
-array_push($advanced_features,
- array
- (
- 'CAPTION' => l10n('Duplicates'),
- 'URL' => get_root_url().'admin.php?page=element_set&amp;cat=duplicates'
- ));
-
-//$advanced_features is array of array composed of CAPTION & URL
-$advanced_features =
- trigger_event('get_admin_advanced_features_links', $advanced_features);
-
-// +-----------------------------------------------------------------------+
-// | Template init |
-// +-----------------------------------------------------------------------+
-
-$template->set_filename('advanced_feature', 'admin/advanced_feature.tpl');
-
-$start_url = get_root_url().'admin.php?page=advanced_feature&amp;action=';
-
-$template->assign(
- array
- (
- 'U_HELP' => get_root_url().'popuphelp.php?page=advanced_feature'
- ));
-
-// advanced_features
-$template->assign('advanced_features', $advanced_features);
-
-// +-----------------------------------------------------------------------+
-// | Sending html code |
-// +-----------------------------------------------------------------------+
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'advanced_feature');
-
-?>
diff --git a/BSF/admin/cat_list.php b/BSF/admin/cat_list.php
deleted file mode 100644
index b8407c2f8..000000000
--- a/BSF/admin/cat_list.php
+++ /dev/null
@@ -1,253 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | functions |
-// +-----------------------------------------------------------------------+
-
-/**
- * save the rank depending on given categories order
- *
- * The list of ordered categories id is supposed to be in the same parent
- * category
- *
- * @param array categories
- * @return void
- */
-function save_categories_order($categories)
-{
- $current_rank = 0;
- $datas = array();
- foreach ($categories as $id)
- {
- array_push($datas, array('id' => $id, 'rank' => ++$current_rank));
- }
- $fields = array('primary' => array('id'), 'update' => array('rank'));
- mass_updates(CATEGORIES_TABLE, $fields, $datas);
-
- update_global_rank();
-}
-
-// +-----------------------------------------------------------------------+
-// | initialization |
-// +-----------------------------------------------------------------------+
-
-$categories = array();
-
-$base_url = get_root_url().'admin.php?page=cat_list';
-$navigation = '<a href="'.$base_url.'">';
-$navigation.= l10n('home');
-$navigation.= '</a>';
-
-// +-----------------------------------------------------------------------+
-// | virtual categories management |
-// +-----------------------------------------------------------------------+
-// request to delete a virtual category / not for an adviser
-if (isset($_GET['delete']) and is_numeric($_GET['delete']) and !is_adviser())
-{
- delete_categories(array($_GET['delete']));
- array_push($page['infos'], l10n('cat_virtual_deleted'));
- update_global_rank();
-}
-// request to add a virtual category
-else if (isset($_POST['submitAdd']))
-{
- $output_create = create_virtual_category(
- $_POST['virtual_name'],
- @$_GET['parent_id']
- );
-
- if (isset($output_create['error']))
- {
- array_push($page['errors'], $output_create['error']);
- }
- else
- {
- array_push($page['infos'], $output_create['info']);
- }
-}
-// save manual category ordering
-else if (isset($_POST['submitOrder']))
-{
- asort($_POST['catOrd'], SORT_NUMERIC);
- save_categories_order(array_keys($_POST['catOrd']));
-
- array_push(
- $page['infos'],
- l10n('Categories manual order was saved')
- );
-}
-// sort categories alpha-numerically
-else if (isset($_POST['submitOrderAlphaNum']))
-{
- $query = '
-SELECT id, name
- FROM '.CATEGORIES_TABLE.'
- WHERE id_uppercat '.
- (!isset($_GET['parent_id']) ? 'IS NULL' : '= '.$_GET['parent_id']).'
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_assoc($result))
- {
- $categories[ $row['id'] ] = strtolower($row['name']);
- }
-
- asort($categories, SORT_REGULAR);
- save_categories_order(array_keys($categories));
-
- array_push(
- $page['infos'],
- l10n('Categories ordered alphanumerically')
- );
-}
-
-// +-----------------------------------------------------------------------+
-// | Navigation path |
-// +-----------------------------------------------------------------------+
-
-if (isset($_GET['parent_id']))
-{
- $navigation.= $conf['level_separator'];
-
- $navigation.= get_cat_display_name_from_id(
- $_GET['parent_id'],
- $base_url.'&amp;parent_id=',
- false
- );
-}
-// +-----------------------------------------------------------------------+
-// | template initialization |
-// +-----------------------------------------------------------------------+
-$template->set_filename('categories', 'admin/cat_list.tpl');
-
-$form_action = PHPWG_ROOT_PATH.'admin.php?page=cat_list';
-if (isset($_GET['parent_id']))
-{
- $form_action.= '&amp;parent_id='.$_GET['parent_id'];
-}
-
-$template->assign(array(
- 'CATEGORIES_NAV'=>$navigation,
- 'F_ACTION'=>$form_action,
- ));
-
-// +-----------------------------------------------------------------------+
-// | Categories display |
-// +-----------------------------------------------------------------------+
-
-$categories = array();
-
-$query = '
-SELECT id, name, permalink, dir, rank, status
- FROM '.CATEGORIES_TABLE;
-if (!isset($_GET['parent_id']))
-{
- $query.= '
- WHERE id_uppercat IS NULL';
-}
-else
-{
- $query.= '
- WHERE id_uppercat = '.$_GET['parent_id'];
-}
-$query.= '
- ORDER BY rank ASC
-;';
-$categories = hash_from_query($query, 'id');
-
-// get the categories containing images directly
-$categories_with_images = array();
-if ( count($categories) )
-{
- $query = '
-SELECT DISTINCT category_id
- FROM '.IMAGE_CATEGORY_TABLE.'
- WHERE category_id IN ('.implode(',', array_keys($categories)).')';
- $categories_with_images = array_flip( array_from_query($query, 'category_id') );
-}
-
-$template->assign('categories', array());
-$base_url = get_root_url().'admin.php?page=';
-foreach ($categories as $category)
-{
- $cat_list_url = $base_url.'cat_list';
-
- $self_url = $cat_list_url;
- if (isset($_GET['parent_id']))
- {
- $self_url.= '&amp;parent_id='.$_GET['parent_id'];
- }
-
- $tpl_cat =
- array(
- 'NAME' => $category['name'],
- 'ID' => $category['id'],
- 'RANK' => $category['rank']*10,
-
- 'U_JUMPTO' => make_index_url(
- array(
- 'category' => $category
- )
- ),
-
- 'U_CHILDREN' => $cat_list_url.'&amp;parent_id='.$category['id'],
- 'U_EDIT' => $base_url.'cat_modify&amp;cat_id='.$category['id'],
-
- 'IS_VIRTUAL' => empty($category['dir'])
- );
-
- if (empty($category['dir']))
- {
- $tpl_cat['U_DELETE'] = $self_url.'&amp;delete='.$category['id'];
- }
-
- if ( array_key_exists($category['id'], $categories_with_images) )
- {
- $tpl_cat['U_MANAGE_ELEMENTS']=
- $base_url.'element_set&amp;cat='.$category['id'];
- }
-
- if ('private' == $category['status'])
- {
- $tpl_cat['U_MANAGE_PERMISSIONS']=
- $base_url.'cat_perm&amp;cat='.$category['id'];
- }
- $template->append('categories', $tpl_cat);
-}
-// +-----------------------------------------------------------------------+
-// | sending html code |
-// +-----------------------------------------------------------------------+
-$template->assign_var_from_handle('ADMIN_CONTENT', 'categories');
-?>
diff --git a/BSF/admin/cat_modify.php b/BSF/admin/cat_modify.php
deleted file mode 100644
index 90310527f..000000000
--- a/BSF/admin/cat_modify.php
+++ /dev/null
@@ -1,553 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-//---------------------------------------------------------------- verification
-if ( !isset( $_GET['cat_id'] ) || !is_numeric( $_GET['cat_id'] ) )
-{
- $_GET['cat_id'] = '-1';
-}
-
-//--------------------------------------------------------- form criteria check
-if (isset($_POST['submit']))
-{
- $data =
- array(
- 'id' => $_GET['cat_id'],
- 'name' => @$_POST['name'],
- 'commentable' => $_POST['commentable'],
- 'uploadable' =>
- isset($_POST['uploadable']) ? $_POST['uploadable'] : 'false',
- 'comment' =>
- $conf['allow_html_descriptions'] ?
- @$_POST['comment'] : strip_tags(@$_POST['comment'])
- );
-
- mass_updates(
- CATEGORIES_TABLE,
- array(
- 'primary' => array('id'),
- 'update' => array_diff(array_keys($data), array('id'))
- ),
- array($data)
- );
-
- set_cat_visible(array($_GET['cat_id']), $_POST['visible']);
- set_cat_status(array($_GET['cat_id']), $_POST['status']);
-
- if (isset($_POST['parent']))
- {
- move_categories(
- array($_GET['cat_id']),
- $_POST['parent']
- );
- }
-
- $image_order = '';
- if ( !isset($_POST['image_order_default']) )
- {
- for ($i=1; $i<=3; $i++)
- {
- if ( !empty($_POST['order_field_'.$i]) )
- {
- if (! empty($image_order) )
- {
- $image_order .= ',';
- }
- $image_order .= $_POST['order_field_'.$i];
- if ($_POST['order_direction_'.$i]=='DESC')
- {
- $image_order .= ' DESC';
- }
- }
- }
- }
- $image_order = empty($image_order) ? 'null' : "'$image_order'";
- $query = '
-UPDATE '.CATEGORIES_TABLE.' SET image_order='.$image_order.'
-WHERE ';
- if (isset($_POST['image_order_subcats']))
- {
- $query .= 'uppercats REGEXP \'(^|,)'.$_GET['cat_id'].'(,|$)\'';
- }
- else
- {
- $query .= 'id='.$_GET['cat_id'].';';
- }
- pwg_query($query);
-
- array_push($page['infos'], l10n('editcat_confirm'));
-}
-else if (isset($_POST['set_random_representant']))
-{
- set_random_representant(array($_GET['cat_id']));
-}
-else if (isset($_POST['delete_representant']))
-{
- $query = '
-UPDATE '.CATEGORIES_TABLE.'
- SET representative_picture_id = NULL
- WHERE id = '.$_GET['cat_id'].'
-;';
- pwg_query($query);
-}
-else if (isset($_POST['submitAdd']))
-{
- $output_create = create_virtual_category(
- $_POST['virtual_name'],
- (0 == $_POST['parent'] ? null : $_POST['parent'])
- );
-
- if (isset($output_create['error']))
- {
- array_push($page['errors'], $output_create['error']);
- }
- else
- {
- // Virtual category creation succeeded
- //
- // Add the information in the information list
- array_push($page['infos'], $output_create['info']);
-
- // Link the new category to the current category
- associate_categories_to_categories(
- array($_GET['cat_id']),
- array($output_create['id'])
- );
-
- // information
- array_push(
- $page['infos'],
- sprintf(
- l10n('Category elements associated to the following categories: %s'),
- '<ul><li>'
- .get_cat_display_name_from_id($output_create['id'])
- .'</li></ul>'
- )
- );
- }
-}
-else if (isset($_POST['submitDestinations'])
- and isset($_POST['destinations'])
- and count($_POST['destinations']) > 0)
-{
- associate_categories_to_categories(
- array($_GET['cat_id']),
- $_POST['destinations']
- );
-
- $category_names = array();
- foreach ($_POST['destinations'] as $category_id)
- {
- array_push(
- $category_names,
- get_cat_display_name_from_id($category_id)
- );
- }
-
- array_push(
- $page['infos'],
- sprintf(
- l10n('Category elements associated to the following categories: %s'),
- '<ul><li>'.implode('</li><li>', $category_names).'</li></ul>'
- )
- );
-}
-
-$query = '
-SELECT *
- FROM '.CATEGORIES_TABLE.'
- WHERE id = '.$_GET['cat_id'].'
-;';
-$category = mysql_fetch_array( pwg_query( $query ) );
-// nullable fields
-foreach (array('comment','dir','site_id', 'id_uppercat') as $nullable)
-{
- if (!isset($category[$nullable]))
- {
- $category[$nullable] = '';
- }
-}
-
-$category['is_virtual'] = empty($category['dir']) ? true : false;
-
-$query = 'SELECT DISTINCT category_id
- FROM '.IMAGE_CATEGORY_TABLE.'
- WHERE category_id = '.$_GET['cat_id'].'
- LIMIT 1';
-$result = pwg_query($query);
-$category['has_images'] = mysql_num_rows($result)>0 ? true : false;
-
-// Navigation path
-$navigation = get_cat_display_name_cache(
- $category['uppercats'],
- get_root_url().'admin.php?page=cat_modify&amp;cat_id='
- );
-
-$form_action = get_root_url().'admin.php?page=cat_modify&amp;cat_id='.$_GET['cat_id'];
-
-//----------------------------------------------------- template initialization
-$template->set_filename( 'categories', 'admin/cat_modify.tpl');
-
-$base_url = get_root_url().'admin.php?page=';
-$cat_list_url = $base_url.'cat_list';
-
-$self_url = $cat_list_url;
-if (!empty($category['id_uppercat']))
-{
- $self_url.= '&amp;parent_id='.$category['id_uppercat'];
-}
-
-$template->assign(
- array(
- 'CATEGORIES_NAV' => $navigation,
- 'CAT_NAME' => @htmlspecialchars($category['name']),
- 'CAT_COMMENT' => @htmlspecialchars($category['comment']),
-
- 'status_values' => array('public','private'),
-
- 'CAT_STATUS' => $category['status'],
- 'CAT_VISIBLE' => $category['visible'],
- 'CAT_COMMENTABLE' => $category['commentable'],
- 'CAT_UPLOADABLE' => $category['uploadable'],
-
- 'IMG_ORDER_DEFAULT' => empty($category['image_order']) ?
- 'checked="checked"' : '',
-
- 'U_JUMPTO' => make_index_url(
- array(
- 'category' => $category
- )
- ),
-
- 'MAIL_CONTENT' => empty($_POST['mail_content'])
- ? '' : stripslashes($_POST['mail_content']),
- 'U_CHILDREN' => $cat_list_url.'&amp;parent_id='.$category['id'],
- 'U_HELP' => get_root_url().'popuphelp.php?page=cat_modify',
-
- 'F_ACTION' => $form_action,
- )
- );
-
-
-if ('private' == $category['status'])
-{
- $template->assign( 'U_MANAGE_PERMISSIONS',
- $base_url.'cat_perm&amp;cat='.$category['id']
- );
-}
-
-// manage category elements link
-if ($category['has_images'])
-{
- $template->assign( 'U_MANAGE_ELEMENTS',
- $base_url.'element_set&amp;cat='.$category['id']
- );
-}
-
-if ($category['is_virtual'])
-{
- $template->assign(
- array(
- 'U_DELETE' => $self_url.'&amp;delete='.$category['id'],
- )
- );
-}
-else
-{
- $category['cat_full_dir'] = get_complete_dir($_GET['cat_id']);
- $template->assign(
- array(
- 'CAT_FULL_DIR' => preg_replace('/\/$/',
- '',
- $category['cat_full_dir'] )
- )
- );
- if (!url_is_remote($category['cat_full_dir']) )
- {
- $template->assign('SHOW_UPLOADABLE', true);
- }
-}
-
-// image order management
-
-$sort_fields = array(
- '' => '',
- 'date_creation' => l10n('Creation date'),
- 'date_available' => l10n('Post date'),
- 'average_rate' => l10n('Average rate'),
- 'hit' => l10n('most_visited_cat'),
- 'file' => l10n('File name'),
- 'id' => 'Id',
- );
-
-$sort_directions = array(
- 'ASC' => l10n('ascending'),
- 'DESC' => l10n('descending'),
- );
-
-$template->assign( 'image_order_field_options', $sort_fields);
-$template->assign( 'image_order_direction_options', $sort_directions);
-
-$matches = array();
-if ( !empty( $category['image_order'] ) )
-{
- preg_match_all('/([a-z_]+) *(?:(asc|desc)(?:ending)?)? *(?:, *|$)/i',
- $category['image_order'], $matches);
-}
-
-for ($i=0; $i<3; $i++) // 3 fields
-{
- $tpl_image_order_select = array(
- 'ID' => $i+1,
- 'FIELD' => array(''),
- 'DIRECTION' => array('ASC'),
- );
-
- if ( isset($matches[1][$i]) )
- {
- $tpl_image_order_select['FIELD'] = array($matches[1][$i]);
- }
-
- if (isset($matches[2][$i]) and strcasecmp($matches[2][$i],'DESC')==0)
- {
- $tpl_image_order_select['DIRECTION'] = array('DESC');
- }
- $template->append( 'image_orders', $tpl_image_order_select);
-}
-
-
-// representant management
-if ($category['has_images']
- or !empty($category['representative_picture_id']))
-{
- $tpl_representant = array();
-
- // picture to display : the identified representant or the generic random
- // representant ?
- if (!empty($category['representative_picture_id']))
- {
- $query = '
-SELECT id,tn_ext,path
- FROM '.IMAGES_TABLE.'
- WHERE id = '.$category['representative_picture_id'].'
-;';
- $row = mysql_fetch_array(pwg_query($query));
- $src = get_thumbnail_url($row);
- $url = get_root_url().'admin.php?page=picture_modify';
- $url.= '&amp;image_id='.$category['representative_picture_id'];
-
- $tpl_representant['picture'] =
- array(
- 'SRC' => $src,
- 'URL' => $url
- );
- }
-
- // can the admin choose to set a new random representant ?
- $tpl_representant['ALLOW_SET_RANDOM'] = ($category['has_images']) ? true : false;
-
- // can the admin delete the current representant ?
- if (
- ($category['has_images']
- and $conf['allow_random_representative'])
- or
- (!$category['has_images']
- and !empty($category['representative_picture_id'])))
- {
- $tpl_representant['ALLOW_DELETE'] = true;
- }
- $template->assign('representant', $tpl_representant);
-}
-
-if ($category['is_virtual'])
-{
- // the category can be moved in any category but in itself, in any
- // sub-category
- $unmovables = get_subcat_ids(array($category['id']));
-
- $query = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE id NOT IN ('.implode(',', $unmovables).')
-;';
-
- display_select_cat_wrapper(
- $query,
- empty($category['id_uppercat']) ? array() : array($category['id_uppercat']),
- 'move_cat_options'
- );
-}
-
-
-// create virtual in parent and link
-$query = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
-;';
-display_select_cat_wrapper(
- $query,
- array(),
- 'create_new_parent_options'
- );
-
-
-// destination categories
-$query = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE id != '.$category['id'].'
-;';
-display_select_cat_wrapper(
- $query,
- array(),
- 'category_destination_options'
- );
-
-// info by email to an access granted group of category informations
-if (isset($_POST['submitEmail']) and !empty($_POST['group']))
-{
- set_make_full_url();
-
- /* TODO: if $category['representative_picture_id']
- is empty find child representative_picture_id */
- if (!empty($category['representative_picture_id']))
- {
- $query = '
-SELECT id, file, path, tn_ext
- FROM '.IMAGES_TABLE.'
- WHERE id = '.$category['representative_picture_id'].'
-;';
-
- $result = pwg_query($query);
- if (mysql_num_rows($result) > 0)
- {
- $element = mysql_fetch_assoc($result);
-
- $img_url = '<a href="'.
- make_picture_url(array(
- 'image_id' => $element['id'],
- 'image_file' => $element['file'],
- 'category' => $category
- ))
- .'"><img src="'.get_thumbnail_url($element).'"/></a>';
- }
- }
-
- if (!isset($img_url))
- {
- $img_url = '';
- }
-
- // TODO Mettre un array pour traduction subjet
- pwg_mail_group(
- $_POST['group'],
- get_str_email_format(true), /* TODO add a checkbox in order to choose format*/
- get_l10n_args('[%s] Come to visit the category %s',
- array($conf['gallery_title'], $category['name'])),
- 'admin',
- 'cat_group_info',
- array
- (
- 'IMG_URL' => $img_url,
- 'CAT_NAME' => $category['name'],
- 'LINK' => make_index_url(
- array(
- 'category' => array(
- 'id' => $category['id'],
- 'name' => $category['name'],
- 'permalink' => $category['permalink']
- ))),
- 'CPL_CONTENT' => empty($_POST['mail_content'])
- ? '' : stripslashes($_POST['mail_content'])
- ),
- '' /* TODO Add listbox in order to choose Language selected */);
-
- unset_make_full_url();
-
- $query = '
-SELECT
- name
- FROM '.GROUPS_TABLE.'
- WHERE id = '.$_POST['group'].'
-;';
- list($group_name) = mysql_fetch_row(pwg_query($query));
-
- array_push(
- $page['infos'],
- sprintf(
- l10n('An information email was sent to group "%s"'),
- $group_name
- )
- );
-}
-
-if ('private' == $category['status'])
-{
- $query = '
-SELECT
- group_id
- FROM '.GROUP_ACCESS_TABLE.'
- WHERE cat_id = '.$category['id'].'
-;';
-}
-else
-{
- $query = '
-SELECT
- id AS group_id
- FROM '.GROUPS_TABLE.'
-;';
-}
-$group_ids = array_from_query($query, 'group_id');
-
-if (count($group_ids) > 0)
-{
- $query = '
-SELECT
- id,
- name
- FROM '.GROUPS_TABLE.'
- WHERE id IN ('.implode(',', $group_ids).')
- ORDER BY name ASC
-;';
- $template->assign('group_mail_options',
- simple_hash_from_query($query, 'id', 'name')
- );
-}
-
-//----------------------------------------------------------- sending html code
-$template->assign_var_from_handle('ADMIN_CONTENT', 'categories');
-?>
diff --git a/BSF/admin/cat_move.php b/BSF/admin/cat_move.php
deleted file mode 100644
index 412b1412f..000000000
--- a/BSF/admin/cat_move.php
+++ /dev/null
@@ -1,104 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | functions |
-// +-----------------------------------------------------------------------+
-
-
-// +-----------------------------------------------------------------------+
-// | categories movement |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST['submit']))
-{
- if (count($_POST['selection']) > 0)
- {
- // TODO: tests
- move_categories($_POST['selection'], $_POST['parent']);
- }
- else
- {
- array_push(
- $page['errors'],
- l10n('Select at least one category')
- );
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | template initialization |
-// +-----------------------------------------------------------------------+
-$template->set_filename('cat_move', 'admin/cat_move.tpl');
-
-$template->assign(
- array(
- 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=cat_move',
- 'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=cat_move',
- )
- );
-
-// +-----------------------------------------------------------------------+
-// | Categories display |
-// +-----------------------------------------------------------------------+
-
-$query = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE dir IS NULL
-;';
-display_select_cat_wrapper(
- $query,
- array(),
- 'category_to_move_options'
- );
-
-$query = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
-;';
-
-display_select_cat_wrapper(
- $query,
- array(),
- 'category_parent_options'
- );
-
-// +-----------------------------------------------------------------------+
-// | sending html code |
-// +-----------------------------------------------------------------------+
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'cat_move');
-?>
diff --git a/BSF/admin/cat_options.php b/BSF/admin/cat_options.php
deleted file mode 100644
index 810534f0b..000000000
--- a/BSF/admin/cat_options.php
+++ /dev/null
@@ -1,312 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die ("Hacking attempt!");
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | modification registration |
-// +-----------------------------------------------------------------------+
-
-// print '<pre>';
-// print_r($_POST);
-// print '</pre>';
-if (isset($_POST['falsify'])
- and isset($_POST['cat_true'])
- and count($_POST['cat_true']) > 0)
-{
- switch ($_GET['section'])
- {
- case 'upload' :
- {
- $query = '
-UPDATE '.CATEGORIES_TABLE.'
- SET uploadable = \'false\'
- WHERE id IN ('.implode(',', $_POST['cat_true']).')
-;';
- pwg_query($query);
- break;
- }
- case 'comments' :
- {
- $query = '
-UPDATE '.CATEGORIES_TABLE.'
- SET commentable = \'false\'
- WHERE id IN ('.implode(',', $_POST['cat_true']).')
-;';
- pwg_query($query);
- break;
- }
- case 'visible' :
- {
- set_cat_visible($_POST['cat_true'], 'false');
- break;
- }
- case 'status' :
- {
- set_cat_status($_POST['cat_true'], 'private');
- break;
- }
- case 'representative' :
- {
- $query = '
-UPDATE '.CATEGORIES_TABLE.'
- SET representative_picture_id = NULL
- WHERE id IN ('.implode(',', $_POST['cat_true']).')
-;';
- pwg_query($query);
- break;
- }
- }
-}
-else if (isset($_POST['trueify'])
- and isset($_POST['cat_false'])
- and count($_POST['cat_false']) > 0)
-{
- switch ($_GET['section'])
- {
- case 'upload' :
- {
- $query = '
-UPDATE '.CATEGORIES_TABLE.'
- SET uploadable = \'true\'
- WHERE id IN ('.implode(',', $_POST['cat_false']).')
-;';
- pwg_query($query);
- break;
- }
- case 'comments' :
- {
- $query = '
-UPDATE '.CATEGORIES_TABLE.'
- SET commentable = \'true\'
- WHERE id IN ('.implode(',', $_POST['cat_false']).')
-;';
- pwg_query($query);
- break;
- }
- case 'visible' :
- {
- set_cat_visible($_POST['cat_false'], 'true');
- break;
- }
- case 'status' :
- {
- set_cat_status($_POST['cat_false'], 'public');
- break;
- }
- case 'representative' :
- {
- // theoretically, all categories in $_POST['cat_false'] contain at
- // least one element, so Piwigo can find a representant.
- set_random_representant($_POST['cat_false']);
- break;
- }
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | template init |
-// +-----------------------------------------------------------------------+
-
-$template->set_filenames(
- array(
- 'cat_options' => 'admin/cat_options.tpl',
- 'double_select' => 'admin/double_select.tpl'
- )
- );
-
-$page['section'] = isset($_GET['section']) ? $_GET['section'] : 'status';
-$base_url = PHPWG_ROOT_PATH.'admin.php?page=cat_options&amp;section=';
-
-$template->assign(
- array(
- 'U_HELP' => PHPWG_ROOT_PATH.'/popuphelp.php?page=cat_options',
- 'F_ACTION'=>$base_url.$page['section']
- )
- );
-
-// TabSheet
-$tabsheet = new tabsheet();
-// TabSheet initialization
-$opt_link = $link_start.'cat_options&amp;section=';
-$tabsheet->add('status', l10n('cat_security'), $opt_link.'status');
-$tabsheet->add('visible', l10n('lock'), $opt_link.'visible');
-$tabsheet->add('upload', l10n('upload'), $opt_link.'upload');
-$tabsheet->add('comments', l10n('comments'), $opt_link.'comments');
-if ($conf['allow_random_representative'])
-{
- $tabsheet->add('representative', l10n('Representative'), $opt_link.'representative');
-}
-// TabSheet selection
-$tabsheet->select($page['section']);
-// Assign tabsheet to template
-$tabsheet->assign();
-
-// +-----------------------------------------------------------------------+
-// | form display |
-// +-----------------------------------------------------------------------+
-
-// for each section, categories in the multiselect field can be :
-//
-// - true : uploadable for upload section
-// - false : un-uploadable for upload section
-// - NA : (not applicable) for virtual categories
-//
-// for true and false status, we associates an array of category ids,
-// function display_select_categories will use the given CSS class for each
-// option
-$cats_true = array();
-$cats_false = array();
-switch ($page['section'])
-{
- case 'upload' :
- {
- $query_true = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE uploadable = \'true\'
- AND dir IS NOT NULL
- AND site_id = 1
-;';
- $query_false = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE uploadable = \'false\'
- AND dir IS NOT NULL
- AND site_id = 1
-;';
- $template->assign(
- array(
- 'L_SECTION' => l10n('cat_upload_title'),
- 'L_CAT_OPTIONS_TRUE' => l10n('authorized'),
- 'L_CAT_OPTIONS_FALSE' => l10n('forbidden'),
- )
- );
- break;
- }
- case 'comments' :
- {
- $query_true = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE commentable = \'true\'
-;';
- $query_false = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE commentable = \'false\'
-;';
- $template->assign(
- array(
- 'L_SECTION' => l10n('cat_comments_title'),
- 'L_CAT_OPTIONS_TRUE' => l10n('authorized'),
- 'L_CAT_OPTIONS_FALSE' => l10n('forbidden'),
- )
- );
- break;
- }
- case 'visible' :
- {
- $query_true = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE visible = \'true\'
-;';
- $query_false = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE visible = \'false\'
-;';
- $template->assign(
- array(
- 'L_SECTION' => l10n('cat_lock_title'),
- 'L_CAT_OPTIONS_TRUE' => l10n('unlocked'),
- 'L_CAT_OPTIONS_FALSE' => l10n('locked'),
- )
- );
- break;
- }
- case 'status' :
- {
- $query_true = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE status = \'public\'
-;';
- $query_false = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE status = \'private\'
-;';
- $template->assign(
- array(
- 'L_SECTION' => l10n('cat_status_title'),
- 'L_CAT_OPTIONS_TRUE' => l10n('cat_public'),
- 'L_CAT_OPTIONS_FALSE' => l10n('cat_private'),
- )
- );
- break;
- }
- case 'representative' :
- {
- $query_true = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE representative_picture_id IS NOT NULL
-;';
- $query_false = '
-SELECT DISTINCT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id=category_id
- WHERE representative_picture_id IS NULL
-;';
- $template->assign(
- array(
- 'L_SECTION' => l10n('Representative'),
- 'L_CAT_OPTIONS_TRUE' => l10n('singly represented'),
- 'L_CAT_OPTIONS_FALSE' => l10n('randomly represented')
- )
- );
- break;
- }
-}
-display_select_cat_wrapper($query_true,array(),'category_option_true');
-display_select_cat_wrapper($query_false,array(),'category_option_false');
-
-// +-----------------------------------------------------------------------+
-// | sending html code |
-// +-----------------------------------------------------------------------+
-
-$template->assign_var_from_handle('DOUBLE_SELECT', 'double_select');
-$template->assign_var_from_handle('ADMIN_CONTENT', 'cat_options');
-?> \ No newline at end of file
diff --git a/BSF/admin/cat_perm.php b/BSF/admin/cat_perm.php
deleted file mode 100644
index 45eb15937..000000000
--- a/BSF/admin/cat_perm.php
+++ /dev/null
@@ -1,330 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die ("Hacking attempt!");
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | variable initialization |
-// +-----------------------------------------------------------------------+
-
-// if the category is not correct (not numeric, not private)
-if (isset($_GET['cat']) and is_numeric($_GET['cat']))
-{
- $query = '
-SELECT status
- FROM '.CATEGORIES_TABLE.'
- WHERE id = '.$_GET['cat'].'
-;';
- list($status) = mysql_fetch_array(pwg_query($query));
-
- if ('private' == $status)
- {
- $page['cat'] = $_GET['cat'];
- }
-}
-
-if (!isset($page['cat']))
-{
- $query = '
-SELECT id
- FROM '.CATEGORIES_TABLE.'
- WHERE status = \'private\'
- LIMIT 0,1
-;';
-
- list($page['cat']) = mysql_fetch_array(pwg_query($query));
-}
-
-// +-----------------------------------------------------------------------+
-// | form submission |
-// +-----------------------------------------------------------------------+
-
-
-if (isset($_POST['deny_groups_submit'])
- and isset($_POST['deny_groups'])
- and count($_POST['deny_groups']) > 0)
-{
- // if you forbid access to a category, all sub-categories become
- // automatically forbidden
- $query = '
-DELETE
- FROM '.GROUP_ACCESS_TABLE.'
- WHERE group_id IN ('.implode(',', $_POST['deny_groups']).')
- AND cat_id IN ('.implode(',', get_subcat_ids(array($page['cat']))).')
-;';
- pwg_query($query);
-}
-else if (isset($_POST['grant_groups_submit'])
- and isset($_POST['grant_groups'])
- and count($_POST['grant_groups']) > 0)
-{
- $query = '
-SELECT id
- FROM '.CATEGORIES_TABLE.'
- WHERE id IN ('.implode(',', get_uppercat_ids(array($page['cat']))).')
- AND status = \'private\'
-;';
- $private_uppercats = array_from_query($query, 'id');
-
- // We must not reinsert already existing lines in group_access table
- $granteds = array();
- foreach ($private_uppercats as $cat_id)
- {
- $granteds[$cat_id] = array();
- }
-
- $query = '
-SELECT group_id, cat_id
- FROM '.GROUP_ACCESS_TABLE.'
- WHERE cat_id IN ('.implode(',', $private_uppercats).')
- AND group_id IN ('.implode(',', $_POST['grant_groups']).')
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- array_push($granteds[$row['cat_id']], $row['group_id']);
- }
-
- $inserts = array();
-
- foreach ($private_uppercats as $cat_id)
- {
- $group_ids = array_diff($_POST['grant_groups'], $granteds[$cat_id]);
- foreach ($group_ids as $group_id)
- {
- array_push($inserts, array('group_id' => $group_id,
- 'cat_id' => $cat_id));
- }
- }
-
- mass_inserts(GROUP_ACCESS_TABLE, array('group_id','cat_id'), $inserts);
-}
-else if (isset($_POST['deny_users_submit'])
- and isset($_POST['deny_users'])
- and count($_POST['deny_users']) > 0)
-{
- // if you forbid access to a category, all sub-categories become
- // automatically forbidden
- $query = '
-DELETE
- FROM '.USER_ACCESS_TABLE.'
- WHERE user_id IN ('.implode(',', $_POST['deny_users']).')
- AND cat_id IN ('.implode(',', get_subcat_ids(array($page['cat']))).')
-;';
- pwg_query($query);
-}
-else if (isset($_POST['grant_users_submit'])
- and isset($_POST['grant_users'])
- and count($_POST['grant_users']) > 0)
-{
- $query = '
-SELECT id
- FROM '.CATEGORIES_TABLE.'
- WHERE id IN ('.implode(',', get_uppercat_ids(array($page['cat']))).')
- AND status = \'private\'
-;';
- $private_uppercats = array_from_query($query, 'id');
-
- // We must not reinsert already existing lines in user_access table
- $granteds = array();
- foreach ($private_uppercats as $cat_id)
- {
- $granteds[$cat_id] = array();
- }
-
- $query = '
-SELECT user_id, cat_id
- FROM '.USER_ACCESS_TABLE.'
- WHERE cat_id IN ('.implode(',', $private_uppercats).')
- AND user_id IN ('.implode(',', $_POST['grant_users']).')
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- array_push($granteds[$row['cat_id']], $row['user_id']);
- }
-
- $inserts = array();
-
- foreach ($private_uppercats as $cat_id)
- {
- $user_ids = array_diff($_POST['grant_users'], $granteds[$cat_id]);
- foreach ($user_ids as $user_id)
- {
- array_push($inserts, array('user_id' => $user_id,
- 'cat_id' => $cat_id));
- }
- }
-
- mass_inserts(USER_ACCESS_TABLE, array('user_id','cat_id'), $inserts);
-}
-
-// +-----------------------------------------------------------------------+
-// | template initialization |
-// +-----------------------------------------------------------------------+
-
-$template->set_filename('cat_perm', 'admin/cat_perm.tpl');
-
-$template->assign(
- array(
- 'CATEGORIES_NAV' =>
- get_cat_display_name_from_id(
- $page['cat'],
- 'admin.php?page=cat_modify&amp;cat_id='
- ),
- 'U_HELP' => get_root_url().'popuphelp.php?page=cat_perm',
- 'F_ACTION' => get_root_url().'admin.php?page=cat_perm&amp;cat='.$page['cat']
- )
- );
-
-// +-----------------------------------------------------------------------+
-// | form construction |
-// +-----------------------------------------------------------------------+
-
-// groups denied are the groups not granted. So we need to find all groups
-// minus groups granted to find groups denied.
-
-$groups = array();
-
-$query = '
-SELECT id, name
- FROM '.GROUPS_TABLE.'
- ORDER BY name ASC
-;';
-$groups = simple_hash_from_query($query, 'id', 'name');
-$template->assign('all_groups', $groups);
-
-// groups granted to access the category
-$query = '
-SELECT group_id
- FROM '.GROUP_ACCESS_TABLE.'
- WHERE cat_id = '.$page['cat'].'
-;';
-$group_granted_ids = array_from_query($query, 'group_id');
-$group_granted_ids = order_by_name($group_granted_ids, $groups);
-$template->assign('group_granted_ids', $group_granted_ids);
-
-
-// groups denied
-$template->assign('group_denied_ids',
- order_by_name(array_diff(array_keys($groups), $group_granted_ids), $groups)
- );
-
-// users...
-$users = array();
-
-$query = '
-SELECT '.$conf['user_fields']['id'].' AS id,
- '.$conf['user_fields']['username'].' AS username
- FROM '.USERS_TABLE.'
-;';
-$users = simple_hash_from_query($query, 'id', 'username');
-$template->assign('all_users', $users);
-
-
-$query = '
-SELECT user_id
- FROM '.USER_ACCESS_TABLE.'
- WHERE cat_id = '.$page['cat'].'
-;';
-$user_granted_direct_ids = array_from_query($query, 'user_id');
-$user_granted_direct_ids = order_by_name($user_granted_direct_ids, $users);
-$template->assign('user_granted_direct_ids', $user_granted_direct_ids);
-
-
-
-$user_granted_indirect_ids = array();
-if (count($group_granted_ids) > 0)
-{
- $granted_groups = array();
-
- $query = '
-SELECT user_id, group_id
- FROM '.USER_GROUP_TABLE.'
- WHERE group_id IN ('.implode(',', $group_granted_ids).')
-';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- if (!isset($granted_groups[$row['group_id']]))
- {
- $granted_groups[$row['group_id']] = array();
- }
- array_push($granted_groups[$row['group_id']], $row['user_id']);
- }
-
- $user_granted_by_group_ids = array();
-
- foreach ($granted_groups as $group_users)
- {
- $user_granted_by_group_ids = array_merge($user_granted_by_group_ids,
- $group_users);
- }
- $user_granted_by_group_ids = array_unique($user_granted_by_group_ids);
-
-
- $user_granted_indirect_ids = array_diff($user_granted_by_group_ids,
- $user_granted_direct_ids);
- $user_granted_indirect_ids =
- order_by_name($user_granted_indirect_ids, $users);
- foreach ($user_granted_indirect_ids as $user_id)
- {
- foreach ($granted_groups as $group_id => $group_users)
- {
- if (in_array($user_id, $group_users))
- {
- $template->append(
- 'user_granted_indirects',
- array(
- 'USER'=>$users[$user_id],
- 'GROUP'=>$groups[$group_id]
- )
- );
- break;
- }
- }
- }
-}
-
-$user_denied_ids = array_diff(array_keys($users),
- $user_granted_indirect_ids,
- $user_granted_direct_ids);
-$user_denied_ids = order_by_name($user_denied_ids, $users);
-$template->assign('user_denied_ids', $user_denied_ids);
-
-
-// +-----------------------------------------------------------------------+
-// | sending html code |
-// +-----------------------------------------------------------------------+
-$template->assign_var_from_handle('ADMIN_CONTENT', 'cat_perm');
-?>
diff --git a/BSF/admin/comments.php b/BSF/admin/comments.php
deleted file mode 100644
index 200451989..000000000
--- a/BSF/admin/comments.php
+++ /dev/null
@@ -1,179 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die ("Hacking attempt!");
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/functions_waiting.inc.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | actions |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST))
-{
- $to_validate = array();
- $to_reject = array();
-
- if (isset($_POST['submit']) and !is_adviser())
- {
- foreach (explode(',', $_POST['list']) as $comment_id)
- {
- if (isset($_POST['action-'.$comment_id]))
- {
- switch ($_POST['action-'.$comment_id])
- {
- case 'reject' :
- {
- array_push($to_reject, $comment_id);
- break;
- }
- case 'validate' :
- {
- array_push($to_validate, $comment_id);
- break;
- }
- }
- }
- }
- }
- else if (isset($_POST['validate-all']) and !empty($_POST['list']) and !is_adviser())
- {
- $to_validate = explode(',', $_POST['list']);
- }
- else if (isset($_POST['reject-all']) and !empty($_POST['list']) and !is_adviser())
- {
- $to_reject = explode(',', $_POST['list']);
- }
-
- if (count($to_validate) > 0)
- {
- $query = '
-UPDATE '.COMMENTS_TABLE.'
- SET validated = \'true\'
- , validation_date = NOW()
- WHERE id IN ('.implode(',', $to_validate).')
-;';
- pwg_query($query);
-
- array_push(
- $page['infos'],
- l10n_dec(
- '%d user comment validated', '%d user comments validated',
- count($to_validate)
- )
- );
- }
-
- if (count($to_reject) > 0)
- {
- $query = '
-DELETE
- FROM '.COMMENTS_TABLE.'
- WHERE id IN ('.implode(',', $to_reject).')
-;';
- pwg_query($query);
-
- array_push(
- $page['infos'],
- l10n_dec(
- '%d user comment rejected', '%d user comments rejected',
- count($to_reject)
- )
- );
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | template init |
-// +-----------------------------------------------------------------------+
-
-$template->set_filenames(array('comments'=>'admin/comments.tpl'));
-
-// TabSheet initialization
-waiting_tabsheet();
-
-$template->assign(
- array(
- 'F_ACTION' => get_root_url().'admin.php?page=comments'
- )
- );
-
-// +-----------------------------------------------------------------------+
-// | comments display |
-// +-----------------------------------------------------------------------+
-
-$list = array();
-
-$query = '
-SELECT c.id, c.image_id, c.date, c.author, c.content, i.path, i.tn_ext
- FROM '.COMMENTS_TABLE.' AS c
- INNER JOIN '.IMAGES_TABLE.' AS i
- ON i.id = c.image_id
- WHERE validated = \'false\'
- ORDER BY c.date DESC
-;';
-$result = pwg_query($query);
-while ($row = mysql_fetch_assoc($result))
-{
- $thumb = get_thumbnail_url(
- array(
- 'id'=>$row['image_id'],
- 'path'=>$row['path'],
- 'tn_ext'=>@$row['tn_ext']
- )
- );
- $template->append(
- 'comments',
- array(
- 'U_PICTURE' =>
- PHPWG_ROOT_PATH.'admin.php?page=picture_modify'.
- '&amp;image_id='.$row['image_id'],
- 'ID' => $row['id'],
- 'TN_SRC' => $thumb,
- 'AUTHOR' => trigger_event('render_comment_author', $row['author']),
- 'DATE' => format_date($row['date'],'mysql_datetime',true),
- 'CONTENT' => trigger_event('render_comment_content',$row['content'])
- )
- );
-
- array_push($list, $row['id']);
-}
-
-$template->assign('LIST', implode(',', $list) );
-
-// +-----------------------------------------------------------------------+
-// | sending html code |
-// +-----------------------------------------------------------------------+
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'comments');
-
-?>
diff --git a/BSF/admin/configuration.php b/BSF/admin/configuration.php
deleted file mode 100644
index 8e69d9c16..000000000
--- a/BSF/admin/configuration.php
+++ /dev/null
@@ -1,301 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if( !defined("PHPWG_ROOT_PATH") )
-{
- die ("Hacking attempt!");
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-//-------------------------------------------------------- sections definitions
-if (!isset($_GET['section']))
-{
- $page['section'] = 'main';
-}
-else
-{
- $page['section'] = $_GET['section'];
-}
-
-$main_checkboxes = array(
- 'gallery_locked',
- 'allow_user_registration',
- 'obligatory_user_mail_address',
- 'rate',
- 'rate_anonymous',
- 'email_admin_on_new_user',
- );
-
-$history_checkboxes = array(
- 'log',
- 'history_admin',
- 'history_guest'
- );
-
-$upload_checkboxes = array(
- 'upload_link_everytime',
- 'email_admin_on_picture_uploaded',
- );
-
-$comments_checkboxes = array(
- 'comments_forall',
- 'comments_validation',
- 'email_admin_on_comment',
- 'email_admin_on_comment_validation',
- );
-
-//------------------------------ verification and registration of modifications
-if (isset($_POST['submit']) and !is_adviser())
-{
- $int_pattern = '/^\d+$/';
-
- switch ($page['section'])
- {
- case 'main' :
- {
- if ( !url_is_remote($_POST['gallery_url']) )
- {
- array_push($page['errors'], l10n('conf_gallery_url_error'));
- }
- foreach( $main_checkboxes as $checkbox)
- {
- $_POST[$checkbox] = empty($_POST[$checkbox])?'false':'true';
- }
- break;
- }
- case 'history' :
- {
- foreach( $history_checkboxes as $checkbox)
- {
- $_POST[$checkbox] = empty($_POST[$checkbox])?'false':'true';
- }
- break;
- }
- case 'comments' :
- {
- // the number of comments per page must be an integer between 5 and 50
- // included
- if (!preg_match($int_pattern, $_POST['nb_comment_page'])
- or $_POST['nb_comment_page'] < 5
- or $_POST['nb_comment_page'] > 50)
- {
- array_push($page['errors'], l10n('conf_nb_comment_page_error'));
- }
- foreach( $comments_checkboxes as $checkbox)
- {
- $_POST[$checkbox] = empty($_POST[$checkbox])?'false':'true';
- }
- break;
- }
- case 'upload' :
- {
- foreach( $upload_checkboxes as $checkbox)
- {
- $_POST[$checkbox] = empty($_POST[$checkbox])?'false':'true';
- }
- break;
- }
- case 'default' :
- {
- // Never go here
- break;
- }
- }
-
- // updating configuration if no error found
- if (count($page['errors']) == 0)
- {
- //echo '<pre>'; print_r($_POST); echo '</pre>';
- $result = pwg_query('SELECT param FROM '.CONFIG_TABLE);
- while ($row = mysql_fetch_array($result))
- {
- if (isset($_POST[$row['param']]))
- {
- $value = $_POST[$row['param']];
-
- if ('gallery_title' == $row['param'])
- {
- if (!$conf['allow_html_descriptions'])
- {
- $value = strip_tags($value);
- }
- }
-
- $query = '
-UPDATE '.CONFIG_TABLE.'
-SET value = \''. str_replace("\'", "''", $value).'\'
-WHERE param = \''.$row['param'].'\'
-;';
- pwg_query($query);
- }
- }
- array_push($page['infos'], l10n('conf_confirmation'));
- }
-
- //------------------------------------------------------ $conf reinitialization
- load_conf_from_db();
-}
-
-//----------------------------------------------------- template initialization
-$template->set_filename('config', 'admin/configuration.tpl');
-
-// TabSheet
-$tabsheet = new tabsheet();
-// TabSheet initialization
-$tabsheet->add('main', l10n('conf_main_title'), $conf_link.'main');
-$tabsheet->add('history', l10n('conf_history_title'), $conf_link.'history');
-$tabsheet->add('comments', l10n('conf_comments_title'), $conf_link.'comments');
-$tabsheet->add('upload', l10n('conf_upload_title'), $conf_link.'upload');
-$tabsheet->add('default', l10n('conf_display'), $conf_link.'default');
-// TabSheet selection
-$tabsheet->select($page['section']);
-// Assign tabsheet to template
-$tabsheet->assign();
-
-$action = get_root_url().'admin.php?page=configuration';
-$action.= '&amp;section='.$page['section'];
-
-$template->assign(
- array(
- 'U_HELP' => get_root_url().'popuphelp.php?page=configuration',
- 'F_ACTION'=>$action
- ));
-
-switch ($page['section'])
-{
- case 'main' :
- {
- $template->assign(
- 'main',
- array(
- 'CONF_GALLERY_TITLE' => htmlspecialchars($conf['gallery_title']),
- 'CONF_PAGE_BANNER' => htmlspecialchars($conf['page_banner']),
- 'CONF_GALLERY_URL' => $conf['gallery_url'],
- ));
-
- foreach ($main_checkboxes as $checkbox)
- {
- $template->append(
- 'main',
- array(
- $checkbox => $conf[$checkbox]
- ),
- true
- );
- }
- break;
- }
- case 'history' :
- {
- //Necessary for merge_block_vars
- foreach ($history_checkboxes as $checkbox)
- {
- $template->append(
- 'history',
- array(
- $checkbox => $conf[$checkbox]
- ),
- true
- );
- }
- break;
- }
- case 'comments' :
- {
- $template->assign(
- 'comments',
- array(
- 'NB_COMMENTS_PAGE'=>$conf['nb_comment_page'],
- ));
-
- foreach ($comments_checkboxes as $checkbox)
- {
- $template->append(
- 'comments',
- array(
- $checkbox => $conf[$checkbox]
- ),
- true
- );
- }
- break;
- }
- case 'upload' :
- {
- $template->assign(
- 'upload',
- array(
- 'upload_user_access_options'=> get_user_access_level_html_options(ACCESS_GUEST),
- 'upload_user_access_options_selected' => array($conf['upload_user_access'])
- )
- );
- //Necessary for merge_block_vars
- foreach ($upload_checkboxes as $checkbox)
- {
- $template->append(
- 'upload',
- array(
- $checkbox => $conf[$checkbox]
- ),
- true
- );
- }
- break;
- }
- case 'default' :
- {
- $edit_user = build_user($conf['default_user_id'], false);
- include_once(PHPWG_ROOT_PATH.'profile.php');
-
- $errors = array();
- if ( !is_adviser() )
- {
- if (save_profile_from_post($edit_user, $errors))
- {
- // Reload user
- $edit_user = build_user($conf['default_user_id'], false);
- array_push($page['infos'], l10n('conf_confirmation'));
- }
- }
- $page['errors'] = array_merge($page['errors'], $errors);
-
- load_profile_in_template(
- $action,
- '',
- $edit_user
- );
- $template->assign('default', array());
- break;
- }
-}
-
-//----------------------------------------------------------- sending html code
-$template->assign_var_from_handle('ADMIN_CONTENT', 'config');
-?>
diff --git a/BSF/admin/element_set.php b/BSF/admin/element_set.php
deleted file mode 100644
index 5513a5e64..000000000
--- a/BSF/admin/element_set.php
+++ /dev/null
@@ -1,232 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * Management of elements set. Elements can belong to a category or to the
- * user caddie.
- *
- */
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | caddie management |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST['submit_caddie']))
-{
- if (isset($_POST['caddie_action']))
- {
- switch ($_POST['caddie_action'])
- {
- case 'empty_all' :
- {
- $query = '
-DELETE FROM '.CADDIE_TABLE.'
- WHERE user_id = '.$user['id'].'
-;';
- pwg_query($query);
- break;
- }
- case 'empty_selected' :
- {
- if (isset($_POST['selection']) and count($_POST['selection']) > 0)
- {
- $query = '
-DELETE
- FROM '.CADDIE_TABLE.'
- WHERE element_id IN ('.implode(',', $_POST['selection']).')
- AND user_id = '.$user['id'].'
-;';
- pwg_query($query);
- }
- else
- {
- // TODO : add error
- }
- break;
- }
- case 'add_selected' :
- {
- if (isset($_POST['selection']) and count($_POST['selection']) > 0)
- {
- fill_caddie($_POST['selection']);
- }
- else
- {
- // TODO : add error
- }
- break;
- }
- }
- }
- else
- {
- // TODO : add error
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | initialize info about category |
-// +-----------------------------------------------------------------------+
-
-// To element_set_(global|unit).php, we must provide the elements id of the
-// managed category in $page['cat_elements_id'] array.
-
-if (is_numeric($_GET['cat']))
-{
- $page['title'] =
- get_cat_display_name_from_id(
- $_GET['cat'],
- PHPWG_ROOT_PATH.'admin.php?page=cat_modify&amp;cat_id=',
- false
- );
-
- $query = '
-SELECT image_id
- FROM '.IMAGE_CATEGORY_TABLE.'
- WHERE category_id = '.$_GET['cat'].'
-;';
- $page['cat_elements_id'] = array_from_query($query, 'image_id');
-}
-else if ('caddie' == $_GET['cat'])
-{
- $page['title'] = l10n('caddie');
-
- $query = '
-SELECT element_id
- FROM '.CADDIE_TABLE.'
- WHERE user_id = '.$user['id'].'
-;';
- $page['cat_elements_id'] = array_from_query($query, 'element_id');
-}
-else if ('not_linked' == $_GET['cat'])
-{
- $page['title'] = l10n('Elements_not_linked');
-
- // we are searching elements not linked to any virtual category
- $query = '
-SELECT id
- FROM '.CATEGORIES_TABLE.'
- WHERE dir IS NULL
-;';
- $virtual_categories = array_from_query($query, 'id');
-
- if (!empty($virtual_categories))
- {
- $query = '
-SELECT DISTINCT(image_id)
- FROM '.IMAGE_CATEGORY_TABLE.'
-;';
- $all_elements = array_from_query($query, 'image_id');
-
- $query = '
-SELECT DISTINCT(image_id)
- FROM '.IMAGE_CATEGORY_TABLE.'
- WHERE category_id IN ('.implode(',', $virtual_categories).')
-;';
- $linked_to_virtual = array_from_query($query, 'image_id');
-
- $page['cat_elements_id'] = array_diff($all_elements, $linked_to_virtual);
- }
- else
- {
- $page['cat_elements_id'] = array();
- }
-}
-else if ('duplicates' == $_GET['cat'])
-{
- $page['title'] = l10n('Duplicates');
-
- // we are searching related elements twice or more to physical categories
- // 1 - Retrieve Files
- $query = '
-SELECT DISTINCT(file)
- FROM '.IMAGES_TABLE.'
- GROUP BY file
-HAVING COUNT(DISTINCT storage_category_id) > 1
-;';
-
- $duplicate_files = array_from_query($query, 'file');
- $duplicate_files[]='Nofiles';
- // 2 - Retrives related picture ids
- $query = '
-SELECT id, file
- FROM '.IMAGES_TABLE.'
-WHERE file IN (\''.implode("','", $duplicate_files).'\')
-ORDER BY file, id
-;';
-
- $page['cat_elements_id'] = array_from_query($query, 'id');
- $page['cat_elements_id'][] = 0;
-}
-// +-----------------------------------------------------------------------+
-// | first element to display |
-// +-----------------------------------------------------------------------+
-
-// $page['start'] contains the number of the first element in its
-// category. For exampe, $page['start'] = 12 means we must show elements #12
-// and $page['nb_images'] next elements
-
-if (!isset($_GET['start'])
- or !is_numeric($_GET['start'])
- or $_GET['start'] < 0
- or (isset($_GET['display']) and 'all' == $_GET['display']))
-{
- $page['start'] = 0;
-}
-else
-{
- $page['start'] = $_GET['start'];
-}
-
-// +-----------------------------------------------------------------------+
-// | open specific mode |
-// +-----------------------------------------------------------------------+
-
-$_GET['mode'] = !empty($_GET['mode']) ? $_GET['mode'] : 'global';
-
-switch ($_GET['mode'])
-{
- case 'global' :
- {
- include(PHPWG_ROOT_PATH.'admin/element_set_global.php');
- break;
- }
- case 'unit' :
- {
- include(PHPWG_ROOT_PATH.'admin/element_set_unit.php');
- break;
- }
-}
-?>
diff --git a/BSF/admin/element_set_global.php b/BSF/admin/element_set_global.php
deleted file mode 100644
index e4725a059..000000000
--- a/BSF/admin/element_set_global.php
+++ /dev/null
@@ -1,382 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * Management of elements set. Elements can belong to a category or to the
- * user caddie.
- *
- */
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | global mode form submission |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST['submit']))
-{
- $collection = array();
-
-// echo '<pre>';
-// print_r($_POST);
-// echo '</pre>';
-// exit();
-
- switch ($_POST['target'])
- {
- case 'all' :
- {
- $collection = $page['cat_elements_id'];
- break;
- }
- case 'selection' :
- {
- if (!isset($_POST['selection']) or count($_POST['selection']) == 0)
- {
- array_push($page['errors'], l10n('Select at least one picture'));
- }
- else
- {
- $collection = $_POST['selection'];
- }
- break;
- }
- }
-
- if (isset($_POST['add_tags']) and count($collection) > 0)
- {
- add_tags($_POST['add_tags'], $collection);
- }
-
- if (isset($_POST['del_tags']) and count($collection) > 0)
- {
- $query = '
-DELETE
- FROM '.IMAGE_TAG_TABLE.'
- WHERE image_id IN ('.implode(',', $collection).')
- AND tag_id IN ('.implode(',', $_POST['del_tags']).')
-;';
- pwg_query($query);
- }
-
- if ($_POST['associate'] != 0 and count($collection) > 0)
- {
- associate_images_to_categories(
- $collection,
- array($_POST['associate'])
- );
- }
-
- if ($_POST['dissociate'] != 0 and count($collection) > 0)
- {
- // physical links must not be broken, so we must first retrieve image_id
- // which create virtual links with the category to "dissociate from".
- $query = '
-SELECT id
- FROM '.IMAGE_CATEGORY_TABLE.'
- INNER JOIN '.IMAGES_TABLE.' ON image_id = id
- WHERE category_id = '.$_POST['dissociate'].'
- AND id IN ('.implode(',', $collection).')
- AND category_id != storage_category_id
-;';
- $dissociables = array_from_query($query, 'id');
-
- if (!empty($dissociables))
- {
- $query = '
-DELETE
- FROM '.IMAGE_CATEGORY_TABLE.'
- WHERE category_id = '.$_POST['dissociate'].'
- AND image_id IN ('.implode(',', $dissociables).')
-';
- pwg_query($query);
-
- $page['cat_elements_id'] = array_diff(
- $page['cat_elements_id'],
- $dissociables
- );
- }
-
- update_category($_POST['dissociate']);
- }
-
- $datas = array();
- $dbfields = array('primary' => array('id'), 'update' => array());
-
- $formfields = array('author', 'name', 'date_creation', 'level');
- foreach ($formfields as $formfield)
- {
- if ($_POST[$formfield.'_action'] != 'leave')
- {
- array_push($dbfields['update'], $formfield);
- }
- }
-
- // updating elements is useful only if needed...
- if (count($dbfields['update']) > 0 and count($collection) > 0)
- {
- $query = '
-SELECT id
- FROM '.IMAGES_TABLE.'
- WHERE id IN ('.implode(',', $collection).')
-;';
- $result = pwg_query($query);
-
- while ($row = mysql_fetch_array($result))
- {
- $data = array();
- $data['id'] = $row['id'];
-
- if ('set' == $_POST['author_action'])
- {
- $data['author'] = $_POST['author'];
- if ('' == $data['author'])
- {
- unset($data['author']);
- }
- }
-
- if ('set' == $_POST['name_action'])
- {
- $data['name'] = $_POST['name'];
- if ('' == $data['name'])
- {
- unset($data['name']);
- }
- }
-
- if ('set' == $_POST['date_creation_action'])
- {
- $data['date_creation'] =
- $_POST['date_creation_year']
- .'-'.$_POST['date_creation_month']
- .'-'.$_POST['date_creation_day']
- ;
- }
-
- if ('set' == $_POST['level_action'])
- {
- $data['level'] = $_POST['level'];
- }
-
- array_push($datas, $data);
- }
- // echo '<pre>'; print_r($datas); echo '</pre>';
- mass_updates(IMAGES_TABLE, $dbfields, $datas);
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | template init |
-// +-----------------------------------------------------------------------+
-$template->set_filenames(
- array('element_set_global' => 'admin/element_set_global.tpl'));
-
-$base_url = get_root_url().'admin.php';
-
-// $form_action = $base_url.'?page=element_set_global';
-
-$template->assign(
- array(
- 'CATEGORIES_NAV'=>$page['title'],
-
- 'U_DISPLAY'=>$base_url.get_query_string_diff(array('display')),
-
- 'U_UNIT_MODE'
- =>
- $base_url
- .get_query_string_diff(array('mode','display'))
- .'&amp;mode=unit',
-
- 'F_ACTION'=>$base_url.get_query_string_diff(array()),
- )
- );
-
-// +-----------------------------------------------------------------------+
-// | caddie options |
-// +-----------------------------------------------------------------------+
-
-$template->assign('IN_CADDIE', 'caddie' == $_GET['cat'] ? true : false );
-
-// +-----------------------------------------------------------------------+
-// | global mode form |
-// +-----------------------------------------------------------------------+
-
-// Virtualy associate a picture to a category
-$query = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
-;';
-display_select_cat_wrapper($query, array(), 'associate_options', true);
-
-// Dissociate from a category : categories listed for dissociation can
-// only represent virtual links. Links to physical categories can't be
-// broken
-if (count($page['cat_elements_id']) > 0)
-{
- $query = '
-SELECT DISTINCT(category_id) AS id, c.name, uppercats, global_rank
- FROM '.IMAGE_CATEGORY_TABLE.' AS ic,
- '.CATEGORIES_TABLE.' AS c,
- '.IMAGES_TABLE.' AS i
- WHERE ic.image_id IN ('.implode(',', $page['cat_elements_id']).')
- AND ic.category_id = c.id
- AND ic.image_id = i.id
- AND ic.category_id != i.storage_category_id
-;';
- display_select_cat_wrapper($query, array(), 'dissociate_options', true);
-}
-
-$all_tags = get_all_tags();
-
-if (count($all_tags) > 0)
-{// add tags
- $template->assign(
- array(
- 'ADD_TAG_SELECTION' => get_html_tag_selection(
- $all_tags,
- 'add_tags'
- ),
- )
- );
-}
-
-if (count($page['cat_elements_id']) > 0)
-{
- // remove tags
- $tags = get_common_tags($page['cat_elements_id'], -1);
- usort($tags, 'name_compare');
-
- $template->assign(
- array(
- 'DEL_TAG_SELECTION' => get_html_tag_selection($tags, 'del_tags'),
- )
- );
-}
-
-// creation date
-$day =
-empty($_POST['date_creation_day']) ? date('j') : $_POST['date_creation_day'];
-
-$month =
-empty($_POST['date_creation_month']) ? date('n') : $_POST['date_creation_month'];
-
-$year =
-empty($_POST['date_creation_year']) ? date('Y') : $_POST['date_creation_year'];
-
-$month_list = $lang['month'];
-$month_list[0]='------------';
-ksort($month_list);
-$template->assign( array(
- 'month_list' => $month_list,
- 'DATE_CREATION_DAY' => (int)$day,
- 'DATE_CREATION_MONTH'=> (int)$month,
- 'DATE_CREATION_YEAR' => (int)$year,
- )
- );
-
-// image level options
-$tpl_options = array();
-foreach ($conf['available_permission_levels'] as $level)
-{
- $tpl_options[$level] = l10n( sprintf('Level %d', $level) );
-}
-$template->assign(
- array(
- 'level_options'=> $tpl_options,
- )
- );
-
-// +-----------------------------------------------------------------------+
-// | global mode thumbnails |
-// +-----------------------------------------------------------------------+
-
-// how many items to display on this page
-if (!empty($_GET['display']))
-{
- if ('all' == $_GET['display'])
- {
- $page['nb_images'] = count($page['cat_elements_id']);
- }
- else
- {
- $page['nb_images'] = intval($_GET['display']);
- }
-}
-else
-{
- $page['nb_images'] = 20;
-}
-
-if (count($page['cat_elements_id']) > 0)
-{
- $nav_bar = create_navigation_bar(
- $base_url.get_query_string_diff(array('start')),
- count($page['cat_elements_id']),
- $page['start'],
- $page['nb_images']
- );
- $template->assign('NAV_BAR', $nav_bar);
-
- $query = '
-SELECT id,path,tn_ext,file,filesize,level
- FROM '.IMAGES_TABLE.'
- WHERE id IN ('.implode(',', $page['cat_elements_id']).')
- '.$conf['order_by'].'
- LIMIT '.$page['start'].', '.$page['nb_images'].'
-;';
- //echo '<pre>'.$query.'</pre>';
- $result = pwg_query($query);
-
- // template thumbnail initialization
-
- while ($row = mysql_fetch_assoc($result))
- {
- $src = get_thumbnail_url($row);
-
- $template->append(
- 'thumbnails',
- array(
- 'ID' => $row['id'],
- 'TN_SRC' => $src,
- 'FILE' => $row['file'],
- 'TITLE' => get_thumbnail_title($row),
- 'LEVEL' => $row['level']
- )
- );
- }
-}
-
-//----------------------------------------------------------- sending html code
-$template->assign_var_from_handle('ADMIN_CONTENT', 'element_set_global');
-?>
diff --git a/BSF/admin/element_set_unit.php b/BSF/admin/element_set_unit.php
deleted file mode 100644
index 28b1cd828..000000000
--- a/BSF/admin/element_set_unit.php
+++ /dev/null
@@ -1,274 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * Management of elements set. Elements can belong to a category or to the
- * user caddie.
- *
- */
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | unit mode form submission |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST['submit']))
-{
- $collection = explode(',', $_POST['element_ids']);
-
- $datas = array();
-
- $query = '
-SELECT id, date_creation
- FROM '.IMAGES_TABLE.'
- WHERE id IN ('.implode(',', $collection).')
-;';
- $result = pwg_query($query);
-
- while ($row = mysql_fetch_array($result))
- {
- $data = array();
-
- $data{'id'} = $row['id'];
- $data{'name'} = $_POST['name-'.$row['id']];
- $data{'author'} = $_POST['author-'.$row['id']];
-
- foreach (array('name', 'author') as $field)
- {
- if (!empty($_POST[$field.'-'.$row['id']]))
- {
- $data{$field} = strip_tags($_POST[$field.'-'.$row['id']]);
- }
- }
-
- if ($conf['allow_html_descriptions'])
- {
- $data{'comment'} = @$_POST['description-'.$row['id']];
- }
- else
- {
- $data{'comment'} = strip_tags(@$_POST['description-'.$row['id']]);
- }
-
- if (isset($_POST['date_creation_action-'.$row['id']]))
- {
- if ('set' == $_POST['date_creation_action-'.$row['id']])
- {
- $data{'date_creation'} =
- $_POST['date_creation_year-'.$row['id']]
- .'-'.$_POST['date_creation_month-'.$row['id']]
- .'-'.$_POST['date_creation_day-'.$row['id']];
- }
- else if ('unset' == $_POST['date_creation_action-'.$row['id']])
- {
- $data{'date_creation'} = '';
- }
- }
- else
- {
- $data{'date_creation'} = $row['date_creation'];
- }
-
- array_push($datas, $data);
-
- // tags management
- if (isset($_POST[ 'tags-'.$row['id'] ]))
- {
- set_tags($_POST[ 'tags-'.$row['id'] ], $row['id']);
- }
- }
-
- mass_updates(
- IMAGES_TABLE,
- array(
- 'primary' => array('id'),
- 'update' => array('name','author','comment','date_creation')
- ),
- $datas
- );
-
- array_push($page['infos'], l10n('Picture informations updated'));
-}
-
-// +-----------------------------------------------------------------------+
-// | template init |
-// +-----------------------------------------------------------------------+
-
-$template->set_filenames(
- array('element_set_unit' => 'admin/element_set_unit.tpl'));
-
-$base_url = PHPWG_ROOT_PATH.'admin.php';
-
-$month_list = $lang['month'];
-$month_list[0]='------------';
-ksort($month_list);
-
-$template->assign(
- array(
- 'CATEGORIES_NAV'=>$page['title'],
-
- 'U_ELEMENTS_PAGE'
- =>$base_url.get_query_string_diff(array('display','start')),
-
- 'U_GLOBAL_MODE'
- =>
- $base_url
- .get_query_string_diff(array('mode','display'))
- .'&amp;mode=global',
-
- 'F_ACTION'=>$base_url.get_query_string_diff(array()),
-
- 'month_list' => $month_list
- )
- );
-
-// +-----------------------------------------------------------------------+
-// | global mode thumbnails |
-// +-----------------------------------------------------------------------+
-
-// how many items to display on this page
-if (!empty($_GET['display']))
-{
- if ('all' == $_GET['display'])
- {
- $page['nb_images'] = count($page['cat_elements_id']);
- }
- else
- {
- $page['nb_images'] = intval($_GET['display']);
- }
-}
-else
-{
- $page['nb_images'] = 5;
-}
-
-
-
-if (count($page['cat_elements_id']) > 0)
-{
- $nav_bar = create_navigation_bar(
- $base_url.get_query_string_diff(array('start')),
- count($page['cat_elements_id']),
- $page['start'],
- $page['nb_images']
- );
- $template->assign(array('NAV_BAR' => $nav_bar));
-
- // tags
- $all_tags = get_all_tags();
-
- $element_ids = array();
-
- $query = '
-SELECT id,path,tn_ext,name,date_creation,comment,author,file
- FROM '.IMAGES_TABLE.'
- WHERE id IN ('.implode(',', $page['cat_elements_id']).')
- '.$conf['order_by'].'
- LIMIT '.$page['start'].', '.$page['nb_images'].'
-;';
- $result = pwg_query($query);
-
- while ($row = mysql_fetch_assoc($result))
- {
- // echo '<pre>'; print_r($row); echo '</pre>';
- array_push($element_ids, $row['id']);
-
- $src = get_thumbnail_url($row);
-
- $query = '
-SELECT tag_id
- FROM '.IMAGE_TAG_TABLE.'
- WHERE image_id = '.$row['id'].'
-;';
- $selected_tags = array_from_query($query, 'tag_id');
-
- // creation date
- if (!empty($row['date_creation']))
- {
- list($year,$month,$day) = explode('-', $row['date_creation']);
- }
- else
- {
- list($year,$month,$day) = array('',0,0);
- }
-
- if (count($all_tags) > 0)
- {
- $tag_selection = get_html_tag_selection(
- $all_tags,
- 'tags-'.$row['id'],
- $selected_tags
- );
- }
- else
- {
- $tag_selection =
- '<p>'.
- l10n('No tag defined. Use Administration>Pictures>Tags').
- '</p>';
- }
-
- $template->append(
- 'elements',
- array(
- 'ID' => $row['id'],
- 'TN_SRC' => $src,
- 'LEGEND' =>
- !empty($row['name']) ?
- $row['name'] : get_name_from_file($row['file']),
- 'U_EDIT' =>
- PHPWG_ROOT_PATH.'admin.php?page=picture_modify'.
- '&amp;image_id='.$row['id'],
- 'NAME' => @$row['name'],
- 'AUTHOR' => @$row['author'],
- 'DESCRIPTION' => @$row['comment'],
- 'DATE_CREATION_YEAR' => $year,
- 'DATE_CREATION_MONTH' => (int)$month,
- 'DATE_CREATION_DAY' => (int)$day,
-
- 'TAG_SELECTION' => $tag_selection,
- )
- );
- }
-
- $template->assign('ELEMENT_IDS', implode(',', $element_ids));
-}
-
-// +-----------------------------------------------------------------------+
-// | sending html code |
-// +-----------------------------------------------------------------------+
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'element_set_unit');
-?> \ No newline at end of file
diff --git a/BSF/admin/group_list.php b/BSF/admin/group_list.php
deleted file mode 100644
index 323674bc1..000000000
--- a/BSF/admin/group_list.php
+++ /dev/null
@@ -1,207 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if( !defined("PHPWG_ROOT_PATH") )
-{
- die ("Hacking attempt!");
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | delete a group |
-// +-----------------------------------------------------------------------+
-
-if (isset($_GET['delete']) and is_numeric($_GET['delete']) and !is_adviser())
-{
- // destruction of the access linked to the group
- $query = '
-DELETE
- FROM '.GROUP_ACCESS_TABLE.'
- WHERE group_id = '.$_GET['delete'].'
-;';
- pwg_query($query);
-
- // destruction of the users links for this group
- $query = '
-DELETE
- FROM '.USER_GROUP_TABLE.'
- WHERE group_id = '.$_GET['delete'].'
-;';
- pwg_query($query);
-
- $query = '
-SELECT name
- FROM '.GROUPS_TABLE.'
- WHERE id = '.$_GET['delete'].'
-;';
- list($groupname) = mysql_fetch_row(pwg_query($query));
-
- // destruction of the group
- $query = '
-DELETE
- FROM '.GROUPS_TABLE.'
- WHERE id = '.$_GET['delete'].'
-;';
- pwg_query($query);
-
- array_push(
- $page['infos'],
- sprintf(l10n('group "%s" deleted'), $groupname)
- );
-}
-
-// +-----------------------------------------------------------------------+
-// | add a group |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST['submit_add']) and !is_adviser())
-{
- if (empty($_POST['groupname']))
- {
- array_push($page['errors'], l10n('group_add_error1'));
- }
- if (count($page['errors']) == 0)
- {
- // is the group not already existing ?
- $query = '
-SELECT COUNT(*)
- FROM '.GROUPS_TABLE.'
- WHERE name = \''.$_POST['groupname'].'\'
-;';
- list($count) = mysql_fetch_row(pwg_query($query));
- if ($count != 0)
- {
- array_push($page['errors'], l10n('group_add_error2'));
- }
- }
- if (count($page['errors']) == 0)
- {
- // creating the group
- $query = '
-INSERT INTO '.GROUPS_TABLE.'
- (name)
- VALUES
- (\''.mysql_escape_string($_POST['groupname']).'\')
-;';
- pwg_query($query);
-
- array_push(
- $page['infos'],
- sprintf(l10n('group "%s" added'), $_POST['groupname'])
- );
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | toggle is default group property |
-// +-----------------------------------------------------------------------+
-
-if (isset($_GET['toggle_is_default']) and is_numeric($_GET['toggle_is_default']) and !is_adviser())
-{
- $query = '
-SELECT name, is_default
- FROM '.GROUPS_TABLE.'
- WHERE id = '.$_GET['toggle_is_default'].'
-;';
- list($groupname, $is_default) = mysql_fetch_row(pwg_query($query));
-
- // update of the group
- $query = '
-UPDATE '.GROUPS_TABLE.'
- SET is_default = \''.boolean_to_string(!get_boolean($is_default)).'\'
- WHERE id = '.$_GET['toggle_is_default'].'
-;';
- pwg_query($query);
-
- array_push(
- $page['infos'],
- sprintf(l10n('group "%s" updated'), $groupname)
- );
-}
-
-// +-----------------------------------------------------------------------+
-// | template init |
-// +-----------------------------------------------------------------------+
-
-$template->set_filenames(array('group_list' => 'admin/group_list.tpl'));
-
-$template->assign(
- array(
- 'F_ADD_ACTION' => get_root_url().'admin.php?page=group_list',
- 'U_HELP' => get_root_url().'popuphelp.php?page=group_list',
- )
- );
-
-// +-----------------------------------------------------------------------+
-// | group list |
-// +-----------------------------------------------------------------------+
-
-$query = '
-SELECT id, name, is_default
- FROM '.GROUPS_TABLE.'
- ORDER BY name ASC
-;';
-$result = pwg_query($query);
-
-$admin_url = get_root_url().'admin.php?page=';
-$perm_url = $admin_url.'group_perm&amp;group_id=';
-$del_url = $admin_url.'group_list&amp;delete=';
-$members_url = $admin_url.'user_list&amp;group=';
-$toggle_is_default_url = $admin_url.'group_list&amp;toggle_is_default=';
-
-while ($row = mysql_fetch_array($result))
-{
- $query = '
-SELECT COUNT(*)
- FROM '.USER_GROUP_TABLE.'
- WHERE group_id = '.$row['id'].'
-;';
- list($counter) = mysql_fetch_row(pwg_query($query));
-
- $template->append(
- 'groups',
- array(
- 'NAME' => $row['name'],
- 'IS_DEFAULT' => (get_boolean($row['is_default']) ? ' ['.l10n('is_default_group').']' : ''),
- 'MEMBERS' => l10n_dec('%d member', '%d members', $counter),
- 'U_MEMBERS' => $members_url.$row['id'],
- 'U_DELETE' => $del_url.$row['id'],
- 'U_PERM' => $perm_url.$row['id'],
- 'U_ISDEFAULT' => $toggle_is_default_url.$row['id']
- )
- );
-}
-
-// +-----------------------------------------------------------------------+
-// | sending html code |
-// +-----------------------------------------------------------------------+
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'group_list');
-
-?>
diff --git a/BSF/admin/group_perm.php b/BSF/admin/group_perm.php
deleted file mode 100644
index 430730001..000000000
--- a/BSF/admin/group_perm.php
+++ /dev/null
@@ -1,185 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if( !defined("PHPWG_ROOT_PATH") )
-{
- die ("Hacking attempt!");
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | variables init |
-// +-----------------------------------------------------------------------+
-
-if (isset($_GET['group_id']) and is_numeric($_GET['group_id']))
-{
- $page['group'] = $_GET['group_id'];
-}
-else
-{
- die('group_id URL parameter is missing');
-}
-
-// +-----------------------------------------------------------------------+
-// | updates |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST['falsify'])
- and isset($_POST['cat_true'])
- and count($_POST['cat_true']) > 0)
-{
- // if you forbid access to a category, all sub-categories become
- // automatically forbidden
- $subcats = get_subcat_ids($_POST['cat_true']);
- $query = '
-DELETE
- FROM '.GROUP_ACCESS_TABLE.'
- WHERE group_id = '.$page['group'].'
- AND cat_id IN ('.implode(',', $subcats).')
-;';
- pwg_query($query);
-}
-else if (isset($_POST['trueify'])
- and isset($_POST['cat_false'])
- and count($_POST['cat_false']) > 0)
-{
- $uppercats = get_uppercat_ids($_POST['cat_false']);
- $private_uppercats = array();
-
- $query = '
-SELECT id
- FROM '.CATEGORIES_TABLE.'
- WHERE id IN ('.implode(',', $uppercats).')
- AND status = \'private\'
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- array_push($private_uppercats, $row['id']);
- }
-
- // retrying to authorize a category which is already authorized may cause
- // an error (in SQL statement), so we need to know which categories are
- // accesible
- $authorized_ids = array();
-
- $query = '
-SELECT cat_id
- FROM '.GROUP_ACCESS_TABLE.'
- WHERE group_id = '.$page['group'].'
-;';
- $result = pwg_query($query);
-
- while ($row = mysql_fetch_array($result))
- {
- array_push($authorized_ids, $row['cat_id']);
- }
-
- $inserts = array();
- $to_autorize_ids = array_diff($private_uppercats, $authorized_ids);
- foreach ($to_autorize_ids as $to_autorize_id)
- {
- array_push(
- $inserts,
- array(
- 'group_id' => $page['group'],
- 'cat_id' => $to_autorize_id
- )
- );
- }
-
- mass_inserts(GROUP_ACCESS_TABLE, array('group_id','cat_id'), $inserts);
-}
-
-// +-----------------------------------------------------------------------+
-// | template init |
-// +-----------------------------------------------------------------------+
-
-$template->set_filenames(
- array(
- 'group_perm' => 'admin/group_perm.tpl',
- 'double_select' => 'admin/double_select.tpl'
- )
- );
-
-$template->assign(
- array(
- 'TITLE' =>
- sprintf(
- l10n('Manage permissions for group "%s"'),
- get_groupname($page['group']
- )
- ),
- 'L_CAT_OPTIONS_TRUE'=>l10n('authorized'),
- 'L_CAT_OPTIONS_FALSE'=>l10n('forbidden'),
-
- 'F_ACTION' =>
- get_root_url().
- 'admin.php?page=group_perm&amp;group_id='.
- $page['group']
- )
- );
-
-// only private categories are listed
-$query_true = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.' INNER JOIN '.GROUP_ACCESS_TABLE.' ON cat_id = id
- WHERE status = \'private\'
- AND group_id = '.$page['group'].'
-;';
-display_select_cat_wrapper($query_true,array(),'category_option_true');
-
-$result = pwg_query($query_true);
-$authorized_ids = array();
-while ($row = mysql_fetch_array($result))
-{
- array_push($authorized_ids, $row['id']);
-}
-
-$query_false = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE status = \'private\'';
-if (count($authorized_ids) > 0)
-{
- $query_false.= '
- AND id NOT IN ('.implode(',', $authorized_ids).')';
-}
-$query_false.= '
-;';
-display_select_cat_wrapper($query_false,array(),'category_option_false');
-
-// +-----------------------------------------------------------------------+
-// | html code display |
-// +-----------------------------------------------------------------------+
-
-$template->assign_var_from_handle('DOUBLE_SELECT', 'double_select');
-$template->assign_var_from_handle('ADMIN_CONTENT', 'group_perm');
-
-?>
diff --git a/BSF/admin/help.php b/BSF/admin/help.php
deleted file mode 100644
index 051a10073..000000000
--- a/BSF/admin/help.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-$template->assign('ADMIN_CONTENT', load_language('help.html','','',true) );
-?>
diff --git a/BSF/admin/history.php b/BSF/admin/history.php
deleted file mode 100644
index c064e7516..000000000
--- a/BSF/admin/history.php
+++ /dev/null
@@ -1,685 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * Display filtered history lines
- */
-
-// +-----------------------------------------------------------------------+
-// | functions |
-// +-----------------------------------------------------------------------+
-
-// +-----------------------------------------------------------------------+
-// | initialization |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/functions_history.inc.php');
-
-if (isset($_GET['start']) and is_numeric($_GET['start']))
-{
- $page['start'] = $_GET['start'];
-}
-else
-{
- $page['start'] = 0;
-}
-
-$types = array('none', 'picture', 'high', 'other');
-$display_thumbnails = array('no_display_thumbnail', 'display_thumbnail_classic', 'display_thumbnail_hoverbox');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | Build search criteria and redirect to results |
-// +-----------------------------------------------------------------------+
-
-$page['errors'] = array();
-$search = array();
-
-if (isset($_POST['submit']))
-{
- // dates
- if (!empty($_POST['start_year']))
- {
- $search['fields']['date-after'] = sprintf(
- '%d-%02d-%02d',
- $_POST['start_year'],
- $_POST['start_month'],
- $_POST['start_day']
- );
- }
-
- if (!empty($_POST['end_year']))
- {
- $search['fields']['date-before'] = sprintf(
- '%d-%02d-%02d',
- $_POST['end_year'],
- $_POST['end_month'],
- $_POST['end_day']
- );
- }
-
- if (empty($_POST['types']))
- {
- $search['fields']['types'] = $types;
- }
- else
- {
- $search['fields']['types'] = $_POST['types'];
- }
-
- $search['fields']['user'] = $_POST['user'];
-
- if (!empty($_POST['image_id']))
- {
- $search['fields']['image_id'] = intval($_POST['image_id']);
- }
-
- if (!empty($_POST['filename']))
- {
- $search['fields']['filename'] = str_replace(
- '*',
- '%',
- mysql_escape_string($_POST['filename'])
- );
- }
-
- $search['fields']['display_thumbnail'] = $_POST['display_thumbnail'];
- // Display choise are also save to one cookie
- pwg_set_cookie_var('history_display_thumbnail', $_POST['display_thumbnail']);
-
- // TODO manage inconsistency of having $_POST['image_id'] and
- // $_POST['filename'] simultaneously
-
- // echo '<pre>'; print_r($search); echo '</pre>';
-
- if (!empty($search))
- {
- // register search rules in database, then they will be available on
- // thumbnails page and picture page.
- $query ='
-INSERT INTO '.SEARCH_TABLE.'
- (rules)
- VALUES
- (\''.serialize($search).'\')
-;';
- pwg_query($query);
-
- $search_id = mysql_insert_id();
-
- redirect(
- PHPWG_ROOT_PATH.'admin.php?page=history&search_id='.$search_id
- );
- }
- else
- {
- array_push($page['errors'], l10n('search_one_clause_at_least'));
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | template init |
-// +-----------------------------------------------------------------------+
-
-$template->set_filename('history', 'admin/history.tpl');
-
-// TabSheet initialization
-history_tabsheet();
-
-$template->assign(
- array(
- 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=history',
- 'F_ACTION' => get_root_url().'admin.php?page=history'
- )
- );
-
-// +-----------------------------------------------------------------------+
-// | history lines |
-// +-----------------------------------------------------------------------+
-
-if (isset($_GET['search_id'])
- and $page['search_id'] = (int)$_GET['search_id'])
-{
- // what are the lines to display in reality ?
- $query = '
-SELECT rules
- FROM '.SEARCH_TABLE.'
- WHERE id = '.$page['search_id'].'
-;';
- list($serialized_rules) = mysql_fetch_row(pwg_query($query));
-
- $page['search'] = unserialize($serialized_rules);
-
- if (isset($_GET['user_id']))
- {
- if (!is_numeric($_GET['user_id']))
- {
- die('user_id GET parameter must be an integer value');
- }
-
- $page['search']['fields']['user'] = $_GET['user_id'];
-
- $query ='
-INSERT INTO '.SEARCH_TABLE.'
- (rules)
- VALUES
- (\''.serialize($page['search']).'\')
-;';
- pwg_query($query);
-
- $search_id = mysql_insert_id();
-
- redirect(
- PHPWG_ROOT_PATH.'admin.php?page=history&search_id='.$search_id
- );
- }
-
- $data = trigger_event('get_history', array(), $page['search'], $types);
- usort($data, 'history_compare');
-
- $page['nb_lines'] = count($data);
-
- $history_lines = array();
- $user_ids = array();
- $username_of = array();
- $category_ids = array();
- $image_ids = array();
- $tag_ids = array();
-
- foreach ($data as $row)
- {
- $user_ids[$row['user_id']] = 1;
-
- if (isset($row['category_id']))
- {
- $category_ids[$row['category_id']] = 1;
- }
-
- if (isset($row['image_id']))
- {
- $image_ids[$row['image_id']] = 1;
- }
-
- if (isset($row['tag_ids']))
- {
- foreach (explode(',', $row['tag_ids']) as $tag_id)
- {
- array_push($tag_ids, $tag_id);
- }
- }
-
- array_push(
- $history_lines,
- $row
- );
- }
-
- // prepare reference data (users, tags, categories...)
- if (count($user_ids) > 0)
- {
- $query = '
-SELECT '.$conf['user_fields']['id'].' AS id
- , '.$conf['user_fields']['username'].' AS username
- FROM '.USERS_TABLE.'
- WHERE id IN ('.implode(',', array_keys($user_ids)).')
-;';
- $result = pwg_query($query);
-
- $username_of = array();
- while ($row = mysql_fetch_array($result))
- {
- $username_of[$row['id']] = $row['username'];
- }
- }
-
- if (count($category_ids) > 0)
- {
- $query = '
-SELECT id, uppercats
- FROM '.CATEGORIES_TABLE.'
- WHERE id IN ('.implode(',', array_keys($category_ids)).')
-;';
- $uppercats_of = simple_hash_from_query($query, 'id', 'uppercats');
-
- $name_of_category = array();
-
- foreach ($uppercats_of as $category_id => $uppercats)
- {
- $name_of_category[$category_id] = get_cat_display_name_cache(
- $uppercats
- );
- }
- }
-
- if (count($image_ids) > 0)
- {
- $query = '
-SELECT
- id,
- IF(name IS NULL, file, name) AS label,
- filesize,
- high_filesize,
- file,
- path,
- tn_ext
- FROM '.IMAGES_TABLE.'
- WHERE id IN ('.implode(',', array_keys($image_ids)).')
-;';
- // $label_of_image = simple_hash_from_query($query, 'id', 'label');
- $label_of_image = array();
- $filesize_of_image = array();
- $high_filesize_of_image = array();
- $file_of_image = array();
- $path_of_image = array();
- $tn_ext_of_image = array();
-
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $label_of_image[ $row['id'] ] = $row['label'];
-
- if (isset($row['filesize']))
- {
- $filesize_of_image[ $row['id'] ] = $row['filesize'];
- }
-
- if (isset($row['high_filesize']))
- {
- $high_filesize_of_image[ $row['id'] ] = $row['high_filesize'];
- }
-
- $file_of_image[ $row['id'] ] = $row['file'];
- $path_of_image[ $row['id'] ] = $row['path'];
- $tn_ext_of_image[ $row['id'] ] = $row['tn_ext'];
- }
-
- // echo '<pre>'; print_r($high_filesize_of_image); echo '</pre>';
- }
-
- if (count($tag_ids) > 0)
- {
- $tag_ids = array_unique($tag_ids);
-
- $query = '
-SELECT
- id,
- name
- FROM '.TAGS_TABLE.'
- WHERE id IN ('.implode(', ', $tag_ids).')
-;';
- $name_of_tag = array();
-
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $name_of_tag[ $row['id'] ] = $row['name'];
- }
- }
-
- $i = 0;
- $first_line = $page['start'] + 1;
- $last_line = $page['start'] + $conf['nb_logs_page'];
-
- $summary['total_filesize'] = 0;
- $summary['guests_IP'] = array();
-
- foreach ($history_lines as $line)
- {
- // FIXME when we watch the representative of a non image element, it is
- // the not the representative filesize that is counted (as it is
- // unknown) but the non image element filesize. Proposed solution: add
- // #images.representative_filesize and add 'representative' in the
- // choices of #history.image_type.
-
- if (isset($line['image_type']))
- {
- if ($line['image_type'] == 'high')
- {
- if (isset($high_filesize_of_image[$line['image_id']]))
- {
- $summary['total_filesize']+=
- $high_filesize_of_image[$line['image_id']];
- }
- }
- else
- {
- if (isset($filesize_of_image[$line['image_id']]))
- {
- $summary['total_filesize']+=
- $filesize_of_image[$line['image_id']];
- }
- }
- }
-
- if ($line['user_id'] == $conf['guest_id'])
- {
- if (!isset($summary['guests_IP'][ $line['IP'] ]))
- {
- $summary['guests_IP'][ $line['IP'] ] = 0;
- }
-
- $summary['guests_IP'][ $line['IP'] ]++;
- }
-
- $i++;
-
- if ($i < $first_line or $i > $last_line)
- {
- continue;
- }
-
- $user_string = '';
- if (isset($username_of[$line['user_id']]))
- {
- $user_string.= $username_of[$line['user_id']];
- }
- else
- {
- $user_string.= $line['user_id'];
- }
- $user_string.= '&nbsp;<a href="';
- $user_string.= PHPWG_ROOT_PATH.'admin.php?page=history';
- $user_string.= '&amp;search_id='.$page['search_id'];
- $user_string.= '&amp;user_id='.$line['user_id'];
- $user_string.= '">+</a>';
-
- $tags_string = '';
- if (isset($line['tag_ids']))
- {
- $tags_string = preg_replace(
- '/(\d+)/e',
- '$name_of_tag["$1"]',
- str_replace(
- ',',
- ', ',
- $line['tag_ids']
- )
- );
- }
-
- $image_string = '';
- if (isset($line['image_id']))
- {
- $picture_url = make_picture_url(
- array(
- 'image_id' => $line['image_id'],
- )
- );
-
- $element = array(
- 'id' => $line['image_id'],
- 'file' => $file_of_image[$line['image_id']],
- 'path' => $path_of_image[$line['image_id']],
- 'tn_ext' => $tn_ext_of_image[$line['image_id']],
- );
-
- $image_title = '('.$line['image_id'].')';
-
- if (isset($label_of_image[$line['image_id']]))
- {
- $image_title.= ' '.$label_of_image[$line['image_id']];
- }
- else
- {
- $image_title.= ' unknown filename';
- }
-
- $image_string = '';
-
- switch ($page['search']['fields']['display_thumbnail'])
- {
- case 'no_display_thumbnail':
- {
- $image_string= '<a href="'.$picture_url.'">'.$image_title.'</a>';
- break;
- }
- case 'display_thumbnail_classic':
- {
- $image_string =
- '<a class="thumbnail" href="'.$picture_url.'">'
- .'<span><img src="'.get_thumbnail_url($element)
- .'" alt="'.$image_title.'" title="'.$image_title.'">'
- .'</span></a>';
- break;
- }
- case 'display_thumbnail_hoverbox':
- {
- $image_string =
- '<a class="over" href="'.$picture_url.'">'
- .'<span><img src="'.get_thumbnail_url($element)
- .'" alt="'.$image_title.'" title="'.$image_title.'">'
- .'</span>'.$image_title.'</a>';
- break;
- }
- }
- }
-
- $template->append(
- 'search_results',
- array(
- 'DATE' => $line['date'],
- 'TIME' => $line['time'],
- 'USER' => $user_string,
- 'IP' => $line['IP'],
- 'IMAGE' => $image_string,
- 'TYPE' => $line['image_type'],
- 'SECTION' => $line['section'],
- 'CATEGORY' => isset($line['category_id'])
- ? ( isset($name_of_category[$line['category_id']])
- ? $name_of_category[$line['category_id']]
- : 'deleted '.$line['category_id'] )
- : '',
- 'TAGS' => $tags_string,
- )
- );
- }
-
- $summary['nb_guests'] = 0;
- if (count(array_keys($summary['guests_IP'])) > 0)
- {
- $summary['nb_guests'] = count(array_keys($summary['guests_IP']));
-
- // we delete the "guest" from the $username_of hash so that it is
- // avoided in next steps
- unset($username_of[ $conf['guest_id'] ]);
- }
-
- $summary['nb_members'] = count($username_of);
-
- $member_strings = array();
- foreach ($username_of as $user_id => $user_name)
- {
- $member_string = $user_name.'&nbsp;<a href="';
- $member_string.= get_root_url().'admin.php?page=history';
- $member_string.= '&amp;search_id='.$page['search_id'];
- $member_string.= '&amp;user_id='.$user_id;
- $member_string.= '">+</a>';
-
- $member_strings[] = $member_string;
- }
-
- $template->assign(
- 'search_summary',
- array(
- 'NB_LINES' => l10n_dec(
- '%d line filtered', '%d lines filtered',
- $page['nb_lines']
- ),
- 'FILESIZE' => $summary['total_filesize'].' KB',
- 'USERS' => l10n_dec(
- '%d user', '%d users',
- $summary['nb_members'] + $summary['nb_guests']
- ),
- 'MEMBERS' => sprintf(
- l10n_dec('%d member', '%d members', $summary['nb_members']).': %s',
- implode(
- ', ',
- $member_strings
- )
- ),
- 'GUESTS' => l10n_dec(
- '%d guest', '%d guests',
- $summary['nb_guests']
- ),
- )
- );
-}
-
-// +-----------------------------------------------------------------------+
-// | navigation bar |
-// +-----------------------------------------------------------------------+
-
-if (isset($page['search_id']))
-{
- $navbar = create_navigation_bar(
- get_root_url().'admin.php'.get_query_string_diff(array('start')),
- $page['nb_lines'],
- $page['start'],
- $conf['nb_logs_page']
- );
-
- $template->assign('NAV_BAR', $navbar);
-}
-
-// +-----------------------------------------------------------------------+
-// | filter form |
-// +-----------------------------------------------------------------------+
-
-$form = array();
-
-if (isset($page['search']))
-{
- if (isset($page['search']['fields']['date-after']))
- {
- $tokens = explode('-', $page['search']['fields']['date-after']);
-
- $form['start_year'] = (int)$tokens[0];
- $form['start_month'] = (int)$tokens[1];
- $form['start_day'] = (int)$tokens[2];
- }
-
- if (isset($page['search']['fields']['date-before']))
- {
- $tokens = explode('-', $page['search']['fields']['date-before']);
-
- $form['end_year'] = (int)$tokens[0];
- $form['end_month'] = (int)$tokens[1];
- $form['end_day'] = (int)$tokens[2];
- }
-
- $form['types'] = $page['search']['fields']['types'];
-
- if (isset($page['search']['fields']['user']))
- {
- $form['user'] = $page['search']['fields']['user'];
- }
- else
- {
- $form['user'] = null;
- }
-
- $form['image_id'] = @$page['search']['fields']['image_id'];
- $form['filename'] = @$page['search']['fields']['filename'];
-
- $form['display_thumbnail'] = @$page['search']['fields']['display_thumbnail'];
-}
-else
-{
- // by default, at page load, we want the selected date to be the current
- // date
- $form['start_year'] = $form['end_year'] = date('Y');
- $form['start_month'] = $form['end_month'] = date('n');
- $form['start_day'] = $form['end_day'] = date('j');
- $form['types'] = $types;
- // Hoverbox by default
- $form['display_thumbnail'] =
- pwg_get_cookie_var('history_display_thumbnail', $display_thumbnails[2]);
-}
-
-
-$month_list = $lang['month'];
-$month_list[0]='------------';
-ksort($month_list);
-
-$template->assign(
- array(
- 'IMAGE_ID' => @$form['image_id'],
- 'FILENAME' => @$form['filename'],
-
- 'month_list' => $month_list,
-
- 'START_DAY_SELECTED' => @$form['start_day'],
- 'START_MONTH_SELECTED' => @$form['start_month'],
- 'START_YEAR' => @$form['start_year'],
-
- 'END_DAY_SELECTED' => @$form['end_day'],
- 'END_MONTH_SELECTED' => @$form['end_month'],
- 'END_YEAR' => @$form['end_year'],
- )
- );
-
-$template->assign(
- array(
- 'type_option_values' => $types,
- 'type_option_selected' => $form['types']
- )
- );
-
-
-$query = '
-SELECT
- '.$conf['user_fields']['id'].' AS id,
- '.$conf['user_fields']['username'].' AS username
- FROM '.USERS_TABLE.'
- ORDER BY username ASC
-;';
-$template->assign(
- array(
- 'user_options' => simple_hash_from_query($query, 'id','username'),
- 'user_options_selected' => array(@$form['user'])
- )
-);
-
-$template->assign(
- array(
- 'display_thumbnail_values' => $display_thumbnails,
- 'display_thumbnail_selected' => array($form['display_thumbnail']),
- )
- );
-
-// +-----------------------------------------------------------------------+
-// | html code display |
-// +-----------------------------------------------------------------------+
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'history');
-?> \ No newline at end of file
diff --git a/BSF/admin/images/index.php b/BSF/admin/images/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/admin/images/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/admin/include/c13y_internal.class.php b/BSF/admin/include/c13y_internal.class.php
deleted file mode 100644
index 2e2c309b5..000000000
--- a/BSF/admin/include/c13y_internal.class.php
+++ /dev/null
@@ -1,249 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-class c13y_internal
-{
- function c13y_internal()
- {
- add_event_handler('list_check_integrity', array(&$this, 'c13y_version'));
- add_event_handler('list_check_integrity', array(&$this, 'c13y_exif'));
- add_event_handler('list_check_integrity', array(&$this, 'c13y_user'));
- }
-
- /**
- * Check version
- *
- * @param c13y object
- * @return void
- */
- function c13y_version($c13y)
- {
- $check_list = array();
-
- $check_list[] = array('type' => 'PHP', 'current' => phpversion(), 'required' => REQUIRED_PHP_VERSION);
-
- list($mysql_version) = mysql_fetch_row(pwg_query('SELECT VERSION();'));
- $check_list[] = array('type' => 'MySQL', 'current' => $mysql_version, 'required' => REQUIRED_MYSQL_VERSION);
-
- foreach ($check_list as $elem)
- {
- if (version_compare($elem['current'], $elem['required'], '<'))
- {
- $c13y->add_anomaly(
- sprintf(l10n('c13y_version_anomaly'), $elem['type'], $elem['current'], $elem['required']),
- null,
- null,
- l10n('c13y_version_correction')
- .'<BR />'.
- $c13y->get_htlm_links_more_info());
- }
- }
- }
-
- /**
- * Check exif
- *
- * @param c13y object
- * @return void
- */
- function c13y_exif($c13y)
- {
- global $conf;
-
- foreach (array('show_exif', 'use_exif') as $value)
- {
- if (($conf[$value]) and (!function_exists('read_exif_data')))
- {
- $c13y->add_anomaly(
- sprintf(l10n('c13y_exif_anomaly'), '$conf[\''.$value.'\']'),
- null,
- null,
- sprintf(l10n('c13y_exif_correction'), '$conf[\''.$value.'\']')
- .'<BR />'.
- $c13y->get_htlm_links_more_info());
- }
- }
- }
-
- /**
- * Check user
- *
- * @param c13y object
- * @return void
- */
- function c13y_user($c13y)
- {
- global $conf;
-
- $c13y_users = array();
- $c13y_users[$conf['guest_id']] = array(
- 'status' => 'guest',
- 'l10n_non_existent' => 'c13y_guest_non_existent',
- 'l10n_bad_status' => 'c13y_bad_guest_status');
-
- if ($conf['guest_id'] != $conf['default_user_id'])
- {
- $c13y_users[$conf['default_user_id']] = array(
- 'password' => null,
- 'l10n_non_existent' => 'c13y_default_non_existent');
- }
-
- $c13y_users[$conf['webmaster_id']] = array(
- 'status' => 'webmaster',
- 'l10n_non_existent' => 'c13y_webmaster_non_existent',
- 'l10n_bad_status' => 'c13y_bad_webmaster_status');
-
- $query = '
- select u.'.$conf['user_fields']['id'].' as id, ui.status
- from '.USERS_TABLE.' as u
- left join '.USER_INFOS_TABLE.' as ui
- on u.'.$conf['user_fields']['id'].' = ui.user_id
- where
- u.'.$conf['user_fields']['id'].' in ('.implode(',', array_keys($c13y_users)).')
- ;';
-
-
- $status = array();
-
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $status[$row['id']] = $row['status'];
- }
-
- foreach ($c13y_users as $id => $data)
- {
- if (!array_key_exists($id, $status))
- {
- $c13y->add_anomaly(l10n($data['l10n_non_existent']), 'c13y_correction_user',
- array('id' => $id, 'action' => 'creation'));
- }
- else
- if (!empty($data['status']) and $status[$id] != $data['status'])
- {
- $c13y->add_anomaly(l10n($data['l10n_bad_status']), 'c13y_correction_user',
- array('id' => $id, 'action' => 'status'));
- }
- }
- }
-
- /**
- * Do correction user
- *
- * @param user_id, action
- * @return boolean true if ok else false
- */
- function c13y_correction_user($id, $action)
- {
- global $conf, $page;
-
- $result = false;
-
- if (!empty($id))
- {
- switch ($action)
- {
- case 'creation':
- if ($id == $conf['guest_id'])
- {
- $name = 'guest';
- $password = null;
- }
- else if ($id == $conf['default_user_id'])
- {
- $name = 'guest';
- $password = null;
- }
- else if ($id == $conf['webmaster_id'])
- {
- $name = 'webmaster';
- $password = generate_key(6);
- }
-
- if (isset($name))
- {
- $name_ok = false;
- while (!$name_ok)
- {
- $name_ok = (get_userid($name) === false);
- if (!$name_ok)
- {
- $name .= generate_key(1);
- }
- }
-
- $inserts = array(
- array(
- 'id' => $id,
- 'username' => $name,
- 'password' => $password
- ),
- );
- mass_inserts(USERS_TABLE, array_keys($inserts[0]), $inserts);
-
- create_user_infos($id);
-
- $page['infos'][] = sprintf(l10n('c13y_user_created'), $name, $password);
-
- $result = true;
- }
- break;
- case 'status':
- if ($id == $conf['guest_id'])
- {
- $status = 'guest';
- }
- else if ($id == $conf['default_user_id'])
- {
- $status = 'guest';
- }
- else if ($id == $conf['webmaster_id'])
- {
- $status = 'webmaster';
- }
-
- if (isset($status))
- {
- $updates = array(
- array(
- 'user_id' => $id,
- 'status' => $status
- ),
- );
- mass_updates(USER_INFOS_TABLE,
- array('primary' => array('user_id'),'update' => array('status')),
- $updates);
-
- $page['infos'][] = sprintf(l10n('c13y_user_status_updated'), get_username($id));
-
- $result = true;
- }
- break;
- }
- }
-
- return $result;
- }
-}
-
-?>
diff --git a/BSF/admin/include/check_integrity.class.php b/BSF/admin/include/check_integrity.class.php
deleted file mode 100644
index b6f3ddd6a..000000000
--- a/BSF/admin/include/check_integrity.class.php
+++ /dev/null
@@ -1,345 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-class check_integrity
-{
- var $ignore_list;
- var $retrieve_list;
- var $build_ignore_list;
-
- function check_integrity()
- {
- $this->ignore_list = array();
- $this->retrieve_list = array();
- $this->build_ignore_list = array();
- }
-
- /**
- * Check integrities
- *
- * @param void
- * @return void
- */
- function check()
- {
- global $page, $header_notes, $conf;
-
- // Ignore list
- $conf_c13y_ignore = unserialize($conf['c13y_ignore']);
- if (
- is_array($conf_c13y_ignore) and
- isset($conf_c13y_ignore['version']) and
- ($conf_c13y_ignore['version'] == PHPWG_VERSION) and
- is_array($conf_c13y_ignore['list'])
- )
- {
- $ignore_list_changed = false;
- $this->ignore_list = $conf_c13y_ignore['list'];
- }
- else
- {
- $ignore_list_changed = true;
- $this->ignore_list = array();
- }
-
- // Retrieve list
- $this->retrieve_list = array();
- $this->build_ignore_list = array();
-
- trigger_action('list_check_integrity', $this);
-
- // Information
- if (count($this->retrieve_list) > 0)
- {
- $header_notes[] =
- l10n_dec('c13y_anomaly_count', 'c13y_anomalies_count',
- count($this->retrieve_list));
- }
-
- // Treatments
- if (!is_adviser())
- {
- if (isset($_POST['c13y_submit_correction']) and isset($_POST['c13y_selection']))
- {
- $corrected_count = 0;
- $not_corrected_count = 0;
-
- foreach ($this->retrieve_list as $i => $c13y)
- {
- if (!empty($c13y['correction_fct']) and
- $c13y['is_callable'] and
- in_array($c13y['id'], $_POST['c13y_selection']))
- {
- if (is_array($c13y['correction_fct_args']))
- {
- $args = $c13y['correction_fct_args'];
- }
- else
- if (!is_null($c13y['correction_fct_args']))
- {
- $args = array($c13y['correction_fct_args']);
- }
- else
- {
- $args = array();
- }
- $this->retrieve_list[$i]['corrected'] = call_user_func_array($c13y['correction_fct'], $args);
-
- if ($this->retrieve_list[$i]['corrected'])
- {
- $corrected_count += 1;
- }
- else
- {
- $not_corrected_count += 1;
- }
- }
- }
-
- if ($corrected_count > 0)
- {
- $page['infos'][] =
- l10n_dec('c13y_anomaly_corrected_count', 'c13y_anomalies_corrected_count',
- $corrected_count);
- }
- if ($not_corrected_count > 0)
- {
- $page['errors'][] =
- l10n_dec('c13y_anomaly_not_corrected_count', 'c13y_anomalies_not_corrected_count',
- $not_corrected_count);
- }
- }
- else
- {
- if (isset($_POST['c13y_submit_ignore']) and isset($_POST['c13y_selection']))
- {
- $ignored_count = 0;
-
- foreach ($this->retrieve_list as $i => $c13y)
- {
- if (in_array($c13y['id'], $_POST['c13y_selection']))
- {
- $this->build_ignore_list[] = $c13y['id'];
- $this->retrieve_list[$i]['ignored'] = true;
- $ignored_count += 1;
- }
- }
-
- if ($ignored_count > 0)
- {
- $page['infos'][] =
- l10n_dec('c13y_anomaly_ignored_count', 'c13y_anomalies_ignored_count',
- $ignored_count);
- }
- }
- }
- }
-
- $ignore_list_changed =
- (
- ($ignore_list_changed) or
- (count(array_diff($this->ignore_list, $this->build_ignore_list)) > 0) or
- (count(array_diff($this->build_ignore_list, $this->ignore_list)) > 0)
- );
-
- if ($ignore_list_changed)
- {
- $this->update_conf($this->build_ignore_list);
- }
- }
-
- /**
- * Display anomalies list
- *
- * @param void
- * @return void
- */
- function display()
- {
- global $template;
-
- $check_automatic_correction = false;
- $submit_automatic_correction = false;
- $submit_ignore = false;
-
- if (isset($this->retrieve_list) and count($this->retrieve_list) > 0)
- {
- $template->set_filenames(array('check_integrity' => 'admin/check_integrity.tpl'));
-
- foreach ($this->retrieve_list as $i => $c13y)
- {
- $can_select = false;
- $c13y_display = array(
- 'id' => $c13y['id'],
- 'anomaly' => $c13y['anomaly'],
- 'show_ignore_msg' => false,
- 'show_correction_success_fct' => false,
- 'correction_error_fct' => '',
- 'show_correction_fct' => false,
- 'correction_error_fct' => '',
- 'show_correction_bad_fct' => false,
- 'correction_msg' => ''
- );
-
- if (isset($c13y['ignored']))
- {
- if ($c13y['ignored'])
- {
- $c13y_display['show_ignore_msg'] = true;
- }
- else
- {
- die('$c13y[\'ignored\'] cannot be false');
- }
- }
- else
- {
- if (!empty($c13y['correction_fct']))
- {
- if (isset($c13y['corrected']))
- {
- if ($c13y['corrected'])
- {
- $c13y_display['show_correction_success_fct'] = true;
- }
- else
- {
- $c13y_display['correction_error_fct'] = $this->get_htlm_links_more_info();
- }
- }
- else if ($c13y['is_callable'])
- {
- $c13y_display['show_correction_fct'] = true;
- $template->append('c13y_do_check', $c13y['id']);
- $submit_automatic_correction = true;
- $can_select = true;
- }
- else
- {
- $c13y_display['show_correction_bad_fct'] = true;
- $can_select = true;
- }
- }
- else
- {
- $can_select = true;
- }
-
- if (!empty($c13y['correction_msg']) and !isset($c13y['corrected']))
- {
- $c13y_display['correction_msg'] = $c13y['correction_msg'];
- }
- }
-
- $c13y_display['can_select'] = $can_select;
- if ($can_select)
- {
- $submit_ignore = true;
- }
-
- $template->append('c13y_list', $c13y_display);
- }
-
- $template->assign('c13y_show_submit_automatic_correction', $submit_automatic_correction);
- $template->assign('c13y_show_submit_ignore', $submit_ignore);
-
- $template->concat('ADMIN_CONTENT', $template->parse('check_integrity', true));
-
- }
- }
-
- /**
- * Add anomaly data
- *
- * @param anomaly arguments
- * @return void
- */
- function add_anomaly($anomaly, $correction_fct = null, $correction_fct_args = null, $correction_msg = null)
- {
- $id = md5($anomaly.$correction_fct.serialize($correction_fct_args).$correction_msg);
-
- if (in_array($id, $this->ignore_list))
- {
- $this->build_ignore_list[] = $id;
- }
- else
- {
- $this->retrieve_list[] =
- array(
- 'id' => $id,
- 'anomaly' => $anomaly,
- 'correction_fct' => $correction_fct,
- 'correction_fct_args' => $correction_fct_args,
- 'correction_msg' => $correction_msg,
- 'is_callable' => is_callable($correction_fct));
- }
- }
-
- /**
- * Update table config
- *
- * @param ignore list array
- * @return void
- */
- function update_conf($conf_ignore_list = array())
- {
- $conf_c13y_ignore = array();
- $conf_c13y_ignore['version'] = PHPWG_VERSION;
- $conf_c13y_ignore['list'] = $conf_ignore_list;
- $query = 'update '.CONFIG_TABLE.' set value =\''.serialize($conf_c13y_ignore).'\'where param = \'c13y_ignore\';';
- pwg_query($query);
- }
-
- /**
- * Apply maintenance
- *
- * @param void
- * @return void
- */
- function maintenance()
- {
- $this->update_conf();
- }
-
- /**
- * Returns links more informations
- *
- * @param void
- * @return html links
- */
- function get_htlm_links_more_info()
- {
- $pwg_links = pwg_URL();
- $link_fmt = '<a href="%s" onclick="window.open(this.href, \'\'); return false;">%s</a>';
- return
- sprintf
- (
- l10n('c13y_more_info'),
- sprintf($link_fmt, $pwg_links['FORUM'], l10n('c13y_more_info_forum')),
- sprintf($link_fmt, $pwg_links['WIKI'], l10n('c13y_more_info_wiki'))
- );
- }
-
-}
-
-?>
diff --git a/BSF/admin/include/functions.php b/BSF/admin/include/functions.php
deleted file mode 100644
index 328a36ab7..000000000
--- a/BSF/admin/include/functions.php
+++ /dev/null
@@ -1,1872 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-include(PHPWG_ROOT_PATH.'admin/include/functions_metadata.php');
-
-
-// The function delete_site deletes a site and call the function
-// delete_categories for each primary category of the site
-function delete_site( $id )
-{
- // destruction of the categories of the site
- $query = '
-SELECT id
- FROM '.CATEGORIES_TABLE.'
- WHERE site_id = '.$id.'
-;';
- $result = pwg_query($query);
- $category_ids = array();
- while ($row = mysql_fetch_array($result))
- {
- array_push($category_ids, $row['id']);
- }
- delete_categories($category_ids);
-
- // destruction of the site
- $query = '
-DELETE FROM '.SITES_TABLE.'
- WHERE id = '.$id.'
-;';
- pwg_query($query);
-}
-
-
-// The function delete_categories deletes the categories identified by the
-// (numeric) key of the array $ids. It also deletes (in the database) :
-// - all the elements of the category (delete_elements, see further)
-// - all the links between elements and this category
-// - all the restrictions linked to the category
-// The function works recursively.
-function delete_categories($ids)
-{
- if (count($ids) == 0)
- {
- return;
- }
-
- // add sub-category ids to the given ids : if a category is deleted, all
- // sub-categories must be so
- $ids = get_subcat_ids($ids);
-
- // destruction of all the related elements
- $query = '
-SELECT id
- FROM '.IMAGES_TABLE.'
- WHERE storage_category_id IN (
-'.wordwrap(implode(', ', $ids), 80, "\n").')
-;';
- $result = pwg_query($query);
- $element_ids = array();
- while ($row = mysql_fetch_array($result))
- {
- array_push($element_ids, $row['id']);
- }
- delete_elements($element_ids);
-
- // destruction of the links between images and this category
- $query = '
-DELETE FROM '.IMAGE_CATEGORY_TABLE.'
- WHERE category_id IN (
-'.wordwrap(implode(', ', $ids), 80, "\n").')
-;';
- pwg_query($query);
-
- // destruction of the access linked to the category
- $query = '
-DELETE FROM '.USER_ACCESS_TABLE.'
- WHERE cat_id IN (
-'.wordwrap(implode(', ', $ids), 80, "\n").')
-;';
- pwg_query($query);
-
- $query = '
-DELETE FROM '.GROUP_ACCESS_TABLE.'
- WHERE cat_id IN (
-'.wordwrap(implode(', ', $ids), 80, "\n").')
-;';
- pwg_query($query);
-
- // destruction of the category
- $query = '
-DELETE FROM '.CATEGORIES_TABLE.'
- WHERE id IN (
-'.wordwrap(implode(', ', $ids), 80, "\n").')
-;';
- pwg_query($query);
-
- $query='
-DELETE FROM '.OLD_PERMALINKS_TABLE.'
- WHERE cat_id IN ('.implode(',',$ids).')';
- pwg_query($query);
-
- trigger_action('delete_categories', $ids);
-}
-
-// The function delete_elements deletes the elements identified by the
-// (numeric) values of the array $ids. It also deletes (in the database) :
-// - all the comments related to elements
-// - all the links between categories and elements
-// - all the favorites associated to elements
-function delete_elements($ids)
-{
- if (count($ids) == 0)
- {
- return;
- }
-
- // destruction of the comments on the image
- $query = '
-DELETE FROM '.COMMENTS_TABLE.'
- WHERE image_id IN (
-'.wordwrap(implode(', ', $ids), 80, "\n").')
-;';
- pwg_query($query);
-
- // destruction of the links between images and this category
- $query = '
-DELETE FROM '.IMAGE_CATEGORY_TABLE.'
- WHERE image_id IN (
-'.wordwrap(implode(', ', $ids), 80, "\n").')
-;';
- pwg_query($query);
-
- // destruction of the links between images and tags
- $query = '
-DELETE FROM '.IMAGE_TAG_TABLE.'
- WHERE image_id IN (
-'.wordwrap(implode(', ', $ids), 80, "\n").')
-;';
- pwg_query($query);
-
- // destruction of the favorites associated with the picture
- $query = '
-DELETE FROM '.FAVORITES_TABLE.'
- WHERE image_id IN (
-'.wordwrap(implode(', ', $ids), 80, "\n").')
-;';
- pwg_query($query);
-
- // destruction of the rates associated to this element
- $query = '
-DELETE FROM '.RATE_TABLE.'
- WHERE element_id IN (
-'.wordwrap(implode(', ', $ids), 80, "\n").')
-;';
- pwg_query($query);
-
- // destruction of the rates associated to this element
- $query = '
-DELETE FROM '.CADDIE_TABLE.'
- WHERE element_id IN (
-'.wordwrap(implode(', ', $ids), 80, "\n").')
-;';
- pwg_query($query);
-
- // destruction of the image
- $query = '
-DELETE FROM '.IMAGES_TABLE.'
- WHERE id IN (
-'.wordwrap(implode(', ', $ids), 80, "\n").')
-;';
- pwg_query($query);
-
- trigger_action('delete_elements', $ids);
-}
-
-// The delete_user function delete a user identified by the $user_id
-// It also deletes :
-// - all the access linked to this user
-// - all the links to any group
-// - all the favorites linked to this user
-// - calculated permissions linked to the user
-// - all datas about notifications for the user
-function delete_user($user_id)
-{
- global $conf;
- $tables = array(
- // destruction of the access linked to the user
- USER_ACCESS_TABLE,
- // destruction of data notification by mail for this user
- USER_MAIL_NOTIFICATION_TABLE,
- // destruction of data RSS notification for this user
- USER_FEED_TABLE,
- // deletion of calculated permissions linked to the user
- USER_CACHE_TABLE,
- // deletion of computed cache data linked to the user
- USER_CACHE_CATEGORIES_TABLE,
- // destruction of the group links for this user
- USER_GROUP_TABLE,
- // destruction of the favorites associated with the user
- FAVORITES_TABLE,
- // destruction of the caddie associated with the user
- CADDIE_TABLE,
- // deletion of piwigo specific informations
- USER_INFOS_TABLE,
- );
-
- foreach ($tables as $table)
- {
- $query = '
-DELETE FROM '.$table.'
- WHERE user_id = '.$user_id.'
-;';
- pwg_query($query);
- }
-
- // destruction of the user
- $query = '
-DELETE FROM '.SESSIONS_TABLE.'
- WHERE data LIKE "pwg_uid|i:'.(int)$user_id.';%"
-;';
- pwg_query($query);
-
- // destruction of the user
- $query = '
-DELETE FROM '.USERS_TABLE.'
- WHERE '.$conf['user_fields']['id'].' = '.$user_id.'
-;';
- pwg_query($query);
-
- trigger_action('delete_user', $user_id);
-}
-
-/**
- * Verifies that the representative picture really exists in the db and
- * picks up a random represantive if possible and based on config.
- *
- * @param mixed category id
- * @returns void
- */
-function update_category($ids = 'all')
-{
- global $conf;
-
- if ($ids=='all')
- {
- $where_cats = '1=1';
- }
- elseif ( !is_array($ids) )
- {
- $where_cats = '%s='.$ids;
- }
- else
- {
- if (count($ids) == 0)
- {
- return false;
- }
- $where_cats = '%s IN('.wordwrap(implode(', ', $ids), 120, "\n").')';
- }
-
- // find all categories where the setted representative is not possible :
- // the picture does not exist
- $query = '
-SELECT DISTINCT c.id
- FROM '.CATEGORIES_TABLE.' AS c LEFT JOIN '.IMAGES_TABLE.' AS i
- ON c.representative_picture_id = i.id
- WHERE representative_picture_id IS NOT NULL
- AND '.sprintf($where_cats, 'c.id').'
- AND i.id IS NULL
-;';
- $wrong_representant = array_from_query($query, 'id');
-
- if (count($wrong_representant) > 0)
- {
- $query = '
-UPDATE '.CATEGORIES_TABLE.'
- SET representative_picture_id = NULL
- WHERE id IN ('.wordwrap(implode(', ', $wrong_representant), 120, "\n").')
-;';
- pwg_query($query);
- }
-
- if (!$conf['allow_random_representative'])
- {
- // If the random representant is not allowed, we need to find
- // categories with elements and with no representant. Those categories
- // must be added to the list of categories to set to a random
- // representant.
- $query = '
-SELECT DISTINCT id
- FROM '.CATEGORIES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.'
- ON id = category_id
- WHERE representative_picture_id IS NULL
- AND '.sprintf($where_cats, 'category_id').'
-;';
- $to_rand = array_from_query($query, 'id');
- if (count($to_rand) > 0)
- {
- set_random_representant($to_rand);
- }
- }
-}
-
-/**
- * returns an array containing sub-directories which can be a category,
- * recursive by default
- *
- * directories nammed "thumbnail", "pwg_high" or "pwg_representative" are
- * omitted
- *
- * @param string $basedir
- * @return array
- */
-function get_fs_directories($path, $recursive = true)
-{
- $dirs = array();
-
- if (is_dir($path))
- {
- if ($contents = opendir($path))
- {
- while (($node = readdir($contents)) !== false)
- {
- if (is_dir($path.'/'.$node)
- and $node != '.'
- and $node != '..'
- and $node != '.svn'
- and $node != 'thumbnail'
- and $node != 'pwg_high'
- and $node != 'pwg_representative')
- {
- array_push($dirs, $path.'/'.$node);
- if ($recursive)
- {
- $dirs = array_merge($dirs, get_fs_directories($path.'/'.$node));
- }
- }
- }
- }
- }
-
- return $dirs;
-}
-
-/**
- * inserts multiple lines in a table
- *
- * @param string table_name
- * @param array dbfields
- * @param array inserts
- * @return void
- */
-function mass_inserts($table_name, $dbfields, $datas)
-{
- if (count($datas) != 0)
- {
- $first = true;
-
- $query = 'SHOW VARIABLES LIKE \'max_allowed_packet\';';
- list(, $packet_size) = mysql_fetch_row(pwg_query($query));
- $packet_size = $packet_size - 2000; // The last list of values MUST not exceed 2000 character*/
- $query = '';
-
- foreach ($datas as $insert)
- {
- if (strlen($query) >= $packet_size)
- {
- $query .= '
-;';
- pwg_query($query);
- $first = true;
- }
-
- if ($first)
- {
- $query = '
-INSERT INTO '.$table_name.'
- ('.implode(',', $dbfields).')
- VALUES';
- $first = false;
- }
- else
- {
- $query .= '
- , ';
- }
-
- $query .= '(';
- foreach ($dbfields as $field_id => $dbfield)
- {
- if ($field_id > 0)
- {
- $query .= ',';
- }
-
- if (!isset($insert[$dbfield]) or $insert[$dbfield] === '')
- {
- $query .= 'NULL';
- }
- else
- {
- $query .= "'".$insert[$dbfield]."'";
- }
- }
- $query .= ')';
- }
-
- $query .= '
-;';
- pwg_query($query);
- }
-}
-
-/**
- * updates multiple lines in a table
- *
- * @param string table_name
- * @param array dbfields
- * @param array datas
- * @return void
- */
-function mass_updates($tablename, $dbfields, $datas)
-{
- if (count($datas) != 0)
- {
- // depending on the MySQL version, we use the multi table update or N
- // update queries
- if (count($datas) < 10 or version_compare(mysql_get_server_info(), '4.0.4') < 0)
- {
- // MySQL is prior to version 4.0.4, multi table update feature is not
- // available
- foreach ($datas as $data)
- {
- $query = '
-UPDATE '.$tablename.'
- SET ';
- $is_first = true;
- foreach ($dbfields['update'] as $key)
- {
- if (!$is_first)
- {
- $query.= ",\n ";
- }
- $query.= $key.' = ';
- if (isset($data[$key]) and $data[$key] != '')
- {
- $query.= '\''.$data[$key].'\'';
- }
- else
- {
- $query.= 'NULL';
- }
- $is_first = false;
- }
- $query.= '
- WHERE ';
-
- $is_first = true;
- foreach ($dbfields['primary'] as $key)
- {
- if (!$is_first)
- {
- $query.= ' AND ';
- }
- if ( isset($data[$key]) )
- {
- $query.= $key.' = \''.$data[$key].'\'';
- }
- else
- {
- $query.= $key.' IS NULL';
- }
- $is_first = false;
- }
- $query.= '
-;';
- pwg_query($query);
- }
- }
- else
- {
- // creation of the temporary table
- $query = '
-SHOW FULL COLUMNS FROM '.$tablename.'
-;';
- $result = pwg_query($query);
- $columns = array();
- $all_fields = array_merge($dbfields['primary'], $dbfields['update']);
- while ($row = mysql_fetch_array($result))
- {
- if (in_array($row['Field'], $all_fields))
- {
- $column = $row['Field'];
- $column.= ' '.$row['Type'];
-
- $nullable = true;
- if (!isset($row['Null']) or $row['Null'] == '' or $row['Null']=='NO')
- {
- $column.= ' NOT NULL';
- $nullable = false;
- }
- if (isset($row['Default']))
- {
- $column.= " default '".$row['Default']."'";
- }
- elseif ($nullable)
- {
- $column.= " default NULL";
- }
- if (isset($row['Collation']) and $row['Collation'] != 'NULL')
- {
- $column.= " collate '".$row['Collation']."'";
- }
- array_push($columns, $column);
- }
- }
-
- $temporary_tablename = $tablename.'_'.micro_seconds();
-
- $query = '
- CREATE TABLE '.$temporary_tablename.'
- (
- '.implode(",\n", $columns).',
- UNIQUE KEY the_key ('.implode(',', $dbfields['primary']).')
- )
-;';
-
- pwg_query($query);
- mass_inserts($temporary_tablename, $all_fields, $datas);
- // update of images table by joining with temporary table
- $query = '
-UPDATE '.$tablename.' AS t1, '.$temporary_tablename.' AS t2
- SET '.
- implode(
- "\n , ",
- array_map(
- create_function('$s', 'return "t1.$s = t2.$s";'),
- $dbfields['update']
- )
- ).'
- WHERE '.
- implode(
- "\n AND ",
- array_map(
- create_function('$s', 'return "t1.$s = t2.$s";'),
- $dbfields['primary']
- )
- ).'
- ;';
- pwg_query($query);
- $query = '
-DROP TABLE '.$temporary_tablename.'
-;';
- pwg_query($query);
- }
- }
-}
-
-/**
- * order categories (update categories.rank and global_rank database fields)
- * so that rank field are consecutive integers starting at 1 for each child
- * @return void
- */
-function update_global_rank()
-{
- $query = '
-SELECT id, if(id_uppercat is null,\'\',id_uppercat) AS id_uppercat, uppercats, rank, global_rank
- FROM '.CATEGORIES_TABLE.'
- ORDER BY id_uppercat,rank,name
-;';
-
- $cat_map = array();
-
- $current_rank = 0;
- $current_uppercat = '';
-
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- if ($row['id_uppercat'] != $current_uppercat)
- {
- $current_rank = 0;
- $current_uppercat = $row['id_uppercat'];
- }
- ++$current_rank;
- $cat =
- array(
- 'rank' => $current_rank,
- 'rank_changed' =>$current_rank!=$row['rank'],
- 'global_rank' => $row['global_rank'],
- 'uppercats' => $row['uppercats'],
- );
- $cat_map[ $row['id'] ] = $cat;
- }
-
- $datas = array();
-
- foreach( $cat_map as $id=>$cat )
- {
- $new_global_rank = preg_replace(
- '/(\d+)/e',
- "\$cat_map['$1']['rank']",
- str_replace(',', '.', $cat['uppercats'] )
- );
- if ( $cat['rank_changed']
- or $new_global_rank!=$cat['global_rank']
- )
- {
- $datas[] = array(
- 'id' => $id,
- 'rank' => $cat['rank'],
- 'global_rank' => $new_global_rank,
- );
- }
- }
-
- mass_updates(
- CATEGORIES_TABLE,
- array(
- 'primary' => array('id'),
- 'update' => array('rank', 'global_rank')
- ),
- $datas
- );
- return count($datas);
-}
-
-/**
- * change the visible property on a set of categories
- *
- * @param array categories
- * @param string value
- * @return void
- */
-function set_cat_visible($categories, $value)
-{
- if (!in_array($value, array('true', 'false')))
- {
- return false;
- }
-
- // unlocking a category => all its parent categories become unlocked
- if ($value == 'true')
- {
- $uppercats = get_uppercat_ids($categories);
- $query = '
-UPDATE '.CATEGORIES_TABLE.'
- SET visible = \'true\'
- WHERE id IN ('.implode(',', $uppercats).')
-;';
- pwg_query($query);
- }
- // locking a category => all its child categories become locked
- if ($value == 'false')
- {
- $subcats = get_subcat_ids($categories);
- $query = '
-UPDATE '.CATEGORIES_TABLE.'
- SET visible = \'false\'
- WHERE id IN ('.implode(',', $subcats).')
-;';
- pwg_query($query);
- }
-}
-
-/**
- * change the status property on a set of categories : private or public
- *
- * @param array categories
- * @param string value
- * @return void
- */
-function set_cat_status($categories, $value)
-{
- if (!in_array($value, array('public', 'private')))
- {
- return false;
- }
-
- // make public a category => all its parent categories become public
- if ($value == 'public')
- {
- $uppercats = get_uppercat_ids($categories);
- $query = '
-UPDATE '.CATEGORIES_TABLE.'
- SET status = \'public\'
- WHERE id IN ('.implode(',', $uppercats).')
-;';
- pwg_query($query);
- }
- // make a category private => all its child categories become private
- if ($value == 'private')
- {
- $subcats = get_subcat_ids($categories);
- $query = '
-UPDATE '.CATEGORIES_TABLE.'
- SET status = \'private\'
- WHERE id IN ('.implode(',', $subcats).')
-;';
- pwg_query($query);
- }
-}
-
-/**
- * returns all uppercats category ids of the given category ids
- *
- * @param array cat_ids
- * @return array
- */
-function get_uppercat_ids($cat_ids)
-{
- if (!is_array($cat_ids) or count($cat_ids) < 1)
- {
- return array();
- }
-
- $uppercats = array();
-
- $query = '
-SELECT uppercats
- FROM '.CATEGORIES_TABLE.'
- WHERE id IN ('.implode(',', $cat_ids).')
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $uppercats = array_merge($uppercats,
- explode(',', $row['uppercats']));
- }
- $uppercats = array_unique($uppercats);
-
- return $uppercats;
-}
-
-/**
- * set a new random representant to the categories
- *
- * @param array categories
- */
-function set_random_representant($categories)
-{
- $datas = array();
- foreach ($categories as $category_id)
- {
- $query = '
-SELECT image_id
- FROM '.IMAGE_CATEGORY_TABLE.'
- WHERE category_id = '.$category_id.'
- ORDER BY RAND()
- LIMIT 0,1
-;';
- list($representative) = mysql_fetch_array(pwg_query($query));
-
- array_push(
- $datas,
- array(
- 'id' => $category_id,
- 'representative_picture_id' => $representative,
- )
- );
- }
-
- mass_updates(
- CATEGORIES_TABLE,
- array(
- 'primary' => array('id'),
- 'update' => array('representative_picture_id')
- ),
- $datas
- );
-}
-
-/**
- * returns the fulldir for each given category id
- *
- * @param array cat_ids
- * @return array
- */
-function get_fulldirs($cat_ids)
-{
- if (count($cat_ids) == 0)
- {
- return array();
- }
-
- // caching directories of existing categories
- $query = '
-SELECT id, dir
- FROM '.CATEGORIES_TABLE.'
- WHERE dir IS NOT NULL
-;';
- $result = pwg_query($query);
- $cat_dirs = array();
- while ($row = mysql_fetch_array($result))
- {
- $cat_dirs[$row['id']] = $row['dir'];
- }
-
- // caching galleries_url
- $query = '
-SELECT id, galleries_url
- FROM '.SITES_TABLE.'
-;';
- $result = pwg_query($query);
- $galleries_url = array();
- while ($row = mysql_fetch_array($result))
- {
- $galleries_url[$row['id']] = $row['galleries_url'];
- }
-
- // categories : id, site_id, uppercats
- $categories = array();
-
- $query = '
-SELECT id, uppercats, site_id
- FROM '.CATEGORIES_TABLE.'
- WHERE id IN (
-'.wordwrap(implode(', ', $cat_ids), 80, "\n").')
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- array_push($categories, $row);
- }
-
- // filling $cat_fulldirs
- $cat_fulldirs = array();
- foreach ($categories as $category)
- {
- $uppercats = str_replace(',', '/', $category['uppercats']);
- $cat_fulldirs[$category['id']] = $galleries_url[$category['site_id']];
- $cat_fulldirs[$category['id']].= preg_replace('/(\d+)/e',
- "\$cat_dirs['$1']",
- $uppercats);
- }
-
- return $cat_fulldirs;
-}
-
-/**
- * returns an array with all file system files according to
- * $conf['file_ext']
- *
- * @param string $path
- * @param bool recursive
- * @return array
- */
-function get_fs($path, $recursive = true)
-{
- global $conf;
-
- // because isset is faster than in_array...
- if (!isset($conf['flip_picture_ext']))
- {
- $conf['flip_picture_ext'] = array_flip($conf['picture_ext']);
- }
- if (!isset($conf['flip_file_ext']))
- {
- $conf['flip_file_ext'] = array_flip($conf['file_ext']);
- }
-
- $fs['elements'] = array();
- $fs['thumbnails'] = array();
- $fs['representatives'] = array();
- $subdirs = array();
-
- if (is_dir($path))
- {
- if ($contents = opendir($path))
- {
- while (($node = readdir($contents)) !== false)
- {
- if (is_file($path.'/'.$node))
- {
- $extension = get_extension($node);
-
-// if (in_array($extension, $conf['picture_ext']))
- if (isset($conf['flip_picture_ext'][$extension]))
- {
- if (basename($path) == 'thumbnail')
- {
- array_push($fs['thumbnails'], $path.'/'.$node);
- }
- else if (basename($path) == 'pwg_representative')
- {
- array_push($fs['representatives'], $path.'/'.$node);
- }
- else
- {
- array_push($fs['elements'], $path.'/'.$node);
- }
- }
-// else if (in_array($extension, $conf['file_ext']))
- else if (isset($conf['flip_file_ext'][$extension]))
- {
- array_push($fs['elements'], $path.'/'.$node);
- }
- }
- else if (is_dir($path.'/'.$node)
- and $node != '.'
- and $node != '..'
- and $node != 'pwg_high'
- and $recursive)
- {
- array_push($subdirs, $node);
- }
- }
- }
- closedir($contents);
-
- foreach ($subdirs as $subdir)
- {
- $tmp_fs = get_fs($path.'/'.$subdir);
-
- $fs['elements'] = array_merge($fs['elements'],
- $tmp_fs['elements']);
-
- $fs['thumbnails'] = array_merge($fs['thumbnails'],
- $tmp_fs['thumbnails']);
-
- $fs['representatives'] = array_merge($fs['representatives'],
- $tmp_fs['representatives']);
- }
- }
- return $fs;
-}
-
-/**
- * stupidly returns the current microsecond since Unix epoch
- */
-function micro_seconds()
-{
- $t1 = explode(' ', microtime());
- $t2 = explode('.', $t1[0]);
- $t2 = $t1[1].substr($t2[1], 0, 6);
- return $t2;
-}
-
-/**
- * synchronize base users list and related users list
- *
- * compares and synchronizes base users table (USERS_TABLE) with its child
- * tables (USER_INFOS_TABLE, USER_ACCESS, USER_CACHE, USER_GROUP) : each
- * base user must be present in child tables, users in child tables not
- * present in base table must be deleted.
- *
- * @return void
- */
-function sync_users()
-{
- global $conf;
-
- $query = '
-SELECT '.$conf['user_fields']['id'].' AS id
- FROM '.USERS_TABLE.'
-;';
- $base_users = array_from_query($query, 'id');
-
- $query = '
-SELECT user_id
- FROM '.USER_INFOS_TABLE.'
-;';
- $infos_users = array_from_query($query, 'user_id');
-
- // users present in $base_users and not in $infos_users must be added
- $to_create = array_diff($base_users, $infos_users);
-
- if (count($to_create) > 0)
- {
- create_user_infos($to_create);
- }
-
- // users present in user related tables must be present in the base user
- // table
- $tables = array(
- USER_MAIL_NOTIFICATION_TABLE,
- USER_FEED_TABLE,
- USER_INFOS_TABLE,
- USER_ACCESS_TABLE,
- USER_CACHE_TABLE,
- USER_CACHE_CATEGORIES_TABLE,
- USER_GROUP_TABLE
- );
-
- foreach ($tables as $table)
- {
- $query = '
-SELECT DISTINCT user_id
- FROM '.$table.'
-;';
- $to_delete = array_diff(
- array_from_query($query, 'user_id'),
- $base_users
- );
-
- if (count($to_delete) > 0)
- {
- $query = '
-DELETE
- FROM '.$table.'
- WHERE user_id in ('.implode(',', $to_delete).')
-;';
- pwg_query($query);
- }
- }
-}
-
-/**
- * updates categories.uppercats field based on categories.id +
- * categories.id_uppercat
- *
- * @return void
- */
-function update_uppercats()
-{
- $query = '
-SELECT id, id_uppercat, uppercats
- FROM '.CATEGORIES_TABLE.'
-;';
- $cat_map = hash_from_query($query, 'id');
-
- $datas = array();
- foreach ($cat_map as $id => $cat)
- {
- $upper_list = array();
-
- $uppercat = $id;
- while ($uppercat)
- {
- array_push($upper_list, $uppercat);
- $uppercat = $cat_map[$uppercat]['id_uppercat'];
- }
-
- $new_uppercats = implode(',', array_reverse($upper_list));
- if ($new_uppercats != $cat['uppercats'])
- {
- array_push(
- $datas,
- array(
- 'id' => $id,
- 'uppercats' => $new_uppercats
- )
- );
- }
- }
- $fields = array('primary' => array('id'), 'update' => array('uppercats'));
- mass_updates(CATEGORIES_TABLE, $fields, $datas);
-}
-
-/**
- * update images.path field
- *
- * @return void
- */
-function update_path()
-{
- $query = '
-SELECT DISTINCT(storage_category_id)
- FROM '.IMAGES_TABLE.'
-;';
- $cat_ids = array_from_query($query, 'storage_category_id');
- $fulldirs = get_fulldirs($cat_ids);
-
- foreach ($cat_ids as $cat_id)
- {
- $query = '
-UPDATE '.IMAGES_TABLE.'
- SET path = CONCAT(\''.$fulldirs[$cat_id].'\',\'/\',file)
- WHERE storage_category_id = '.$cat_id.'
-;';
- pwg_query($query);
- }
-}
-
-/**
- * update images.average_rate field
- * param int $element_id optional, otherwise applies to all
- * @return void
- */
-function update_average_rate( $element_id=-1 )
-{
- $query = '
-SELECT element_id,
- ROUND(AVG(rate),2) AS average_rate
- FROM '.RATE_TABLE;
- if ( $element_id != -1 )
- {
- $query .= ' WHERE element_id=' . $element_id;
- }
- $query .= ' GROUP BY element_id;';
-
- $result = pwg_query($query);
-
- $datas = array();
-
- while ($row = mysql_fetch_array($result))
- {
- array_push(
- $datas,
- array(
- 'id' => $row['element_id'],
- 'average_rate' => $row['average_rate']
- )
- );
- }
-
- mass_updates(
- IMAGES_TABLE,
- array(
- 'primary' => array('id'),
- 'update' => array('average_rate')
- ),
- $datas
- );
-
- $query='
-SELECT id FROM '.IMAGES_TABLE .'
- LEFT JOIN '.RATE_TABLE.' ON id=element_id
- WHERE element_id IS NULL AND average_rate IS NOT NULL';
- if ( $element_id != -1 )
- {
- $query .= ' AND id=' . $element_id;
- }
- $to_update = array_from_query( $query, 'id');
-
- if ( !empty($to_update) )
- {
- $query='
-UPDATE '.IMAGES_TABLE .'
- SET average_rate=NULL
- WHERE id IN (' . implode(',',$to_update) . ')';
- pwg_query($query);
- }
-}
-
-/**
- * change the parent category of the given categories. The categories are
- * supposed virtual.
- *
- * @param array category identifiers
- * @param int parent category identifier
- * @return void
- */
-function move_categories($category_ids, $new_parent = -1)
-{
- global $page;
-
- if (count($category_ids) == 0)
- {
- return;
- }
-
- $new_parent = $new_parent < 1 ? 'NULL' : $new_parent;
-
- $categories = array();
-
- $query = '
-SELECT id, id_uppercat, status, uppercats
- FROM '.CATEGORIES_TABLE.'
- WHERE id IN ('.implode(',', $category_ids).')
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $categories[$row['id']] =
- array(
- 'parent' => empty($row['id_uppercat']) ? 'NULL' : $row['id_uppercat'],
- 'status' => $row['status'],
- 'uppercats' => $row['uppercats']
- );
- }
-
- // is the movement possible? The movement is impossible if you try to move
- // a category in a sub-category or itself
- if ('NULL' != $new_parent)
- {
- $query = '
-SELECT uppercats
- FROM '.CATEGORIES_TABLE.'
- WHERE id = '.$new_parent.'
-;';
- list($new_parent_uppercats) = mysql_fetch_row(pwg_query($query));
-
- foreach ($categories as $category)
- {
- // technically, you can't move a category with uppercats 12,125,13,14
- // into a new parent category with uppercats 12,125,13,14,24
- if (preg_match('/^'.$category['uppercats'].'/', $new_parent_uppercats))
- {
- array_push(
- $page['errors'],
- l10n('You cannot move a category in its own sub category')
- );
- return;
- }
- }
- }
-
- $tables =
- array(
- USER_ACCESS_TABLE => 'user_id',
- GROUP_ACCESS_TABLE => 'group_id'
- );
-
- $query = '
-UPDATE '.CATEGORIES_TABLE.'
- SET id_uppercat = '.$new_parent.'
- WHERE id IN ('.implode(',', $category_ids).')
-;';
- pwg_query($query);
-
- update_uppercats();
- update_global_rank();
-
- // status and related permissions management
- if ('NULL' == $new_parent)
- {
- $parent_status = 'public';
- }
- else
- {
- $query = '
-SELECT status
- FROM '.CATEGORIES_TABLE.'
- WHERE id = '.$new_parent.'
-;';
- list($parent_status) = mysql_fetch_row(pwg_query($query));
- }
-
- if ('private' == $parent_status)
- {
- foreach ($categories as $cat_id => $category)
- {
- switch ($category['status'])
- {
- case 'public' :
- {
- set_cat_status(array($cat_id), 'private');
- break;
- }
- case 'private' :
- {
- $subcats = get_subcat_ids(array($cat_id));
-
- foreach ($tables as $table => $field)
- {
- $query = '
-SELECT '.$field.'
- FROM '.$table.'
- WHERE cat_id = '.$cat_id.'
-;';
- $category_access = array_from_query($query, $field);
-
- $query = '
-SELECT '.$field.'
- FROM '.$table.'
- WHERE cat_id = '.$new_parent.'
-;';
- $parent_access = array_from_query($query, $field);
-
- $to_delete = array_diff($parent_access, $category_access);
-
- if (count($to_delete) > 0)
- {
- $query = '
-DELETE FROM '.$table.'
- WHERE '.$field.' IN ('.implode(',', $to_delete).')
- AND cat_id IN ('.implode(',', $subcats).')
-;';
- pwg_query($query);
- }
- }
- break;
- }
- }
- }
- }
-
- array_push(
- $page['infos'],
- l10n_dec(
- '%d category moved', '%d categories moved',
- count($categories)
- )
- );
-}
-
-/**
- * create a virtual category
- *
- * @param string category name
- * @param int parent category id
- * @return array with ('info' and 'id') or ('error') key
- */
-function create_virtual_category($category_name, $parent_id=null)
-{
- global $conf;
-
- // is the given category name only containing blank spaces ?
- if (preg_match('/^\s*$/', $category_name))
- {
- return array('error' => l10n('cat_error_name'));
- }
-
- $parent_id = !empty($parent_id) ? $parent_id : 'NULL';
-
- $query = '
-SELECT MAX(rank)
- FROM '.CATEGORIES_TABLE.'
- WHERE id_uppercat '.(is_numeric($parent_id) ? '= '.$parent_id : 'IS NULL').'
-;';
- list($current_rank) = mysql_fetch_array(pwg_query($query));
-
- $insert = array(
- 'name' => $category_name,
- 'rank' => ++$current_rank,
- 'commentable' => boolean_to_string($conf['newcat_default_commentable']),
- 'uploadable' => 'false',
- );
-
- if ($parent_id != 'NULL')
- {
- $query = '
-SELECT id, uppercats, global_rank, visible, status
- FROM '.CATEGORIES_TABLE.'
- WHERE id = '.$parent_id.'
-;';
- $parent = mysql_fetch_array(pwg_query($query));
-
- $insert{'id_uppercat'} = $parent{'id'};
- $insert{'global_rank'} = $parent{'global_rank'}.'.'.$insert{'rank'};
-
- // at creation, must a category be visible or not ? Warning : if the
- // parent category is invisible, the category is automatically create
- // invisible. (invisible = locked)
- if ('false' == $parent['visible'])
- {
- $insert{'visible'} = 'false';
- }
- else
- {
- $insert{'visible'} = boolean_to_string($conf['newcat_default_visible']);
- }
-
- // at creation, must a category be public or private ? Warning : if the
- // parent category is private, the category is automatically create
- // private.
- if ('private' == $parent['status'])
- {
- $insert{'status'} = 'private';
- }
- else
- {
- $insert{'status'} = $conf['newcat_default_status'];
- }
- }
- else
- {
- $insert{'visible'} = boolean_to_string($conf['newcat_default_visible']);
- $insert{'status'} = $conf['newcat_default_status'];
- $insert{'global_rank'} = $insert{'rank'};
- }
-
- // we have then to add the virtual category
- mass_inserts(
- CATEGORIES_TABLE,
- array(
- 'site_id', 'name', 'id_uppercat', 'rank', 'commentable',
- 'uploadable', 'visible', 'status', 'global_rank',
- ),
- array($insert)
- );
-
- $inserted_id = mysql_insert_id();
-
- $query = '
-UPDATE
- '.CATEGORIES_TABLE.'
- SET uppercats = \''.
- (isset($parent) ? $parent{'uppercats'}.',' : '').
- $inserted_id.
- '\'
- WHERE id = '.$inserted_id.'
-;';
- pwg_query($query);
-
- return array(
- 'info' => l10n('cat_virtual_added'),
- 'id' => $inserted_id,
- );
-}
-
-/**
- * Set tags to an image. Warning: given tags are all tags associated to the
- * image, not additionnal tags.
- *
- * @param array tag ids
- * @param int image id
- * @return void
- */
-function set_tags($tags, $image_id)
-{
- $query = '
-DELETE
- FROM '.IMAGE_TAG_TABLE.'
- WHERE image_id = '.$image_id.'
-;';
- pwg_query($query);
-
- if (count($tags) > 0)
- {
- $inserts = array();
- foreach ($tags as $tag_id)
- {
- array_push(
- $inserts,
- array(
- 'tag_id' => $tag_id,
- 'image_id' => $image_id
- )
- );
- }
- mass_inserts(
- IMAGE_TAG_TABLE,
- array_keys($inserts[0]),
- $inserts
- );
- }
-}
-
-/**
- * Add new tags to a set of images.
- *
- * @param array tag ids
- * @param array image ids
- * @return void
- */
-function add_tags($tags, $images)
-{
- if (count($tags) == 0 or count($tags) == 0)
- {
- return;
- }
-
- // we can't insert twice the same {image_id,tag_id} so we must first
- // delete lines we'll insert later
- $query = '
-DELETE
- FROM '.IMAGE_TAG_TABLE.'
- WHERE image_id IN ('.implode(',', $images).')
- AND tag_id IN ('.implode(',', $tags).')
-;';
- pwg_query($query);
-
- $inserts = array();
- foreach ($images as $image_id)
- {
- foreach ($tags as $tag_id)
- {
- array_push(
- $inserts,
- array(
- 'image_id' => $image_id,
- 'tag_id' => $tag_id,
- )
- );
- }
- }
- mass_inserts(
- IMAGE_TAG_TABLE,
- array_keys($inserts[0]),
- $inserts
- );
-}
-
-function tag_id_from_tag_name($tag_name)
-{
- global $page;
-
- $tag_name = trim($tag_name);
- if (isset($page['tag_id_from_tag_name_cache'][$tag_name]))
- {
- return $page['tag_id_from_tag_name_cache'][$tag_name];
- }
-
- // does the tag already exists?
- $query = '
-SELECT id
- FROM '.TAGS_TABLE.'
- WHERE name = \''.$tag_name.'\'
-;';
- $existing_tags = array_from_query($query, 'id');
-
- if (count($existing_tags) == 0)
- {
- mass_inserts(
- TAGS_TABLE,
- array('name', 'url_name'),
- array(
- array(
- 'name' => $tag_name,
- 'url_name' => str2url($tag_name),
- )
- )
- );
-
- $page['tag_id_from_tag_name_cache'][$tag_name] = mysql_insert_id();
- }
- else
- {
- $page['tag_id_from_tag_name_cache'][$tag_name] = $existing_tags[0];
- }
-
- return $page['tag_id_from_tag_name_cache'][$tag_name];
-}
-
-function set_tags_of($tags_of)
-{
- if (count($tags_of) > 0)
- {
- $query = '
-DELETE
- FROM '.IMAGE_TAG_TABLE.'
- WHERE image_id IN ('.implode(',', array_keys($tags_of)).')
-;';
- pwg_query($query);
-
- $inserts = array();
-
- foreach ($tags_of as $image_id => $tag_ids)
- {
- foreach ($tag_ids as $tag_id)
- {
- array_push(
- $inserts,
- array(
- 'image_id' => $image_id,
- 'tag_id' => $tag_id,
- )
- );
- }
- }
-
- mass_inserts(
- IMAGE_TAG_TABLE,
- array_keys($inserts[0]),
- $inserts
- );
- }
-}
-
-/**
- * Do maintenance on all PWG tables
- *
- * @return nono
- */
-function do_maintenance_all_tables()
-{
- global $prefixeTable;
-
- $all_tables = array();
-
- // List all tables
- $query = 'SHOW TABLES LIKE \''.$prefixeTable.'%\';';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- array_push($all_tables, $row[0]);
- }
-
- // Repair all tables
- $query = 'REPAIR TABLE '.implode(', ', $all_tables).';';
- pwg_query($query);
-
- // Re-Order all tables
- foreach ($all_tables as $table_name)
- {
- $all_primary_key = array();
-
- $query = 'DESC '.$table_name.';';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- if ($row['Key'] == 'PRI')
- {
- array_push($all_primary_key, $row['Field']);
- }
- }
-
- if (count($all_primary_key) != 0)
- {
- $query = 'ALTER TABLE '.$table_name.' ORDER BY '.implode(', ', $all_primary_key).';';
- pwg_query($query);
- }
- }
-
- // Optimize all tables
- $query = 'OPTIMIZE TABLE '.implode(', ', $all_tables).';';
- pwg_query($query);
-
-}
-
-/**
- * Associate a list of images to a list of categories.
- *
- * The function will not duplicate links
- *
- * @param array images
- * @param array categories
- * @return void
- */
-function associate_images_to_categories($images, $categories)
-{
- if (count($images) == 0
- or count($categories) == 0)
- {
- return false;
- }
-
- $query = '
-DELETE
- FROM '.IMAGE_CATEGORY_TABLE.'
- WHERE image_id IN ('.implode(',', $images).')
- AND category_id IN ('.implode(',', $categories).')
-;';
- pwg_query($query);
-
- $inserts = array();
- foreach ($categories as $category_id)
- {
- foreach ($images as $image_id)
- {
- array_push(
- $inserts,
- array(
- 'image_id' => $image_id,
- 'category_id' => $category_id,
- )
- );
- }
- }
-
- mass_inserts(
- IMAGE_CATEGORY_TABLE,
- array_keys($inserts[0]),
- $inserts
- );
-
- update_category($categories);
-}
-
-/**
- * Associate images associated to a list of source categories to a list of
- * destination categories.
- *
- * @param array sources
- * @param array destinations
- * @return void
- */
-function associate_categories_to_categories($sources, $destinations)
-{
- if (count($sources) == 0)
- {
- return false;
- }
-
- $query = '
-SELECT image_id
- FROM '.IMAGE_CATEGORY_TABLE.'
- WHERE category_id IN ('.implode(',', $sources).')
-;';
- $images = array_from_query($query, 'image_id');
-
- associate_images_to_categories($images, $destinations);
-}
-
-/**
- * Create an XML file with Piwigo informations about a list of
- * pictures.
- *
- * The goal of the export feature is to make easier the reading of
- * informations related to pictures outside of Piwigo.
- *
- * @param array image_ids
- */
-function export_pwg_data($image_ids)
-{
- global $conf;
-
- if (count($image_ids) == 0)
- {
- return;
- }
-
- $fp = fopen($conf['export_file'], 'w');
- $xml_string = '<export>'."\n";
-
- $query = '
-SELECT tag_id,
- image_id
- FROM '.IMAGE_TAG_TABLE.'
- WHERE image_id IN ('.implode(',', $image_ids).')
-;';
- $result = pwg_query($query);
- $tags_of = array();
- $all_tag_ids = array();
- $tag_name_of = array();
-
- if (mysql_num_rows($result))
- {
- while ($row = mysql_fetch_array($result))
- {
- array_push($all_tag_ids, $row['tag_id']);
-
- if (!isset($tags_of[ $row['image_id'] ])) {
- $tags_of[ $row['image_id'] ] = array();
- }
-
- array_push(
- $tags_of[ $row['image_id'] ],
- $row['tag_id']
- );
- }
-
- $all_tag_ids = array_unique($all_tag_ids);
-
- $query = '
-SELECT id,
- name
- FROM '.TAGS_TABLE.'
- WHERE id IN ('.implode(',', $all_tag_ids).')
-;';
- $result = pwg_query($query);
-
- while ($row = mysql_fetch_array($result))
- {
- $tag_name_of[ $row['id'] ] = $row['name'];
- }
- }
-
- $query = '
-SELECT id,
- path
- FROM '.IMAGES_TABLE.'
- WHERE id IN ('.implode(',', $image_ids).')
-;';
- $result = pwg_query($query);
-
- while ($row = mysql_fetch_array($result))
- {
- $xml_string.= " <photo>\n";
- $xml_string.= " <id>".$row['id']."</id>\n";
- $xml_string.= " <path>".$row['path']."</path>\n";
-
- foreach ($tags_of[ $row['id'] ] as $tag_id)
- {
- $xml_string.= " <tag>".$tag_name_of[$tag_id]."</tag>\n";
- }
-
- $xml_string.= " </photo>\n";
- }
-
- $xml_string.= '</export>';
- fwrite($fp, $xml_string);
- fclose($fp);
-}
-
-/**
- * Refer main Piwigo URLs (currently PHPWG_DOMAIN domain)
- *
- * @param void
- * @return array like $conf['links']
- */
-function pwg_URL()
-{
- global $lang_info;
- $urls = array(
- 'WIKI' => 'http://'.PHPWG_DOMAIN.'/doc/',
- 'HOME' => 'http://'.PHPWG_DOMAIN.'/',
- 'DEMO' => 'http://demo.'.PHPWG_DOMAIN.'/',
- 'FORUM' => 'http://forum.'.PHPWG_DOMAIN.'/',
- 'BUGS' => 'http://bugs.'.PHPWG_DOMAIN.'/',
- 'EXTENSIONS' => 'http://'.PHPWG_DOMAIN.'/ext',
- );
- if ( isset($lang_info['code']) and
- in_array($lang_info['code'], array('fr','en')) )
- { /* current wiki languages are French or English */
- $urls['WIKI'] .= 'doku.php?id='.$lang_info['code'].':start';
- $urls['HOME'] .= '?lang='.$lang_info['code'];
- }
- return $urls;
-}
-
-/**
- * Invalidates cahed data (permissions and category counts) for all users.
- */
-function invalidate_user_cache()
-{
- $query = '
-UPDATE '.USER_CACHE_TABLE.'
- SET need_update = \'true\'
-;';
- pwg_query($query);
- trigger_action('invalidate_user_cache');
-}
-
-/**
- * adds the caracter set to a create table sql query.
- * all CREATE TABLE queries must call this function
- * @param string query - the sql query
- */
-function create_table_add_character_set($query)
-{
- defined('DB_CHARSET') or die('create_table_add_character_set DB_CHARSET undefined');
- if ('DB_CHARSET'!='')
- {
- if ( version_compare(mysql_get_server_info(), '4.1.0', '<') )
- {
- return $query;
- }
- $charset_collate = " DEFAULT CHARACTER SET ".DB_CHARSET;
- if ('DB_COLLATE'!='')
- {
- $charset_collate .= " COLLATE ".DB_COLLATE;
- }
- $query=trim($query);
- $query=trim($query, ';');
- if (preg_match('/^CREATE\s+TABLE/i',$query))
- {
- $query.=$charset_collate;
- }
- $query .= ';';
- }
- return $query;
-}
-
-/**
- * Returns array use on template with html_options method
- * @param Min and Max access to use
- * @return array of user access level
- */
-function get_user_access_level_html_options($MinLevelAccess = ACCESS_FREE, $MaxLevelAccess = ACCESS_CLOSED)
-{
- $tpl_options = array();
- for ($level = $MinLevelAccess; $level <= $MaxLevelAccess; $level++)
- {
- $tpl_options[$level] = l10n(sprintf('ACCESS_%d', $level));
- }
- return $tpl_options;
-}
-
-?> \ No newline at end of file
diff --git a/BSF/admin/include/functions_history.inc.php b/BSF/admin/include/functions_history.inc.php
deleted file mode 100644
index aa4a03fc8..000000000
--- a/BSF/admin/include/functions_history.inc.php
+++ /dev/null
@@ -1,179 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
-
-function history_tabsheet()
-{
- global $page, $link_start;
-
- // TabSheet
- $tabsheet = new tabsheet();
- // TabSheet initialization
- $tabsheet->add('stats', l10n('Statistics'), $link_start.'stats');
- $tabsheet->add('history', l10n('Search'), $link_start.'history');
- // TabSheet selection
- $tabsheet->select($page['page']);
- // Assign tabsheet to template
- $tabsheet->assign();
-}
-
-function history_compare($a, $b)
-{
- return strcmp($a['date'].$a['time'], $b['date'].$b['time']);
-}
-
-function get_history($data, $search, $types)
-{
- if (isset($search['fields']['filename']))
- {
- $query = '
-SELECT
- id
- FROM '.IMAGES_TABLE.'
- WHERE file LIKE \''.$search['fields']['filename'].'\'
-;';
- $search['image_ids'] = array_from_query($query, 'id');
- }
-
- // echo '<pre>'; print_r($search); echo '</pre>';
-
- $clauses = array();
-
- if (isset($search['fields']['date-after']))
- {
- array_push(
- $clauses,
- "date >= '".$search['fields']['date-after']."'"
- );
- }
-
- if (isset($search['fields']['date-before']))
- {
- array_push(
- $clauses,
- "date <= '".$search['fields']['date-before']."'"
- );
- }
-
- if (isset($search['fields']['types']))
- {
- $local_clauses = array();
-
- foreach ($types as $type) {
- if (in_array($type, $search['fields']['types'])) {
- $clause = 'image_type ';
- if ($type == 'none')
- {
- $clause.= 'IS NULL';
- }
- else
- {
- $clause.= "= '".$type."'";
- }
-
- array_push($local_clauses, $clause);
- }
- }
-
- if (count($local_clauses) > 0)
- {
- array_push(
- $clauses,
- implode(' OR ', $local_clauses)
- );
- }
- }
-
- if (isset($search['fields']['user'])
- and $search['fields']['user'] != -1)
- {
- array_push(
- $clauses,
- 'user_id = '.$search['fields']['user']
- );
- }
-
- if (isset($search['fields']['image_id']))
- {
- array_push(
- $clauses,
- 'image_id = '.$search['fields']['image_id']
- );
- }
-
- if (isset($search['fields']['filename']))
- {
- if (count($search['image_ids']) == 0)
- {
- // a clause that is always false
- array_push($clauses, '1 = 2 ');
- }
- else
- {
- array_push(
- $clauses,
- 'image_id IN ('.implode(', ', $search['image_ids']).')'
- );
- }
- }
-
- $clauses = prepend_append_array_items($clauses, '(', ')');
-
- $where_separator =
- implode(
- "\n AND ",
- $clauses
- );
-
- $query = '
-SELECT
- date,
- time,
- user_id,
- IP,
- section,
- category_id,
- tag_ids,
- image_id,
- image_type
- FROM '.HISTORY_TABLE.'
- WHERE '.$where_separator.'
-;';
-
- // LIMIT '.$page['start'].', '.$conf['nb_logs_page'].'
-
- $result = pwg_query($query);
-
- while ($row = mysql_fetch_assoc($result))
- {
- array_push($data, $row);
- }
-
- return $data;
-}
-
-add_event_handler('get_history', 'get_history', EVENT_HANDLER_PRIORITY_NEUTRAL, 3);
-trigger_action('functions_history_included');
-
-?>
diff --git a/BSF/admin/include/functions_metadata.php b/BSF/admin/include/functions_metadata.php
deleted file mode 100644
index e805aeba6..000000000
--- a/BSF/admin/include/functions_metadata.php
+++ /dev/null
@@ -1,298 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-include_once(PHPWG_ROOT_PATH.'/include/functions_metadata.inc.php');
-
-$page['datefields'] = array('date_creation', 'date_available');
-
-function get_sync_iptc_data($file)
-{
- global $conf, $page;
-
- $map = $conf['use_iptc_mapping'];
-
- $iptc = get_iptc_data($file, $map);
-
- foreach ($iptc as $pwg_key => $value)
- {
- if (in_array($pwg_key, $page['datefields']))
- {
- if (preg_match('/(\d{4})(\d{2})(\d{2})/', $value, $matches))
- {
- $iptc[$pwg_key] = $matches[1].'-'.$matches[2].'-'.$matches[3];
- }
- }
- }
-
- if (isset($iptc['keywords']))
- {
- // official keywords separator is the comma
- $iptc['keywords'] = preg_replace('/[.;]/', ',', $iptc['keywords']);
- $iptc['keywords'] = preg_replace('/^,+|,+$/', '', $iptc['keywords']);
-
- $iptc['keywords'] = implode(
- ',',
- array_unique(
- explode(
- ',',
- $iptc['keywords']
- )
- )
- );
- }
-
- foreach ($iptc as $pwg_key => $value)
- {
- $iptc[$pwg_key] = addslashes($iptc[$pwg_key]);
- }
-
- return $iptc;
-}
-
-function get_sync_exif_data($file)
-{
- global $conf, $page;
-
- $exif = get_exif_data($file, $conf['use_exif_mapping']);
-
- foreach ($exif as $pwg_key => $value)
- {
- if (in_array($pwg_key, $page['datefields']))
- {
- if (preg_match('/^(\d{4}).(\d{2}).(\d{2})/', $value, $matches))
- {
- $exif[$pwg_key] = $matches[1].'-'.$matches[2].'-'.$matches[3];
- }
- }
- $exif[$pwg_key] = addslashes($exif[$pwg_key]);
- }
-
- return $exif;
-}
-
-function update_metadata($files)
-{
- global $conf;
-
- if (!defined('CURRENT_DATE'))
- {
- define('CURRENT_DATE', date('Y-m-d'));
- }
-
- $datas = array();
- $tags_of = array();
- $has_high_images = array();
-
- $image_ids = array();
- foreach ($files as $id => $file)
- {
- array_push($image_ids, $id);
- }
-
- $query = '
-SELECT id
- FROM '.IMAGES_TABLE.'
- WHERE has_high = \'true\'
- AND id IN (
-'.wordwrap(implode(', ', $image_ids), 80, "\n").'
-)
-;';
-
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- array_push($has_high_images, $row['id']);
- }
-
- foreach ($files as $id => $file)
- {
- $data = array();
- $data['id'] = $id;
- $data['filesize'] = floor(filesize($file)/1024);
-
- if ($image_size = @getimagesize($file))
- {
- $data['width'] = $image_size[0];
- $data['height'] = $image_size[1];
- }
-
- if (in_array($id, $has_high_images))
- {
- $high_file = dirname($file).'/pwg_high/'.basename($file);
-
- $data['high_filesize'] = floor(filesize($high_file)/1024);
- }
-
- if ($conf['use_exif'])
- {
- $exif = get_sync_exif_data($file);
- }
-
- if ($conf['use_iptc'])
- {
- $iptc = get_sync_iptc_data($file);
- if (count($iptc) > 0)
- {
- foreach (array_keys($iptc) as $key)
- {
- if ($key == 'keywords' or $key == 'tags')
- {
- if (!isset($tags_of[$id]))
- {
- $tags_of[$id] = array();
- }
-
- foreach (explode(',', $iptc[$key]) as $tag_name)
- {
- array_push(
- $tags_of[$id],
- tag_id_from_tag_name($tag_name)
- );
- }
- }
- }
- }
- }
-
- $data['date_metadata_update'] = CURRENT_DATE;
-
- array_push($datas, $data);
- }
-
- if (count($datas) > 0)
- {
- $update_fields =
- array(
- 'filesize',
- 'width',
- 'height',
- 'high_filesize',
- 'date_metadata_update'
- );
-
- if ($conf['use_exif'])
- {
- $update_fields =
- array_merge(
- $update_fields,
- array_keys($conf['use_exif_mapping'])
- );
- }
-
- if ($conf['use_iptc'])
- {
- $update_fields =
- array_merge(
- $update_fields,
- array_diff(
- array_keys($conf['use_iptc_mapping']),
- array('tags', 'keywords')
- )
- );
- }
-
- mass_updates(
- IMAGES_TABLE,
- array(
- 'primary' => array('id'),
- 'update' => array_unique($update_fields)
- ),
- $datas
- );
- }
-
- set_tags_of($tags_of);
-}
-
-/**
- * returns an array associating element id (images.id) with its complete
- * path in the filesystem
- *
- * @param int id_uppercat
- * @param int site_id
- * @param boolean recursive ?
- * @param boolean only newly added files ?
- * @return array
- */
-function get_filelist($category_id = '', $site_id=1, $recursive = false,
- $only_new = false)
-{
- // filling $cat_ids : all categories required
- $cat_ids = array();
-
- $query = '
-SELECT id
- FROM '.CATEGORIES_TABLE.'
- WHERE site_id = '.$site_id.'
- AND dir IS NOT NULL';
- if (is_numeric($category_id))
- {
- if ($recursive)
- {
- $query.= '
- AND uppercats REGEXP \'(^|,)'.$category_id.'(,|$)\'
-';
- }
- else
- {
- $query.= '
- AND id = '.$category_id.'
-';
- }
- }
- $query.= '
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- array_push($cat_ids, $row['id']);
- }
-
- if (count($cat_ids) == 0)
- {
- return array();
- }
-
- $files = array();
-
- $query = '
-SELECT id, path
- FROM '.IMAGES_TABLE.'
- WHERE storage_category_id IN ('.implode(',', $cat_ids).')';
- if ($only_new)
- {
- $query.= '
- AND date_metadata_update IS NULL
-';
- }
- $query.= '
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $files[$row['id']] = $row['path'];
- }
-
- return $files;
-}
-?> \ No newline at end of file
diff --git a/BSF/admin/include/functions_notification_by_mail.inc.php b/BSF/admin/include/functions_notification_by_mail.inc.php
deleted file mode 100644
index c7c9f1942..000000000
--- a/BSF/admin/include/functions_notification_by_mail.inc.php
+++ /dev/null
@@ -1,522 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/* nbm_global_var */
-$env_nbm = array
- (
- 'start_time' => get_moment(),
- 'sendmail_timeout' => (intval(ini_get('max_execution_time')) * $conf['nbm_max_treatment_timeout_percent']),
- 'is_sendmail_timeout' => false
- );
-
-if
- (
- (!isset($env_nbm['sendmail_timeout'])) or
- (!is_numeric($env_nbm['sendmail_timeout'])) or
- ($env_nbm['sendmail_timeout'] <= 0)
- )
-{
- $env_nbm['sendmail_timeout'] = $conf['nbm_treatment_timeout_default'];
-}
-
-/*
- * Search an available check_key
- *
- * It's a copy of function find_available_feed_id
- *
- * @return string nbm identifier
- */
-function find_available_check_key()
-{
- while (true)
- {
- $key = generate_key(16);
- $query = '
-select
- count(*)
-from
- '.USER_MAIL_NOTIFICATION_TABLE.'
-where
- check_key = \''.$key.'\';';
-
- list($count) = mysql_fetch_row(pwg_query($query));
- if ($count == 0)
- {
- return $key;
- }
- }
-}
-
-/*
- * Check sendmail timeout state
- *
- * @return true, if it's timeout
- */
-function check_sendmail_timeout()
-{
- global $env_nbm;
-
- $env_nbm['is_sendmail_timeout'] = ((get_moment() - $env_nbm['start_time']) > $env_nbm['sendmail_timeout']);
-
- return $env_nbm['is_sendmail_timeout'];
-}
-
-
-/*
- * Add quote to all elements of check_key_list
- *
- * @return quoted check key list
- */
-function quote_check_key_list($check_key_list = array())
-{
- return array_map(create_function('$s', 'return \'\\\'\'.$s.\'\\\'\';'), $check_key_list);
-}
-
-/*
- * Execute all main queries to get list of user
- *
- * Type are the type of list 'subscribe', 'send'
- *
- * return array of users
- */
-function get_user_notifications($action, $check_key_list = array(), $enabled_filter_value = '')
-{
- global $conf;
-
- $data_users = array();
-
- if (in_array($action, array('subscribe', 'send')))
- {
- $quoted_check_key_list = quote_check_key_list($check_key_list);
- if (count($quoted_check_key_list) != 0 )
- {
- $query_and_check_key = ' and
- check_key in ('.implode(",", $quoted_check_key_list).') ';
- }
- else
- {
- $query_and_check_key = '';
- }
-
- $query = '
-select
- N.user_id,
- N.check_key,
- U.'.$conf['user_fields']['username'].' as username,
- U.'.$conf['user_fields']['email'].' as mail_address,
- N.enabled,
- N.last_send
-from
- '.USER_MAIL_NOTIFICATION_TABLE.' as N,
- '.USERS_TABLE.' as U
-where
- N.user_id = U.'.$conf['user_fields']['id'];
-
- if ($action == 'send')
- {
- // No mail empty and all users enabled
- $query .= ' and
- N.enabled = \'true\' and
- U.'.$conf['user_fields']['email'].' is not null';
- }
-
- $query .= $query_and_check_key;
-
- if (isset($enabled_filter_value) and ($enabled_filter_value != ''))
- {
- $query .= ' and
- N.enabled = \''.boolean_to_string($enabled_filter_value).'\'';
- }
-
- $query .= '
-order by';
-
- if ($action == 'send')
- {
- $query .= '
- last_send, username;';
- }
- else
- {
- $query .= '
- username;';
- }
-
- $query .= ';';
-
- $result = pwg_query($query);
- if (!empty($result))
- {
- while ($nbm_user = mysql_fetch_array($result))
- {
- array_push($data_users, $nbm_user);
- }
- }
- }
- return $data_users;
-}
-
-/*
- * Begin of use nbm environment
- * Prepare and save current environment and initialize data in order to send mail
- *
- * Return none
- */
-function begin_users_env_nbm($is_to_send_mail = false)
-{
- global $user, $lang, $lang_info, $conf, $env_nbm;
-
- // Save $user, $lang_info and $lang arrays (include/user.inc.php has been executed)
- $env_nbm['save_user'] = $user;
- // Save current language to stack, necessary because $user change during NBM
- switch_lang_to($user['language']);
-
- $env_nbm['is_to_send_mail'] = $is_to_send_mail;
-
- if ($is_to_send_mail)
- {
- // Init mail configuration
- $env_nbm['email_format'] = get_str_email_format($conf['nbm_send_html_mail']);
- $env_nbm['send_as_name'] = ((isset($conf['nbm_send_mail_as']) and !empty($conf['nbm_send_mail_as'])) ? $conf['nbm_send_mail_as'] : get_mail_sender_name());
- $env_nbm['send_as_mail_address'] = get_webmaster_mail_address();
- $env_nbm['send_as_mail_formated'] = format_email($env_nbm['send_as_name'], $env_nbm['send_as_mail_address']);
- // Init mail counter
- $env_nbm['error_on_mail_count'] = 0;
- $env_nbm['sent_mail_count'] = 0;
- // Save sendmail message info and error in the original language
- $env_nbm['msg_info'] = l10n('nbm_msg_mail_sent_to');
- $env_nbm['msg_error'] = l10n('nbm_msg_error_sending_email_to');
- }
-}
-
-/*
- * End of use nbm environment
- * Restore environment
- *
- * Return none
- */
-function end_users_env_nbm()
-{
- global $user, $lang, $lang_info, $env_nbm;
-
- // Restore $user, $lang_info and $lang arrays (include/user.inc.php has been executed)
- $user = $env_nbm['save_user'];
- // Restore current language to stack, necessary because $user change during NBM
- switch_lang_back();
-
- if ($env_nbm['is_to_send_mail'])
- {
- unset($env_nbm['email_format']);
- unset($env_nbm['send_as_name']);
- unset($env_nbm['send_as_mail_address']);
- unset($env_nbm['send_as_mail_formated']);
- // Don t unset counter
- //unset($env_nbm['error_on_mail_count']);
- //unset($env_nbm['sent_mail_count']);
- unset($env_nbm['msg_info']);
- unset($env_nbm['msg_error']);
- }
-
- unset($env_nbm['save_user']);
- unset($env_nbm['is_to_send_mail']);
-}
-
-/*
- * Set user on nbm enviromnent
- *
- * Return none
- */
-function set_user_on_env_nbm(&$nbm_user, $is_action_send)
-{
- global $user, $lang, $lang_info, $env_nbm;
-
- $user = build_user( $nbm_user['user_id'], true );
-
- switch_lang_to($user['language']);
-
- if ($is_action_send)
- {
- $nbm_user['template'] = $user['template'];
- $nbm_user['theme'] = $user['theme'];
- $env_nbm['mail_template'] =
- get_mail_template($env_nbm['email_format'],
- array('template' => $nbm_user['template'], 'theme' => $nbm_user['theme']));
- $env_nbm['mail_template']->set_filename('notification_by_mail', 'admin/notification_by_mail.tpl');
- }
-}
-
-/*
- * Unset user on nbm enviromnent
- *
- * Return none
- */
-function unset_user_on_env_nbm()
-{
- global $env_nbm;
-
- switch_lang_back();
- unset($env_nbm['mail_template']);
-}
-
-/*
- * Inc Counter success
- *
- * Return none
- */
-function inc_mail_sent_success($nbm_user)
-{
- global $page, $env_nbm;
-
- $env_nbm['sent_mail_count'] += 1;
- array_push($page['infos'], sprintf($env_nbm['msg_info'], $nbm_user['username'], $nbm_user['mail_address']));
-}
-
-/*
- * Inc Counter failed
- *
- * Return none
- */
-function inc_mail_sent_failed($nbm_user)
-{
- global $page, $env_nbm;
-
- $env_nbm['error_on_mail_count'] += 1;
- array_push($page['errors'], sprintf($env_nbm['msg_error'], $nbm_user['username'], $nbm_user['mail_address']));
-}
-
-/*
- * Display Counter Info
- *
- * Return none
- */
-function display_counter_info()
-{
- global $page, $env_nbm;
-
- if ($env_nbm['error_on_mail_count'] != 0)
- {
- array_push($page['errors'], l10n_dec('nbm_msg_n_mail_not_send', 'nbm_msg_n_mails_not_send', $env_nbm['error_on_mail_count']));
- if ($env_nbm['sent_mail_count'] != 0)
- array_push($page['infos'], l10n_dec('nbm_msg_n_mail_sent', 'nbm_msg_n_mails_sent', $env_nbm['sent_mail_count']));
- }
- else
- {
- if ($env_nbm['sent_mail_count'] == 0)
- array_push($page['infos'], l10n('nbm_no_mail_to_send'));
- else
- array_push($page['infos'], l10n_dec('nbm_msg_n_mail_sent', 'nbm_msg_n_mails_sent', $env_nbm['sent_mail_count']));
- }
-}
-
-function assign_vars_nbm_mail_content($nbm_user)
-{
- global $env_nbm;
-
- set_make_full_url();
-
- $env_nbm['mail_template']->assign
- (
- array
- (
- 'USERNAME' => $nbm_user['username'],
-
- 'SEND_AS_NAME' => $env_nbm['send_as_name'],
-
- 'UNSUBSCRIBE_LINK' => add_url_params(get_root_url().'nbm.php', array('unsubscribe' => $nbm_user['check_key'])),
- 'SUBSCRIBE_LINK' => add_url_params(get_root_url().'nbm.php', array('subscribe' => $nbm_user['check_key'])),
- 'CONTACT_EMAIL' => $env_nbm['send_as_mail_address']
- )
- );
-
- unset_make_full_url();
-}
-
-/*
- * Subscribe or unsubscribe notification by mail
- *
- * is_subscribe define if action=subscribe or unsubscribe
- * check_key list where action will be done
- *
- * @return check_key list treated
- */
-function do_subscribe_unsubscribe_notification_by_mail($is_admin_request, $is_subscribe = false, $check_key_list = array())
-{
- global $conf, $page, $env_nbm, $conf;
-
- $check_key_treated = array();
- $updated_data_count = 0;
- $error_on_updated_data_count = 0;
-
- if ($is_subscribe)
- {
- $msg_info = l10n('nbm_user_change_enabled_true');
- $msg_error = l10n('nbm_user_not_change_enabled_true');
- }
- else
- {
- $msg_info = l10n('nbm_user_change_enabled_false');
- $msg_error = l10n('nbm_user_not_change_enabled_false');
- }
-
- if (count($check_key_list) != 0)
- {
- $updates = array();
- $enabled_value = boolean_to_string($is_subscribe);
- $data_users = get_user_notifications('subscribe', $check_key_list, !$is_subscribe);
-
- // Prepare message after change language
- $msg_break_timeout = l10n('nbm_break_timeout_send_mail');
-
- // Begin nbm users environment
- begin_users_env_nbm(true);
-
- foreach ($data_users as $nbm_user)
- {
- if (check_sendmail_timeout())
- {
- // Stop fill list on 'send', if the quota is override
- array_push($page['errors'], $msg_break_timeout);
- break;
- }
-
- // Fill return list
- array_push($check_key_treated, $nbm_user['check_key']);
-
- $do_update = true;
- if ($nbm_user['mail_address'] != '')
- {
- // set env nbm user
- set_user_on_env_nbm($nbm_user, true);
-
- $subject = '['.$conf['gallery_title'].']: '.($is_subscribe ? l10n('nbm_object_subscribe'): l10n('nbm_object_unsubscribe'));
-
- // Assign current var for nbm mail
- assign_vars_nbm_mail_content($nbm_user);
-
- $section_action_by = ($is_subscribe ? 'subscribe_by_' : 'unsubscribe_by_');
- $section_action_by .= ($is_admin_request ? 'admin' : 'himself');
- $env_nbm['mail_template']->assign( $section_action_by, true );
-
- if (pwg_mail
- (
- format_email($nbm_user['username'], $nbm_user['mail_address']),
- array
- (
- 'from' => $env_nbm['send_as_mail_formated'],
- 'subject' => $subject,
- 'email_format' => $env_nbm['email_format'],
- 'content' => $env_nbm['mail_template']->parse('notification_by_mail', true),
- 'content_format' => $env_nbm['email_format'],
- 'template' => $nbm_user['template'],
- 'theme' => $nbm_user['theme']
- )
- ))
- {
- inc_mail_sent_success($nbm_user);
- }
- else
- {
- inc_mail_sent_failed($nbm_user);
- $do_update = false;
- }
-
- // unset env nbm user
- unset_user_on_env_nbm();
-
- }
-
- if ($do_update)
- {
- array_push
- (
- $updates,
- array
- (
- 'check_key' => $nbm_user['check_key'],
- 'enabled' => $enabled_value
- )
- );
- $updated_data_count += 1;
- array_push($page['infos'], sprintf($msg_info, $nbm_user['username'], $nbm_user['mail_address']));
- }
- else
- {
- $error_on_updated_data_count += 1;
- array_push($page['errors'], sprintf($msg_error, $nbm_user['username'], $nbm_user['mail_address']));
- }
-
- }
-
- // Restore nbm environment
- end_users_env_nbm();
-
- display_counter_info();
-
- mass_updates(
- USER_MAIL_NOTIFICATION_TABLE,
- array(
- 'primary' => array('check_key'),
- 'update' => array('enabled')
- ),
- $updates
- );
-
- }
-
- array_push($page['infos'], l10n_dec('nbm_user_change_enabled_updated_data_count', 'nbm_users_change_enabled_updated_data_count', $updated_data_count));
- if ($error_on_updated_data_count != 0)
- {
- array_push($page['errors'],
- l10n_dec('nbm_user_change_enabled_error_on_updated_data_count',
- 'nbm_users_change_enabled_error_on_updated_data_count',
- $error_on_updated_data_count));
- }
-
- return $check_key_treated;
-}
-
-/*
- * Unsubscribe notification by mail
- *
- * check_key list where action will be done
- *
- * @return check_key list treated
- */
-function unsubscribe_notification_by_mail($is_admin_request, $check_key_list = array())
-{
- return do_subscribe_unsubscribe_notification_by_mail($is_admin_request, false, $check_key_list);
-}
-
-/*
- * Subscribe notification by mail
- *
- * check_key list where action will be done
- *
- * @return check_key list treated
- */
-function subscribe_notification_by_mail($is_admin_request, $check_key_list = array())
-{
- return do_subscribe_unsubscribe_notification_by_mail($is_admin_request, true, $check_key_list);
-}
-
-?>
diff --git a/BSF/admin/include/functions_permalinks.php b/BSF/admin/include/functions_permalinks.php
deleted file mode 100644
index 4b19f02e1..000000000
--- a/BSF/admin/include/functions_permalinks.php
+++ /dev/null
@@ -1,204 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/** returns a category id that corresponds to the given permalink (or null)
- * @param string permalink
- */
-function get_cat_id_from_permalink( $permalink )
-{
- $query ='
-SELECT id FROM '.CATEGORIES_TABLE.'
- WHERE permalink="'.$permalink.'"';
- $ids = array_from_query($query, 'id');
- if (!empty($ids))
- {
- return $ids[0];
- }
- return null;
-}
-
-/** returns a category id that has used before this permalink (or null)
- * @param string permalink
- * @param boolean is_hit if true update the usage counters on the old permalinks
- */
-function get_cat_id_from_old_permalink($permalink)
-{
- $query='
-SELECT c.id
- FROM '.OLD_PERMALINKS_TABLE.' op INNER JOIN '.CATEGORIES_TABLE.' c
- ON op.cat_id=c.id
- WHERE op.permalink="'.$permalink.'"
- LIMIT 1';
- $result = pwg_query($query);
- $cat_id = null;
- if ( mysql_num_rows($result) )
- list( $cat_id ) = mysql_fetch_array($result);
- return $cat_id;
-}
-
-
-/** deletes the permalink associated with a category
- * returns true on success
- * @param int cat_id the target category id
- * @param boolean save if true, the current category-permalink association
- * is saved in the old permalinks table in case external links hit it
- */
-function delete_cat_permalink( $cat_id, $save )
-{
- global $page, $cache;
- $query = '
-SELECT permalink
- FROM '.CATEGORIES_TABLE.'
- WHERE id="'.$cat_id.'"
-;';
- $result = pwg_query($query);
- if ( mysql_num_rows($result) )
- {
- list($permalink) = mysql_fetch_array($result);
- }
- if ( !isset($permalink) )
- {// no permalink; nothing to do
- return true;
- }
- if ($save)
- {
- $old_cat_id = get_cat_id_from_old_permalink($permalink);
- if ( isset($old_cat_id) and $old_cat_id!=$cat_id )
- {
- $page['errors'][] =
- sprintf(
- l10n('Permalink_%s_histo_used_by_%s'),
- $permalink, $old_cat_id
- );
- return false;
- }
- }
- $query = '
-UPDATE '.CATEGORIES_TABLE.'
- SET permalink=NULL
- WHERE id='.$cat_id.'
- LIMIT 1';
- pwg_query($query);
-
- unset( $cache['cat_names'] ); //force regeneration
- if ($save)
- {
- if ( isset($old_cat_id) )
- {
- $query = '
-UPDATE '.OLD_PERMALINKS_TABLE.'
- SET date_deleted=NOW()
- WHERE cat_id='.$cat_id.' AND permalink="'.$permalink.'"';
- }
- else
- {
- $query = '
-INSERT INTO '.OLD_PERMALINKS_TABLE.'
- (permalink, cat_id, date_deleted)
-VALUES
- ( "'.$permalink.'",'.$cat_id.',NOW() )';
- }
- pwg_query( $query );
- }
- return true;
-}
-
-/** sets a new permalink for a category
- * returns true on success
- * @param int cat_id the target category id
- * @param string permalink the new permalink
- * @param boolean save if true, the current category-permalink association
- * is saved in the old permalinks table in case external links hit it
- */
-function set_cat_permalink( $cat_id, $permalink, $save )
-{
- global $page, $cache;
-
- $sanitized_permalink = preg_replace( '#[^a-zA-Z0-9_/-]#', '' ,$permalink);
- $sanitized_permalink = trim($sanitized_permalink, '/');
- $sanitized_permalink = str_replace('//', '/', $sanitized_permalink);
- if ( $sanitized_permalink != $permalink
- or preg_match( '#^(\d)+(-.*)?$#', $permalink) )
- {
- $page['errors'][] = l10n('Permalink_name_rule');
- return false;
- }
-
- // check if the new permalink is actively used
- $existing_cat_id = get_cat_id_from_permalink( $permalink );
- if ( isset($existing_cat_id) )
- {
- if ( $existing_cat_id==$cat_id )
- {// no change required
- return true;
- }
- else
- {
- $page['errors'][] =
- sprintf(
- l10n('Permalink %s is already used by category %s'),
- $permalink, $existing_cat_id
- );
- return false;
- }
- }
-
- // check if the new permalink was historically used
- $old_cat_id = get_cat_id_from_old_permalink($permalink);
- if ( isset($old_cat_id) and $old_cat_id!=$cat_id )
- {
- $page['errors'][] =
- sprintf(
- l10n('Permalink_%s_histo_used_by_%s'),
- $permalink, $old_cat_id
- );
- return false;
- }
-
- if ( !delete_cat_permalink($cat_id, $save ) )
- {
- return false;
- }
-
- if ( isset($old_cat_id) )
- {// the new permalink must not be active and old at the same time
- assert( $old_cat_id==$cat_id );
- $query = '
-DELETE FROM '.OLD_PERMALINKS_TABLE.'
- WHERE cat_id='.$old_cat_id.' AND permalink="'.$permalink.'"';
- pwg_query($query);
- }
-
- $query = '
-UPDATE '.CATEGORIES_TABLE.'
- SET permalink="'.$permalink.'"
- WHERE id='.$cat_id.'
- LIMIT 1';
- pwg_query($query);
-
- unset( $cache['cat_names'] ); //force regeneration
-
- return true;
-}
-
-?>
diff --git a/BSF/admin/include/functions_plugins.inc.php b/BSF/admin/include/functions_plugins.inc.php
deleted file mode 100644
index 1395f34e0..000000000
--- a/BSF/admin/include/functions_plugins.inc.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * Retrieves an url for a plugin page.
- * @param string file - php script full name
- */
-function get_admin_plugin_menu_link($file)
-{
- global $page;
- $real_file = realpath($file);
- $url = get_root_url().'admin.php?page=plugin';
- if (false!==$real_file)
- {
- $real_plugin_path = rtrim(realpath(PHPWG_PLUGINS_PATH), '\\/');
- $file = substr($real_file, strlen($real_plugin_path)+1);
- $file = str_replace('\\', '/', $file);//Windows
- $url .= '&amp;section='.urlencode($file);
- }
- else if (isset($page['errors']))
- {
- array_push($page['errors'], 'PLUGIN ERROR: "'.$file.'" is not a valid file');
- }
- return $url;
-}
-
-/**
- * Set tabsheet for plugins pages.
- * @param string selected page.
- */
-function set_plugins_tabsheet($selected)
-{
- include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
-
- $link = get_root_url().'admin.php?page=';
-
- $tabsheet = new tabsheet();
- $tabsheet->add('plugins_list', l10n('plugins_tab_list'), $link.'plugins_list');
- $tabsheet->add('plugins_update', l10n('plugins_tab_update'), $link.'plugins_update');
- $tabsheet->add('plugins_new', l10n('plugins_tab_new'), $link.'plugins_new');
- $tabsheet->select($selected);
- $tabsheet->assign();
-}
-?> \ No newline at end of file
diff --git a/BSF/admin/include/functions_upgrade.php b/BSF/admin/include/functions_upgrade.php
deleted file mode 100644
index 7e9a93aef..000000000
--- a/BSF/admin/include/functions_upgrade.php
+++ /dev/null
@@ -1,98 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-function check_upgrade()
-{
- // Is Piwigo already installed ?
- if (!defined('PHPWG_IN_UPGRADE') or !PHPWG_IN_UPGRADE)
- {
- $message = 'Piwigo is not in upgrade mode. In include/mysql.inc.php,
-insert line
-<pre style="background-color:lightgray">
-define(\'PHPWG_IN_UPGRADE\', true);
-</pre>
-if you want to upgrade';
- die($message);
- }
-}
-
-// concerning upgrade, we use the default tables
-function prepare_conf_upgrade()
-{
- global $prefixeTable;
-
- // $conf is not used for users tables
- // define cannot be re-defined
- define('CATEGORIES_TABLE', $prefixeTable.'categories');
- define('COMMENTS_TABLE', $prefixeTable.'comments');
- define('CONFIG_TABLE', $prefixeTable.'config');
- define('FAVORITES_TABLE', $prefixeTable.'favorites');
- define('GROUP_ACCESS_TABLE', $prefixeTable.'group_access');
- define('GROUPS_TABLE', $prefixeTable.'groups');
- define('HISTORY_TABLE', $prefixeTable.'history');
- define('HISTORY_SUMMARY_TABLE', $prefixeTable.'history_summary');
- define('IMAGE_CATEGORY_TABLE', $prefixeTable.'image_category');
- define('IMAGES_TABLE', $prefixeTable.'images');
- define('SESSIONS_TABLE', $prefixeTable.'sessions');
- define('SITES_TABLE', $prefixeTable.'sites');
- define('USER_ACCESS_TABLE', $prefixeTable.'user_access');
- define('USER_GROUP_TABLE', $prefixeTable.'user_group');
- define('USERS_TABLE', $prefixeTable.'users');
- define('USER_INFOS_TABLE', $prefixeTable.'user_infos');
- define('USER_FEED_TABLE', $prefixeTable.'user_feed');
- define('WAITING_TABLE', $prefixeTable.'waiting');
- define('RATE_TABLE', $prefixeTable.'rate');
- define('USER_CACHE_TABLE', $prefixeTable.'user_cache');
- define('USER_CACHE_CATEGORIES_TABLE', $prefixeTable.'user_cache_categories');
- define('CADDIE_TABLE', $prefixeTable.'caddie');
- define('UPGRADE_TABLE', $prefixeTable.'upgrade');
- define('SEARCH_TABLE', $prefixeTable.'search');
- define('USER_MAIL_NOTIFICATION_TABLE', $prefixeTable.'user_mail_notification');
- define('TAGS_TABLE', $prefixeTable.'tags');
- define('IMAGE_TAG_TABLE', $prefixeTable.'image_tag');
- define('PLUGINS_TABLE', $prefixeTable.'plugins');
- define('WEB_SERVICES_ACCESS_TABLE', $prefixeTable.'ws_access');
- define('OLD_PERMALINKS_TABLE', $prefixeTable.'old_permalinks');
-}
-
-// Create empty local files to avoid log errors
-function create_empty_local_files()
-{
- $files =
- array (
- PHPWG_ROOT_PATH . 'template-common/local-layout.css',
- PHPWG_ROOT_PATH . 'template/yoga/local-layout.css'
- );
-
- foreach ($files as $path)
- {
- if (!file_exists ($path))
- {
- $file = @fopen($path, "w");
- @fwrite($file , '/* You can modify this file */');
- @fclose($file);
- }
- }
-}
-
-?>
diff --git a/BSF/admin/include/functions_waiting.inc.php b/BSF/admin/include/functions_waiting.inc.php
deleted file mode 100644
index 3e7c3d8b6..000000000
--- a/BSF/admin/include/functions_waiting.inc.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
-
-function waiting_tabsheet()
-{
- global $page, $link_start;
-
- // TabSheet
- $tabsheet = new tabsheet();
- // TabSheet initialization
- $tabsheet->add('comments', l10n('comments'), $link_start.'comments');
- $tabsheet->add('upload', l10n('Pictures'), $link_start.'upload');
- // TabSheet selection
- $tabsheet->select($page['page']);
- // Assign tabsheet to template
- $tabsheet->assign();
-}
-
-?>
diff --git a/BSF/admin/include/index.php b/BSF/admin/include/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/admin/include/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/admin/include/pclzip.lib.php b/BSF/admin/include/pclzip.lib.php
deleted file mode 100644
index 8b3c62d38..000000000
--- a/BSF/admin/include/pclzip.lib.php
+++ /dev/null
@@ -1,5872 +0,0 @@
-<?php
-// --------------------------------------------------------------------------------
-// PhpConcept Library - Zip Module 2.6
-// --------------------------------------------------------------------------------
-// License GNU/LGPL - Vincent Blavet - March 2006
-// http://www.phpconcept.net
-// --------------------------------------------------------------------------------
-//
-// Presentation :
-// PclZip is a PHP library that manage ZIP archives.
-// So far tests show that archives generated by PclZip are readable by
-// WinZip application and other tools.
-//
-// Description :
-// See readme.txt and http://www.phpconcept.net
-//
-// Warning :
-// This library and the associated files are non commercial, non professional
-// work.
-// It should not have unexpected results. However if any damage is caused by
-// this software the author can not be responsible.
-// The use of this software is at the risk of the user.
-//
-// --------------------------------------------------------------------------------
-// $Id$
-// --------------------------------------------------------------------------------
-
- // ----- Constants
- if (!defined('PCLZIP_READ_BLOCK_SIZE')) {
- define( 'PCLZIP_READ_BLOCK_SIZE', 2048 );
- }
-
- // ----- File list separator
- // In version 1.x of PclZip, the separator for file list is a space
- // (which is not a very smart choice, specifically for windows paths !).
- // A better separator should be a comma (,). This constant gives you the
- // abilty to change that.
- // However notice that changing this value, may have impact on existing
- // scripts, using space separated filenames.
- // Recommanded values for compatibility with older versions :
- //define( 'PCLZIP_SEPARATOR', ' ' );
- // Recommanded values for smart separation of filenames.
- if (!defined('PCLZIP_SEPARATOR')) {
- define( 'PCLZIP_SEPARATOR', ',' );
- }
-
- // ----- Error configuration
- // 0 : PclZip Class integrated error handling
- // 1 : PclError external library error handling. By enabling this
- // you must ensure that you have included PclError library.
- // [2,...] : reserved for futur use
- if (!defined('PCLZIP_ERROR_EXTERNAL')) {
- define( 'PCLZIP_ERROR_EXTERNAL', 0 );
- }
-
- // ----- Optional static temporary directory
- // By default temporary files are generated in the script current
- // path.
- // If defined :
- // - MUST BE terminated by a '/'.
- // - MUST be a valid, already created directory
- // Samples :
- // define( 'PCLZIP_TEMPORARY_DIR', '/temp/' );
- // define( 'PCLZIP_TEMPORARY_DIR', 'C:/Temp/' );
- if (!defined('PCLZIP_TEMPORARY_DIR')) {
- define( 'PCLZIP_TEMPORARY_DIR', '' );
- }
-
-// --------------------------------------------------------------------------------
-// ***** UNDER THIS LINE NOTHING NEEDS TO BE MODIFIED *****
-// --------------------------------------------------------------------------------
-
- // ----- Global variables
- $g_pclzip_version = "2.6";
-
- // ----- Error codes
- // -1 : Unable to open file in binary write mode
- // -2 : Unable to open file in binary read mode
- // -3 : Invalid parameters
- // -4 : File does not exist
- // -5 : Filename is too long (max. 255)
- // -6 : Not a valid zip file
- // -7 : Invalid extracted file size
- // -8 : Unable to create directory
- // -9 : Invalid archive extension
- // -10 : Invalid archive format
- // -11 : Unable to delete file (unlink)
- // -12 : Unable to rename file (rename)
- // -13 : Invalid header checksum
- // -14 : Invalid archive size
- define( 'PCLZIP_ERR_USER_ABORTED', 2 );
- define( 'PCLZIP_ERR_NO_ERROR', 0 );
- define( 'PCLZIP_ERR_WRITE_OPEN_FAIL', -1 );
- define( 'PCLZIP_ERR_READ_OPEN_FAIL', -2 );
- define( 'PCLZIP_ERR_INVALID_PARAMETER', -3 );
- define( 'PCLZIP_ERR_MISSING_FILE', -4 );
- define( 'PCLZIP_ERR_FILENAME_TOO_LONG', -5 );
- define( 'PCLZIP_ERR_INVALID_ZIP', -6 );
- define( 'PCLZIP_ERR_BAD_EXTRACTED_FILE', -7 );
- define( 'PCLZIP_ERR_DIR_CREATE_FAIL', -8 );
- define( 'PCLZIP_ERR_BAD_EXTENSION', -9 );
- define( 'PCLZIP_ERR_BAD_FORMAT', -10 );
- define( 'PCLZIP_ERR_DELETE_FILE_FAIL', -11 );
- define( 'PCLZIP_ERR_RENAME_FILE_FAIL', -12 );
- define( 'PCLZIP_ERR_BAD_CHECKSUM', -13 );
- define( 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP', -14 );
- define( 'PCLZIP_ERR_MISSING_OPTION_VALUE', -15 );
- define( 'PCLZIP_ERR_INVALID_OPTION_VALUE', -16 );
- define( 'PCLZIP_ERR_ALREADY_A_DIRECTORY', -17 );
- define( 'PCLZIP_ERR_UNSUPPORTED_COMPRESSION', -18 );
- define( 'PCLZIP_ERR_UNSUPPORTED_ENCRYPTION', -19 );
- define( 'PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE', -20 );
- define( 'PCLZIP_ERR_DIRECTORY_RESTRICTION', -21 );
-
- // ----- Options values
- define( 'PCLZIP_OPT_PATH', 77001 );
- define( 'PCLZIP_OPT_ADD_PATH', 77002 );
- define( 'PCLZIP_OPT_REMOVE_PATH', 77003 );
- define( 'PCLZIP_OPT_REMOVE_ALL_PATH', 77004 );
- define( 'PCLZIP_OPT_SET_CHMOD', 77005 );
- define( 'PCLZIP_OPT_EXTRACT_AS_STRING', 77006 );
- define( 'PCLZIP_OPT_NO_COMPRESSION', 77007 );
- define( 'PCLZIP_OPT_BY_NAME', 77008 );
- define( 'PCLZIP_OPT_BY_INDEX', 77009 );
- define( 'PCLZIP_OPT_BY_EREG', 77010 );
- define( 'PCLZIP_OPT_BY_PREG', 77011 );
- define( 'PCLZIP_OPT_COMMENT', 77012 );
- define( 'PCLZIP_OPT_ADD_COMMENT', 77013 );
- define( 'PCLZIP_OPT_PREPEND_COMMENT', 77014 );
- define( 'PCLZIP_OPT_EXTRACT_IN_OUTPUT', 77015 );
- define( 'PCLZIP_OPT_REPLACE_NEWER', 77016 );
- define( 'PCLZIP_OPT_STOP_ON_ERROR', 77017 );
- // Having big trouble with crypt. Need to multiply 2 long int
- // which is not correctly supported by PHP ...
- //define( 'PCLZIP_OPT_CRYPT', 77018 );
- define( 'PCLZIP_OPT_EXTRACT_DIR_RESTRICTION', 77019 );
-
- // ----- File description attributes
- define( 'PCLZIP_ATT_FILE_NAME', 79001 );
- define( 'PCLZIP_ATT_FILE_NEW_SHORT_NAME', 79002 );
- define( 'PCLZIP_ATT_FILE_NEW_FULL_NAME', 79003 );
- define( 'PCLZIP_ATT_FILE_MTIME', 79004 );
- define( 'PCLZIP_ATT_FILE_CONTENT', 79005 );
- define( 'PCLZIP_ATT_FILE_COMMENT', 79006 );
-
- // ----- Call backs values
- define( 'PCLZIP_CB_PRE_EXTRACT', 78001 );
- define( 'PCLZIP_CB_POST_EXTRACT', 78002 );
- define( 'PCLZIP_CB_PRE_ADD', 78003 );
- define( 'PCLZIP_CB_POST_ADD', 78004 );
- /* For futur use
- define( 'PCLZIP_CB_PRE_LIST', 78005 );
- define( 'PCLZIP_CB_POST_LIST', 78006 );
- define( 'PCLZIP_CB_PRE_DELETE', 78007 );
- define( 'PCLZIP_CB_POST_DELETE', 78008 );
- */
-
- // --------------------------------------------------------------------------------
- // Class : PclZip
- // Description :
- // PclZip is the class that represent a Zip archive.
- // The public methods allow the manipulation of the archive.
- // Attributes :
- // Attributes must not be accessed directly.
- // Methods :
- // PclZip() : Object creator
- // create() : Creates the Zip archive
- // listContent() : List the content of the Zip archive
- // extract() : Extract the content of the archive
- // properties() : List the properties of the archive
- // --------------------------------------------------------------------------------
- class PclZip
- {
- // ----- Filename of the zip file
- var $zipname = '';
-
- // ----- File descriptor of the zip file
- var $zip_fd = 0;
-
- // ----- Internal error handling
- var $error_code = 1;
- var $error_string = '';
-
- // ----- Current status of the magic_quotes_runtime
- // This value store the php configuration for magic_quotes
- // The class can then disable the magic_quotes and reset it after
- var $magic_quotes_status;
-
- // --------------------------------------------------------------------------------
- // Function : PclZip()
- // Description :
- // Creates a PclZip object and set the name of the associated Zip archive
- // filename.
- // Note that no real action is taken, if the archive does not exist it is not
- // created. Use create() for that.
- // --------------------------------------------------------------------------------
- function PclZip($p_zipname)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::PclZip', "zipname=$p_zipname");
-
- // ----- Tests the zlib
- if (!function_exists('gzopen'))
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 1, "zlib extension seems to be missing");
- die('Abort '.basename(__FILE__).' : Missing zlib extensions');
- }
-
- // ----- Set the attributes
- $this->zipname = $p_zipname;
- $this->zip_fd = 0;
- $this->magic_quotes_status = -1;
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 1);
- return;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function :
- // create($p_filelist, $p_add_dir="", $p_remove_dir="")
- // create($p_filelist, $p_option, $p_option_value, ...)
- // Description :
- // This method supports two different synopsis. The first one is historical.
- // This method creates a Zip Archive. The Zip file is created in the
- // filesystem. The files and directories indicated in $p_filelist
- // are added in the archive. See the parameters description for the
- // supported format of $p_filelist.
- // When a directory is in the list, the directory and its content is added
- // in the archive.
- // In this synopsis, the function takes an optional variable list of
- // options. See bellow the supported options.
- // Parameters :
- // $p_filelist : An array containing file or directory names, or
- // a string containing one filename or one directory name, or
- // a string containing a list of filenames and/or directory
- // names separated by spaces.
- // $p_add_dir : A path to add before the real path of the archived file,
- // in order to have it memorized in the archive.
- // $p_remove_dir : A path to remove from the real path of the file to archive,
- // in order to have a shorter path memorized in the archive.
- // When $p_add_dir and $p_remove_dir are set, $p_remove_dir
- // is removed first, before $p_add_dir is added.
- // Options :
- // PCLZIP_OPT_ADD_PATH :
- // PCLZIP_OPT_REMOVE_PATH :
- // PCLZIP_OPT_REMOVE_ALL_PATH :
- // PCLZIP_OPT_COMMENT :
- // PCLZIP_CB_PRE_ADD :
- // PCLZIP_CB_POST_ADD :
- // Return Values :
- // 0 on failure,
- // The list of the added files, with a status of the add action.
- // (see PclZip::listContent() for list entry format)
- // --------------------------------------------------------------------------------
- function create($p_filelist)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::create', "filelist='$p_filelist', ...");
- $v_result=1;
-
- // ----- Reset the error handler
- $this->privErrorReset();
-
- // ----- Set default values
- $v_options = array();
- $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE;
-
- // ----- Look for variable options arguments
- $v_size = func_num_args();
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
-
- // ----- Look for arguments
- if ($v_size > 1) {
- // ----- Get the arguments
- $v_arg_list = func_get_args();
-
- // ----- Remove from the options list the first argument
- array_shift($v_arg_list);
- $v_size--;
-
- // ----- Look for first arg
- if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options detected");
-
- // ----- Parse the options
- $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
- array (PCLZIP_OPT_REMOVE_PATH => 'optional',
- PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
- PCLZIP_OPT_ADD_PATH => 'optional',
- PCLZIP_CB_PRE_ADD => 'optional',
- PCLZIP_CB_POST_ADD => 'optional',
- PCLZIP_OPT_NO_COMPRESSION => 'optional',
- PCLZIP_OPT_COMMENT => 'optional'
- //, PCLZIP_OPT_CRYPT => 'optional'
- ));
- if ($v_result != 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return 0;
- }
- }
-
- // ----- Look for 2 args
- // Here we need to support the first historic synopsis of the
- // method.
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis");
-
- // ----- Get the first argument
- $v_options[PCLZIP_OPT_ADD_PATH] = $v_arg_list[0];
-
- // ----- Look for the optional second argument
- if ($v_size == 2) {
- $v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1];
- }
- else if ($v_size > 2) {
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER,
- "Invalid number / type of arguments");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return 0;
- }
- }
- }
-
- // ----- Init
- $v_string_list = array();
- $v_att_list = array();
- $v_filedescr_list = array();
- $p_result_list = array();
-
- // ----- Look if the $p_filelist is really an array
- if (is_array($p_filelist)) {
-
- // ----- Look if the first element is also an array
- // This will mean that this is a file description entry
- if (isset($p_filelist[0]) && is_array($p_filelist[0])) {
- $v_att_list = $p_filelist;
- }
-
- // ----- The list is a list of string names
- else {
- $v_string_list = $p_filelist;
- }
- }
-
- // ----- Look if the $p_filelist is a string
- else if (is_string($p_filelist)) {
- // ----- Create a list from the string
- $v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist);
- }
-
- // ----- Invalid variable type for $p_filelist
- else {
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_filelist");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return 0;
- }
-
- // ----- Reformat the string list
- if (sizeof($v_string_list) != 0) {
- foreach ($v_string_list as $v_string) {
- if ($v_string != '') {
- $v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string;
- }
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Ignore an empty filename");
- }
- }
- }
-
- // ----- For each file in the list check the attributes
- $v_supported_attributes
- = array ( PCLZIP_ATT_FILE_NAME => 'mandatory'
- ,PCLZIP_ATT_FILE_NEW_SHORT_NAME => 'optional'
- ,PCLZIP_ATT_FILE_NEW_FULL_NAME => 'optional'
- ,PCLZIP_ATT_FILE_MTIME => 'optional'
- ,PCLZIP_ATT_FILE_CONTENT => 'optional'
- ,PCLZIP_ATT_FILE_COMMENT => 'optional'
- );
- foreach ($v_att_list as $v_entry) {
- $v_result = $this->privFileDescrParseAtt($v_entry,
- $v_filedescr_list[],
- $v_options,
- $v_supported_attributes);
- if ($v_result != 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return 0;
- }
- }
-
- // ----- Expand the filelist (expand directories)
- $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options);
- if ($v_result != 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return 0;
- }
-
- // ----- Call the create fct
- $v_result = $this->privCreate($v_filedescr_list, $p_result_list, $v_options);
- if ($v_result != 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return 0;
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_result_list);
- return $p_result_list;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function :
- // add($p_filelist, $p_add_dir="", $p_remove_dir="")
- // add($p_filelist, $p_option, $p_option_value, ...)
- // Description :
- // This method supports two synopsis. The first one is historical.
- // This methods add the list of files in an existing archive.
- // If a file with the same name already exists, it is added at the end of the
- // archive, the first one is still present.
- // If the archive does not exist, it is created.
- // Parameters :
- // $p_filelist : An array containing file or directory names, or
- // a string containing one filename or one directory name, or
- // a string containing a list of filenames and/or directory
- // names separated by spaces.
- // $p_add_dir : A path to add before the real path of the archived file,
- // in order to have it memorized in the archive.
- // $p_remove_dir : A path to remove from the real path of the file to archive,
- // in order to have a shorter path memorized in the archive.
- // When $p_add_dir and $p_remove_dir are set, $p_remove_dir
- // is removed first, before $p_add_dir is added.
- // Options :
- // PCLZIP_OPT_ADD_PATH :
- // PCLZIP_OPT_REMOVE_PATH :
- // PCLZIP_OPT_REMOVE_ALL_PATH :
- // PCLZIP_OPT_COMMENT :
- // PCLZIP_OPT_ADD_COMMENT :
- // PCLZIP_OPT_PREPEND_COMMENT :
- // PCLZIP_CB_PRE_ADD :
- // PCLZIP_CB_POST_ADD :
- // Return Values :
- // 0 on failure,
- // The list of the added files, with a status of the add action.
- // (see PclZip::listContent() for list entry format)
- // --------------------------------------------------------------------------------
- function add($p_filelist)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::add', "filelist='$p_filelist', ...");
- $v_result=1;
-
- // ----- Reset the error handler
- $this->privErrorReset();
-
- // ----- Set default values
- $v_options = array();
- $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE;
-
- // ----- Look for variable options arguments
- $v_size = func_num_args();
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
-
- // ----- Look for arguments
- if ($v_size > 1) {
- // ----- Get the arguments
- $v_arg_list = func_get_args();
-
- // ----- Remove form the options list the first argument
- array_shift($v_arg_list);
- $v_size--;
-
- // ----- Look for first arg
- if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options detected");
-
- // ----- Parse the options
- $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
- array (PCLZIP_OPT_REMOVE_PATH => 'optional',
- PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
- PCLZIP_OPT_ADD_PATH => 'optional',
- PCLZIP_CB_PRE_ADD => 'optional',
- PCLZIP_CB_POST_ADD => 'optional',
- PCLZIP_OPT_NO_COMPRESSION => 'optional',
- PCLZIP_OPT_COMMENT => 'optional',
- PCLZIP_OPT_ADD_COMMENT => 'optional',
- PCLZIP_OPT_PREPEND_COMMENT => 'optional'
- //, PCLZIP_OPT_CRYPT => 'optional'
- ));
- if ($v_result != 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return 0;
- }
- }
-
- // ----- Look for 2 args
- // Here we need to support the first historic synopsis of the
- // method.
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis");
-
- // ----- Get the first argument
- $v_options[PCLZIP_OPT_ADD_PATH] = $v_add_path = $v_arg_list[0];
-
- // ----- Look for the optional second argument
- if ($v_size == 2) {
- $v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1];
- }
- else if ($v_size > 2) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return 0;
- }
- }
- }
-
- // ----- Init
- $v_string_list = array();
- $v_att_list = array();
- $v_filedescr_list = array();
- $p_result_list = array();
-
- // ----- Look if the $p_filelist is really an array
- if (is_array($p_filelist)) {
-
- // ----- Look if the first element is also an array
- // This will mean that this is a file description entry
- if (isset($p_filelist[0]) && is_array($p_filelist[0])) {
- $v_att_list = $p_filelist;
- }
-
- // ----- The list is a list of string names
- else {
- $v_string_list = $p_filelist;
- }
- }
-
- // ----- Look if the $p_filelist is a string
- else if (is_string($p_filelist)) {
- // ----- Create a list from the string
- $v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist);
- }
-
- // ----- Invalid variable type for $p_filelist
- else {
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type '".gettype($p_filelist)."' for p_filelist");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return 0;
- }
-
- // ----- Reformat the string list
- if (sizeof($v_string_list) != 0) {
- foreach ($v_string_list as $v_string) {
- $v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string;
- }
- }
-
- // ----- For each file in the list check the attributes
- $v_supported_attributes
- = array ( PCLZIP_ATT_FILE_NAME => 'mandatory'
- ,PCLZIP_ATT_FILE_NEW_SHORT_NAME => 'optional'
- ,PCLZIP_ATT_FILE_NEW_FULL_NAME => 'optional'
- ,PCLZIP_ATT_FILE_MTIME => 'optional'
- ,PCLZIP_ATT_FILE_CONTENT => 'optional'
- ,PCLZIP_ATT_FILE_COMMENT => 'optional'
- );
- foreach ($v_att_list as $v_entry) {
- $v_result = $this->privFileDescrParseAtt($v_entry,
- $v_filedescr_list[],
- $v_options,
- $v_supported_attributes);
- if ($v_result != 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return 0;
- }
- }
-
- // ----- Expand the filelist (expand directories)
- $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options);
- if ($v_result != 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return 0;
- }
-
- // ----- Call the create fct
- $v_result = $this->privAdd($v_filedescr_list, $p_result_list, $v_options);
- if ($v_result != 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return 0;
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_result_list);
- return $p_result_list;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : listContent()
- // Description :
- // This public method, gives the list of the files and directories, with their
- // properties.
- // The properties of each entries in the list are (used also in other functions) :
- // filename : Name of the file. For a create or add action it is the filename
- // given by the user. For an extract function it is the filename
- // of the extracted file.
- // stored_filename : Name of the file / directory stored in the archive.
- // size : Size of the stored file.
- // compressed_size : Size of the file's data compressed in the archive
- // (without the headers overhead)
- // mtime : Last known modification date of the file (UNIX timestamp)
- // comment : Comment associated with the file
- // folder : true | false
- // index : index of the file in the archive
- // status : status of the action (depending of the action) :
- // Values are :
- // ok : OK !
- // filtered : the file / dir is not extracted (filtered by user)
- // already_a_directory : the file can not be extracted because a
- // directory with the same name already exists
- // write_protected : the file can not be extracted because a file
- // with the same name already exists and is
- // write protected
- // newer_exist : the file was not extracted because a newer file exists
- // path_creation_fail : the file is not extracted because the folder
- // does not exists and can not be created
- // write_error : the file was not extracted because there was a
- // error while writing the file
- // read_error : the file was not extracted because there was a error
- // while reading the file
- // invalid_header : the file was not extracted because of an archive
- // format error (bad file header)
- // Note that each time a method can continue operating when there
- // is an action error on a file, the error is only logged in the file status.
- // Return Values :
- // 0 on an unrecoverable failure,
- // The list of the files in the archive.
- // --------------------------------------------------------------------------------
- function listContent()
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::listContent', "");
- $v_result=1;
-
- // ----- Reset the error handler
- $this->privErrorReset();
-
- // ----- Check archive
- if (!$this->privCheckFormat()) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return(0);
- }
-
- // ----- Call the extracting fct
- $p_list = array();
- if (($v_result = $this->privList($p_list)) != 1)
- {
- unset($p_list);
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
- return(0);
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list);
- return $p_list;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function :
- // extract($p_path="./", $p_remove_path="")
- // extract([$p_option, $p_option_value, ...])
- // Description :
- // This method supports two synopsis. The first one is historical.
- // This method extract all the files / directories from the archive to the
- // folder indicated in $p_path.
- // If you want to ignore the 'root' part of path of the memorized files
- // you can indicate this in the optional $p_remove_path parameter.
- // By default, if a newer file with the same name already exists, the
- // file is not extracted.
- //
- // If both PCLZIP_OPT_PATH and PCLZIP_OPT_ADD_PATH aoptions
- // are used, the path indicated in PCLZIP_OPT_ADD_PATH is append
- // at the end of the path value of PCLZIP_OPT_PATH.
- // Parameters :
- // $p_path : Path where the files and directories are to be extracted
- // $p_remove_path : First part ('root' part) of the memorized path
- // (if any similar) to remove while extracting.
- // Options :
- // PCLZIP_OPT_PATH :
- // PCLZIP_OPT_ADD_PATH :
- // PCLZIP_OPT_REMOVE_PATH :
- // PCLZIP_OPT_REMOVE_ALL_PATH :
- // PCLZIP_CB_PRE_EXTRACT :
- // PCLZIP_CB_POST_EXTRACT :
- // Return Values :
- // 0 or a negative value on failure,
- // The list of the extracted files, with a status of the action.
- // (see PclZip::listContent() for list entry format)
- // --------------------------------------------------------------------------------
- function extract()
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::extract", "");
- $v_result=1;
-
- // ----- Reset the error handler
- $this->privErrorReset();
-
- // ----- Check archive
- if (!$this->privCheckFormat()) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return(0);
- }
-
- // ----- Set default values
- $v_options = array();
-// $v_path = "./";
- $v_path = '';
- $v_remove_path = "";
- $v_remove_all_path = false;
-
- // ----- Look for variable options arguments
- $v_size = func_num_args();
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
-
- // ----- Default values for option
- $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
-
- // ----- Look for arguments
- if ($v_size > 0) {
- // ----- Get the arguments
- $v_arg_list = func_get_args();
-
- // ----- Look for first arg
- if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options");
-
- // ----- Parse the options
- $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
- array (PCLZIP_OPT_PATH => 'optional',
- PCLZIP_OPT_REMOVE_PATH => 'optional',
- PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
- PCLZIP_OPT_ADD_PATH => 'optional',
- PCLZIP_CB_PRE_EXTRACT => 'optional',
- PCLZIP_CB_POST_EXTRACT => 'optional',
- PCLZIP_OPT_SET_CHMOD => 'optional',
- PCLZIP_OPT_BY_NAME => 'optional',
- PCLZIP_OPT_BY_EREG => 'optional',
- PCLZIP_OPT_BY_PREG => 'optional',
- PCLZIP_OPT_BY_INDEX => 'optional',
- PCLZIP_OPT_EXTRACT_AS_STRING => 'optional',
- PCLZIP_OPT_EXTRACT_IN_OUTPUT => 'optional',
- PCLZIP_OPT_REPLACE_NEWER => 'optional'
- ,PCLZIP_OPT_STOP_ON_ERROR => 'optional'
- ,PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional'
- ));
- if ($v_result != 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return 0;
- }
-
- // ----- Set the arguments
- if (isset($v_options[PCLZIP_OPT_PATH])) {
- $v_path = $v_options[PCLZIP_OPT_PATH];
- }
- if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {
- $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];
- }
- if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
- $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];
- }
- if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {
- // ----- Check for '/' in last path char
- if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) {
- $v_path .= '/';
- }
- $v_path .= $v_options[PCLZIP_OPT_ADD_PATH];
- }
- }
-
- // ----- Look for 2 args
- // Here we need to support the first historic synopsis of the
- // method.
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis");
-
- // ----- Get the first argument
- $v_path = $v_arg_list[0];
-
- // ----- Look for the optional second argument
- if ($v_size == 2) {
- $v_remove_path = $v_arg_list[1];
- }
- else if ($v_size > 2) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
- return 0;
- }
- }
- }
-
- // ----- Trace
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "path='$v_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_path?'true':'false')."'");
-
- // ----- Call the extracting fct
- $p_list = array();
- $v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path,
- $v_remove_all_path, $v_options);
- if ($v_result < 1) {
- unset($p_list);
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
- return(0);
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list);
- return $p_list;
- }
- // --------------------------------------------------------------------------------
-
-
- // --------------------------------------------------------------------------------
- // Function :
- // extractByIndex($p_index, $p_path="./", $p_remove_path="")
- // extractByIndex($p_index, [$p_option, $p_option_value, ...])
- // Description :
- // This method supports two synopsis. The first one is historical.
- // This method is doing a partial extract of the archive.
- // The extracted files or folders are identified by their index in the
- // archive (from 0 to n).
- // Note that if the index identify a folder, only the folder entry is
- // extracted, not all the files included in the archive.
- // Parameters :
- // $p_index : A single index (integer) or a string of indexes of files to
- // extract. The form of the string is "0,4-6,8-12" with only numbers
- // and '-' for range or ',' to separate ranges. No spaces or ';'
- // are allowed.
- // $p_path : Path where the files and directories are to be extracted
- // $p_remove_path : First part ('root' part) of the memorized path
- // (if any similar) to remove while extracting.
- // Options :
- // PCLZIP_OPT_PATH :
- // PCLZIP_OPT_ADD_PATH :
- // PCLZIP_OPT_REMOVE_PATH :
- // PCLZIP_OPT_REMOVE_ALL_PATH :
- // PCLZIP_OPT_EXTRACT_AS_STRING : The files are extracted as strings and
- // not as files.
- // The resulting content is in a new field 'content' in the file
- // structure.
- // This option must be used alone (any other options are ignored).
- // PCLZIP_CB_PRE_EXTRACT :
- // PCLZIP_CB_POST_EXTRACT :
- // Return Values :
- // 0 on failure,
- // The list of the extracted files, with a status of the action.
- // (see PclZip::listContent() for list entry format)
- // --------------------------------------------------------------------------------
- //function extractByIndex($p_index, options...)
- function extractByIndex($p_index)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::extractByIndex", "index='$p_index', ...");
- $v_result=1;
-
- // ----- Reset the error handler
- $this->privErrorReset();
-
- // ----- Check archive
- if (!$this->privCheckFormat()) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return(0);
- }
-
- // ----- Set default values
- $v_options = array();
-// $v_path = "./";
- $v_path = '';
- $v_remove_path = "";
- $v_remove_all_path = false;
-
- // ----- Look for variable options arguments
- $v_size = func_num_args();
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
-
- // ----- Default values for option
- $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
-
- // ----- Look for arguments
- if ($v_size > 1) {
- // ----- Get the arguments
- $v_arg_list = func_get_args();
-
- // ----- Remove form the options list the first argument
- array_shift($v_arg_list);
- $v_size--;
-
- // ----- Look for first arg
- if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Variable list of options");
-
- // ----- Parse the options
- $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
- array (PCLZIP_OPT_PATH => 'optional',
- PCLZIP_OPT_REMOVE_PATH => 'optional',
- PCLZIP_OPT_REMOVE_ALL_PATH => 'optional',
- PCLZIP_OPT_EXTRACT_AS_STRING => 'optional',
- PCLZIP_OPT_ADD_PATH => 'optional',
- PCLZIP_CB_PRE_EXTRACT => 'optional',
- PCLZIP_CB_POST_EXTRACT => 'optional',
- PCLZIP_OPT_SET_CHMOD => 'optional',
- PCLZIP_OPT_REPLACE_NEWER => 'optional'
- ,PCLZIP_OPT_STOP_ON_ERROR => 'optional'
- ,PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional'
- ));
- if ($v_result != 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return 0;
- }
-
- // ----- Set the arguments
- if (isset($v_options[PCLZIP_OPT_PATH])) {
- $v_path = $v_options[PCLZIP_OPT_PATH];
- }
- if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) {
- $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH];
- }
- if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
- $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH];
- }
- if (isset($v_options[PCLZIP_OPT_ADD_PATH])) {
- // ----- Check for '/' in last path char
- if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) {
- $v_path .= '/';
- }
- $v_path .= $v_options[PCLZIP_OPT_ADD_PATH];
- }
- if (!isset($v_options[PCLZIP_OPT_EXTRACT_AS_STRING])) {
- $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE;
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Option PCLZIP_OPT_EXTRACT_AS_STRING not set.");
- }
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Option PCLZIP_OPT_EXTRACT_AS_STRING set.");
- }
- }
-
- // ----- Look for 2 args
- // Here we need to support the first historic synopsis of the
- // method.
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Static synopsis");
-
- // ----- Get the first argument
- $v_path = $v_arg_list[0];
-
- // ----- Look for the optional second argument
- if ($v_size == 2) {
- $v_remove_path = $v_arg_list[1];
- }
- else if ($v_size > 2) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return 0;
- }
- }
- }
-
- // ----- Trace
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "index='$p_index', path='$v_path', remove_path='$v_remove_path', remove_all_path='".($v_remove_path?'true':'false')."'");
-
- // ----- Trick
- // Here I want to reuse extractByRule(), so I need to parse the $p_index
- // with privParseOptions()
- $v_arg_trick = array (PCLZIP_OPT_BY_INDEX, $p_index);
- $v_options_trick = array();
- $v_result = $this->privParseOptions($v_arg_trick, sizeof($v_arg_trick), $v_options_trick,
- array (PCLZIP_OPT_BY_INDEX => 'optional' ));
- if ($v_result != 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return 0;
- }
- $v_options[PCLZIP_OPT_BY_INDEX] = $v_options_trick[PCLZIP_OPT_BY_INDEX];
-
- // ----- Call the extracting fct
- if (($v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path, $v_remove_all_path, $v_options)) < 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
- return(0);
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list);
- return $p_list;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function :
- // delete([$p_option, $p_option_value, ...])
- // Description :
- // This method removes files from the archive.
- // If no parameters are given, then all the archive is emptied.
- // Parameters :
- // None or optional arguments.
- // Options :
- // PCLZIP_OPT_BY_INDEX :
- // PCLZIP_OPT_BY_NAME :
- // PCLZIP_OPT_BY_EREG :
- // PCLZIP_OPT_BY_PREG :
- // Return Values :
- // 0 on failure,
- // The list of the files which are still present in the archive.
- // (see PclZip::listContent() for list entry format)
- // --------------------------------------------------------------------------------
- function delete()
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::delete", "");
- $v_result=1;
-
- // ----- Reset the error handler
- $this->privErrorReset();
-
- // ----- Check archive
- if (!$this->privCheckFormat()) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return(0);
- }
-
- // ----- Set default values
- $v_options = array();
-
- // ----- Look for variable options arguments
- $v_size = func_num_args();
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "$v_size arguments passed to the method");
-
- // ----- Look for arguments
- if ($v_size > 0) {
- // ----- Get the arguments
- $v_arg_list = func_get_args();
-
- // ----- Parse the options
- $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options,
- array (PCLZIP_OPT_BY_NAME => 'optional',
- PCLZIP_OPT_BY_EREG => 'optional',
- PCLZIP_OPT_BY_PREG => 'optional',
- PCLZIP_OPT_BY_INDEX => 'optional' ));
- if ($v_result != 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return 0;
- }
- }
-
- // ----- Magic quotes trick
- $this->privDisableMagicQuotes();
-
- // ----- Call the delete fct
- $v_list = array();
- if (($v_result = $this->privDeleteByRule($v_list, $v_options)) != 1) {
- $this->privSwapBackMagicQuotes();
- unset($v_list);
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0, PclZip::errorInfo());
- return(0);
- }
-
- // ----- Magic quotes trick
- $this->privSwapBackMagicQuotes();
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_list);
- return $v_list;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : deleteByIndex()
- // Description :
- // ***** Deprecated *****
- // delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefered.
- // --------------------------------------------------------------------------------
- function deleteByIndex($p_index)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::deleteByIndex", "index='$p_index'");
-
- $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index);
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $p_list);
- return $p_list;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : properties()
- // Description :
- // This method gives the properties of the archive.
- // The properties are :
- // nb : Number of files in the archive
- // comment : Comment associated with the archive file
- // status : not_exist, ok
- // Parameters :
- // None
- // Return Values :
- // 0 on failure,
- // An array with the archive properties.
- // --------------------------------------------------------------------------------
- function properties()
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::properties", "");
-
- // ----- Reset the error handler
- $this->privErrorReset();
-
- // ----- Magic quotes trick
- $this->privDisableMagicQuotes();
-
- // ----- Check archive
- if (!$this->privCheckFormat()) {
- $this->privSwapBackMagicQuotes();
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return(0);
- }
-
- // ----- Default properties
- $v_prop = array();
- $v_prop['comment'] = '';
- $v_prop['nb'] = 0;
- $v_prop['status'] = 'not_exist';
-
- // ----- Look if file exists
- if (@is_file($this->zipname))
- {
- // ----- Open the zip file
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
- if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
- {
- $this->privSwapBackMagicQuotes();
-
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), 0);
- return 0;
- }
-
- // ----- Read the central directory informations
- $v_central_dir = array();
- if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
- {
- $this->privSwapBackMagicQuotes();
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return 0;
- }
-
- // ----- Close the zip file
- $this->privCloseFd();
-
- // ----- Set the user attributes
- $v_prop['comment'] = $v_central_dir['comment'];
- $v_prop['nb'] = $v_central_dir['entries'];
- $v_prop['status'] = 'ok';
- }
-
- // ----- Magic quotes trick
- $this->privSwapBackMagicQuotes();
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_prop);
- return $v_prop;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : duplicate()
- // Description :
- // This method creates an archive by copying the content of an other one. If
- // the archive already exist, it is replaced by the new one without any warning.
- // Parameters :
- // $p_archive : The filename of a valid archive, or
- // a valid PclZip object.
- // Return Values :
- // 1 on success.
- // 0 or a negative value on error (error code).
- // --------------------------------------------------------------------------------
- function duplicate($p_archive)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::duplicate", "");
- $v_result = 1;
-
- // ----- Reset the error handler
- $this->privErrorReset();
-
- // ----- Look if the $p_archive is a PclZip object
- if ((is_object($p_archive)) && (get_class($p_archive) == 'pclzip'))
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The parameter is valid PclZip object '".$p_archive->zipname."'");
-
- // ----- Duplicate the archive
- $v_result = $this->privDuplicate($p_archive->zipname);
- }
-
- // ----- Look if the $p_archive is a string (so a filename)
- else if (is_string($p_archive))
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The parameter is a filename '$p_archive'");
-
- // ----- Check that $p_archive is a valid zip file
- // TBC : Should also check the archive format
- if (!is_file($p_archive)) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "No file with filename '".$p_archive."'");
- $v_result = PCLZIP_ERR_MISSING_FILE;
- }
- else {
- // ----- Duplicate the archive
- $v_result = $this->privDuplicate($p_archive);
- }
- }
-
- // ----- Invalid variable
- else
- {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add");
- $v_result = PCLZIP_ERR_INVALID_PARAMETER;
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : merge()
- // Description :
- // This method merge the $p_archive_to_add archive at the end of the current
- // one ($this).
- // If the archive ($this) does not exist, the merge becomes a duplicate.
- // If the $p_archive_to_add archive does not exist, the merge is a success.
- // Parameters :
- // $p_archive_to_add : It can be directly the filename of a valid zip archive,
- // or a PclZip object archive.
- // Return Values :
- // 1 on success,
- // 0 or negative values on error (see below).
- // --------------------------------------------------------------------------------
- function merge($p_archive_to_add)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::merge", "");
- $v_result = 1;
-
- // ----- Reset the error handler
- $this->privErrorReset();
-
- // ----- Check archive
- if (!$this->privCheckFormat()) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, 0);
- return(0);
- }
-
- // ----- Look if the $p_archive_to_add is a PclZip object
- if ((is_object($p_archive_to_add)) && (get_class($p_archive_to_add) == 'pclzip'))
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The parameter is valid PclZip object");
-
- // ----- Merge the archive
- $v_result = $this->privMerge($p_archive_to_add);
- }
-
- // ----- Look if the $p_archive_to_add is a string (so a filename)
- else if (is_string($p_archive_to_add))
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The parameter is a filename");
-
- // ----- Create a temporary archive
- $v_object_archive = new PclZip($p_archive_to_add);
-
- // ----- Merge the archive
- $v_result = $this->privMerge($v_object_archive);
- }
-
- // ----- Invalid variable
- else
- {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add");
- $v_result = PCLZIP_ERR_INVALID_PARAMETER;
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
-
-
- // --------------------------------------------------------------------------------
- // Function : errorCode()
- // Description :
- // Parameters :
- // --------------------------------------------------------------------------------
- function errorCode()
- {
- if (PCLZIP_ERROR_EXTERNAL == 1) {
- return(PclErrorCode());
- }
- else {
- return($this->error_code);
- }
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : errorName()
- // Description :
- // Parameters :
- // --------------------------------------------------------------------------------
- function errorName($p_with_code=false)
- {
- $v_name = array ( PCLZIP_ERR_NO_ERROR => 'PCLZIP_ERR_NO_ERROR',
- PCLZIP_ERR_WRITE_OPEN_FAIL => 'PCLZIP_ERR_WRITE_OPEN_FAIL',
- PCLZIP_ERR_READ_OPEN_FAIL => 'PCLZIP_ERR_READ_OPEN_FAIL',
- PCLZIP_ERR_INVALID_PARAMETER => 'PCLZIP_ERR_INVALID_PARAMETER',
- PCLZIP_ERR_MISSING_FILE => 'PCLZIP_ERR_MISSING_FILE',
- PCLZIP_ERR_FILENAME_TOO_LONG => 'PCLZIP_ERR_FILENAME_TOO_LONG',
- PCLZIP_ERR_INVALID_ZIP => 'PCLZIP_ERR_INVALID_ZIP',
- PCLZIP_ERR_BAD_EXTRACTED_FILE => 'PCLZIP_ERR_BAD_EXTRACTED_FILE',
- PCLZIP_ERR_DIR_CREATE_FAIL => 'PCLZIP_ERR_DIR_CREATE_FAIL',
- PCLZIP_ERR_BAD_EXTENSION => 'PCLZIP_ERR_BAD_EXTENSION',
- PCLZIP_ERR_BAD_FORMAT => 'PCLZIP_ERR_BAD_FORMAT',
- PCLZIP_ERR_DELETE_FILE_FAIL => 'PCLZIP_ERR_DELETE_FILE_FAIL',
- PCLZIP_ERR_RENAME_FILE_FAIL => 'PCLZIP_ERR_RENAME_FILE_FAIL',
- PCLZIP_ERR_BAD_CHECKSUM => 'PCLZIP_ERR_BAD_CHECKSUM',
- PCLZIP_ERR_INVALID_ARCHIVE_ZIP => 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP',
- PCLZIP_ERR_MISSING_OPTION_VALUE => 'PCLZIP_ERR_MISSING_OPTION_VALUE',
- PCLZIP_ERR_INVALID_OPTION_VALUE => 'PCLZIP_ERR_INVALID_OPTION_VALUE',
- PCLZIP_ERR_UNSUPPORTED_COMPRESSION => 'PCLZIP_ERR_UNSUPPORTED_COMPRESSION',
- PCLZIP_ERR_UNSUPPORTED_ENCRYPTION => 'PCLZIP_ERR_UNSUPPORTED_ENCRYPTION'
- ,PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE => 'PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE'
- ,PCLZIP_ERR_DIRECTORY_RESTRICTION => 'PCLZIP_ERR_DIRECTORY_RESTRICTION'
- );
-
- if (isset($v_name[$this->error_code])) {
- $v_value = $v_name[$this->error_code];
- }
- else {
- $v_value = 'NoName';
- }
-
- if ($p_with_code) {
- return($v_value.' ('.$this->error_code.')');
- }
- else {
- return($v_value);
- }
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : errorInfo()
- // Description :
- // Parameters :
- // --------------------------------------------------------------------------------
- function errorInfo($p_full=false)
- {
- if (PCLZIP_ERROR_EXTERNAL == 1) {
- return(PclErrorString());
- }
- else {
- if ($p_full) {
- return($this->errorName(true)." : ".$this->error_string);
- }
- else {
- return($this->error_string." [code ".$this->error_code."]");
- }
- }
- }
- // --------------------------------------------------------------------------------
-
-
-// --------------------------------------------------------------------------------
-// ***** UNDER THIS LINE ARE DEFINED PRIVATE INTERNAL FUNCTIONS *****
-// ***** *****
-// ***** THESES FUNCTIONS MUST NOT BE USED DIRECTLY *****
-// --------------------------------------------------------------------------------
-
-
-
- // --------------------------------------------------------------------------------
- // Function : privCheckFormat()
- // Description :
- // This method check that the archive exists and is a valid zip archive.
- // Several level of check exists. (futur)
- // Parameters :
- // $p_level : Level of check. Default 0.
- // 0 : Check the first bytes (magic codes) (default value))
- // 1 : 0 + Check the central directory (futur)
- // 2 : 1 + Check each file header (futur)
- // Return Values :
- // true on success,
- // false on error, the error code is set.
- // --------------------------------------------------------------------------------
- function privCheckFormat($p_level=0)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCheckFormat", "");
- $v_result = true;
-
- // ----- Reset the file system cache
- clearstatcache();
-
- // ----- Reset the error handler
- $this->privErrorReset();
-
- // ----- Look if the file exits
- if (!is_file($this->zipname)) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "Missing archive file '".$this->zipname."'");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, false, PclZip::errorInfo());
- return(false);
- }
-
- // ----- Check that the file is readeable
- if (!is_readable($this->zipname)) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->zipname."'");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, false, PclZip::errorInfo());
- return(false);
- }
-
- // ----- Check the magic code
- // TBC
-
- // ----- Check the central header
- // TBC
-
- // ----- Check each file header
- // TBC
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privParseOptions()
- // Description :
- // This internal methods reads the variable list of arguments ($p_options_list,
- // $p_size) and generate an array with the options and values ($v_result_list).
- // $v_requested_options contains the options that can be present and those that
- // must be present.
- // $v_requested_options is an array, with the option value as key, and 'optional',
- // or 'mandatory' as value.
- // Parameters :
- // See above.
- // Return Values :
- // 1 on success.
- // 0 on failure.
- // --------------------------------------------------------------------------------
- function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options=false)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privParseOptions", "");
- $v_result=1;
-
- // ----- Read the options
- $i=0;
- while ($i<$p_size) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Looking for table index $i, option = '".PclZipUtilOptionText($p_options_list[$i])."(".$p_options_list[$i].")'");
-
- // ----- Check if the option is supported
- if (!isset($v_requested_options[$p_options_list[$i]])) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid optional parameter '".$p_options_list[$i]."' for this method");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Look for next option
- switch ($p_options_list[$i]) {
- // ----- Look for options that request a path value
- case PCLZIP_OPT_PATH :
- case PCLZIP_OPT_REMOVE_PATH :
- case PCLZIP_OPT_ADD_PATH :
- // ----- Check the number of parameters
- if (($i+1) >= $p_size) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Get the value
- $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
- $i++;
- break;
-
- case PCLZIP_OPT_EXTRACT_DIR_RESTRICTION :
- // ----- Check the number of parameters
- if (($i+1) >= $p_size) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Get the value
- if ( is_string($p_options_list[$i+1])
- && ($p_options_list[$i+1] != '')) {
- $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
- $i++;
- }
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." set with an empty value is ignored.");
- }
- break;
-
- // ----- Look for options that request an array of string for value
- case PCLZIP_OPT_BY_NAME :
- // ----- Check the number of parameters
- if (($i+1) >= $p_size) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Get the value
- if (is_string($p_options_list[$i+1])) {
- $v_result_list[$p_options_list[$i]][0] = $p_options_list[$i+1];
- }
- else if (is_array($p_options_list[$i+1])) {
- $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
- }
- else {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
- $i++;
- break;
-
- // ----- Look for options that request an EREG or PREG expression
- case PCLZIP_OPT_BY_EREG :
- case PCLZIP_OPT_BY_PREG :
- //case PCLZIP_OPT_CRYPT :
- // ----- Check the number of parameters
- if (($i+1) >= $p_size) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Get the value
- if (is_string($p_options_list[$i+1])) {
- $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
- }
- else {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
- $i++;
- break;
-
- // ----- Look for options that takes a string
- case PCLZIP_OPT_COMMENT :
- case PCLZIP_OPT_ADD_COMMENT :
- case PCLZIP_OPT_PREPEND_COMMENT :
- // ----- Check the number of parameters
- if (($i+1) >= $p_size) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE,
- "Missing parameter value for option '"
- .PclZipUtilOptionText($p_options_list[$i])
- ."'");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Get the value
- if (is_string($p_options_list[$i+1])) {
- $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
- }
- else {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE,
- "Wrong parameter value for option '"
- .PclZipUtilOptionText($p_options_list[$i])
- ."'");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
- $i++;
- break;
-
- // ----- Look for options that request an array of index
- case PCLZIP_OPT_BY_INDEX :
- // ----- Check the number of parameters
- if (($i+1) >= $p_size) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Get the value
- $v_work_list = array();
- if (is_string($p_options_list[$i+1])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is a string '".$p_options_list[$i+1]."'");
-
- // ----- Remove spaces
- $p_options_list[$i+1] = strtr($p_options_list[$i+1], ' ', '');
-
- // ----- Parse items
- $v_work_list = explode(",", $p_options_list[$i+1]);
- }
- else if (is_integer($p_options_list[$i+1])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is an integer '".$p_options_list[$i+1]."'");
- $v_work_list[0] = $p_options_list[$i+1].'-'.$p_options_list[$i+1];
- }
- else if (is_array($p_options_list[$i+1])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Index value is an array");
- $v_work_list = $p_options_list[$i+1];
- }
- else {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Value must be integer, string or array for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Reduce the index list
- // each index item in the list must be a couple with a start and
- // an end value : [0,3], [5-5], [8-10], ...
- // ----- Check the format of each item
- $v_sort_flag=false;
- $v_sort_value=0;
- for ($j=0; $j<sizeof($v_work_list); $j++) {
- // ----- Explode the item
- $v_item_list = explode("-", $v_work_list[$j]);
- $v_size_item_list = sizeof($v_item_list);
-
- // ----- TBC : Here we might check that each item is a
- // real integer ...
-
- // ----- Look for single value
- if ($v_size_item_list == 1) {
- // ----- Set the option value
- $v_result_list[$p_options_list[$i]][$j]['start'] = $v_item_list[0];
- $v_result_list[$p_options_list[$i]][$j]['end'] = $v_item_list[0];
- }
- elseif ($v_size_item_list == 2) {
- // ----- Set the option value
- $v_result_list[$p_options_list[$i]][$j]['start'] = $v_item_list[0];
- $v_result_list[$p_options_list[$i]][$j]['end'] = $v_item_list[1];
- }
- else {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Too many values in index range for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extracted index item = [".$v_result_list[$p_options_list[$i]][$j]['start'].",".$v_result_list[$p_options_list[$i]][$j]['end']."]");
-
- // ----- Look for list sort
- if ($v_result_list[$p_options_list[$i]][$j]['start'] < $v_sort_value) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The list should be sorted ...");
- $v_sort_flag=true;
-
- // ----- TBC : An automatic sort should be writen ...
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Invalid order of index range for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- $v_sort_value = $v_result_list[$p_options_list[$i]][$j]['start'];
- }
-
- // ----- Sort the items
- if ($v_sort_flag) {
- // TBC : To Be Completed
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "List sorting is not yet write ...");
- }
-
- // ----- Next option
- $i++;
- break;
-
- // ----- Look for options that request no value
- case PCLZIP_OPT_REMOVE_ALL_PATH :
- case PCLZIP_OPT_EXTRACT_AS_STRING :
- case PCLZIP_OPT_NO_COMPRESSION :
- case PCLZIP_OPT_EXTRACT_IN_OUTPUT :
- case PCLZIP_OPT_REPLACE_NEWER :
- case PCLZIP_OPT_STOP_ON_ERROR :
- $v_result_list[$p_options_list[$i]] = true;
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
- break;
-
- // ----- Look for options that request an octal value
- case PCLZIP_OPT_SET_CHMOD :
- // ----- Check the number of parameters
- if (($i+1) >= $p_size) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Get the value
- $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($p_options_list[$i])." = '".$v_result_list[$p_options_list[$i]]."'");
- $i++;
- break;
-
- // ----- Look for options that request a call-back
- case PCLZIP_CB_PRE_EXTRACT :
- case PCLZIP_CB_POST_EXTRACT :
- case PCLZIP_CB_PRE_ADD :
- case PCLZIP_CB_POST_ADD :
- /* for futur use
- case PCLZIP_CB_PRE_DELETE :
- case PCLZIP_CB_POST_DELETE :
- case PCLZIP_CB_PRE_LIST :
- case PCLZIP_CB_POST_LIST :
- */
- // ----- Check the number of parameters
- if (($i+1) >= $p_size) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Get the value
- $v_function_name = $p_options_list[$i+1];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "call-back ".PclZipUtilOptionText($p_options_list[$i])." = '".$v_function_name."'");
-
- // ----- Check that the value is a valid existing function
- if (!function_exists($v_function_name)) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Function '".$v_function_name."()' is not an existing function for option '".PclZipUtilOptionText($p_options_list[$i])."'");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Set the attribute
- $v_result_list[$p_options_list[$i]] = $v_function_name;
- $i++;
- break;
-
- default :
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER,
- "Unknown parameter '"
- .$p_options_list[$i]."'");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Next options
- $i++;
- }
-
- // ----- Look for mandatory options
- if ($v_requested_options !== false) {
- for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) {
- // ----- Look for mandatory option
- if ($v_requested_options[$key] == 'mandatory') {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Detect a mandatory option : ".PclZipUtilOptionText($key)."(".$key.")");
- // ----- Look if present
- if (!isset($v_result_list[$key])) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- }
- }
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privFileDescrParseAtt()
- // Description :
- // Parameters :
- // Return Values :
- // 1 on success.
- // 0 on failure.
- // --------------------------------------------------------------------------------
- function privFileDescrParseAtt(&$p_file_list, &$p_filedescr, $v_options, $v_requested_options=false)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privFileDescrParseAtt", "");
- $v_result=1;
-
- // ----- For each file in the list check the attributes
- foreach ($p_file_list as $v_key => $v_value) {
-
- // ----- Check if the option is supported
- if (!isset($v_requested_options[$v_key])) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file attribute '".$v_key."' for this file");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Look for attribute
- switch ($v_key) {
- case PCLZIP_ATT_FILE_NAME :
- if (!is_string($v_value)) {
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- $p_filedescr['filename'] = PclZipUtilPathReduction($v_value);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'");
-
- if ($p_filedescr['filename'] == '') {
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- break;
-
- case PCLZIP_ATT_FILE_NEW_SHORT_NAME :
- if (!is_string($v_value)) {
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- $p_filedescr['new_short_name'] = PclZipUtilPathReduction($v_value);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'");
-
- if ($p_filedescr['new_short_name'] == '') {
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty short filename for attribute '".PclZipUtilOptionText($v_key)."'");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- break;
-
- case PCLZIP_ATT_FILE_NEW_FULL_NAME :
- if (!is_string($v_value)) {
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- $p_filedescr['new_full_name'] = PclZipUtilPathReduction($v_value);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'");
-
- if ($p_filedescr['new_full_name'] == '') {
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty full filename for attribute '".PclZipUtilOptionText($v_key)."'");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- break;
-
- // ----- Look for options that takes a string
- case PCLZIP_ATT_FILE_COMMENT :
- if (!is_string($v_value)) {
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- $p_filedescr['comment'] = $v_value;
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'");
- break;
-
- case PCLZIP_ATT_FILE_MTIME :
- if (!is_integer($v_value)) {
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". Integer expected for attribute '".PclZipUtilOptionText($v_key)."'");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- $p_filedescr['mtime'] = $v_value;
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'");
- break;
-
- case PCLZIP_ATT_FILE_CONTENT :
- $p_filedescr['content'] = $v_value;
- ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "".PclZipUtilOptionText($v_key)." = '".$v_value."'");
- break;
-
- default :
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER,
- "Unknown parameter '".$v_key."'");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Look for mandatory options
- if ($v_requested_options !== false) {
- for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) {
- // ----- Look for mandatory option
- if ($v_requested_options[$key] == 'mandatory') {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Detect a mandatory option : ".PclZipUtilOptionText($key)."(".$key.")");
- // ----- Look if present
- if (!isset($p_file_list[$key])) {
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- }
- }
- }
-
- // end foreach
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privFileDescrExpand()
- // Description :
- // Parameters :
- // Return Values :
- // 1 on success.
- // 0 on failure.
- // --------------------------------------------------------------------------------
- function privFileDescrExpand(&$p_filedescr_list, &$p_options)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privFileDescrExpand", "");
- $v_result=1;
-
- // ----- Create a result list
- $v_result_list = array();
-
- // ----- Look each entry
- for ($i=0; $i<sizeof($p_filedescr_list); $i++) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Looking for file ".$i.".");
-
- // ----- Get filedescr
- $v_descr = $p_filedescr_list[$i];
-
- // ----- Reduce the filename
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filedescr before reduction :'".$v_descr['filename']."'");
- $v_descr['filename'] = PclZipUtilTranslateWinPath($v_descr['filename']);
- $v_descr['filename'] = PclZipUtilPathReduction($v_descr['filename']);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filedescr after reduction :'".$v_descr['filename']."'");
-
- // ----- Look for real file or folder
- if (file_exists($v_descr['filename'])) {
- if (@is_file($v_descr['filename'])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "This is a file");
- $v_descr['type'] = 'file';
- }
- else if (@is_dir($v_descr['filename'])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "This is a folder");
- $v_descr['type'] = 'folder';
- }
- else if (@is_link($v_descr['filename'])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Unsupported file type : link");
- // skip
- continue;
- }
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Unsupported file type : unknown type");
- // skip
- continue;
- }
- }
-
- // ----- Look for string added as file
- else if (isset($v_descr['content'])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "This is a string added as a file");
- $v_descr['type'] = 'virtual_file';
- }
-
- // ----- Missing file
- else {
- // ----- Error log
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$v_descr['filename']."' does not exists");
- PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '".$v_descr['filename']."' does not exists");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Calculate the stored filename
- $this->privCalculateStoredFilename($v_descr, $p_options);
-
- // ----- Add the descriptor in result list
- $v_result_list[sizeof($v_result_list)] = $v_descr;
-
- // ----- Look for folder
- if ($v_descr['type'] == 'folder') {
- // ----- List of items in folder
- $v_dirlist_descr = array();
- $v_dirlist_nb = 0;
- if ($v_folder_handler = @opendir($v_descr['filename'])) {
- while (($v_item_handler = @readdir($v_folder_handler)) !== false) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Looking for '".$v_item_handler."' in the directory");
-
- // ----- Skip '.' and '..'
- if (($v_item_handler == '.') || ($v_item_handler == '..')) {
- continue;
- }
-
- // ----- Compose the full filename
- $v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'].'/'.$v_item_handler;
-
- // ----- Look for different stored filename
- // Because the name of the folder was changed, the name of the
- // files/sub-folders also change
- if ($v_descr['stored_filename'] != $v_descr['filename']) {
- if ($v_descr['stored_filename'] != '') {
- $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_descr['stored_filename'].'/'.$v_item_handler;
- }
- else {
- $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_item_handler;
- }
- }
-
- $v_dirlist_nb++;
- }
-
- @closedir($v_folder_handler);
- }
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to open dir '".$v_descr['filename']."' in read mode. Skipped.");
- // TBC : unable to open folder in read mode
- }
-
- // ----- Expand each element of the list
- if ($v_dirlist_nb != 0) {
- // ----- Expand
- if (($v_result = $this->privFileDescrExpand($v_dirlist_descr, $p_options)) != 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Concat the resulting list
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Merging result list (size '".sizeof($v_result_list)."') with dirlist (size '".sizeof($v_dirlist_descr)."')");
- $v_result_list = array_merge($v_result_list, $v_dirlist_descr);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "merged result list is size '".sizeof($v_result_list)."'");
- }
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Nothing in this folder to expand.");
- }
-
- // ----- Free local array
- unset($v_dirlist_descr);
- }
- }
-
- // ----- Get the result list
- $p_filedescr_list = $v_result_list;
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privCreate()
- // Description :
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privCreate($p_filedescr_list, &$p_result_list, &$p_options)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCreate", "list");
- $v_result=1;
- $v_list_detail = array();
-
- // ----- Magic quotes trick
- $this->privDisableMagicQuotes();
-
- // ----- Open the file in write mode
- if (($v_result = $this->privOpenFd('wb')) != 1)
- {
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Add the list of files
- $v_result = $this->privAddList($p_filedescr_list, $p_result_list, $p_options);
-
- // ----- Close
- $this->privCloseFd();
-
- // ----- Magic quotes trick
- $this->privSwapBackMagicQuotes();
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privAdd()
- // Description :
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privAdd($p_filedescr_list, &$p_result_list, &$p_options)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAdd", "list");
- $v_result=1;
- $v_list_detail = array();
-
- // ----- Look if the archive exists or is empty
- if ((!is_file($this->zipname)) || (filesize($this->zipname) == 0))
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive does not exist, or is empty, create it.");
-
- // ----- Do a create
- $v_result = $this->privCreate($p_filedescr_list, $p_result_list, $p_options);
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // ----- Magic quotes trick
- $this->privDisableMagicQuotes();
-
- // ----- Open the zip file
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
- if (($v_result=$this->privOpenFd('rb')) != 1)
- {
- // ----- Magic quotes trick
- $this->privSwapBackMagicQuotes();
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Read the central directory informations
- $v_central_dir = array();
- if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
- {
- $this->privCloseFd();
- $this->privSwapBackMagicQuotes();
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Go to beginning of File
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'");
- @rewind($this->zip_fd);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'");
-
- // ----- Creates a temporay file
- $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
-
- // ----- Open the temporary file in write mode
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
- if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)
- {
- $this->privCloseFd();
- $this->privSwapBackMagicQuotes();
-
- PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Copy the files from the archive to the temporary file
- // TBC : Here I should better append the file and go back to erase the central dir
- $v_size = $v_central_dir['offset'];
- while ($v_size != 0)
- {
- $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
- $v_buffer = fread($this->zip_fd, $v_read_size);
- @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
- $v_size -= $v_read_size;
- }
-
- // ----- Swap the file descriptor
- // Here is a trick : I swap the temporary fd with the zip fd, in order to use
- // the following methods on the temporary fil and not the real archive
- $v_swap = $this->zip_fd;
- $this->zip_fd = $v_zip_temp_fd;
- $v_zip_temp_fd = $v_swap;
-
- // ----- Add the files
- $v_header_list = array();
- if (($v_result = $this->privAddFileList($p_filedescr_list, $v_header_list, $p_options)) != 1)
- {
- fclose($v_zip_temp_fd);
- $this->privCloseFd();
- @unlink($v_zip_temp_name);
- $this->privSwapBackMagicQuotes();
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Store the offset of the central dir
- $v_offset = @ftell($this->zip_fd);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "New offset of central dir : $v_offset");
-
- // ----- Copy the block of file headers from the old archive
- $v_size = $v_central_dir['size'];
- while ($v_size != 0)
- {
- $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
- $v_buffer = @fread($v_zip_temp_fd, $v_read_size);
- @fwrite($this->zip_fd, $v_buffer, $v_read_size);
- $v_size -= $v_read_size;
- }
-
- // ----- Create the Central Dir files header
- for ($i=0, $v_count=0; $i<sizeof($v_header_list); $i++)
- {
- // ----- Create the file header
- if ($v_header_list[$i]['status'] == 'ok') {
- if (($v_result = $this->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
- fclose($v_zip_temp_fd);
- $this->privCloseFd();
- @unlink($v_zip_temp_name);
- $this->privSwapBackMagicQuotes();
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- $v_count++;
- }
-
- // ----- Transform the header to a 'usable' info
- $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
- }
-
- // ----- Zip file comment
- $v_comment = $v_central_dir['comment'];
- if (isset($p_options[PCLZIP_OPT_COMMENT])) {
- $v_comment = $p_options[PCLZIP_OPT_COMMENT];
- }
- if (isset($p_options[PCLZIP_OPT_ADD_COMMENT])) {
- $v_comment = $v_comment.$p_options[PCLZIP_OPT_ADD_COMMENT];
- }
- if (isset($p_options[PCLZIP_OPT_PREPEND_COMMENT])) {
- $v_comment = $p_options[PCLZIP_OPT_PREPEND_COMMENT].$v_comment;
- }
-
- // ----- Calculate the size of the central header
- $v_size = @ftell($this->zip_fd)-$v_offset;
-
- // ----- Create the central dir footer
- if (($v_result = $this->privWriteCentralHeader($v_count+$v_central_dir['entries'], $v_size, $v_offset, $v_comment)) != 1)
- {
- // ----- Reset the file list
- unset($v_header_list);
- $this->privSwapBackMagicQuotes();
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Swap back the file descriptor
- $v_swap = $this->zip_fd;
- $this->zip_fd = $v_zip_temp_fd;
- $v_zip_temp_fd = $v_swap;
-
- // ----- Close
- $this->privCloseFd();
-
- // ----- Close the temporary file
- @fclose($v_zip_temp_fd);
-
- // ----- Magic quotes trick
- $this->privSwapBackMagicQuotes();
-
- // ----- Delete the zip file
- // TBC : I should test the result ...
- @unlink($this->zipname);
-
- // ----- Rename the temporary file
- // TBC : I should test the result ...
- //@rename($v_zip_temp_name, $this->zipname);
- PclZipUtilRename($v_zip_temp_name, $this->zipname);
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privOpenFd()
- // Description :
- // Parameters :
- // --------------------------------------------------------------------------------
- function privOpenFd($p_mode)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privOpenFd", 'mode='.$p_mode);
- $v_result=1;
-
- // ----- Look if already open
- if ($this->zip_fd != 0)
- {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Zip file \''.$this->zipname.'\' already open');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Open the zip file
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Open file in '.$p_mode.' mode');
- if (($this->zip_fd = @fopen($this->zipname, $p_mode)) == 0)
- {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in '.$p_mode.' mode');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privCloseFd()
- // Description :
- // Parameters :
- // --------------------------------------------------------------------------------
- function privCloseFd()
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCloseFd", "");
- $v_result=1;
-
- if ($this->zip_fd != 0)
- @fclose($this->zip_fd);
- $this->zip_fd = 0;
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privAddList()
- // Description :
- // $p_add_dir and $p_remove_dir will give the ability to memorize a path which is
- // different from the real path of the file. This is usefull if you want to have PclTar
- // running in any directory, and memorize relative path from an other directory.
- // Parameters :
- // $p_list : An array containing the file or directory names to add in the tar
- // $p_result_list : list of added files with their properties (specially the status field)
- // $p_add_dir : Path to add in the filename path archived
- // $p_remove_dir : Path to remove in the filename path archived
- // Return Values :
- // --------------------------------------------------------------------------------
-// function privAddList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options)
- function privAddList($p_filedescr_list, &$p_result_list, &$p_options)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddList", "list");
- $v_result=1;
-
- // ----- Add the files
- $v_header_list = array();
- if (($v_result = $this->privAddFileList($p_filedescr_list, $v_header_list, $p_options)) != 1)
- {
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Store the offset of the central dir
- $v_offset = @ftell($this->zip_fd);
-
- // ----- Create the Central Dir files header
- for ($i=0,$v_count=0; $i<sizeof($v_header_list); $i++)
- {
- // ----- Create the file header
- if ($v_header_list[$i]['status'] == 'ok') {
- if (($v_result = $this->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- $v_count++;
- }
-
- // ----- Transform the header to a 'usable' info
- $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
- }
-
- // ----- Zip file comment
- $v_comment = '';
- if (isset($p_options[PCLZIP_OPT_COMMENT])) {
- $v_comment = $p_options[PCLZIP_OPT_COMMENT];
- }
-
- // ----- Calculate the size of the central header
- $v_size = @ftell($this->zip_fd)-$v_offset;
-
- // ----- Create the central dir footer
- if (($v_result = $this->privWriteCentralHeader($v_count, $v_size, $v_offset, $v_comment)) != 1)
- {
- // ----- Reset the file list
- unset($v_header_list);
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privAddFileList()
- // Description :
- // Parameters :
- // $p_filedescr_list : An array containing the file description
- // or directory names to add in the zip
- // $p_result_list : list of added files with their properties (specially the status field)
- // Return Values :
- // --------------------------------------------------------------------------------
- function privAddFileList($p_filedescr_list, &$p_result_list, &$p_options)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFileList", "filedescr_list");
- $v_result=1;
- $v_header = array();
-
- // ----- Recuperate the current number of elt in list
- $v_nb = sizeof($p_result_list);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Before add, list have ".$v_nb." elements");
-
- // ----- Loop on the files
- for ($j=0; ($j<sizeof($p_filedescr_list)) && ($v_result==1); $j++) {
- // ----- Format the filename
- $p_filedescr_list[$j]['filename']
- = PclZipUtilTranslateWinPath($p_filedescr_list[$j]['filename'], false);
-
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Looking for file '".$p_filedescr_list[$j]['filename']."'");
-
- // ----- Skip empty file names
- // TBC : Can this be possible ? not checked in DescrParseAtt ?
- if ($p_filedescr_list[$j]['filename'] == "") {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Skip empty filename");
- continue;
- }
-
- // ----- Check the filename
- if ( ($p_filedescr_list[$j]['type'] != 'virtual_file')
- && (!file_exists($p_filedescr_list[$j]['filename']))) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$p_filedescr_list[$j]['filename']."' does not exists");
- PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "File '".$p_filedescr_list[$j]['filename']."' does not exists");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Look if it is a file or a dir with no all path remove option
- // or a dir with all its path removed
-// if ( (is_file($p_filedescr_list[$j]['filename']))
-// || ( is_dir($p_filedescr_list[$j]['filename'])
- if ( ($p_filedescr_list[$j]['type'] == 'file')
- || ($p_filedescr_list[$j]['type'] == 'virtual_file')
- || ( ($p_filedescr_list[$j]['type'] == 'folder')
- && ( !isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH])
- || !$p_options[PCLZIP_OPT_REMOVE_ALL_PATH]))
- ) {
-
- // ----- Add the file
- $v_result = $this->privAddFile($p_filedescr_list[$j], $v_header,
- $p_options);
- if ($v_result != 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Store the file infos
- $p_result_list[$v_nb++] = $v_header;
- }
- }
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "After add, list have ".$v_nb." elements");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privAddFile()
- // Description :
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privAddFile($p_filedescr, &$p_header, &$p_options)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privAddFile", "filename='".$p_filedescr['filename']."'");
- $v_result=1;
-
- // ----- Working variable
- $p_filename = $p_filedescr['filename'];
-
- // TBC : Already done in the fileAtt check ... ?
- if ($p_filename == "") {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file list parameter (invalid or empty list)");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Look for a stored different filename
- /* TBC : Removed
- if (isset($p_filedescr['stored_filename'])) {
- $v_stored_filename = $p_filedescr['stored_filename'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'Stored filename is NOT the same "'.$v_stored_filename.'"');
- }
- else {
- $v_stored_filename = $p_filedescr['stored_filename'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'Stored filename is the same');
- }
- */
-
- // ----- Set the file properties
- clearstatcache();
- $p_header['version'] = 20;
- $p_header['version_extracted'] = 10;
- $p_header['flag'] = 0;
- $p_header['compression'] = 0;
- $p_header['crc'] = 0;
- $p_header['compressed_size'] = 0;
- $p_header['filename_len'] = strlen($p_filename);
- $p_header['extra_len'] = 0;
- $p_header['disk'] = 0;
- $p_header['internal'] = 0;
- $p_header['offset'] = 0;
- $p_header['filename'] = $p_filename;
-// TBC : Removed $p_header['stored_filename'] = $v_stored_filename;
- $p_header['stored_filename'] = $p_filedescr['stored_filename'];
- $p_header['extra'] = '';
- $p_header['status'] = 'ok';
- $p_header['index'] = -1;
-
- // ----- Look for regular file
- if ($p_filedescr['type']=='file') {
- $p_header['external'] = 0x00000000;
- $p_header['size'] = filesize($p_filename);
- }
-
- // ----- Look for regular folder
- else if ($p_filedescr['type']=='folder') {
- $p_header['external'] = 0x00000010;
- $p_header['mtime'] = filemtime($p_filename);
- $p_header['size'] = filesize($p_filename);
- }
-
- // ----- Look for virtual file
- else if ($p_filedescr['type'] == 'virtual_file') {
- $p_header['external'] = 0x00000000;
- $p_header['size'] = strlen($p_filedescr['content']);
- }
-
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header external extension '".sprintf("0x%X",$p_header['external'])."'");
-
- // ----- Look for filetime
- if (isset($p_filedescr['mtime'])) {
- $p_header['mtime'] = $p_filedescr['mtime'];
- }
- else if ($p_filedescr['type'] == 'virtual_file') {
- $p_header['mtime'] = mktime();
- }
- else {
- $p_header['mtime'] = filemtime($p_filename);
- }
-
- // ------ Look for file comment
- if (isset($p_filedescr['comment'])) {
- $p_header['comment_len'] = strlen($p_filedescr['comment']);
- $p_header['comment'] = $p_filedescr['comment'];
- }
- else {
- $p_header['comment_len'] = 0;
- $p_header['comment'] = '';
- }
-
- // ----- Look for pre-add callback
- if (isset($p_options[PCLZIP_CB_PRE_ADD])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_ADD]."()') is defined for the extraction");
-
- // ----- Generate a local information
- $v_local_header = array();
- $this->privConvertHeader2FileInfo($p_header, $v_local_header);
-
- // ----- Call the callback
- // Here I do not use call_user_func() because I need to send a reference to the
- // header.
- eval('$v_result = '.$p_options[PCLZIP_CB_PRE_ADD].'(PCLZIP_CB_PRE_ADD, $v_local_header);');
- if ($v_result == 0) {
- // ----- Change the file status
- $p_header['status'] = "skipped";
- $v_result = 1;
- }
-
- // ----- Update the informations
- // Only some fields can be modified
- if ($p_header['stored_filename'] != $v_local_header['stored_filename']) {
- $p_header['stored_filename'] = PclZipUtilPathReduction($v_local_header['stored_filename']);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New stored filename is '".$p_header['stored_filename']."'");
- }
- }
-
- // ----- Look for empty stored filename
- if ($p_header['stored_filename'] == "") {
- $p_header['status'] = "filtered";
- }
-
- // ----- Check the path length
- if (strlen($p_header['stored_filename']) > 0xFF) {
- $p_header['status'] = 'filename_too_long';
- }
-
- // ----- Look if no error, or file not skipped
- if ($p_header['status'] == 'ok') {
-
- // ----- Look for a file
-// if (is_file($p_filename))
- if ( ($p_filedescr['type'] == 'file')
- || ($p_filedescr['type'] == 'virtual_file')) {
-
- // ----- Get content from real file
- if ($p_filedescr['type'] == 'file') {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "'".$p_filename."' is a file");
-
- // ----- Open the source file
- if (($v_file = @fopen($p_filename, "rb")) == 0) {
- PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Read the file content
- $v_content = @fread($v_file, $p_header['size']);
-
- // ----- Close the file
- @fclose($v_file);
- }
- else if ($p_filedescr['type'] == 'virtual_file') {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Add by string");
- $v_content = $p_filedescr['content'];
- }
-
- // ----- Calculate the CRC
- $p_header['crc'] = @crc32($v_content);
-
- // ----- Look for no compression
- if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will not be compressed");
- // ----- Set header parameters
- $p_header['compressed_size'] = $p_header['size'];
- $p_header['compression'] = 0;
- }
-
- // ----- Look for normal compression
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will be compressed");
- // ----- Compress the content
- $v_content = @gzdeflate($v_content);
-
- // ----- Set header parameters
- $p_header['compressed_size'] = strlen($v_content);
- $p_header['compression'] = 8;
- }
-
- // ----- Look for encryption
- /*
- if ((isset($p_options[PCLZIP_OPT_CRYPT]))
- && ($p_options[PCLZIP_OPT_CRYPT] != "")) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File need to be crypted ....");
-
- // Should be a random header
- $v_header = 'xxxxxxxxxxxx';
- $v_content_compressed = PclZipUtilZipEncrypt($v_content_compressed,
- $p_header['compressed_size'],
- $v_header,
- $p_header['crc'],
- "test");
-
- $p_header['compressed_size'] += 12;
- $p_header['flag'] = 1;
-
- // ----- Add the header to the data
- $v_content_compressed = $v_header.$v_content_compressed;
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Size after header : ".strlen($v_content_compressed)."");
- }
- */
-
- // ----- Call the header generation
- if (($v_result = $this->privWriteFileHeader($p_header)) != 1) {
- @fclose($v_file);
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Write the compressed (or not) content
- @fwrite($this->zip_fd, $v_content, $p_header['compressed_size']);
- }
-
- // ----- Look for a directory
- else if ($p_filedescr['type'] == 'folder') {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "'".$p_filename."' is a folder");
- // ----- Look for directory last '/'
- if (@substr($p_header['stored_filename'], -1) != '/') {
- $p_header['stored_filename'] .= '/';
- }
-
- // ----- Set the file properties
- $p_header['size'] = 0;
- //$p_header['external'] = 0x41FF0010; // Value for a folder : to be checked
- $p_header['external'] = 0x00000010; // Value for a folder : to be checked
-
- // ----- Call the header generation
- if (($v_result = $this->privWriteFileHeader($p_header)) != 1)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- }
- }
-
- // ----- Look for post-add callback
- if (isset($p_options[PCLZIP_CB_POST_ADD])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_ADD]."()') is defined for the extraction");
-
- // ----- Generate a local information
- $v_local_header = array();
- $this->privConvertHeader2FileInfo($p_header, $v_local_header);
-
- // ----- Call the callback
- // Here I do not use call_user_func() because I need to send a reference to the
- // header.
- eval('$v_result = '.$p_options[PCLZIP_CB_POST_ADD].'(PCLZIP_CB_POST_ADD, $v_local_header);');
- if ($v_result == 0) {
- // ----- Ignored
- $v_result = 1;
- }
-
- // ----- Update the informations
- // Nothing can be modified
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privCalculateStoredFilename()
- // Description :
- // Based on file descriptor properties and global options, this method
- // calculate the filename that will be stored in the archive.
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privCalculateStoredFilename(&$p_filedescr, &$p_options)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCalculateStoredFilename", "filename='".$p_filedescr['filename']."'");
- $v_result=1;
-
- // ----- Working variables
- $p_filename = $p_filedescr['filename'];
- if (isset($p_options[PCLZIP_OPT_ADD_PATH])) {
- $p_add_dir = $p_options[PCLZIP_OPT_ADD_PATH];
- }
- else {
- $p_add_dir = '';
- }
- if (isset($p_options[PCLZIP_OPT_REMOVE_PATH])) {
- $p_remove_dir = $p_options[PCLZIP_OPT_REMOVE_PATH];
- }
- else {
- $p_remove_dir = '';
- }
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Remove path ='".$p_remove_dir."'");
- if (isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH])) {
- $p_remove_all_dir = $p_options[PCLZIP_OPT_REMOVE_ALL_PATH];
- }
- else {
- $p_remove_all_dir = 0;
- }
-
- // ----- Look for full name change
- if (isset($p_filedescr['new_full_name'])) {
- $v_stored_filename = $p_filedescr['new_full_name'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Changing full name of '".$p_filename."' for '".$v_stored_filename."'");
- }
-
- // ----- Look for path and/or short name change
- else {
-
- // ----- Look for short name change
- if (isset($p_filedescr['new_short_name'])) {
- $v_path_info = pathinfo($p_filename);
- $v_dir = '';
- if ($v_path_info['dirname'] != '') {
- $v_dir = $v_path_info['dirname'].'/';
- }
- $v_stored_filename = $v_dir.$p_filedescr['new_short_name'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Changing short name of '".$p_filename."' for '".$v_stored_filename."'");
- }
- else {
- // ----- Calculate the stored filename
- $v_stored_filename = $p_filename;
- }
-
- // ----- Look for all path to remove
- if ($p_remove_all_dir) {
- $v_stored_filename = basename($p_filename);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Remove all path selected change '".$p_filename."' for '".$v_stored_filename."'");
- }
- // ----- Look for partial path remove
- else if ($p_remove_dir != "") {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Partial path to remove");
- if (substr($p_remove_dir, -1) != '/')
- $p_remove_dir .= "/";
-
- if ( (substr($p_filename, 0, 2) == "./")
- || (substr($p_remove_dir, 0, 2) == "./")) {
-
- if ( (substr($p_filename, 0, 2) == "./")
- && (substr($p_remove_dir, 0, 2) != "./")) {
- $p_remove_dir = "./".$p_remove_dir;
- }
- if ( (substr($p_filename, 0, 2) != "./")
- && (substr($p_remove_dir, 0, 2) == "./")) {
- $p_remove_dir = substr($p_remove_dir, 2);
- }
- }
-
- $v_compare = PclZipUtilPathInclusion($p_remove_dir,
- $v_stored_filename);
- if ($v_compare > 0) {
- if ($v_compare == 2) {
- $v_stored_filename = "";
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Path to remove is the current folder");
- }
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Remove path '$p_remove_dir' in file '$v_stored_filename'");
- $v_stored_filename = substr($v_stored_filename,
- strlen($p_remove_dir));
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Result is '$v_stored_filename'");
- }
- }
- }
- // ----- Look for path to add
- if ($p_add_dir != "") {
- if (substr($p_add_dir, -1) == "/")
- $v_stored_filename = $p_add_dir.$v_stored_filename;
- else
- $v_stored_filename = $p_add_dir."/".$v_stored_filename;
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Add path '$p_add_dir' in file '$p_filename' = '$v_stored_filename'");
- }
- }
-
- // ----- Filename (reduce the path of stored name)
- $v_stored_filename = PclZipUtilPathReduction($v_stored_filename);
- $p_filedescr['stored_filename'] = $v_stored_filename;
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Stored filename will be '".$p_filedescr['stored_filename']."', strlen ".strlen($p_filedescr['stored_filename']));
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privWriteFileHeader()
- // Description :
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privWriteFileHeader(&$p_header)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteFileHeader", 'file="'.$p_header['filename'].'", stored as "'.$p_header['stored_filename'].'"');
- $v_result=1;
-
- // ----- Store the offset position of the file
- $p_header['offset'] = ftell($this->zip_fd);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, 'File offset of the header :'.$p_header['offset']);
-
- // ----- Transform UNIX mtime to DOS format mdate/mtime
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
- $v_date = getdate($p_header['mtime']);
- $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2;
- $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday'];
-
- // ----- Packed data
- $v_binary_data = pack("VvvvvvVVVvv", 0x04034b50,
- $p_header['version_extracted'], $p_header['flag'],
- $p_header['compression'], $v_mtime, $v_mdate,
- $p_header['crc'], $p_header['compressed_size'],
- $p_header['size'],
- strlen($p_header['stored_filename']),
- $p_header['extra_len']);
-
- // ----- Write the first 148 bytes of the header in the archive
- fputs($this->zip_fd, $v_binary_data, 30);
-
- // ----- Write the variable fields
- if (strlen($p_header['stored_filename']) != 0)
- {
- fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename']));
- }
- if ($p_header['extra_len'] != 0)
- {
- fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']);
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privWriteCentralFileHeader()
- // Description :
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privWriteCentralFileHeader(&$p_header)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteCentralFileHeader", 'file="'.$p_header['filename'].'", stored as "'.$p_header['stored_filename'].'"');
- $v_result=1;
-
- // TBC
- //for(reset($p_header); $key = key($p_header); next($p_header)) {
- // //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "header[$key] = ".$p_header[$key]);
- //}
-
- // ----- Transform UNIX mtime to DOS format mdate/mtime
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
- $v_date = getdate($p_header['mtime']);
- $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2;
- $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday'];
-
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Comment size : \''.$p_header['comment_len'].'\'');
-
- // ----- Packed data
- $v_binary_data = pack("VvvvvvvVVVvvvvvVV", 0x02014b50,
- $p_header['version'], $p_header['version_extracted'],
- $p_header['flag'], $p_header['compression'],
- $v_mtime, $v_mdate, $p_header['crc'],
- $p_header['compressed_size'], $p_header['size'],
- strlen($p_header['stored_filename']),
- $p_header['extra_len'], $p_header['comment_len'],
- $p_header['disk'], $p_header['internal'],
- $p_header['external'], $p_header['offset']);
-
- // ----- Write the 42 bytes of the header in the zip file
- fputs($this->zip_fd, $v_binary_data, 46);
-
- // ----- Write the variable fields
- if (strlen($p_header['stored_filename']) != 0)
- {
- fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename']));
- }
- if ($p_header['extra_len'] != 0)
- {
- fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']);
- }
- if ($p_header['comment_len'] != 0)
- {
- fputs($this->zip_fd, $p_header['comment'], $p_header['comment_len']);
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privWriteCentralHeader()
- // Description :
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privWriteCentralHeader", 'nb_entries='.$p_nb_entries.', size='.$p_size.', offset='.$p_offset.', comment="'.$p_comment.'"');
- $v_result=1;
-
- // ----- Packed data
- $v_binary_data = pack("VvvvvVVv", 0x06054b50, 0, 0, $p_nb_entries,
- $p_nb_entries, $p_size,
- $p_offset, strlen($p_comment));
-
- // ----- Write the 22 bytes of the header in the zip file
- fputs($this->zip_fd, $v_binary_data, 22);
-
- // ----- Write the variable fields
- if (strlen($p_comment) != 0)
- {
- fputs($this->zip_fd, $p_comment, strlen($p_comment));
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privList()
- // Description :
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privList(&$p_list)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privList", "list");
- $v_result=1;
-
- // ----- Magic quotes trick
- $this->privDisableMagicQuotes();
-
- // ----- Open the zip file
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
- if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0)
- {
- // ----- Magic quotes trick
- $this->privSwapBackMagicQuotes();
-
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Read the central directory informations
- $v_central_dir = array();
- if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
- {
- $this->privSwapBackMagicQuotes();
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Go to beginning of Central Dir
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Offset : ".$v_central_dir['offset']."'");
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'");
- @rewind($this->zip_fd);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'");
- if (@fseek($this->zip_fd, $v_central_dir['offset']))
- {
- $this->privSwapBackMagicQuotes();
-
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position in file : ".ftell($this->zip_fd)."'");
-
- // ----- Read each entry
- for ($i=0; $i<$v_central_dir['entries']; $i++)
- {
- // ----- Read the file header
- if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1)
- {
- $this->privSwapBackMagicQuotes();
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- $v_header['index'] = $i;
-
- // ----- Get the only interesting attributes
- $this->privConvertHeader2FileInfo($v_header, $p_list[$i]);
- unset($v_header);
- }
-
- // ----- Close the zip file
- $this->privCloseFd();
-
- // ----- Magic quotes trick
- $this->privSwapBackMagicQuotes();
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privConvertHeader2FileInfo()
- // Description :
- // This function takes the file informations from the central directory
- // entries and extract the interesting parameters that will be given back.
- // The resulting file infos are set in the array $p_info
- // $p_info['filename'] : Filename with full path. Given by user (add),
- // extracted in the filesystem (extract).
- // $p_info['stored_filename'] : Stored filename in the archive.
- // $p_info['size'] = Size of the file.
- // $p_info['compressed_size'] = Compressed size of the file.
- // $p_info['mtime'] = Last modification date of the file.
- // $p_info['comment'] = Comment associated with the file.
- // $p_info['folder'] = true/false : indicates if the entry is a folder or not.
- // $p_info['status'] = status of the action on the file.
- // $p_info['crc'] = CRC of the file content.
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privConvertHeader2FileInfo($p_header, &$p_info)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privConvertHeader2FileInfo", "Filename='".$p_header['filename']."'");
- $v_result=1;
-
- // ----- Get the interesting attributes
- $p_info['filename'] = $p_header['filename'];
- $p_info['stored_filename'] = $p_header['stored_filename'];
- $p_info['size'] = $p_header['size'];
- $p_info['compressed_size'] = $p_header['compressed_size'];
- $p_info['mtime'] = $p_header['mtime'];
- $p_info['comment'] = $p_header['comment'];
- $p_info['folder'] = (($p_header['external']&0x00000010)==0x00000010);
- $p_info['index'] = $p_header['index'];
- $p_info['status'] = $p_header['status'];
- $p_info['crc'] = $p_header['crc'];
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privExtractByRule()
- // Description :
- // Extract a file or directory depending of rules (by index, by name, ...)
- // Parameters :
- // $p_file_list : An array where will be placed the properties of each
- // extracted file
- // $p_path : Path to add while writing the extracted files
- // $p_remove_path : Path to remove (from the file memorized path) while writing the
- // extracted files. If the path does not match the file path,
- // the file is extracted with its memorized path.
- // $p_remove_path does not apply to 'list' mode.
- // $p_path and $p_remove_path are commulative.
- // Return Values :
- // 1 on success,0 or less on error (see error code list)
- // --------------------------------------------------------------------------------
- function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privExtractByRule", "path='$p_path', remove_path='$p_remove_path', remove_all_path='".($p_remove_all_path?'true':'false')."'");
- $v_result=1;
-
- // ----- Magic quotes trick
- $this->privDisableMagicQuotes();
-
- // ----- Check the path
- if ( ($p_path == "")
- || ( (substr($p_path, 0, 1) != "/")
- && (substr($p_path, 0, 3) != "../")
- && (substr($p_path,1,2)!=":/")))
- $p_path = "./".$p_path;
-
- // ----- Reduce the path last (and duplicated) '/'
- if (($p_path != "./") && ($p_path != "/"))
- {
- // ----- Look for the path end '/'
- while (substr($p_path, -1) == "/")
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Destination path [$p_path] ends by '/'");
- $p_path = substr($p_path, 0, strlen($p_path)-1);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Modified to [$p_path]");
- }
- }
-
- // ----- Look for path to remove format (should end by /)
- if (($p_remove_path != "") && (substr($p_remove_path, -1) != '/'))
- {
- $p_remove_path .= '/';
- }
- $p_remove_path_size = strlen($p_remove_path);
-
- // ----- Open the zip file
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
- if (($v_result = $this->privOpenFd('rb')) != 1)
- {
- $this->privSwapBackMagicQuotes();
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Read the central directory informations
- $v_central_dir = array();
- if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
- {
- // ----- Close the zip file
- $this->privCloseFd();
- $this->privSwapBackMagicQuotes();
-
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Start at beginning of Central Dir
- $v_pos_entry = $v_central_dir['offset'];
-
- // ----- Read each entry
- $j_start = 0;
- for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Read next file header entry : '$i'");
-
- // ----- Read next Central dir entry
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Position before rewind : ".ftell($this->zip_fd)."'");
- @rewind($this->zip_fd);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Position after rewind : ".ftell($this->zip_fd)."'");
- if (@fseek($this->zip_fd, $v_pos_entry))
- {
- // ----- Close the zip file
- $this->privCloseFd();
- $this->privSwapBackMagicQuotes();
-
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Position after fseek : ".ftell($this->zip_fd)."'");
-
- // ----- Read the file header
- $v_header = array();
- if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1)
- {
- // ----- Close the zip file
- $this->privCloseFd();
- $this->privSwapBackMagicQuotes();
-
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Store the index
- $v_header['index'] = $i;
-
- // ----- Store the file position
- $v_pos_entry = ftell($this->zip_fd);
-
- // ----- Look for the specific extract rules
- $v_extract = false;
-
- // ----- Look for extract by name rule
- if ( (isset($p_options[PCLZIP_OPT_BY_NAME]))
- && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByName'");
-
- // ----- Look if the filename is in the list
- for ($j=0; ($j<sizeof($p_options[PCLZIP_OPT_BY_NAME])) && (!$v_extract); $j++) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Compare with file '".$p_options[PCLZIP_OPT_BY_NAME][$j]."'");
-
- // ----- Look for a directory
- if (substr($p_options[PCLZIP_OPT_BY_NAME][$j], -1) == "/") {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The searched item is a directory");
-
- // ----- Look if the directory is in the filename path
- if ( (strlen($v_header['stored_filename']) > strlen($p_options[PCLZIP_OPT_BY_NAME][$j]))
- && (substr($v_header['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The directory is in the file path");
- $v_extract = true;
- }
- }
- // ----- Look for a filename
- elseif ($v_header['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The file is the right one.");
- $v_extract = true;
- }
- }
- }
-
- // ----- Look for extract by ereg rule
- else if ( (isset($p_options[PCLZIP_OPT_BY_EREG]))
- && ($p_options[PCLZIP_OPT_BY_EREG] != "")) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract by ereg '".$p_options[PCLZIP_OPT_BY_EREG]."'");
-
- if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header['stored_filename'])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression");
- $v_extract = true;
- }
- }
-
- // ----- Look for extract by preg rule
- else if ( (isset($p_options[PCLZIP_OPT_BY_PREG]))
- && ($p_options[PCLZIP_OPT_BY_PREG] != "")) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByEreg'");
-
- if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header['stored_filename'])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression");
- $v_extract = true;
- }
- }
-
- // ----- Look for extract by index rule
- else if ( (isset($p_options[PCLZIP_OPT_BY_INDEX]))
- && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'");
-
- // ----- Look if the index is in the list
- for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_extract); $j++) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Look if index '$i' is in [".$p_options[PCLZIP_OPT_BY_INDEX][$j]['start'].",".$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']."]");
-
- if (($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found as part of an index range");
- $v_extract = true;
- }
- if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Do not look this index range for next loop");
- $j_start = $j+1;
- }
-
- if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Index range is greater than index, stop loop");
- break;
- }
- }
- }
-
- // ----- Look for no rule, which means extract all the archive
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with no rule (extract all)");
- $v_extract = true;
- }
-
- // ----- Check compression method
- if ( ($v_extract)
- && ( ($v_header['compression'] != 8)
- && ($v_header['compression'] != 0))) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unsupported compression method (".$v_header['compression'].")");
- $v_header['status'] = 'unsupported_compression';
-
- // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
- if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
- && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped");
-
- $this->privSwapBackMagicQuotes();
-
- PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION,
- "Filename '".$v_header['stored_filename']."' is "
- ."compressed by an unsupported compression "
- ."method (".$v_header['compression'].") ");
-
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- }
-
- // ----- Check encrypted files
- if (($v_extract) && (($v_header['flag'] & 1) == 1)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unsupported file encryption");
- $v_header['status'] = 'unsupported_encryption';
-
- // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
- if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
- && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped");
-
- $this->privSwapBackMagicQuotes();
-
- PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION,
- "Unsupported encryption for "
- ." filename '".$v_header['stored_filename']
- ."'");
-
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- }
-
- // ----- Look for real extraction
- if (($v_extract) && ($v_header['status'] != 'ok')) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "No need for extract");
- $v_result = $this->privConvertHeader2FileInfo($v_header,
- $p_file_list[$v_nb_extracted++]);
- if ($v_result != 1) {
- $this->privCloseFd();
- $this->privSwapBackMagicQuotes();
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- $v_extract = false;
- }
-
- // ----- Look for real extraction
- if ($v_extract)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file '".$v_header['filename']."', index '$i'");
-
- // ----- Go to the file position
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position before rewind : ".ftell($this->zip_fd)."'");
- @rewind($this->zip_fd);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($this->zip_fd)."'");
- if (@fseek($this->zip_fd, $v_header['offset']))
- {
- // ----- Close the zip file
- $this->privCloseFd();
-
- $this->privSwapBackMagicQuotes();
-
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'");
-
- // ----- Look for extraction as string
- if ($p_options[PCLZIP_OPT_EXTRACT_AS_STRING]) {
-
- // ----- Extracting the file
- $v_result1 = $this->privExtractFileAsString($v_header, $v_string);
- if ($v_result1 < 1) {
- $this->privCloseFd();
- $this->privSwapBackMagicQuotes();
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1);
- return $v_result1;
- }
-
- // ----- Get the only interesting attributes
- if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted])) != 1)
- {
- // ----- Close the zip file
- $this->privCloseFd();
- $this->privSwapBackMagicQuotes();
-
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Set the file content
- $p_file_list[$v_nb_extracted]['content'] = $v_string;
-
- // ----- Next extracted file
- $v_nb_extracted++;
-
- // ----- Look for user callback abort
- if ($v_result1 == 2) {
- break;
- }
- }
- // ----- Look for extraction in standard output
- elseif ( (isset($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT]))
- && ($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT])) {
- // ----- Extracting the file in standard output
- $v_result1 = $this->privExtractFileInOutput($v_header, $p_options);
- if ($v_result1 < 1) {
- $this->privCloseFd();
- $this->privSwapBackMagicQuotes();
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1);
- return $v_result1;
- }
-
- // ----- Get the only interesting attributes
- if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1) {
- $this->privCloseFd();
- $this->privSwapBackMagicQuotes();
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Look for user callback abort
- if ($v_result1 == 2) {
- break;
- }
- }
- // ----- Look for normal extraction
- else {
- // ----- Extracting the file
- $v_result1 = $this->privExtractFile($v_header,
- $p_path, $p_remove_path,
- $p_remove_all_path,
- $p_options);
- if ($v_result1 < 1) {
- $this->privCloseFd();
- $this->privSwapBackMagicQuotes();
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result1);
- return $v_result1;
- }
-
- // ----- Get the only interesting attributes
- if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1)
- {
- // ----- Close the zip file
- $this->privCloseFd();
- $this->privSwapBackMagicQuotes();
-
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Look for user callback abort
- if ($v_result1 == 2) {
- break;
- }
- }
- }
- }
-
- // ----- Close the zip file
- $this->privCloseFd();
- $this->privSwapBackMagicQuotes();
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privExtractFile()
- // Description :
- // Parameters :
- // Return Values :
- //
- // 1 : ... ?
- // PCLZIP_ERR_USER_ABORTED(2) : User ask for extraction stop in callback
- // --------------------------------------------------------------------------------
- function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFile', "path='$p_path', remove_path='$p_remove_path', remove_all_path='".($p_remove_all_path?'true':'false')."'");
- $v_result=1;
-
- // ----- Read the file header
- if (($v_result = $this->privReadFileHeader($v_header)) != 1)
- {
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'");
-
- // ----- Check that the file header is coherent with $p_entry info
- if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) {
- // TBC
- }
-
- // ----- Look for all path to remove
- if ($p_remove_all_path == true) {
- // ----- Look for folder entry that not need to be extracted
- if (($p_entry['external']&0x00000010)==0x00000010) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The entry is a folder : need to be filtered");
-
- $p_entry['status'] = "filtered";
-
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "All path is removed");
- // ----- Get the basename of the path
- $p_entry['filename'] = basename($p_entry['filename']);
- }
-
- // ----- Look for path to remove
- else if ($p_remove_path != "")
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Look for some path to remove");
- if (PclZipUtilPathInclusion($p_remove_path, $p_entry['filename']) == 2)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The folder is the same as the removed path '".$p_entry['filename']."'");
-
- // ----- Change the file status
- $p_entry['status'] = "filtered";
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- $p_remove_path_size = strlen($p_remove_path);
- if (substr($p_entry['filename'], 0, $p_remove_path_size) == $p_remove_path)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found path '$p_remove_path' to remove in file '".$p_entry['filename']."'");
-
- // ----- Remove the path
- $p_entry['filename'] = substr($p_entry['filename'], $p_remove_path_size);
-
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Resulting file is '".$p_entry['filename']."'");
- }
- }
-
- // ----- Add the path
- if ($p_path != '') {
- $p_entry['filename'] = $p_path."/".$p_entry['filename'];
- }
-
- // ----- Check a base_dir_restriction
- if (isset($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Check the extract directory restriction");
- $v_inclusion
- = PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION],
- $p_entry['filename']);
- if ($v_inclusion == 0) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_EXTRACT_DIR_RESTRICTION is selected, file is outside restriction");
-
- PclZip::privErrorLog(PCLZIP_ERR_DIRECTORY_RESTRICTION,
- "Filename '".$p_entry['filename']."' is "
- ."outside PCLZIP_OPT_EXTRACT_DIR_RESTRICTION");
-
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- }
-
- // ----- Look for pre-extract callback
- if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_EXTRACT]."()') is defined for the extraction");
-
- // ----- Generate a local information
- $v_local_header = array();
- $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
-
- // ----- Call the callback
- // Here I do not use call_user_func() because I need to send a reference to the
- // header.
- eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);');
- if ($v_result == 0) {
- // ----- Change the file status
- $p_entry['status'] = "skipped";
- $v_result = 1;
- }
-
- // ----- Look for abort result
- if ($v_result == 2) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction");
- // ----- This status is internal and will be changed in 'skipped'
- $p_entry['status'] = "aborted";
- $v_result = PCLZIP_ERR_USER_ABORTED;
- }
-
- // ----- Update the informations
- // Only some fields can be modified
- $p_entry['filename'] = $v_local_header['filename'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New filename is '".$p_entry['filename']."'");
- }
-
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file (with path) '".$p_entry['filename']."', size '$v_header[size]'");
-
- // ----- Look if extraction should be done
- if ($p_entry['status'] == 'ok') {
-
- // ----- Look for specific actions while the file exist
- if (file_exists($p_entry['filename']))
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$p_entry['filename']."' already exists");
-
- // ----- Look if file is a directory
- if (is_dir($p_entry['filename']))
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is a directory");
-
- // ----- Change the file status
- $p_entry['status'] = "already_a_directory";
-
- // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
- // For historical reason first PclZip implementation does not stop
- // when this kind of error occurs.
- if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
- && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped");
-
- PclZip::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY,
- "Filename '".$p_entry['filename']."' is "
- ."already used by an existing directory");
-
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- }
- // ----- Look if file is write protected
- else if (!is_writeable($p_entry['filename']))
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is write protected");
-
- // ----- Change the file status
- $p_entry['status'] = "write_protected";
-
- // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
- // For historical reason first PclZip implementation does not stop
- // when this kind of error occurs.
- if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
- && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped");
-
- PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL,
- "Filename '".$p_entry['filename']."' exists "
- ."and is write protected");
-
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- }
-
- // ----- Look if the extracted file is older
- else if (filemtime($p_entry['filename']) > $p_entry['mtime'])
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is newer (".date("l dS of F Y h:i:s A", filemtime($p_entry['filename'])).") than the extracted file (".date("l dS of F Y h:i:s A", $p_entry['mtime']).")");
- // ----- Change the file status
- if ( (isset($p_options[PCLZIP_OPT_REPLACE_NEWER]))
- && ($p_options[PCLZIP_OPT_REPLACE_NEWER]===true)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_REPLACE_NEWER is selected, file will be replaced");
- }
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File will not be replaced");
- $p_entry['status'] = "newer_exist";
-
- // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
- // For historical reason first PclZip implementation does not stop
- // when this kind of error occurs.
- if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
- && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "PCLZIP_OPT_STOP_ON_ERROR is selected, extraction will be stopped");
-
- PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL,
- "Newer version of '".$p_entry['filename']."' exists "
- ."and option PCLZIP_OPT_REPLACE_NEWER is not selected");
-
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- }
- }
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Existing file '".$p_entry['filename']."' is older than the extrated one - will be replaced by the extracted one (".date("l dS of F Y h:i:s A", filemtime($p_entry['filename'])).") than the extracted file (".date("l dS of F Y h:i:s A", $p_entry['mtime']).")");
- }
- }
-
- // ----- Check the directory availability and create it if necessary
- else {
- if ((($p_entry['external']&0x00000010)==0x00000010) || (substr($p_entry['filename'], -1) == '/'))
- $v_dir_to_check = $p_entry['filename'];
- else if (!strstr($p_entry['filename'], "/"))
- $v_dir_to_check = "";
- else
- $v_dir_to_check = dirname($p_entry['filename']);
-
- if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to create path for '".$p_entry['filename']."'");
-
- // ----- Change the file status
- $p_entry['status'] = "path_creation_fail";
-
- // ----- Return
- ////--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- //return $v_result;
- $v_result = 1;
- }
- }
- }
-
- // ----- Look if extraction should be done
- if ($p_entry['status'] == 'ok') {
-
- // ----- Do the extraction (if not a folder)
- if (!(($p_entry['external']&0x00000010)==0x00000010))
- {
- // ----- Look for not compressed file
- if ($p_entry['compression'] == 0) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file");
-
- // ----- Opening destination file
- if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode");
-
- // ----- Change the file status
- $p_entry['status'] = "write_error";
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Read '".$p_entry['size']."' bytes");
-
- // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks
- $v_size = $p_entry['compressed_size'];
- while ($v_size != 0)
- {
- $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Read $v_read_size bytes");
- $v_buffer = @fread($this->zip_fd, $v_read_size);
- /* Try to speed up the code
- $v_binary_data = pack('a'.$v_read_size, $v_buffer);
- @fwrite($v_dest_file, $v_binary_data, $v_read_size);
- */
- @fwrite($v_dest_file, $v_buffer, $v_read_size);
- $v_size -= $v_read_size;
- }
-
- // ----- Closing the destination file
- fclose($v_dest_file);
-
- // ----- Change the file mtime
- touch($p_entry['filename'], $p_entry['mtime']);
-
-
- }
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file (Compression method ".$p_entry['compression'].")");
- // ----- TBC
- // Need to be finished
- if (($p_entry['flag'] & 1) == 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File is encrypted");
- /*
- // ----- Read the encryption header
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read 12 encryption header bytes");
- $v_encryption_header = @fread($this->zip_fd, 12);
-
- // ----- Read the encrypted & compressed file in a buffer
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read '".($p_entry['compressed_size']-12)."' compressed & encrypted bytes");
- $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']-12);
-
- // ----- Decrypt the buffer
- $this->privDecrypt($v_encryption_header, $v_buffer,
- $p_entry['compressed_size']-12, $p_entry['crc']);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Buffer is '".$v_buffer."'");
- */
- }
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read '".$p_entry['compressed_size']."' compressed bytes");
- // ----- Read the compressed file in a buffer (one shot)
- $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
- }
-
- // ----- Decompress the file
- $v_file_content = @gzinflate($v_buffer);
- unset($v_buffer);
- if ($v_file_content === FALSE) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to inflate compressed file");
-
- // ----- Change the file status
- // TBC
- $p_entry['status'] = "error";
-
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Opening destination file
- if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Error while opening '".$p_entry['filename']."' in write binary mode");
-
- // ----- Change the file status
- $p_entry['status'] = "write_error";
-
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Write the uncompressed data
- @fwrite($v_dest_file, $v_file_content, $p_entry['size']);
- unset($v_file_content);
-
- // ----- Closing the destination file
- @fclose($v_dest_file);
-
- // ----- Change the file mtime
- @touch($p_entry['filename'], $p_entry['mtime']);
- }
-
- // ----- Look for chmod option
- if (isset($p_options[PCLZIP_OPT_SET_CHMOD])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "chmod option activated '".$p_options[PCLZIP_OPT_SET_CHMOD]."'");
-
- // ----- Change the mode of the file
- @chmod($p_entry['filename'], $p_options[PCLZIP_OPT_SET_CHMOD]);
- }
-
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done");
- }
- }
-
- // ----- Change abort status
- if ($p_entry['status'] == "aborted") {
- $p_entry['status'] = "skipped";
- }
-
- // ----- Look for post-extract callback
- elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_EXTRACT]."()') is defined for the extraction");
-
- // ----- Generate a local information
- $v_local_header = array();
- $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
-
- // ----- Call the callback
- // Here I do not use call_user_func() because I need to send a reference to the
- // header.
- eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);');
-
- // ----- Look for abort result
- if ($v_result == 2) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction");
- $v_result = PCLZIP_ERR_USER_ABORTED;
- }
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privExtractFileInOutput()
- // Description :
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privExtractFileInOutput(&$p_entry, &$p_options)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFileInOutput', "");
- $v_result=1;
-
- // ----- Read the file header
- if (($v_result = $this->privReadFileHeader($v_header)) != 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'");
-
- // ----- Check that the file header is coherent with $p_entry info
- if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) {
- // TBC
- }
-
- // ----- Look for pre-extract callback
- if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A pre-callback '".$p_options[PCLZIP_CB_PRE_EXTRACT]."()') is defined for the extraction");
-
- // ----- Generate a local information
- $v_local_header = array();
- $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
-
- // ----- Call the callback
- // Here I do not use call_user_func() because I need to send a reference to the
- // header.
- eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);');
- if ($v_result == 0) {
- // ----- Change the file status
- $p_entry['status'] = "skipped";
- $v_result = 1;
- }
-
- // ----- Look for abort result
- if ($v_result == 2) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction");
- // ----- This status is internal and will be changed in 'skipped'
- $p_entry['status'] = "aborted";
- $v_result = PCLZIP_ERR_USER_ABORTED;
- }
-
- // ----- Update the informations
- // Only some fields can be modified
- $p_entry['filename'] = $v_local_header['filename'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "New filename is '".$p_entry['filename']."'");
- }
-
- // ----- Trace
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file (with path) '".$p_entry['filename']."', size '$v_header[size]'");
-
- // ----- Look if extraction should be done
- if ($p_entry['status'] == 'ok') {
-
- // ----- Do the extraction (if not a folder)
- if (!(($p_entry['external']&0x00000010)==0x00000010)) {
- // ----- Look for not compressed file
- if ($p_entry['compressed_size'] == $p_entry['size']) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file");
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Reading '".$p_entry['size']."' bytes");
-
- // ----- Read the file in a buffer (one shot)
- $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
-
- // ----- Send the file to the output
- echo $v_buffer;
- unset($v_buffer);
- }
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file");
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Reading '".$p_entry['size']."' bytes");
-
- // ----- Read the compressed file in a buffer (one shot)
- $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']);
-
- // ----- Decompress the file
- $v_file_content = gzinflate($v_buffer);
- unset($v_buffer);
-
- // ----- Send the file to the output
- echo $v_file_content;
- unset($v_file_content);
- }
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done");
- }
- }
-
- // ----- Change abort status
- if ($p_entry['status'] == "aborted") {
- $p_entry['status'] = "skipped";
- }
-
- // ----- Look for post-extract callback
- elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "A post-callback '".$p_options[PCLZIP_CB_POST_EXTRACT]."()') is defined for the extraction");
-
- // ----- Generate a local information
- $v_local_header = array();
- $this->privConvertHeader2FileInfo($p_entry, $v_local_header);
-
- // ----- Call the callback
- // Here I do not use call_user_func() because I need to send a reference to the
- // header.
- eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);');
-
- // ----- Look for abort result
- if ($v_result == 2) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "User callback abort the extraction");
- $v_result = PCLZIP_ERR_USER_ABORTED;
- }
- }
-
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privExtractFileAsString()
- // Description :
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privExtractFileAsString(&$p_entry, &$p_string)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privExtractFileAsString', "p_entry['filename']='".$p_entry['filename']."'");
- $v_result=1;
-
- // ----- Read the file header
- $v_header = array();
- if (($v_result = $this->privReadFileHeader($v_header)) != 1)
- {
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found file '".$v_header['filename']."', size '".$v_header['size']."'");
-
- // ----- Check that the file header is coherent with $p_entry info
- if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) {
- // TBC
- }
-
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting file in string (with path) '".$p_entry['filename']."', size '$v_header[size]'");
-
- // ----- Do the extraction (if not a folder)
- if (!(($p_entry['external']&0x00000010)==0x00000010))
- {
- // ----- Look for not compressed file
-// if ($p_entry['compressed_size'] == $p_entry['size'])
- if ($p_entry['compression'] == 0) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting an un-compressed file");
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Reading '".$p_entry['size']."' bytes");
-
- // ----- Reading the file
- $p_string = @fread($this->zip_fd, $p_entry['compressed_size']);
- }
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extracting a compressed file (compression method '".$p_entry['compression']."')");
-
- // ----- Reading the file
- $v_data = @fread($this->zip_fd, $p_entry['compressed_size']);
-
- // ----- Decompress the file
- if (($p_string = @gzinflate($v_data)) === FALSE) {
- // TBC
- }
- }
-
- // ----- Trace
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Extraction done");
- }
- else {
- // TBC : error : can not extract a folder in a string
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privReadFileHeader()
- // Description :
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privReadFileHeader(&$p_header)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadFileHeader", "");
- $v_result=1;
-
- // ----- Read the 4 bytes signature
- $v_binary_data = @fread($this->zip_fd, 4);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary data is : '".sprintf("%08x", $v_binary_data)."'");
- $v_data = unpack('Vid', $v_binary_data);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'");
-
- // ----- Check signature
- if ($v_data['id'] != 0x04034b50)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Invalid File header");
-
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Read the first 42 bytes of the header
- $v_binary_data = fread($this->zip_fd, 26);
-
- // ----- Look for invalid block size
- if (strlen($v_binary_data) != 26)
- {
- $p_header['filename'] = "";
- $p_header['status'] = "invalid_header";
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid block size : ".strlen($v_binary_data));
-
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data));
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Extract the values
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Header : '".$v_binary_data."'");
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Header (Hex) : '".bin2hex($v_binary_data)."'");
- $v_data = unpack('vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $v_binary_data);
-
- // ----- Get filename
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "File name length : ".$v_data['filename_len']);
- $p_header['filename'] = fread($this->zip_fd, $v_data['filename_len']);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Filename : \''.$p_header['filename'].'\'');
-
- // ----- Get extra_fields
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extra field length : ".$v_data['extra_len']);
- if ($v_data['extra_len'] != 0) {
- $p_header['extra'] = fread($this->zip_fd, $v_data['extra_len']);
- }
- else {
- $p_header['extra'] = '';
- }
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Extra field : \''.bin2hex($p_header['extra']).'\'');
-
- // ----- Extract properties
- $p_header['version_extracted'] = $v_data['version'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version need to extract : ('.$p_header['version_extracted'].') \''.($p_header['version_extracted']/10).'.'.($p_header['version_extracted']%10).'\'');
- $p_header['compression'] = $v_data['compression'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compression method : \''.$p_header['compression'].'\'');
- $p_header['size'] = $v_data['size'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size : \''.$p_header['size'].'\'');
- $p_header['compressed_size'] = $v_data['compressed_size'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compressed Size : \''.$p_header['compressed_size'].'\'');
- $p_header['crc'] = $v_data['crc'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'CRC : \''.sprintf("0x%X", $p_header['crc']).'\'');
- $p_header['flag'] = $v_data['flag'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Flag : \''.$p_header['flag'].'\'');
- $p_header['filename_len'] = $v_data['filename_len'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Filename_len : \''.$p_header['filename_len'].'\'');
-
- // ----- Recuperate date in UNIX format
- $p_header['mdate'] = $v_data['mdate'];
- $p_header['mtime'] = $v_data['mtime'];
- if ($p_header['mdate'] && $p_header['mtime'])
- {
- // ----- Extract time
- $v_hour = ($p_header['mtime'] & 0xF800) >> 11;
- $v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
- $v_seconde = ($p_header['mtime'] & 0x001F)*2;
-
- // ----- Extract date
- $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980;
- $v_month = ($p_header['mdate'] & 0x01E0) >> 5;
- $v_day = $p_header['mdate'] & 0x001F;
-
- // ----- Get UNIX date format
- $p_header['mtime'] = mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
-
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
- }
- else
- {
- $p_header['mtime'] = time();
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Date is actual : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
- }
-
- // TBC
- //for(reset($v_data); $key = key($v_data); next($v_data)) {
- // //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Attribut[$key] = ".$v_data[$key]);
- //}
-
- // ----- Set the stored filename
- $p_header['stored_filename'] = $p_header['filename'];
-
- // ----- Set the status field
- $p_header['status'] = "ok";
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privReadCentralFileHeader()
- // Description :
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privReadCentralFileHeader(&$p_header)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadCentralFileHeader", "");
- $v_result=1;
-
- // ----- Read the 4 bytes signature
- $v_binary_data = @fread($this->zip_fd, 4);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary data is : '".sprintf("%08x", $v_binary_data)."'");
- $v_data = unpack('Vid', $v_binary_data);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'");
-
- // ----- Check signature
- if ($v_data['id'] != 0x02014b50)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Invalid Central Dir File signature");
-
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Read the first 42 bytes of the header
- $v_binary_data = fread($this->zip_fd, 42);
-
- // ----- Look for invalid block size
- if (strlen($v_binary_data) != 42)
- {
- $p_header['filename'] = "";
- $p_header['status'] = "invalid_header";
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid block size : ".strlen($v_binary_data));
-
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data));
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Extract the values
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header : '".$v_binary_data."'");
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Header (Hex) : '".bin2hex($v_binary_data)."'");
- $p_header = unpack('vversion/vversion_extracted/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len/vcomment_len/vdisk/vinternal/Vexternal/Voffset', $v_binary_data);
-
- // ----- Get filename
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "File name length : ".$p_header['filename_len']);
- if ($p_header['filename_len'] != 0)
- $p_header['filename'] = fread($this->zip_fd, $p_header['filename_len']);
- else
- $p_header['filename'] = '';
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Filename : \''.$p_header['filename'].'\'');
-
- // ----- Get extra
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Extra length : ".$p_header['extra_len']);
- if ($p_header['extra_len'] != 0)
- $p_header['extra'] = fread($this->zip_fd, $p_header['extra_len']);
- else
- $p_header['extra'] = '';
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Extra : \''.$p_header['extra'].'\'');
-
- // ----- Get comment
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Comment length : ".$p_header['comment_len']);
- if ($p_header['comment_len'] != 0)
- $p_header['comment'] = fread($this->zip_fd, $p_header['comment_len']);
- else
- $p_header['comment'] = '';
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Comment : \''.$p_header['comment'].'\'');
-
- // ----- Extract properties
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version : \''.($p_header['version']/10).'.'.($p_header['version']%10).'\'');
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Version need to extract : \''.($p_header['version_extracted']/10).'.'.($p_header['version_extracted']%10).'\'');
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Size : \''.$p_header['size'].'\'');
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Compressed Size : \''.$p_header['compressed_size'].'\'');
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'CRC : \''.sprintf("0x%X", $p_header['crc']).'\'');
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Flag : \''.$p_header['flag'].'\'');
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Offset : \''.$p_header['offset'].'\'');
-
- // ----- Recuperate date in UNIX format
- //if ($p_header['mdate'] && $p_header['mtime'])
- // TBC : bug : this was ignoring time with 0/0/0
- if (1)
- {
- // ----- Extract time
- $v_hour = ($p_header['mtime'] & 0xF800) >> 11;
- $v_minute = ($p_header['mtime'] & 0x07E0) >> 5;
- $v_seconde = ($p_header['mtime'] & 0x001F)*2;
-
- // ----- Extract date
- $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980;
- $v_month = ($p_header['mdate'] & 0x01E0) >> 5;
- $v_day = $p_header['mdate'] & 0x001F;
-
- // ----- Get UNIX date format
- $p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year);
-
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Date : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
- }
- else
- {
- $p_header['mtime'] = time();
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Date is actual : \''.date("d/m/y H:i:s", $p_header['mtime']).'\'');
- }
-
- // ----- Set the stored filename
- $p_header['stored_filename'] = $p_header['filename'];
-
- // ----- Set default status to ok
- $p_header['status'] = 'ok';
-
- // ----- Look if it is a directory
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Internal (Hex) : '".sprintf("Ox%04X", $p_header['internal'])."'");
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "External (Hex) : '".sprintf("Ox%04X", $p_header['external'])."' (".(($p_header['external']&0x00000010)==0x00000010?'is a folder':'is a file').')');
- if (substr($p_header['filename'], -1) == '/') {
- //$p_header['external'] = 0x41FF0010;
- $p_header['external'] = 0x00000010;
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Force folder external : \''.sprintf("Ox%04X", $p_header['external']).'\'');
- }
-
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Header of filename : \''.$p_header['filename'].'\'');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privCheckFileHeaders()
- // Description :
- // Parameters :
- // Return Values :
- // 1 on success,
- // 0 on error;
- // --------------------------------------------------------------------------------
- function privCheckFileHeaders(&$p_local_header, &$p_central_header)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privCheckFileHeaders", "");
- $v_result=1;
-
- // ----- Check the static values
- // TBC
- if ($p_local_header['filename'] != $p_central_header['filename']) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "filename" : TBC To Be Completed');
- }
- if ($p_local_header['version_extracted'] != $p_central_header['version_extracted']) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "version_extracted" : TBC To Be Completed');
- }
- if ($p_local_header['flag'] != $p_central_header['flag']) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "flag" : TBC To Be Completed');
- }
- if ($p_local_header['compression'] != $p_central_header['compression']) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "compression" : TBC To Be Completed');
- }
- if ($p_local_header['mtime'] != $p_central_header['mtime']) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "mtime" : TBC To Be Completed');
- }
- if ($p_local_header['filename_len'] != $p_central_header['filename_len']) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Bad check "filename_len" : TBC To Be Completed');
- }
-
- // ----- Look for flag bit 3
- if (($p_local_header['flag'] & 8) == 8) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Purpose bit flag bit 3 set !');
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'File size, compression size and crc found in central header');
- $p_local_header['size'] = $p_central_header['size'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size : \''.$p_local_header['size'].'\'');
- $p_local_header['compressed_size'] = $p_central_header['compressed_size'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Compressed Size : \''.$p_local_header['compressed_size'].'\'');
- $p_local_header['crc'] = $p_central_header['crc'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'CRC : \''.sprintf("0x%X", $p_local_header['crc']).'\'');
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privReadEndCentralDir()
- // Description :
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privReadEndCentralDir(&$p_central_dir)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privReadEndCentralDir", "");
- $v_result=1;
-
- // ----- Go to the end of the zip file
- $v_size = filesize($this->zipname);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Size of the file :$v_size");
- @fseek($this->zip_fd, $v_size);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position at end of zip file : \''.ftell($this->zip_fd).'\'');
- if (@ftell($this->zip_fd) != $v_size)
- {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \''.$this->zipname.'\'');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- First try : look if this is an archive with no commentaries (most of the time)
- // in this case the end of central dir is at 22 bytes of the file end
- $v_found = 0;
- if ($v_size > 26) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Look for central dir with no comment');
- @fseek($this->zip_fd, $v_size-22);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position after min central position : \''.ftell($this->zip_fd).'\'');
- if (($v_pos = @ftell($this->zip_fd)) != ($v_size-22))
- {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\'');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Read for bytes
- $v_binary_data = @fread($this->zip_fd, 4);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Binary data is : '".sprintf("%08x", $v_binary_data)."'");
- $v_data = @unpack('Vid', $v_binary_data);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Binary signature is : '".sprintf("0x%08x", $v_data['id'])."'");
-
- // ----- Check signature
- if ($v_data['id'] == 0x06054b50) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Found central dir at the default position.");
- $v_found = 1;
- }
-
- $v_pos = ftell($this->zip_fd);
- }
-
- // ----- Go back to the maximum possible size of the Central Dir End Record
- if (!$v_found) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Start extended search of end central dir');
- $v_maximum_size = 65557; // 0xFFFF + 22;
- if ($v_maximum_size > $v_size)
- $v_maximum_size = $v_size;
- @fseek($this->zip_fd, $v_size-$v_maximum_size);
- if (@ftell($this->zip_fd) != ($v_size-$v_maximum_size))
- {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\'');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Position after max central position : \''.ftell($this->zip_fd).'\'');
-
- // ----- Read byte per byte in order to find the signature
- $v_pos = ftell($this->zip_fd);
- $v_bytes = 0x00000000;
- while ($v_pos < $v_size)
- {
- // ----- Read a byte
- $v_byte = @fread($this->zip_fd, 1);
-
- // ----- Add the byte
- $v_bytes = ($v_bytes << 8) | Ord($v_byte);
-
- // ----- Compare the bytes
- if ($v_bytes == 0x504b0506)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, 'Found End Central Dir signature at position : \''.ftell($this->zip_fd).'\'');
- $v_pos++;
- break;
- }
-
- $v_pos++;
- }
-
- // ----- Look if not found end of central dir
- if ($v_pos == $v_size)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Unable to find End of Central Dir Record signature");
-
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Unable to find End of Central Dir Record signature");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- }
-
- // ----- Read the first 18 bytes of the header
- $v_binary_data = fread($this->zip_fd, 18);
-
- // ----- Look for invalid block size
- if (strlen($v_binary_data) != 18)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "Invalid End of Central Dir Record size : ".strlen($v_binary_data));
-
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Central Dir Record size : ".strlen($v_binary_data));
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Extract the values
- ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Central Dir Record : '".$v_binary_data."'");
- ////--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Central Dir Record (Hex) : '".bin2hex($v_binary_data)."'");
- $v_data = unpack('vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size', $v_binary_data);
-
- // ----- Check the global size
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Comment length : ".$v_data['comment_size']);
- if (($v_pos + $v_data['comment_size'] + 18) != $v_size) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "The central dir is not at the end of the archive. Some trailing bytes exists after the archive.");
-
- // ----- Removed in release 2.2 see readme file
- // The check of the file size is a little too strict.
- // Some bugs where found when a zip is encrypted/decrypted with 'crypt'.
- // While decrypted, zip has training 0 bytes
- if (0) {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT,
- 'The central dir is not at the end of the archive.'
- .' Some trailing bytes exists after the archive.');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- }
-
- // ----- Get comment
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Comment size : \''.$v_data['comment_size'].'\'');
- if ($v_data['comment_size'] != 0) {
- $p_central_dir['comment'] = fread($this->zip_fd, $v_data['comment_size']);
- }
- else
- $p_central_dir['comment'] = '';
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Comment : \''.$p_central_dir['comment'].'\'');
-
- $p_central_dir['entries'] = $v_data['entries'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Nb of entries : \''.$p_central_dir['entries'].'\'');
- $p_central_dir['disk_entries'] = $v_data['disk_entries'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Nb of entries for this disk : \''.$p_central_dir['disk_entries'].'\'');
- $p_central_dir['offset'] = $v_data['offset'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Offset of Central Dir : \''.$p_central_dir['offset'].'\'');
- $p_central_dir['size'] = $v_data['size'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Size of Central Dir : \''.$p_central_dir['size'].'\'');
- $p_central_dir['disk'] = $v_data['disk'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Disk number : \''.$p_central_dir['disk'].'\'');
- $p_central_dir['disk_start'] = $v_data['disk_start'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, 'Start disk number : \''.$p_central_dir['disk_start'].'\'');
-
- // TBC
- //for(reset($p_central_dir); $key = key($p_central_dir); next($p_central_dir)) {
- // //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "central_dir[$key] = ".$p_central_dir[$key]);
- //}
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privDeleteByRule()
- // Description :
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privDeleteByRule(&$p_result_list, &$p_options)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDeleteByRule", "");
- $v_result=1;
- $v_list_detail = array();
-
- // ----- Open the zip file
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
- if (($v_result=$this->privOpenFd('rb')) != 1)
- {
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Read the central directory informations
- $v_central_dir = array();
- if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
- {
- $this->privCloseFd();
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Go to beginning of File
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'");
- @rewind($this->zip_fd);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in file : ".ftell($this->zip_fd)."'");
-
- // ----- Scan all the files
- // ----- Start at beginning of Central Dir
- $v_pos_entry = $v_central_dir['offset'];
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position before rewind : ".ftell($this->zip_fd)."'");
- @rewind($this->zip_fd);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($this->zip_fd)."'");
- if (@fseek($this->zip_fd, $v_pos_entry))
- {
- // ----- Close the zip file
- $this->privCloseFd();
-
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'");
-
- // ----- Read each entry
- $v_header_list = array();
- $j_start = 0;
- for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Read next file header entry (index '$i')");
-
- // ----- Read the file header
- $v_header_list[$v_nb_extracted] = array();
- if (($v_result = $this->privReadCentralFileHeader($v_header_list[$v_nb_extracted])) != 1)
- {
- // ----- Close the zip file
- $this->privCloseFd();
-
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename (index '$i') : '".$v_header_list[$v_nb_extracted]['stored_filename']."'");
-
- // ----- Store the index
- $v_header_list[$v_nb_extracted]['index'] = $i;
-
- // ----- Look for the specific extract rules
- $v_found = false;
-
- // ----- Look for extract by name rule
- if ( (isset($p_options[PCLZIP_OPT_BY_NAME]))
- && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByName'");
-
- // ----- Look if the filename is in the list
- for ($j=0; ($j<sizeof($p_options[PCLZIP_OPT_BY_NAME])) && (!$v_found); $j++) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Compare with file '".$p_options[PCLZIP_OPT_BY_NAME][$j]."'");
-
- // ----- Look for a directory
- if (substr($p_options[PCLZIP_OPT_BY_NAME][$j], -1) == "/") {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The searched item is a directory");
-
- // ----- Look if the directory is in the filename path
- if ( (strlen($v_header_list[$v_nb_extracted]['stored_filename']) > strlen($p_options[PCLZIP_OPT_BY_NAME][$j]))
- && (substr($v_header_list[$v_nb_extracted]['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The directory is in the file path");
- $v_found = true;
- }
- elseif ( (($v_header_list[$v_nb_extracted]['external']&0x00000010)==0x00000010) /* Indicates a folder */
- && ($v_header_list[$v_nb_extracted]['stored_filename'].'/' == $p_options[PCLZIP_OPT_BY_NAME][$j])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The entry is the searched directory");
- $v_found = true;
- }
- }
- // ----- Look for a filename
- elseif ($v_header_list[$v_nb_extracted]['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "The file is the right one.");
- $v_found = true;
- }
- }
- }
-
- // ----- Look for extract by ereg rule
- else if ( (isset($p_options[PCLZIP_OPT_BY_EREG]))
- && ($p_options[PCLZIP_OPT_BY_EREG] != "")) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract by ereg '".$p_options[PCLZIP_OPT_BY_EREG]."'");
-
- if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header_list[$v_nb_extracted]['stored_filename'])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression");
- $v_found = true;
- }
- }
-
- // ----- Look for extract by preg rule
- else if ( (isset($p_options[PCLZIP_OPT_BY_PREG]))
- && ($p_options[PCLZIP_OPT_BY_PREG] != "")) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByEreg'");
-
- if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header_list[$v_nb_extracted]['stored_filename'])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Filename match the regular expression");
- $v_found = true;
- }
- }
-
- // ----- Look for extract by index rule
- else if ( (isset($p_options[PCLZIP_OPT_BY_INDEX]))
- && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Extract with rule 'ByIndex'");
-
- // ----- Look if the index is in the list
- for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_found); $j++) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Look if index '$i' is in [".$p_options[PCLZIP_OPT_BY_INDEX][$j]['start'].",".$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']."]");
-
- if (($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Found as part of an index range");
- $v_found = true;
- }
- if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Do not look this index range for next loop");
- $j_start = $j+1;
- }
-
- if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Index range is greater than index, stop loop");
- break;
- }
- }
- }
- else {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "No argument mean remove all file");
- $v_found = true;
- }
-
- // ----- Look for deletion
- if ($v_found)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$v_header_list[$v_nb_extracted]['stored_filename']."', index '$i' need to be deleted");
- unset($v_header_list[$v_nb_extracted]);
- }
- else
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 2, "File '".$v_header_list[$v_nb_extracted]['stored_filename']."', index '$i' will not be deleted");
- $v_nb_extracted++;
- }
- }
-
- // ----- Look if something need to be deleted
- if ($v_nb_extracted > 0) {
-
- // ----- Creates a temporay file
- $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
-
- // ----- Creates a temporary zip archive
- $v_temp_zip = new PclZip($v_zip_temp_name);
-
- // ----- Open the temporary zip file in write mode
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary write mode");
- if (($v_result = $v_temp_zip->privOpenFd('wb')) != 1) {
- $this->privCloseFd();
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Look which file need to be kept
- for ($i=0; $i<sizeof($v_header_list); $i++) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Keep entry index '$i' : '".$v_header_list[$i]['filename']."'");
-
- // ----- Calculate the position of the header
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Offset='". $v_header_list[$i]['offset']."'");
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position before rewind : ".ftell($this->zip_fd)."'");
- @rewind($this->zip_fd);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after rewind : ".ftell($this->zip_fd)."'");
- if (@fseek($this->zip_fd, $v_header_list[$i]['offset'])) {
- // ----- Close the zip file
- $this->privCloseFd();
- $v_temp_zip->privCloseFd();
- @unlink($v_zip_temp_name);
-
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position after fseek : ".ftell($this->zip_fd)."'");
-
- // ----- Read the file header
- $v_local_header = array();
- if (($v_result = $this->privReadFileHeader($v_local_header)) != 1) {
- // ----- Close the zip file
- $this->privCloseFd();
- $v_temp_zip->privCloseFd();
- @unlink($v_zip_temp_name);
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Check that local file header is same as central file header
- if ($this->privCheckFileHeaders($v_local_header,
- $v_header_list[$i]) != 1) {
- // TBC
- }
- unset($v_local_header);
-
- // ----- Write the file header
- if (($v_result = $v_temp_zip->privWriteFileHeader($v_header_list[$i])) != 1) {
- // ----- Close the zip file
- $this->privCloseFd();
- $v_temp_zip->privCloseFd();
- @unlink($v_zip_temp_name);
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Offset for this file is '".$v_header_list[$i]['offset']."'");
-
- // ----- Read/write the data block
- if (($v_result = PclZipUtilCopyBlock($this->zip_fd, $v_temp_zip->zip_fd, $v_header_list[$i]['compressed_size'])) != 1) {
- // ----- Close the zip file
- $this->privCloseFd();
- $v_temp_zip->privCloseFd();
- @unlink($v_zip_temp_name);
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- }
-
- // ----- Store the offset of the central dir
- $v_offset = @ftell($v_temp_zip->zip_fd);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "New offset of central dir : $v_offset");
-
- // ----- Re-Create the Central Dir files header
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Creates the new central directory");
- for ($i=0; $i<sizeof($v_header_list); $i++) {
- // ----- Create the file header
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Offset of file : ".$v_header_list[$i]['offset']);
- if (($v_result = $v_temp_zip->privWriteCentralFileHeader($v_header_list[$i])) != 1) {
- $v_temp_zip->privCloseFd();
- $this->privCloseFd();
- @unlink($v_zip_temp_name);
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Transform the header to a 'usable' info
- $v_temp_zip->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]);
- }
-
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Creates the central directory footer");
-
- // ----- Zip file comment
- $v_comment = '';
- if (isset($p_options[PCLZIP_OPT_COMMENT])) {
- $v_comment = $p_options[PCLZIP_OPT_COMMENT];
- }
-
- // ----- Calculate the size of the central header
- $v_size = @ftell($v_temp_zip->zip_fd)-$v_offset;
-
- // ----- Create the central dir footer
- if (($v_result = $v_temp_zip->privWriteCentralHeader(sizeof($v_header_list), $v_size, $v_offset, $v_comment)) != 1) {
- // ----- Reset the file list
- unset($v_header_list);
- $v_temp_zip->privCloseFd();
- $this->privCloseFd();
- @unlink($v_zip_temp_name);
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Close
- $v_temp_zip->privCloseFd();
- $this->privCloseFd();
-
- // ----- Delete the zip file
- // TBC : I should test the result ...
- @unlink($this->zipname);
-
- // ----- Rename the temporary file
- // TBC : I should test the result ...
- //@rename($v_zip_temp_name, $this->zipname);
- PclZipUtilRename($v_zip_temp_name, $this->zipname);
-
- // ----- Destroy the temporary archive
- unset($v_temp_zip);
- }
-
- // ----- Remove every files : reset the file
- else if ($v_central_dir['entries'] != 0) {
- $this->privCloseFd();
-
- if (($v_result = $this->privOpenFd('wb')) != 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- if (($v_result = $this->privWriteCentralHeader(0, 0, 0, '')) != 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- $this->privCloseFd();
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privDirCheck()
- // Description :
- // Check if a directory exists, if not it creates it and all the parents directory
- // which may be useful.
- // Parameters :
- // $p_dir : Directory path to check.
- // Return Values :
- // 1 : OK
- // -1 : Unable to create directory
- // --------------------------------------------------------------------------------
- function privDirCheck($p_dir, $p_is_dir=false)
- {
- $v_result = 1;
-
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDirCheck", "entry='$p_dir', is_dir='".($p_is_dir?"true":"false")."'");
-
- // ----- Remove the final '/'
- if (($p_is_dir) && (substr($p_dir, -1)=='/'))
- {
- $p_dir = substr($p_dir, 0, strlen($p_dir)-1);
- }
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Looking for entry '$p_dir'");
-
- // ----- Check the directory availability
- if ((is_dir($p_dir)) || ($p_dir == ""))
- {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, "'$p_dir' is a directory");
- return 1;
- }
-
- // ----- Extract parent directory
- $p_parent_dir = dirname($p_dir);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Parent directory is '$p_parent_dir'");
-
- // ----- Just a check
- if ($p_parent_dir != $p_dir)
- {
- // ----- Look for parent directory
- if ($p_parent_dir != "")
- {
- if (($v_result = $this->privDirCheck($p_parent_dir)) != 1)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- }
- }
-
- // ----- Create the directory
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Create directory '$p_dir'");
- if (!@mkdir($p_dir, 0777))
- {
- // ----- Error log
- PclZip::privErrorLog(PCLZIP_ERR_DIR_CREATE_FAIL, "Unable to create directory '$p_dir'");
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result, "Directory '$p_dir' created");
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privMerge()
- // Description :
- // If $p_archive_to_add does not exist, the function exit with a success result.
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privMerge(&$p_archive_to_add)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privMerge", "archive='".$p_archive_to_add->zipname."'");
- $v_result=1;
-
- // ----- Look if the archive_to_add exists
- if (!is_file($p_archive_to_add->zipname))
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive to add does not exist. End of merge.");
-
- // ----- Nothing to merge, so merge is a success
- $v_result = 1;
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Look if the archive exists
- if (!is_file($this->zipname))
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive does not exist, duplicate the archive_to_add.");
-
- // ----- Do a duplicate
- $v_result = $this->privDuplicate($p_archive_to_add->zipname);
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Open the zip file
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
- if (($v_result=$this->privOpenFd('rb')) != 1)
- {
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Read the central directory informations
- $v_central_dir = array();
- if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1)
- {
- $this->privCloseFd();
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Go to beginning of File
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in zip : ".ftell($this->zip_fd)."'");
- @rewind($this->zip_fd);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in zip : ".ftell($this->zip_fd)."'");
-
- // ----- Open the archive_to_add file
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open archive_to_add in binary read mode");
- if (($v_result=$p_archive_to_add->privOpenFd('rb')) != 1)
- {
- $this->privCloseFd();
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Read the central directory informations
- $v_central_dir_to_add = array();
- if (($v_result = $p_archive_to_add->privReadEndCentralDir($v_central_dir_to_add)) != 1)
- {
- $this->privCloseFd();
- $p_archive_to_add->privCloseFd();
-
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Go to beginning of File
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in archive_to_add : ".ftell($p_archive_to_add->zip_fd)."'");
- @rewind($p_archive_to_add->zip_fd);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Position in archive_to_add : ".ftell($p_archive_to_add->zip_fd)."'");
-
- // ----- Creates a temporay file
- $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp';
-
- // ----- Open the temporary file in write mode
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
- if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0)
- {
- $this->privCloseFd();
- $p_archive_to_add->privCloseFd();
-
- PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Copy the files from the archive to the temporary file
- // TBC : Here I should better append the file and go back to erase the central dir
- $v_size = $v_central_dir['offset'];
- while ($v_size != 0)
- {
- $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
- $v_buffer = fread($this->zip_fd, $v_read_size);
- @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
- $v_size -= $v_read_size;
- }
-
- // ----- Copy the files from the archive_to_add into the temporary file
- $v_size = $v_central_dir_to_add['offset'];
- while ($v_size != 0)
- {
- $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
- $v_buffer = fread($p_archive_to_add->zip_fd, $v_read_size);
- @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
- $v_size -= $v_read_size;
- }
-
- // ----- Store the offset of the central dir
- $v_offset = @ftell($v_zip_temp_fd);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "New offset of central dir : $v_offset");
-
- // ----- Copy the block of file headers from the old archive
- $v_size = $v_central_dir['size'];
- while ($v_size != 0)
- {
- $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
- $v_buffer = @fread($this->zip_fd, $v_read_size);
- @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
- $v_size -= $v_read_size;
- }
-
- // ----- Copy the block of file headers from the archive_to_add
- $v_size = $v_central_dir_to_add['size'];
- while ($v_size != 0)
- {
- $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
- $v_buffer = @fread($p_archive_to_add->zip_fd, $v_read_size);
- @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size);
- $v_size -= $v_read_size;
- }
-
- // ----- Merge the file comments
- $v_comment = $v_central_dir['comment'].' '.$v_central_dir_to_add['comment'];
-
- // ----- Calculate the size of the (new) central header
- $v_size = @ftell($v_zip_temp_fd)-$v_offset;
-
- // ----- Swap the file descriptor
- // Here is a trick : I swap the temporary fd with the zip fd, in order to use
- // the following methods on the temporary fil and not the real archive fd
- $v_swap = $this->zip_fd;
- $this->zip_fd = $v_zip_temp_fd;
- $v_zip_temp_fd = $v_swap;
-
- // ----- Create the central dir footer
- if (($v_result = $this->privWriteCentralHeader($v_central_dir['entries']+$v_central_dir_to_add['entries'], $v_size, $v_offset, $v_comment)) != 1)
- {
- $this->privCloseFd();
- $p_archive_to_add->privCloseFd();
- @fclose($v_zip_temp_fd);
- $this->zip_fd = null;
-
- // ----- Reset the file list
- unset($v_header_list);
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Swap back the file descriptor
- $v_swap = $this->zip_fd;
- $this->zip_fd = $v_zip_temp_fd;
- $v_zip_temp_fd = $v_swap;
-
- // ----- Close
- $this->privCloseFd();
- $p_archive_to_add->privCloseFd();
-
- // ----- Close the temporary file
- @fclose($v_zip_temp_fd);
-
- // ----- Delete the zip file
- // TBC : I should test the result ...
- @unlink($this->zipname);
-
- // ----- Rename the temporary file
- // TBC : I should test the result ...
- //@rename($v_zip_temp_name, $this->zipname);
- PclZipUtilRename($v_zip_temp_name, $this->zipname);
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privDuplicate()
- // Description :
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privDuplicate($p_archive_filename)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZip::privDuplicate", "archive_filename='$p_archive_filename'");
- $v_result=1;
-
- // ----- Look if the $p_archive_filename exists
- if (!is_file($p_archive_filename))
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Archive to duplicate does not exist. End of duplicate.");
-
- // ----- Nothing to duplicate, so duplicate is a success.
- $v_result = 1;
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Open the zip file
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
- if (($v_result=$this->privOpenFd('wb')) != 1)
- {
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Open the temporary file in write mode
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Open file in binary read mode");
- if (($v_zip_temp_fd = @fopen($p_archive_filename, 'rb')) == 0)
- {
- $this->privCloseFd();
-
- PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \''.$p_archive_filename.'\' in binary write mode');
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, PclZip::errorCode(), PclZip::errorInfo());
- return PclZip::errorCode();
- }
-
- // ----- Copy the files from the archive to the temporary file
- // TBC : Here I should better append the file and go back to erase the central dir
- $v_size = filesize($p_archive_filename);
- while ($v_size != 0)
- {
- $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Read $v_read_size bytes");
- $v_buffer = fread($v_zip_temp_fd, $v_read_size);
- @fwrite($this->zip_fd, $v_buffer, $v_read_size);
- $v_size -= $v_read_size;
- }
-
- // ----- Close
- $this->privCloseFd();
-
- // ----- Close the temporary file
- @fclose($v_zip_temp_fd);
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privErrorLog()
- // Description :
- // Parameters :
- // --------------------------------------------------------------------------------
- function privErrorLog($p_error_code=0, $p_error_string='')
- {
- if (PCLZIP_ERROR_EXTERNAL == 1) {
- PclError($p_error_code, $p_error_string);
- }
- else {
- $this->error_code = $p_error_code;
- $this->error_string = $p_error_string;
- }
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privErrorReset()
- // Description :
- // Parameters :
- // --------------------------------------------------------------------------------
- function privErrorReset()
- {
- if (PCLZIP_ERROR_EXTERNAL == 1) {
- PclErrorReset();
- }
- else {
- $this->error_code = 0;
- $this->error_string = '';
- }
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privDecrypt()
- // Description :
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privDecrypt($p_encryption_header, &$p_buffer, $p_size, $p_crc)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privDecrypt', "size=".$p_size."");
- $v_result=1;
-
- // ----- To Be Modified ;-)
- $v_pwd = "test";
-
- $p_buffer = PclZipUtilZipDecrypt($p_buffer, $p_size, $p_encryption_header,
- $p_crc, $v_pwd);
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privDisableMagicQuotes()
- // Description :
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privDisableMagicQuotes()
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privDisableMagicQuotes', "");
- $v_result=1;
-
- // ----- Look if function exists
- if ( (!function_exists("get_magic_quotes_runtime"))
- || (!function_exists("set_magic_quotes_runtime"))) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Functions *et_magic_quotes_runtime are not supported");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Look if already done
- if ($this->magic_quotes_status != -1) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "magic_quote already disabled");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Get and memorize the magic_quote value
- $this->magic_quotes_status = @get_magic_quotes_runtime();
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Current magic_quotes_runtime status is '".($this->magic_quotes_status==0?'disable':'enable')."'");
-
- // ----- Disable magic_quotes
- if ($this->magic_quotes_status == 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Disable magic_quotes");
- @set_magic_quotes_runtime(0);
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : privSwapBackMagicQuotes()
- // Description :
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function privSwapBackMagicQuotes()
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, 'PclZip::privSwapBackMagicQuotes', "");
- $v_result=1;
-
- // ----- Look if function exists
- if ( (!function_exists("get_magic_quotes_runtime"))
- || (!function_exists("set_magic_quotes_runtime"))) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Functions *et_magic_quotes_runtime are not supported");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Look if something to do
- if ($this->magic_quotes_status != -1) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "magic_quote not modified");
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
-
- // ----- Swap back magic_quotes
- if ($this->magic_quotes_status == 1) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Enable back magic_quotes");
- @set_magic_quotes_runtime($this->magic_quotes_status);
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- }
- // End of class
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : PclZipUtilPathReduction()
- // Description :
- // Parameters :
- // Return Values :
- // --------------------------------------------------------------------------------
- function PclZipUtilPathReduction($p_dir)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathReduction", "dir='$p_dir'");
- $v_result = "";
-
- // ----- Look for not empty path
- if ($p_dir != "") {
- // ----- Explode path by directory names
- $v_list = explode("/", $p_dir);
-
- // ----- Study directories from last to first
- $v_skip = 0;
- for ($i=sizeof($v_list)-1; $i>=0; $i--) {
- // ----- Look for current path
- if ($v_list[$i] == ".") {
- // ----- Ignore this directory
- // Should be the first $i=0, but no check is done
- }
- else if ($v_list[$i] == "..") {
- $v_skip++;
- }
- else if ($v_list[$i] == "") {
- // ----- First '/' i.e. root slash
- if ($i == 0) {
- $v_result = "/".$v_result;
- if ($v_skip > 0) {
- // ----- It is an invalid path, so the path is not modified
- // TBC
- $v_result = $p_dir;
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 3, "Invalid path is unchanged");
- $v_skip = 0;
- }
- }
- // ----- Last '/' i.e. indicates a directory
- else if ($i == (sizeof($v_list)-1)) {
- $v_result = $v_list[$i];
- }
- // ----- Double '/' inside the path
- else {
- // ----- Ignore only the double '//' in path,
- // but not the first and last '/'
- }
- }
- else {
- // ----- Look for item to skip
- if ($v_skip > 0) {
- $v_skip--;
- }
- else {
- $v_result = $v_list[$i].($i!=(sizeof($v_list)-1)?"/".$v_result:"");
- }
- }
- }
-
- // ----- Look for skip
- if ($v_skip > 0) {
- while ($v_skip > 0) {
- $v_result = '../'.$v_result;
- $v_skip--;
- }
- }
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : PclZipUtilPathInclusion()
- // Description :
- // This function indicates if the path $p_path is under the $p_dir tree. Or,
- // said in an other way, if the file or sub-dir $p_path is inside the dir
- // $p_dir.
- // The function indicates also if the path is exactly the same as the dir.
- // This function supports path with duplicated '/' like '//', but does not
- // support '.' or '..' statements.
- // Parameters :
- // Return Values :
- // 0 if $p_path is not inside directory $p_dir
- // 1 if $p_path is inside directory $p_dir
- // 2 if $p_path is exactly the same as $p_dir
- // --------------------------------------------------------------------------------
- function PclZipUtilPathInclusion($p_dir, $p_path)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilPathInclusion", "dir='$p_dir', path='$p_path'");
- $v_result = 1;
-
- // ----- Look for path beginning by ./
- if ( ($p_dir == '.')
- || ((strlen($p_dir) >=2) && (substr($p_dir, 0, 2) == './'))) {
- $p_dir = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_dir, 1);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Replacing ./ by full path in p_dir '".$p_dir."'");
- }
- if ( ($p_path == '.')
- || ((strlen($p_path) >=2) && (substr($p_path, 0, 2) == './'))) {
- $p_path = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_path, 1);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Replacing ./ by full path in p_path '".$p_path."'");
- }
-
- // ----- Explode dir and path by directory separator
- $v_list_dir = explode("/", $p_dir);
- $v_list_dir_size = sizeof($v_list_dir);
- $v_list_path = explode("/", $p_path);
- $v_list_path_size = sizeof($v_list_path);
-
- // ----- Study directories paths
- $i = 0;
- $j = 0;
- while (($i < $v_list_dir_size) && ($j < $v_list_path_size) && ($v_result)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Working on dir($i)='".$v_list_dir[$i]."' and path($j)='".$v_list_path[$j]."'");
-
- // ----- Look for empty dir (path reduction)
- if ($v_list_dir[$i] == '') {
- $i++;
- continue;
- }
- if ($v_list_path[$j] == '') {
- $j++;
- continue;
- }
-
- // ----- Compare the items
- if (($v_list_dir[$i] != $v_list_path[$j]) && ($v_list_dir[$i] != '') && ( $v_list_path[$j] != '')) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Items ($i,$j) are different");
- $v_result = 0;
- }
-
- // ----- Next items
- $i++;
- $j++;
- }
-
- // ----- Look if everything seems to be the same
- if ($v_result) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Look for tie break");
- // ----- Skip all the empty items
- while (($j < $v_list_path_size) && ($v_list_path[$j] == '')) $j++;
- while (($i < $v_list_dir_size) && ($v_list_dir[$i] == '')) $i++;
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Looking on dir($i)='".($i < $v_list_dir_size?$v_list_dir[$i]:'')."' and path($j)='".($j < $v_list_path_size?$v_list_path[$j]:'')."'");
-
- if (($i >= $v_list_dir_size) && ($j >= $v_list_path_size)) {
- // ----- There are exactly the same
- $v_result = 2;
- }
- else if ($i < $v_list_dir_size) {
- // ----- The path is shorter than the dir
- $v_result = 0;
- }
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : PclZipUtilCopyBlock()
- // Description :
- // Parameters :
- // $p_mode : read/write compression mode
- // 0 : src & dest normal
- // 1 : src gzip, dest normal
- // 2 : src normal, dest gzip
- // 3 : src & dest gzip
- // Return Values :
- // --------------------------------------------------------------------------------
- function PclZipUtilCopyBlock($p_src, $p_dest, $p_size, $p_mode=0)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilCopyBlock", "size=$p_size, mode=$p_mode");
- $v_result = 1;
-
- if ($p_mode==0)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Src offset before read :".(@ftell($p_src)));
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Dest offset before write :".(@ftell($p_dest)));
- while ($p_size != 0)
- {
- $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
- $v_buffer = @fread($p_src, $v_read_size);
- @fwrite($p_dest, $v_buffer, $v_read_size);
- $p_size -= $v_read_size;
- }
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Src offset after read :".(@ftell($p_src)));
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Dest offset after write :".(@ftell($p_dest)));
- }
- else if ($p_mode==1)
- {
- while ($p_size != 0)
- {
- $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
- $v_buffer = @gzread($p_src, $v_read_size);
- @fwrite($p_dest, $v_buffer, $v_read_size);
- $p_size -= $v_read_size;
- }
- }
- else if ($p_mode==2)
- {
- while ($p_size != 0)
- {
- $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
- $v_buffer = @fread($p_src, $v_read_size);
- @gzwrite($p_dest, $v_buffer, $v_read_size);
- $p_size -= $v_read_size;
- }
- }
- else if ($p_mode==3)
- {
- while ($p_size != 0)
- {
- $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE);
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 4, "Read $v_read_size bytes");
- $v_buffer = @gzread($p_src, $v_read_size);
- @gzwrite($p_dest, $v_buffer, $v_read_size);
- $p_size -= $v_read_size;
- }
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : PclZipUtilRename()
- // Description :
- // This function tries to do a simple rename() function. If it fails, it
- // tries to copy the $p_src file in a new $p_dest file and then unlink the
- // first one.
- // Parameters :
- // $p_src : Old filename
- // $p_dest : New filename
- // Return Values :
- // 1 on success, 0 on failure.
- // --------------------------------------------------------------------------------
- function PclZipUtilRename($p_src, $p_dest)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilRename", "source=$p_src, destination=$p_dest");
- $v_result = 1;
-
- // ----- Try to rename the files
- if (!@rename($p_src, $p_dest)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to rename file, try copy+unlink");
-
- // ----- Try to copy & unlink the src
- if (!@copy($p_src, $p_dest)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to copy file");
- $v_result = 0;
- }
- else if (!@unlink($p_src)) {
- //--(MAGIC-PclTrace)--//PclTraceFctMessage(__FILE__, __LINE__, 5, "Fail to unlink old filename");
- $v_result = 0;
- }
- }
-
- // ----- Return
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : PclZipUtilOptionText()
- // Description :
- // Translate option value in text. Mainly for debug purpose.
- // Parameters :
- // $p_option : the option value.
- // Return Values :
- // The option text value.
- // --------------------------------------------------------------------------------
- function PclZipUtilOptionText($p_option)
- {
- //--(MAGIC-PclTrace)--//PclTraceFctStart(__FILE__, __LINE__, "PclZipUtilOptionText", "option='".$p_option."'");
-
- $v_list = get_defined_constants();
- for (reset($v_list); $v_key = key($v_list); next($v_list)) {
- $v_prefix = substr($v_key, 0, 10);
- if (( ($v_prefix == 'PCLZIP_OPT')
- || ($v_prefix == 'PCLZIP_CB_')
- || ($v_prefix == 'PCLZIP_ATT'))
- && ($v_list[$v_key] == $p_option)) {
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_key);
- return $v_key;
- }
- }
-
- $v_result = 'Unknown';
-
- //--(MAGIC-PclTrace)--//PclTraceFctEnd(__FILE__, __LINE__, $v_result);
- return $v_result;
- }
- // --------------------------------------------------------------------------------
-
- // --------------------------------------------------------------------------------
- // Function : PclZipUtilTranslateWinPath()
- // Description :
- // Translate windows path by replacing '\' by '/' and optionally removing
- // drive letter.
- // Parameters :
- // $p_path : path to translate.
- // $p_remove_disk_letter : true | false
- // Return Values :
- // The path translated.
- // --------------------------------------------------------------------------------
- function PclZipUtilTranslateWinPath($p_path, $p_remove_disk_letter=true)
- {
- if (stristr(php_uname(), 'windows')) {
- // ----- Look for potential disk letter
- if (($p_remove_disk_letter) && (($v_position = strpos($p_path, ':')) != false)) {
- $p_path = substr($p_path, $v_position+1);
- }
- // ----- Change potential windows directory separator
- if ((strpos($p_path, '\\') > 0) || (substr($p_path, 0,1) == '\\')) {
- $p_path = strtr($p_path, '\\', '/');
- }
- }
- return $p_path;
- }
- // --------------------------------------------------------------------------------
-
-
-?>
diff --git a/BSF/admin/include/plugins.class.php b/BSF/admin/include/plugins.class.php
deleted file mode 100644
index de189ffc9..000000000
--- a/BSF/admin/include/plugins.class.php
+++ /dev/null
@@ -1,484 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-class plugins
-{
- var $fs_plugins = array();
- var $db_plugins_by_id = array();
- var $server_plugins;
-
- /**
- * Initialize $fs_plugins and $db_plugins_by_id
- */
- function plugins()
- {
- $this->get_fs_plugins();
-
- foreach (get_db_plugins() as $db_plugin)
- {
- $this->db_plugins_by_id[$db_plugin['id']] = $db_plugin;
- }
- }
-
- /**
- * Perform requested actions
- * @param string - action
- * @param string - plugin id
- * @param array - errors
- */
- function perform_action($action, $plugin_id)
- {
- if (isset($this->db_plugins_by_id[$plugin_id]))
- {
- $crt_db_plugin = $this->db_plugins_by_id[$plugin_id];
- }
- $file_to_include = PHPWG_PLUGINS_PATH . $plugin_id . '/maintain.inc.php';
-
- $errors = array();
-
- switch ($action)
- {
- case 'install':
- if (!empty($crt_db_plugin))
- {
- array_push($errors, 'CANNOT INSTALL - ALREADY INSTALLED');
- break;
- }
- if (!isset($this->fs_plugins[$plugin_id]))
- {
- array_push($errors, 'CANNOT INSTALL - NO SUCH PLUGIN');
- break;
- }
- if (file_exists($file_to_include))
- {
- include_once($file_to_include);
- if (function_exists('plugin_install'))
- {
- plugin_install($plugin_id, $this->fs_plugins[$plugin_id]['version'], $errors);
- }
- }
- if (empty($errors))
- {
- $query = '
-INSERT INTO ' . PLUGINS_TABLE . ' (id,version) VALUES ("'
-. $plugin_id . '","' . $this->fs_plugins[$plugin_id]['version'] . '"
-)';
- pwg_query($query);
- }
- break;
-
- case 'activate':
- if (!isset($crt_db_plugin))
- {
- array_push($errors, 'CANNOT ACTIVATE - NOT INSTALLED');
- break;
- }
- if ($crt_db_plugin['state'] != 'inactive')
- {
- array_push($errors, 'invalid current state ' . $crt_db_plugin['state']);
- break;
- }
- if (file_exists($file_to_include))
- {
- include_once($file_to_include);
- if (function_exists('plugin_activate'))
- {
- plugin_activate($plugin_id, $crt_db_plugin['version'], $errors);
- }
- }
- if (empty($errors))
- {
- $query = '
-UPDATE ' . PLUGINS_TABLE . ' SET state="active" WHERE id="' . $plugin_id . '"';
- pwg_query($query);
- }
- break;
-
- case 'deactivate':
- if (!isset($crt_db_plugin))
- {
- die ('CANNOT DEACTIVATE - NOT INSTALLED');
- }
- if ($crt_db_plugin['state'] != 'active')
- {
- die('invalid current state ' . $crt_db_plugin['state']);
- }
- $query = '
-UPDATE ' . PLUGINS_TABLE . ' SET state="inactive" WHERE id="' . $plugin_id . '"';
- pwg_query($query);
- if (file_exists($file_to_include))
- {
- include_once($file_to_include);
- if (function_exists('plugin_deactivate'))
- {
- plugin_deactivate($plugin_id);
- }
- }
- break;
-
- case 'uninstall':
- if (!isset($crt_db_plugin))
- {
- die ('CANNOT UNINSTALL - NOT INSTALLED');
- }
- $query = '
-DELETE FROM ' . PLUGINS_TABLE . ' WHERE id="' . $plugin_id . '"';
- pwg_query($query);
- if (file_exists($file_to_include))
- {
- include_once($file_to_include);
- if (function_exists('plugin_uninstall'))
- {
- plugin_uninstall($plugin_id);
- }
- }
- break;
-
- case 'delete':
- if (!empty($crt_db_plugin))
- {
- array_push($errors, 'CANNOT DELETE - PLUGIN IS INSTALLED');
- break;
- }
- if (!isset($this->fs_plugins[$plugin_id]))
- {
- array_push($errors, 'CANNOT DELETE - NO SUCH PLUGIN');
- break;
- }
- if (!$this->deltree(PHPWG_PLUGINS_PATH . $plugin_id))
- {
- $this->send_to_trash(PHPWG_PLUGINS_PATH . $plugin_id);
- }
- break;
- }
- return $errors;
- }
-
- /**
- * Get plugins defined in the plugin directory
- */
- function get_fs_plugins()
- {
- $dir = opendir(PHPWG_PLUGINS_PATH);
- while ($file = readdir($dir))
- {
- if ($file!='.' and $file!='..')
- {
- $path = PHPWG_PLUGINS_PATH.$file;
- if (is_dir($path) and !is_link($path)
- and preg_match('/^[a-zA-Z0-9-_]+$/', $file )
- and file_exists($path.'/main.inc.php')
- )
- {
- $plugin = array(
- 'name'=>$file,
- 'version'=>'0',
- 'uri'=>'',
- 'description'=>'',
- 'author'=>'',
- );
- $plg_data = implode( '', file($path.'/main.inc.php') );
-
- if ( preg_match("|Plugin Name: (.*)|", $plg_data, $val) )
- {
- $plugin['name'] = trim( $val[1] );
- }
- if (preg_match("|Version: (.*)|", $plg_data, $val))
- {
- $plugin['version'] = trim($val[1]);
- }
- if ( preg_match("|Plugin URI: (.*)|", $plg_data, $val) )
- {
- $plugin['uri'] = trim($val[1]);
- }
- if ( preg_match("|Description: (.*)|", $plg_data, $val) )
- {
- $plugin['description'] = trim($val[1]);
- }
- if ( preg_match("|Author: (.*)|", $plg_data, $val) )
- {
- $plugin['author'] = trim($val[1]);
- }
- if ( preg_match("|Author URI: (.*)|", $plg_data, $val) )
- {
- $plugin['author uri'] = trim($val[1]);
- }
- if (!empty($plugin['uri']) and strpos($plugin['uri'] , 'extension_view.php?eid='))
- {
- list( , $extension) = explode('extension_view.php?eid=', $plugin['uri']);
- if (is_numeric($extension)) $plugin['extension'] = $extension;
- }
- // IMPORTANT SECURITY !
- $plugin = array_map('htmlspecialchars', $plugin);
- $this->fs_plugins[$file] = $plugin;
- }
- }
- }
- closedir($dir);
- }
-
- /**
- * Sort fs_plugins
- */
- function sort_fs_plugins($order='name')
- {
- switch ($order)
- {
- case 'name':
- uasort($this->fs_plugins, 'name_compare');
- break;
- case 'status':
- $this->sort_plugins_by_state();
- break;
- case 'author':
- uasort($this->fs_plugins, array($this, 'plugin_author_compare'));
- break;
- case 'id':
- uksort($this->fs_plugins, 'strcasecmp');
- break;
- }
- }
-
- /**
- * Retrieve PEM server datas to $server_plugins
- */
- function get_server_plugins($new=false)
- {
- foreach($this->fs_plugins as $fs_plugin)
- {
- if (isset($fs_plugin['extension']))
- {
- $plugins_to_check[] = $fs_plugin['extension'];
- }
- }
- $url = PEM_URL . '/uptodate.php?version=' . rawurlencode(PHPWG_VERSION) . '&extensions=' . implode(',', $plugins_to_check);
- $url .= $new ? '&newext=Plugin' : '';
-
- if (!empty($plugins_to_check) and $source = @file_get_contents($url))
- {
- $this->server_plugins = @unserialize($source);
- }
- }
-
- /**
- * Sort $server_plugins
- */
- function sort_server_plugins($order='date')
- {
- switch ($order)
- {
- case 'date':
- krsort($this->server_plugins);
- break;
- case 'revision':
- usort($this->server_plugins, array($this, 'extension_revision_compare'));
- break;
- case 'name':
- uasort($this->server_plugins, array($this, 'extension_name_compare'));
- break;
- case 'author':
- uasort($this->server_plugins, array($this, 'extension_author_compare'));
- break;
- }
- }
-
- /**
- * Extract plugin files from archive
- * @param string - install or upgrade
- * @param string - archive URL
- * @param string - destination path
- */
- function extract_plugin_files($action, $source, $dest)
- {
- if ($archive = tempnam( PHPWG_PLUGINS_PATH, 'zip'))
- {
- if (@copy(PEM_URL . str_replace(' ', '%20', $source), $archive))
- {
- include(PHPWG_ROOT_PATH.'admin/include/pclzip.lib.php');
- $zip = new PclZip($archive);
- if ($list = $zip->listContent())
- {
- foreach ($list as $file)
- {
- // we search main.inc.php in archive
- if (basename($file['filename']) == 'main.inc.php'
- and (!isset($main_filepath)
- or strlen($file['filename']) < strlen($main_filepath)))
- {
- $main_filepath = $file['filename'];
- }
- }
- if (isset($main_filepath))
- {
- $root = dirname($main_filepath); // main.inc.php path in archive
- if ($action == 'upgrade')
- {
- $extract_path = PHPWG_PLUGINS_PATH.$dest;
- }
- else
- {
- $extract_path = PHPWG_PLUGINS_PATH
- . ($root == '.' ? 'extension_' . $dest : basename($root));
- }
- if($result = $zip->extract(PCLZIP_OPT_PATH, $extract_path,
- PCLZIP_OPT_REMOVE_PATH, $root,
- PCLZIP_OPT_REPLACE_NEWER))
- {
- foreach ($result as $file)
- {
- if ($file['stored_filename'] == $main_filepath)
- {
- $status = $file['status'];
- break;
- }
- }
- }
- else $status = 'extract_error';
- }
- else $status = 'archive_error';
- }
- else $status = 'archive_error';
- }
- else $status = 'dl_archive_error';
- }
- else $status = 'temp_path_error';
-
- @unlink($archive);
- return $status;
- }
-
- /**
- * delete $path directory
- * @param string - path
- */
- function deltree($path)
- {
- if (is_dir($path))
- {
- $fh = opendir($path);
- while ($file = readdir($fh))
- {
- if ($file != '.' and $file != '..')
- {
- $pathfile = $path . '/' . $file;
- if (is_dir($pathfile))
- {
- $this->deltree($pathfile);
- }
- else
- {
- @unlink($pathfile);
- }
- }
- }
- closedir($fh);
- return @rmdir($path);
- }
- }
-
- /**
- * send $path to trash directory
- * @param string - path
- */
- function send_to_trash($path)
- {
- $trash_path = PHPWG_PLUGINS_PATH . 'trash';
- if (!is_dir($trash_path))
- {
- @mkdir($trash_path);
- $file = @fopen($trash_path . '/.htaccess', 'w');
- @fwrite($file, 'deny from all');
- @fclose($file);
- }
- while ($r = $trash_path . '/' . md5(uniqid(rand(), true)))
- {
- if (!is_dir($r))
- {
- @rename($path, $r);
- break;
- }
- }
- }
-
- /**
- * Sort functions
- */
- function plugin_version_compare($a, $b)
- {
- $pattern = array('/([a-z])/ei', '/\.+/', '/\.\Z|\A\./');
- $replacement = array( "'.'.intval('\\1', 36).'.'", '.', '');
-
- $array = preg_replace($pattern, $replacement, array($a['version'], $b['version']));
-
- return version_compare($array[0], $array[1], '>=');
- }
-
- function extension_revision_compare($a, $b)
- {
- if ($a['date'] < $b['date']) return 1;
- else return -1;
- }
-
- function extension_name_compare($a, $b)
- {
- return strcmp(strtolower($a['ext_name']), strtolower($b['ext_name']));
- }
-
- function extension_author_compare($a, $b)
- {
- $r = strcasecmp($a['author'], $b['author']);
- if ($r == 0) return $this->extension_name_compare($a, $b);
- else return $r;
- }
-
- function plugin_author_compare($a, $b)
- {
- $r = strcasecmp($a['author'], $b['author']);
- if ($r == 0) return name_compare($a, $b);
- else return $r;
- }
-
- function sort_plugins_by_state()
- {
- uasort($this->fs_plugins, 'name_compare');
-
- $active_plugins = array();
- $inactive_plugins = array();
- $not_installed = array();
-
- foreach($this->fs_plugins as $plugin_id => $plugin)
- {
- if (isset($this->db_plugins_by_id[$plugin_id]))
- {
- $this->db_plugins_by_id[$plugin_id]['state'] == 'active' ?
- $active_plugins[$plugin_id] = $plugin : $inactive_plugins[$plugin_id] = $plugin;
- }
- else
- {
- $not_installed[$plugin_id] = $plugin;
- }
- }
- $this->fs_plugins = $active_plugins + $inactive_plugins + $not_installed;
- }
-}
-?> \ No newline at end of file
diff --git a/BSF/admin/include/tabsheet.class.php b/BSF/admin/include/tabsheet.class.php
deleted file mode 100644
index c295f0ae0..000000000
--- a/BSF/admin/include/tabsheet.class.php
+++ /dev/null
@@ -1,146 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-class tabsheet
-{
- var $sheets;
- var $name;
- var $titlename;
- var $selected;
-
- /*
- $name is the tabsheet's name inside the template .tpl file
- $titlename in the template is affected by $titlename value
- */
- function tabsheet($name = 'TABSHEET', $titlename = 'TABSHEET_TITLE')
- {
- $this->sheets = array();
- $this->name = $name;
- $this->titlename = $titlename;
- $this->selected = "";
- }
-
- /*
- add a tab
- */
- function add($name, $caption, $url, $selected = false)
- {
- if (!isset($this->sheets[$name]))
- {
- $this->sheets[$name] = array('caption' => $caption,
- 'url' => $url);
- if($selected)
- {
- $this->selected=$name;
- }
- return true;
- }
- return false;
- }
-
- /*
- remove a tab
- */
- function delete($name)
- {
- if (isset($this->sheets[$name]))
- {
- array_splice($this->sheets, $name, 1);
-
- if ($this->selected == $name)
- {
- $this->selected = "";
- }
- return true;
- }
- return false;
- }
-
- /*
- select a tab to be active
- */
- function select($name)
- {
- $this->selected = $name;
- }
-
- /*
- set $titlename value
- */
- function set_titlename($titlename)
- {
- $this->titlename = $titlename;
- return $this->titlename;
- }
-
- /*
- returns $titlename value
- */
- function get_titlename()
- {
- return $this->titlename;
- }
-
- /*
- returns properties of selected tab
- */
- function get_selected()
- {
- if (!empty($this->selected))
- {
- return $this->sheets[$this->selected];
- }
- else
- {
- return null;
- }
- }
-
- /*
- * Build TabSheet and assign this content to current page
- *
- * Fill $this->$name {default value = TABSHEET} with HTML code for tabsheet
- * Fill $this->titlename {default value = TABSHEET_TITLE} with formated caption of the selected tab
- */
- function assign()
- {
- global $template;
-
- $template->set_filename('tabsheet', 'admin/tabsheet.tpl');
- $template->assign('tabsheet', $this->sheets);
- $template->assign('tabsheet_selected', $this->selected);
-
- $selected_tab = $this->get_selected();
-
- if (isset($selected_tab))
- {
- $template->assign(
- array($this->titlename => '['.$selected_tab['caption'].']'));
- }
-
- $template->assign_var_from_handle($this->name, 'tabsheet');
- $template->clear_assign('tabsheet');
- }
-}
-
-?>
diff --git a/BSF/admin/index.php b/BSF/admin/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/admin/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/admin/intro.php b/BSF/admin/intro.php
deleted file mode 100644
index ed378d2d5..000000000
--- a/BSF/admin/intro.php
+++ /dev/null
@@ -1,285 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die ("Hacking attempt!");
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/check_integrity.class.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/c13y_internal.class.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | actions |
-// +-----------------------------------------------------------------------+
-
-// Check for upgrade : code inspired from punbb
-if (isset($_GET['action']) and 'check_upgrade' == $_GET['action'])
-{
- if (!ini_get('allow_url_fopen'))
- {
- array_push(
- $page['errors'],
- l10n('Unable to check for upgrade since allow_url_fopen is disabled.')
- );
- }
- else
- {
- $versions = array('current' => PHPWG_VERSION);
- $lines = @file(PHPWG_URL.'/latest_version');
-
- // if the current version is a BSF (development branch) build, we check
- // the first line, for stable versions, we check the second line
- if (preg_match('/^BSF/', $versions{'current'}))
- {
- $versions{'latest'} = trim($lines[0]);
-
- // because integer are limited to 4,294,967,296 we need to split BSF
- // versions in date.time
- foreach ($versions as $key => $value)
- {
- $versions{$key} =
- preg_replace('/BSF_(\d{8})(\d{4})/', '$1.$2', $value);
- }
- }
- else
- {
- $versions{'latest'} = trim($lines[1]);
- }
-
- if ('' == $versions{'latest'})
- {
- array_push(
- $page['errors'],
- l10n('Check for upgrade failed for unknown reasons.')
- );
- }
- // concatenation needed to avoid automatic transformation by release
- // script generator
- else if ('%'.'PWGVERSION'.'%' == $versions{'current'})
- {
- array_push(
- $page['infos'],
- l10n('You are running on development sources, no check possible.')
- );
- }
- else if (version_compare($versions{'current'}, $versions{'latest'}) < 0)
- {
- array_push(
- $page['infos'],
- l10n('A new version of Piwigo is available.')
- );
- }
- else
- {
- array_push(
- $page['infos'],
- l10n('You are running the latest version of Piwigo.')
- );
- }
- }
-}
-// Show phpinfo() output
-else if (isset($_GET['action']) and 'phpinfo' == $_GET['action'])
-{
- phpinfo();
- exit();
-}
-
-// +-----------------------------------------------------------------------+
-// | template init |
-// +-----------------------------------------------------------------------+
-
-$template->set_filenames(array('intro' => 'admin/intro.tpl'));
-
-$php_current_timestamp = date("Y-m-d H:i:s");
-list($mysql_version, $db_current_timestamp) = mysql_fetch_row(pwg_query('SELECT VERSION(), CURRENT_TIMESTAMP;'));
-
-$query = '
-SELECT COUNT(*)
- FROM '.IMAGES_TABLE.'
-;';
-list($nb_elements) = mysql_fetch_row(pwg_query($query));
-
-$query = '
-SELECT COUNT(*)
- FROM '.CATEGORIES_TABLE.'
-;';
-list($nb_categories) = mysql_fetch_row(pwg_query($query));
-
-$query = '
-SELECT COUNT(*)
- FROM '.CATEGORIES_TABLE.'
- WHERE dir IS NULL
-;';
-list($nb_virtual) = mysql_fetch_row(pwg_query($query));
-
-$query = '
-SELECT COUNT(*)
- FROM '.CATEGORIES_TABLE.'
- WHERE dir IS NOT NULL
-;';
-list($nb_physical) = mysql_fetch_row(pwg_query($query));
-
-$query = '
-SELECT COUNT(*)
- FROM '.IMAGE_CATEGORY_TABLE.'
-;';
-list($nb_image_category) = mysql_fetch_row(pwg_query($query));
-
-$query = '
-SELECT COUNT(*)
- FROM '.TAGS_TABLE.'
-;';
-list($nb_tags) = mysql_fetch_row(pwg_query($query));
-
-$query = '
-SELECT COUNT(*)
- FROM '.IMAGE_TAG_TABLE.'
-;';
-list($nb_image_tag) = mysql_fetch_row(pwg_query($query));
-
-$query = '
-SELECT COUNT(*)
- FROM '.USERS_TABLE.'
-;';
-list($nb_users) = mysql_fetch_row(pwg_query($query));
-
-$query = '
-SELECT COUNT(*)
- FROM '.GROUPS_TABLE.'
-;';
-list($nb_groups) = mysql_fetch_row(pwg_query($query));
-
-$query = '
-SELECT COUNT(*)
- FROM '.COMMENTS_TABLE.'
-;';
-list($nb_comments) = mysql_fetch_row(pwg_query($query));
-
-$template->assign(
- array(
- 'PWG_VERSION' => PHPWG_VERSION,
- 'OS' => PHP_OS,
- 'PHP_VERSION' => phpversion(),
- 'MYSQL_VERSION' => $mysql_version,
- 'DB_ELEMENTS' => l10n_dec('%d element', '%d elements', $nb_elements),
- 'DB_CATEGORIES' =>
- l10n_dec('cat_inclu_part1_S', 'cat_inclu_part1_P',
- $nb_categories).
- l10n_dec('cat_inclu_part2_S', 'cat_inclu_part2_P',
- $nb_physical).
- l10n_dec('cat_inclu_part3_S', 'cat_inclu_part3_P',
- $nb_virtual),
- 'DB_IMAGE_CATEGORY' => l10n_dec('%d association', '%d associations', $nb_image_category),
- 'DB_TAGS' => l10n_dec('%d tag', '%d tags', $nb_tags),
- 'DB_IMAGE_TAG' => l10n_dec('%d association', '%d associations', $nb_image_tag),
- 'DB_USERS' => l10n_dec('%d user', '%d users', $nb_users),
- 'DB_GROUPS' => l10n_dec('%d group', '%d groups', $nb_groups),
- 'DB_COMMENTS' => l10n_dec('%d comment', '%d comments', $nb_comments),
- 'U_CHECK_UPGRADE' => PHPWG_ROOT_PATH.'admin.php?action=check_upgrade',
- 'U_PHPINFO' => PHPWG_ROOT_PATH.'admin.php?action=phpinfo',
- 'PHP_DATATIME' => $php_current_timestamp,
- 'DB_DATATIME' => $db_current_timestamp,
- )
- );
-
-if ($nb_elements > 0)
-{
- $query = '
-SELECT MIN(date_available)
- FROM '.IMAGES_TABLE.'
-;';
- list($first_date) = mysql_fetch_row(pwg_query($query));
-
- $template->assign(
- 'first_added',
- array(
- 'DB_DATE' =>
- sprintf(
- l10n('first element added on %s'),
- format_date($first_date, 'mysql_datetime')
- )
- )
- );
-}
-
-// waiting elements
-$query = '
-SELECT COUNT(*)
- FROM '.WAITING_TABLE.'
- WHERE validated=\'false\'
-;';
-list($nb_waiting) = mysql_fetch_row(pwg_query($query));
-
-if ($nb_waiting > 0)
-{
- $template->assign(
- 'waiting',
- array(
- 'URL' => PHPWG_ROOT_PATH.'admin.php?page=upload',
- 'INFO' => sprintf(l10n('%d waiting for validation'), $nb_waiting)
- )
- );
-}
-
-// unvalidated comments
-$query = '
-SELECT COUNT(*)
- FROM '.COMMENTS_TABLE.'
- WHERE validated=\'false\'
-;';
-list($nb_comments) = mysql_fetch_row(pwg_query($query));
-
-if ($nb_comments > 0)
-{
- $template->assign(
- 'unvalidated',
- array(
- 'URL' => PHPWG_ROOT_PATH.'admin.php?page=comments',
- 'INFO' => sprintf(l10n('%d waiting for validation'), $nb_comments)
- )
- );
-}
-
-// +-----------------------------------------------------------------------+
-// | sending html code |
-// +-----------------------------------------------------------------------+
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'intro');
-
-// Check integrity
-$c13y = new check_integrity();
-// add internal checks
-new c13y_internal();
-// check and display
-$c13y->check();
-$c13y->display();
-
-?>
diff --git a/BSF/admin/maintenance.php b/BSF/admin/maintenance.php
deleted file mode 100644
index 69268cf2c..000000000
--- a/BSF/admin/maintenance.php
+++ /dev/null
@@ -1,142 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die ("Hacking attempt!");
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | actions |
-// +-----------------------------------------------------------------------+
-
-$action = (isset($_GET['action']) and !is_adviser()) ? $_GET['action'] : '';
-
-switch ($action)
-{
- case 'categories' :
- {
- update_uppercats();
- update_category('all');
- update_global_rank();
- invalidate_user_cache();
- break;
- }
- case 'images' :
- {
- update_path();
- update_average_rate();
- break;
- }
- case 'history_detail' :
- {
- $query = '
-DELETE
- FROM '.HISTORY_TABLE.'
-;';
- pwg_query($query);
- break;
- }
- case 'history_summary' :
- {
- $query = '
-DELETE
- FROM '.HISTORY_SUMMARY_TABLE.'
-;';
- pwg_query($query);
- break;
- }
- case 'sessions' :
- {
- pwg_session_gc();
- break;
- }
- case 'feeds' :
- {
- $query = '
-DELETE
- FROM '.USER_FEED_TABLE.'
- WHERE last_check IS NULL
-;';
- pwg_query($query);
- break;
- }
- case 'database' :
- {
- do_maintenance_all_tables();
- break;
- }
- case 'c13y' :
- {
- include_once(PHPWG_ROOT_PATH.'admin/include/check_integrity.class.php');
- $c13y = new check_integrity();
- $c13y->maintenance();
- break;
- }
- case 'compiled-templates' :
- {
- $template->delete_compiled_templates();
- break;
- }
- default :
- {
- break;
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | template init |
-// +-----------------------------------------------------------------------+
-
-$template->set_filenames(array('maintenance'=>'admin/maintenance.tpl'));
-
-$start_url = get_root_url().'admin.php?page=maintenance&amp;action=';
-
-$template->assign(
- array(
- 'U_MAINT_CATEGORIES' => $start_url.'categories',
- 'U_MAINT_IMAGES' => $start_url.'images',
- 'U_MAINT_HISTORY_DETAIL' => $start_url.'history_detail',
- 'U_MAINT_HISTORY_SUMMARY' => $start_url.'history_summary',
- 'U_MAINT_SESSIONS' => $start_url.'sessions',
- 'U_MAINT_FEEDS' => $start_url.'feeds',
- 'U_MAINT_DATABASE' => $start_url.'database',
- 'U_MAINT_C13Y' => $start_url.'c13y',
- 'U_MAINT_COMPILED_TEMPLATES' => $start_url.'compiled-templates',
- 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=maintenance',
- )
- );
-
-// +-----------------------------------------------------------------------+
-// | sending html code |
-// +-----------------------------------------------------------------------+
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'maintenance');
-?> \ No newline at end of file
diff --git a/BSF/admin/notification_by_mail.php b/BSF/admin/notification_by_mail.php
deleted file mode 100644
index fc0a2d637..000000000
--- a/BSF/admin/notification_by_mail.php
+++ /dev/null
@@ -1,738 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// +-----------------------------------------------------------------------+
-// | include |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die ("Hacking attempt!");
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/functions_notification_by_mail.inc.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
-include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
-include_once(PHPWG_ROOT_PATH.'include/functions_notification.inc.php');
-include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | Initialization |
-// +-----------------------------------------------------------------------+
-$base_url = get_root_url().'admin.php';
-$must_repost = false;
-
-// +-----------------------------------------------------------------------+
-// | functions |
-// +-----------------------------------------------------------------------+
-
-/*
- * Do timeout treatment in order to finish to send mails
- *
- * @param $post_keyname: key of check_key post array
- * @param check_key_treated: array of check_key treated
- * @return none
- */
-function do_timeout_treatment($post_keyname, $check_key_treated = array())
-{
- global $env_nbm, $base_url, $page, $must_repost;
-
- if ($env_nbm['is_sendmail_timeout'])
- {
- if (isset($_POST[$post_keyname]))
- {
- $post_count = count($_POST[$post_keyname]);
- $treated_count = count($check_key_treated);
- if ($treated_count != 0)
- {
- $time_refresh = ceil((get_moment() - $env_nbm['start_time']) * $post_count / $treated_count);
- }
- else
- {
- $time_refresh = 0;
- }
- $_POST[$post_keyname] = array_diff($_POST[$post_keyname], $check_key_treated);
-
- $must_repost = true;
- array_push($page['errors'],
- l10n_dec('nbm_background_treatment_redirect_second',
- 'nbm_background_treatment_redirect_seconds',
- $time_refresh));
- }
- }
-
-}
-
-/*
- * Get the authorized_status for each tab
- * return corresponding status
- */
-function get_tab_status($mode)
-{
- $result = ACCESS_WEBMASTER;
- switch ($mode)
- {
- case 'param':
- case 'subscribe':
- $result = ACCESS_WEBMASTER;
- break;
- case 'send':
- $result = ACCESS_ADMINISTRATOR;
- break;
- default:
- $result = ACCESS_WEBMASTER;
- break;
- }
- return $result;
-}
-
-/*
- * Inserting News users
- */
-function insert_new_data_user_mail_notification()
-{
- global $conf, $page, $env_nbm;
-
- // Set null mail_address empty
- $query = '
-update
- '.USERS_TABLE.'
-set
- '.$conf['user_fields']['email'].' = null
-where
- trim('.$conf['user_fields']['email'].') = \'\';';
- pwg_query($query);
-
- // null mail_address are not selected in the list
- $query = '
-select
- u.'.$conf['user_fields']['id'].' as user_id,
- u.'.$conf['user_fields']['username'].' as username,
- u.'.$conf['user_fields']['email'].' as mail_address
-from
- '.USERS_TABLE.' as u left join '.USER_MAIL_NOTIFICATION_TABLE.' as m on u.'.$conf['user_fields']['id'].' = m.user_id
-where
- u.'.$conf['user_fields']['email'].' is not null and
- m.user_id is null
-order by
- user_id;';
-
- $result = pwg_query($query);
-
- if (mysql_num_rows($result) > 0)
- {
- $inserts = array();
- $check_key_list = array();
-
- while ($nbm_user = mysql_fetch_array($result))
- {
- // Calculate key
- $nbm_user['check_key'] = find_available_check_key();
-
- // Save key
- array_push($check_key_list, $nbm_user['check_key']);
-
- // Insert new nbm_users
- array_push
- (
- $inserts,
- array
- (
- 'user_id' => $nbm_user['user_id'],
- 'check_key' => $nbm_user['check_key'],
- 'enabled' => 'false' // By default if false, set to true with specific functions
- )
- );
-
- array_push
- (
- $page['infos'],
- sprintf(
- l10n('nbm_user_x_added'),
- $nbm_user['username'],
- get_email_address_as_display_text($nbm_user['mail_address'])
- )
- );
- }
-
- // Insert new nbm_users
- mass_inserts(USER_MAIL_NOTIFICATION_TABLE, array('user_id', 'check_key', 'enabled'), $inserts);
- // Update field enabled with specific function
- $check_key_treated = do_subscribe_unsubscribe_notification_by_mail
- (
- true,
- $conf['nbm_default_value_user_enabled'],
- $check_key_list
- );
-
- // On timeout simulate like tabsheet send
- if ($env_nbm['is_sendmail_timeout'])
- {
- $quoted_check_key_list = quote_check_key_list(array_diff($check_key_list, $check_key_treated));
- if (count($quoted_check_key_list) != 0 )
- {
- $query = 'delete from '.USER_MAIL_NOTIFICATION_TABLE.' where check_key in ('.implode(",", $quoted_check_key_list).');';
- $result = pwg_query($query);
-
- redirect($base_url.get_query_string_diff(array(), false), l10n('nbm_redirect_msg'));
- }
- }
- }
-}
-
-/*
- * Apply global functions to mail content
- * return customize mail content rendered
- */
-function render_global_customize_mail_content($customize_mail_content)
-{
- global $conf;
-
- if ($conf['nbm_send_html_mail'] and !(strpos($customize_mail_content, '<') === 0))
- {
- // On HTML mail, detects if the content are HTML format.
- // If it's plain text format, convert content to readable HTML
- return nl2br(htmlspecialchars($customize_mail_content));
- }
- else
- {
- return $customize_mail_content;
- }
-}
-
-/*
- * Send mail for notification to all users
- * Return list of "selected" users for 'list_to_send'
- * Return list of "treated" check_key for 'send'
- */
-function do_action_send_mail_notification($action = 'list_to_send', $check_key_list = array(), $customize_mail_content = '')
-{
- global $conf, $page, $user, $lang_info, $lang, $env_nbm;
- $return_list = array();
-
- if (in_array($action, array('list_to_send', 'send')))
- {
- list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
-
- $is_action_send = ($action == 'send');
-
- // disabled and null mail_address are not selected in the list
- $data_users = get_user_notifications('send', $check_key_list);
-
- // List all if it's define on options or on timeout
- $is_list_all_without_test = ($env_nbm['is_sendmail_timeout'] or $conf['nbm_list_all_enabled_users_to_send']);
-
- // Check if exist news to list user or send mails
- if ((!$is_list_all_without_test) or ($is_action_send))
- {
- if (count($data_users) > 0)
- {
- $datas = array();
-
- if (!isset($customize_mail_content))
- {
- $customize_mail_content = $conf['nbm_complementary_mail_content'];
- }
-
- $customize_mail_content =
- trigger_event('nbm_render_global_customize_mail_content', $customize_mail_content);
-
-
- // Prepare message after change language
- if ($is_action_send)
- {
- $msg_break_timeout = l10n('nbm_break_timeout_send_mail');
- }
- else
- {
- $msg_break_timeout = l10n('nbm_break_timeout_list_user');
- }
-
- // Begin nbm users environment
- begin_users_env_nbm($is_action_send);
-
- foreach ($data_users as $nbm_user)
- {
- if ((!$is_action_send) and check_sendmail_timeout())
- {
- // Stop fill list on 'list_to_send', if the quota is override
- array_push($page['infos'], $msg_break_timeout);
- break;
- }
- if (($is_action_send) and check_sendmail_timeout())
- {
- // Stop fill list on 'send', if the quota is override
- array_push($page['errors'], $msg_break_timeout);
- break;
- }
-
- // set env nbm user
- set_user_on_env_nbm($nbm_user, $is_action_send);
-
- if ($is_action_send)
- {
- set_make_full_url();
- // Fill return list of "treated" check_key for 'send'
- array_push($return_list, $nbm_user['check_key']);
-
- if ($conf['nbm_send_detailed_content'])
- {
- $news = news($nbm_user['last_send'], $dbnow, false, $conf['nbm_send_html_mail']);
- $exist_data = count($news) > 0;
- }
- else
- {
- $exist_data = news_exists($nbm_user['last_send'], $dbnow);
- }
-
- if ($exist_data)
- {
- $subject = '['.$conf['gallery_title'].']: '.l10n('nbm_object_news');
-
- // Assign current var for nbm mail
- assign_vars_nbm_mail_content($nbm_user);
-
- if (!is_null($nbm_user['last_send']))
- {
- $env_nbm['mail_template']->assign
- (
- 'content_new_elements_between',
- array
- (
- 'DATE_BETWEEN_1' => $nbm_user['last_send'],
- 'DATE_BETWEEN_2' => $dbnow,
- )
- );
- }
- else
- {
- $env_nbm['mail_template']->assign
- (
- 'content_new_elements_single',
- array
- (
- 'DATE_SINGLE' => $dbnow,
- )
- );
- }
-
- if ($conf['nbm_send_detailed_content'])
- {
- $env_nbm['mail_template']->assign('global_new_lines', $news);
- }
-
- $nbm_user_customize_mail_content =
- trigger_event('nbm_render_user_customize_mail_content',
- $customize_mail_content, $nbm_user);
- if (!empty($nbm_user_customize_mail_content))
- {
- $env_nbm['mail_template']->assign
- (
- 'custom_mail_content', $nbm_user_customize_mail_content
- );
- }
-
- if ($conf['nbm_send_html_mail'] and $conf['nbm_send_recent_post_dates'])
- {
- $recent_post_dates = get_recent_post_dates_array(
- $conf['recent_post_dates']['NBM']);
- foreach ($recent_post_dates as $date_detail)
- {
- $env_nbm['mail_template']->append
- (
- 'recent_posts',
- array
- (
- 'TITLE' => get_title_recent_post_date($date_detail),
- 'HTML_DATA' => get_html_description_recent_post_date($date_detail)
- )
- );
- }
- }
-
- $env_nbm['mail_template']->assign
- (
- array
- (
- 'GOTO_GALLERY_TITLE' => $conf['gallery_title'],
- 'GOTO_GALLERY_URL' => $conf['gallery_url'],
- 'SEND_AS_NAME' => $env_nbm['send_as_name'],
- )
- );
-
- if (pwg_mail
- (
- format_email($nbm_user['username'], $nbm_user['mail_address']),
- array
- (
- 'from' => $env_nbm['send_as_mail_formated'],
- 'subject' => $subject,
- 'email_format' => $env_nbm['email_format'],
- 'content' => $env_nbm['mail_template']->parse('notification_by_mail', true),
- 'content_format' => $env_nbm['email_format'],
- 'template' => $nbm_user['template'],
- 'theme' => $nbm_user['theme']
- )
- ))
- {
- inc_mail_sent_success($nbm_user);
-
- $data = array('user_id' => $nbm_user['user_id'],
- 'last_send' => $dbnow);
- array_push($datas, $data);
- }
- else
- {
- inc_mail_sent_failed($nbm_user);
- }
-
- unset_make_full_url();
- }
- }
- else
- {
- if (news_exists($nbm_user['last_send'], $dbnow))
- {
- // Fill return list of "selected" users for 'list_to_send'
- array_push($return_list, $nbm_user);
- }
- }
-
- // unset env nbm user
- unset_user_on_env_nbm();
- }
-
- // Restore nbm environment
- end_users_env_nbm();
-
- if ($is_action_send)
- {
- mass_updates(
- USER_MAIL_NOTIFICATION_TABLE,
- array(
- 'primary' => array('user_id'),
- 'update' => array('last_send')
- ),
- $datas
- );
-
- display_counter_info();
- }
- }
- else
- {
- if ($is_action_send)
- {
- array_push($page['errors'], l10n('nbm_no_user_to send_notifications_by_mail'));
- }
- }
- }
- else
- {
- // Quick List, don't check news
- // Fill return list of "selected" users for 'list_to_send'
- $return_list = $data_users;
- }
- }
-
- // Return list of "selected" users for 'list_to_send'
- // Return list of "treated" check_key for 'send'
- return $return_list;
-}
-
-// +-----------------------------------------------------------------------+
-// | Main |
-// +-----------------------------------------------------------------------+
-if (!isset($_GET['mode']))
-{
- $page['mode'] = 'send';
-}
-else
-{
- $page['mode'] = $_GET['mode'];
-}
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(get_tab_status($page['mode']));
-
-
-// +-----------------------------------------------------------------------+
-// | Add event handler |
-// +-----------------------------------------------------------------------+
-add_event_handler('nbm_render_global_customize_mail_content', 'render_global_customize_mail_content');
-trigger_action('nbm_event_handler_added');
-
-
-// +-----------------------------------------------------------------------+
-// | Insert new users with mails |
-// +-----------------------------------------------------------------------+
-if (!isset($_POST) or (count($_POST) ==0))
-{
- // No insert data in post mode
- insert_new_data_user_mail_notification();
-}
-
-// +-----------------------------------------------------------------------+
-// | Treatment of tab post |
-// +-----------------------------------------------------------------------+
-switch ($page['mode'])
-{
- case 'param' :
- {
- if (isset($_POST['param_submit']) and !is_adviser())
- {
- $updated_param_count = 0;
- // Update param
- $result = pwg_query('select param, value from '.CONFIG_TABLE.' where param like \'nbm\\_%\'');
- while ($nbm_user = mysql_fetch_array($result))
- {
- if (isset($_POST[$nbm_user['param']]))
- {
- $value = $_POST[$nbm_user['param']];
-
- $query = '
-update
-'.CONFIG_TABLE.'
-set
- value = \''. str_replace("\'", "''", $value).'\'
-where
- param = \''.$nbm_user['param'].'\';';
- pwg_query($query);
- $updated_param_count += 1;
- }
- }
-
- array_push($page['infos'],
- l10n_dec('nbm_updated_param_count', 'nbm_updated_params_count',
- $updated_param_count));
-
- // Reload conf with new values
- load_conf_from_db('param like \'nbm\\_%\'');
- }
- }
- case 'subscribe' :
- {
- if (!is_adviser())
- {
- if (isset($_POST['falsify']) and isset($_POST['cat_true']))
- {
- $check_key_treated = unsubscribe_notification_by_mail(true, $_POST['cat_true']);
- do_timeout_treatment('cat_true', $check_key_treated);
- }
- else
- if (isset($_POST['trueify']) and isset($_POST['cat_false']))
- {
- $check_key_treated = subscribe_notification_by_mail(true, $_POST['cat_false']);
- do_timeout_treatment('cat_false', $check_key_treated);
- }
- }
- break;
- }
-
- case 'send' :
- {
- if (isset($_POST['send_submit']) and isset($_POST['send_selection']) and isset($_POST['send_customize_mail_content']) and !is_adviser())
- {
- $check_key_treated = do_action_send_mail_notification('send', $_POST['send_selection'], stripslashes($_POST['send_customize_mail_content']));
- do_timeout_treatment('send_selection', $check_key_treated);
- }
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | template initialization |
-// +-----------------------------------------------------------------------+
-$template->set_filenames
-(
- array
- (
- 'double_select' => 'admin/double_select.tpl',
- 'notification_by_mail'=>'admin/notification_by_mail.tpl'
- )
-);
-
-$template->assign
-(
- array
- (
- 'U_HELP' => add_url_params(get_root_url().'popuphelp.php', array('page' => 'notification_by_mail')),
- 'F_ACTION'=> $base_url.get_query_string_diff(array())
- )
-);
-
-if (is_autorize_status(ACCESS_WEBMASTER))
-{
- // TabSheet
- $tabsheet = new tabsheet();
- // TabSheet initialization
- $tabsheet->add('param', l10n('nbm_param_mode'),
- add_url_params($base_url.get_query_string_diff(array('mode', 'select')),
- array('mode' => 'param')));
- $tabsheet->add('subscribe', l10n('nbm_subscribe_mode'),
- add_url_params($base_url.get_query_string_diff(array('mode', 'select')),
- array('mode' => 'subscribe')));
- $tabsheet->add('send', l10n('nbm_send_mode'),
- add_url_params($base_url.get_query_string_diff(array('mode', 'select')),
- array('mode' => 'send')));
- // TabSheet selection
- $tabsheet->select($page['mode']);
- // Assign tabsheet to template
- $tabsheet->assign();
-}
-
-if ($must_repost)
-{
- // Get name of submit button
- $repost_submit_name = '';
- if (isset($_POST['falsify']))
- {
- $repost_submit_name = 'falsify';
- }
- elseif (isset($_POST['trueify']))
- {
- $repost_submit_name = 'trueify';
- }
- elseif (isset($_POST['send_submit']))
- {
- $repost_submit_name = 'send_submit';
- }
-
- $template->assign('REPOST_SUBMIT_NAME', $repost_submit_name);
-}
-
-switch ($page['mode'])
-{
- case 'param' :
- {
- $template->assign(
- $page['mode'],
- array(
- 'SEND_HTML_MAIL' => $conf['nbm_send_html_mail'],
- 'SEND_MAIL_AS' => $conf['nbm_send_mail_as'],
- 'SEND_DETAILED_CONTENT' => $conf['nbm_send_detailed_content'],
- 'COMPLEMENTARY_MAIL_CONTENT' => $conf['nbm_complementary_mail_content'],
- 'SEND_RECENT_POST_DATES' => $conf['nbm_send_recent_post_dates'],
- ));
- break;
- }
-
- case 'subscribe' :
- {
- $template->assign( $page['mode'], true );
-
- $template->assign(
- array(
- 'L_CAT_OPTIONS_TRUE' => l10n('nbm_subscribe_col'),
- 'L_CAT_OPTIONS_FALSE' => l10n('nbm_unsubscribe_col')
- )
- );
-
- $data_users = get_user_notifications('subscribe');
-
- $opt_true = array();
- $opt_true_selected = array();
- $opt_false = array();
- $opt_false_selected = array();
- foreach ($data_users as $nbm_user)
- {
- if (get_boolean($nbm_user['enabled']))
- {
- $opt_true[ $nbm_user['check_key'] ] = $nbm_user['username'].'['.get_email_address_as_display_text($nbm_user['mail_address']).']';
- if ((isset($_POST['falsify']) and isset($_POST['cat_true']) and in_array($nbm_user['check_key'], $_POST['cat_true'])))
- {
- $opt_true_selected[] = $nbm_user['check_key'];
- }
- }
- else
- {
- $opt_false[ $nbm_user['check_key'] ] = $nbm_user['username'].'['.get_email_address_as_display_text($nbm_user['mail_address']).']';
- if (isset($_POST['trueify']) and isset($_POST['cat_false']) and in_array($nbm_user['check_key'], $_POST['cat_false']))
- {
- $opt_false_selected[] = $nbm_user['check_key'];
- }
- }
- }
- $template->assign( array(
- 'category_option_true' => $opt_true,
- 'category_option_true_selected' => $opt_true_selected,
- 'category_option_false' => $opt_false,
- 'category_option_false_selected' => $opt_false_selected,
- )
- );
- $template->assign_var_from_handle('DOUBLE_SELECT', 'double_select');
- break;
- }
-
- case 'send' :
- {
- $tpl_var = array('users'=> array() );
-
- $data_users = do_action_send_mail_notification('list_to_send');
-
- $tpl_var['CUSTOMIZE_MAIL_CONTENT'] =
- isset($_POST['send_customize_mail_content'])
- ? stripslashes($_POST['send_customize_mail_content'])
- : $conf['nbm_complementary_mail_content'];
-
- if (count($data_users))
- {
- foreach ($data_users as $nbm_user)
- {
- if (
- (!$must_repost) or // Not timeout, normal treatment
- (($must_repost) and in_array($nbm_user['check_key'], $_POST['send_selection'])) // Must be repost, show only user to send
- )
- {
- $tpl_var['users'][] =
- array(
- 'ID' => $nbm_user['check_key'],
- 'CHECKED' => ( // not check if not selected, on init select<all
- isset($_POST['send_selection']) and // not init
- !in_array($nbm_user['check_key'], $_POST['send_selection']) // not selected
- ) ? '' : 'checked="checked"',
- 'USERNAME'=> $nbm_user['username'],
- 'EMAIL' => get_email_address_as_display_text($nbm_user['mail_address']),
- 'LAST_SEND'=> $nbm_user['last_send']
- );
- }
- }
- }
- $template->assign($page['mode'], $tpl_var);
- break;
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | Sending html code |
-// +-----------------------------------------------------------------------+
-$template->assign_var_from_handle('ADMIN_CONTENT', 'notification_by_mail');
-
-?> \ No newline at end of file
diff --git a/BSF/admin/permalinks.php b/BSF/admin/permalinks.php
deleted file mode 100644
index ecae18965..000000000
--- a/BSF/admin/permalinks.php
+++ /dev/null
@@ -1,179 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-function parse_sort_variables(
- $sortable_by, $default_field,
- $get_param, $get_rejects,
- $template_var,
- $anchor = '' )
-{
- global $template;
-
- $url_components = parse_url( $_SERVER['REQUEST_URI'] );
-
- $base_url = $url_components['path'];
-
- parse_str($url_components['query'], $vars);
- $is_first = true;
- foreach ($vars as $key => $value)
- {
- if (!in_array($key, $get_rejects) and $key!=$get_param)
- {
- $base_url .= $is_first ? '?' : '&amp;';
- $is_first = false;
- $base_url .= $key.'='.urlencode($value);
- }
- }
-
- $ret = array();
- foreach( $sortable_by as $field)
- {
- $url = $base_url;
- $disp = '&dArr;'; // TODO: an small image is better
-
- if ( $field !== @$_GET[$get_param] )
- {
- if ( !isset($default_field) or $default_field!=$field )
- { // the first should be the default
- $url = add_url_params($url, array($get_param=>$field) );
- }
- elseif (isset($default_field) and !isset($_GET[$get_param]) )
- {
- array_push($ret, $field);
- $disp = '<em>'.$disp.'</em>';
- }
- }
- else
- {
- array_push($ret, $field);
- $disp = '<em>'.$disp.'</em>';
- }
- if ( isset($template_var) )
- {
- $template->assign( $template_var.strtoupper($field),
- '<a href="'.$url.$anchor.'" title="'.l10n('Sort order').'">'.$disp.'</a>'
- );
- }
- }
- return $ret;
-}
-
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions_permalinks.php');
-
-$selected_cat = array();
-if ( isset($_POST['set_permalink']) and $_POST['cat_id']>0 and !is_adviser() )
-{
- $permalink = $_POST['permalink'];
- if ( empty($permalink) )
- delete_cat_permalink($_POST['cat_id'], isset($_POST['save']) );
- else
- set_cat_permalink($_POST['cat_id'], $permalink, isset($_POST['save']) );
- $selected_cat = array( $_POST['cat_id'] );
-}
-elseif ( isset($_GET['delete_permanent']) and !is_adviser() )
-{
- $query = '
-DELETE FROM '.OLD_PERMALINKS_TABLE.'
- WHERE permalink="'.$_GET['delete_permanent'].'"
- LIMIT 1';
- pwg_query($query);
- if (mysql_affected_rows()==0)
- array_push($page['errors'], 'Cannot delete the old permalink !');
-}
-
-
-$template->set_filename('permalinks', 'admin/permalinks.tpl' );
-
-$query = '
-SELECT
- id,
- CONCAT(id, " - ", name, IF(permalink IS NULL, "", " &radic;") ) AS name,
- uppercats, global_rank
-FROM '.CATEGORIES_TABLE;
-
-display_select_cat_wrapper( $query, $selected_cat, 'categories', false );
-
-
-// --- generate display of active permalinks -----------------------------------
-$sort_by = parse_sort_variables(
- array('id', 'name', 'permalink'), 'name',
- 'psf',
- array('delete_permanent'),
- 'SORT_' );
-
-$query = '
-SELECT id, permalink, uppercats, global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE permalink IS NOT NULL
-';
-if ( $sort_by[0]=='id' or $sort_by[0]=='permalink' )
-{
- $query .= ' ORDER BY '.$sort_by[0];
-}
-$categories=array();
-$result=pwg_query($query);
-while ( $row=mysql_fetch_assoc($result) )
-{
- $row['name'] = get_cat_display_name_cache( $row['uppercats'] );
- $categories[] = $row;
-}
-
-if ( $sort_by[0]=='name')
-{
- usort($categories, 'global_rank_compare');
-}
-$template->assign( 'permalinks', $categories );
-
-// --- generate display of old permalinks --------------------------------------
-
-$sort_by = parse_sort_variables(
- array('cat_id','permalink','date_deleted','last_hit','hit'), null,
- 'dpsf',
- array('delete_permanent'),
- 'SORT_OLD_', '#old_permalinks' );
-
-$url_del_base = get_root_url().'admin.php?page=permalinks';
-$query = 'SELECT * FROM '.OLD_PERMALINKS_TABLE;
-if ( count($sort_by) )
-{
- $query .= ' ORDER BY '.$sort_by[0];
-}
-$result = pwg_query($query);
-$deleted_permalinks=array();
-while ( $row=mysql_fetch_assoc($result) )
-{
- $row['name'] = get_cat_display_name_cache($row['cat_id']);
- $row['U_DELETE'] =
- add_url_params(
- $url_del_base,
- array( 'delete_permanent'=> $row['permalink'] )
- );
- $deleted_permalinks[] = $row;
-}
-$template->assign('deleted_permalinks', $deleted_permalinks);
-$template->assign('U_HELP', get_root_url().'popuphelp.php?page=permalinks');
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'permalinks');
-?>
diff --git a/BSF/admin/picture_modify.php b/BSF/admin/picture_modify.php
deleted file mode 100644
index 2fbaf901b..000000000
--- a/BSF/admin/picture_modify.php
+++ /dev/null
@@ -1,437 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if(!defined("PHPWG_ROOT_PATH"))
-{
- die('Hacking attempt!');
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | synchronize metadata |
-// +-----------------------------------------------------------------------+
-
-if (isset($_GET['sync_metadata']) and !is_adviser())
-{
- $query = '
-SELECT path
- FROM '.IMAGES_TABLE.'
- WHERE id = '.$_GET['image_id'].'
-;';
- list($path) = mysql_fetch_row(pwg_query($query));
- update_metadata(array($_GET['image_id'] => $path));
-
- array_push($page['infos'], l10n('Metadata synchronized from file'));
-}
-
-//--------------------------------------------------------- update informations
-
-// first, we verify whether there is a mistake on the given creation date
-if (isset($_POST['date_creation_action'])
- and 'set' == $_POST['date_creation_action'])
-{
- if (!checkdate(
- $_POST['date_creation_month'],
- $_POST['date_creation_day'],
- $_POST['date_creation_year'])
- )
- {
- array_push($page['errors'], l10n('err_date'));
- }
-}
-
-if (isset($_POST['submit']) and count($page['errors']) == 0 and !is_adviser())
-{
- $data = array();
- $data{'id'} = $_GET['image_id'];
- $data{'name'} = $_POST['name'];
- $data{'author'} = $_POST['author'];
- $data['level'] = $_POST['level'];
-
- if ($conf['allow_html_descriptions'])
- {
- $data{'comment'} = @$_POST['description'];
- }
- else
- {
- $data{'comment'} = strip_tags(@$_POST['description']);
- }
-
- if (isset($_POST['date_creation_action']))
- {
- if ('set' == $_POST['date_creation_action'])
- {
- $data{'date_creation'} = $_POST['date_creation_year']
- .'-'.$_POST['date_creation_month']
- .'-'.$_POST['date_creation_day'];
- }
- else if ('unset' == $_POST['date_creation_action'])
- {
- $data{'date_creation'} = '';
- }
- }
-
- mass_updates(
- IMAGES_TABLE,
- array(
- 'primary' => array('id'),
- 'update' => array_diff(array_keys($data), array('id'))
- ),
- array($data)
- );
-
- set_tags(
- isset($_POST['tags']) ? $_POST['tags'] : array(),
- $_GET['image_id']
- );
-
- array_push($page['infos'], l10n('Picture informations updated'));
-}
-// associate the element to other categories than its storage category
-if (isset($_POST['associate'])
- and isset($_POST['cat_dissociated'])
- and count($_POST['cat_dissociated']) > 0
- and !is_adviser()
- )
-{
- associate_images_to_categories(
- array($_GET['image_id']),
- $_POST['cat_dissociated']
- );
-}
-// dissociate the element from categories (but not from its storage category)
-if (isset($_POST['dissociate'])
- and isset($_POST['cat_associated'])
- and count($_POST['cat_associated']) > 0
- and !is_adviser()
- )
-{
- $query = '
-DELETE FROM '.IMAGE_CATEGORY_TABLE.'
- WHERE image_id = '.$_GET['image_id'].'
- AND category_id IN ('.implode(',', $_POST['cat_associated']).')
-';
- pwg_query($query);
-
- update_category($_POST['cat_associated']);
-}
-// elect the element to represent the given categories
-if (isset($_POST['elect'])
- and isset($_POST['cat_dismissed'])
- and count($_POST['cat_dismissed']) > 0
- and !is_adviser()
- )
-{
- $datas = array();
- foreach ($_POST['cat_dismissed'] as $category_id)
- {
- array_push($datas,
- array('id' => $category_id,
- 'representative_picture_id' => $_GET['image_id']));
- }
- $fields = array('primary' => array('id'),
- 'update' => array('representative_picture_id'));
- mass_updates(CATEGORIES_TABLE, $fields, $datas);
-}
-// dismiss the element as representant of the given categories
-if (isset($_POST['dismiss'])
- and isset($_POST['cat_elected'])
- and count($_POST['cat_elected']) > 0
- and !is_adviser()
- )
-{
- set_random_representant($_POST['cat_elected']);
-}
-
-// retrieving direct information about picture
-$query = '
-SELECT *
- FROM '.IMAGES_TABLE.'
- WHERE id = '.$_GET['image_id'].'
-;';
-$row = mysql_fetch_array(pwg_query($query));
-
-$storage_category_id = $row['storage_category_id'];
-$image_file = $row['file'];
-
-// tags
-$query = '
-SELECT tag_id
- FROM '.IMAGE_TAG_TABLE.'
- WHERE image_id = '.$_GET['image_id'].'
-;';
-$selected_tags = array_from_query($query, 'tag_id');
-
-// +-----------------------------------------------------------------------+
-// | template init |
-// +-----------------------------------------------------------------------+
-
-$template->set_filenames(
- array(
- 'picture_modify' => 'admin/picture_modify.tpl'
- )
- );
-
-$all_tags = get_all_tags();
-
-if (count($all_tags) > 0)
-{
- $tag_selection = get_html_tag_selection(
- $all_tags,
- 'tags',
- $selected_tags
- );
-}
-else
-{
- $tag_selection =
- '<p>'.
- l10n('No tag defined. Use Administration>Pictures>Tags').
- '</p>';
-}
-
-$template->assign(
- array(
- 'U_SYNC' =>
- get_root_url().'admin.php?page=picture_modify'.
- '&amp;image_id='.$_GET['image_id'].
- (isset($_GET['cat_id']) ? '&amp;cat_id='.$_GET['cat_id'] : '').
- '&amp;sync_metadata=1',
-
- 'PATH'=>$row['path'],
-
- 'TN_SRC' => get_thumbnail_url($row),
-
- 'NAME' =>
- isset($_POST['name']) ?
- stripslashes($_POST['name']) : @$row['name'],
-
- 'DIMENSIONS' => @$row['width'].' * '.@$row['height'],
-
- 'FILESIZE' => @$row['filesize'].' KB',
-
- 'REGISTRATION_DATE' =>
- format_date($row['date_available'], 'mysql_datetime', false),
-
- 'AUTHOR' => isset($_POST['author']) ? $_POST['author'] : @$row['author'],
-
- 'TAG_SELECTION' => $tag_selection,
-
- 'DESCRIPTION' =>
- htmlspecialchars( isset($_POST['description']) ?
- stripslashes($_POST['description']) : @$row['comment'] ),
-
- 'F_ACTION' =>
- get_root_url().'admin.php'
- .get_query_string_diff(array('sync_metadata'))
- )
- );
-
-if ($row['has_high'] == 'true')
-{
- $template->assign(
- 'HIGH_FILESIZE',
- isset($row['high_filesize'])
- ? $row['high_filesize'].' KB'
- : l10n('unknown')
- );
-}
-
-// image level options
-$tpl_options = array();
-foreach ($conf['available_permission_levels'] as $level)
-{
- $tpl_options[$level] = l10n( sprintf('Level %d', $level) ).' ('.$level.')';
-}
-$selected_level = isset($_POST['level']) ? $_POST['level'] : $row['level'];
-$template->assign(
- array(
- 'level_options'=> $tpl_options,
- 'level_options_selected' => array($selected_level)
- )
- );
-
-// creation date
-unset($day, $month, $year);
-
-if (isset($_POST['date_creation_action'])
- and 'set' == $_POST['date_creation_action'])
-{
- foreach (array('day', 'month', 'year') as $varname)
- {
- $$varname = $_POST['date_creation_'.$varname];
- }
-}
-else if (isset($row['date_creation']) and !empty($row['date_creation']))
-{
- list($year, $month, $day) = explode('-', $row['date_creation']);
-}
-else
-{
- list($year, $month, $day) = array('', 0, 0);
-}
-
-
-$month_list = $lang['month'];
-$month_list[0]='------------';
-ksort($month_list);
-
-$template->assign(
- array(
- 'DATE_CREATION_DAY_VALUE' => $day,
- 'DATE_CREATION_MONTH_VALUE' => $month,
- 'DATE_CREATION_YEAR_VALUE' => $year,
- 'month_list' => $month_list,
- )
- );
-
-$query = '
-SELECT category_id, uppercats
- FROM '.IMAGE_CATEGORY_TABLE.' AS ic
- INNER JOIN '.CATEGORIES_TABLE.' AS c
- ON c.id = ic.category_id
- WHERE image_id = '.$_GET['image_id'].'
-;';
-$result = pwg_query($query);
-
-while ($row = mysql_fetch_array($result))
-{
- $name =
- get_cat_display_name_cache(
- $row['uppercats'],
- get_root_url().'admin.php?page=cat_modify&amp;cat_id=',
- false
- );
-
- if ($row['category_id'] == $storage_category_id)
- {
- $template->assign('STORAGE_CATEGORY', $name);
- }
- else
- {
- $template->append('related_categories', $name);
- }
-}
-
-// jump to link
-//
-// 1. find all linked categories that are reachable for the current user.
-// 2. if a category is available in the URL, use it if reachable
-// 3. if URL category not available or reachable, use the first reachable
-// linked category
-// 4. if no category reachable, no jumpto link
-
-$query = '
-SELECT category_id
- FROM '.IMAGE_CATEGORY_TABLE.'
- WHERE image_id = '.$_GET['image_id'].'
-;';
-
-$authorizeds = array_diff(
- array_from_query($query, 'category_id'),
- explode(
- ',',
- calculate_permissions($user['id'], $user['status'])
- )
- );
-
-if (isset($_GET['cat_id'])
- and in_array($_GET['cat_id'], $authorizeds))
-{
- $url_img = make_picture_url(
- array(
- 'image_id' => $_GET['image_id'],
- 'image_file' => $image_file,
- 'category' => $cache['cat_names'][ $_GET['cat_id'] ],
- )
- );
-}
-else
-{
- foreach ($authorizeds as $category)
- {
- $url_img = make_picture_url(
- array(
- 'image_id' => $_GET['image_id'],
- 'image_file' => $image_file,
- 'category' => $cache['cat_names'][ $category ],
- )
- );
- break;
- }
-}
-
-if (isset($url_img))
-{
- $template->assign( 'U_JUMPTO', $url_img );
-}
-
-// associate to another category ?
-$query = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = category_id
- WHERE image_id = '.$_GET['image_id'].'
- AND id != '.$storage_category_id.'
-;';
-display_select_cat_wrapper($query, array(), 'associated_options');
-
-$result = pwg_query($query);
-$associateds = array($storage_category_id);
-while ($row = mysql_fetch_array($result))
-{
- array_push($associateds, $row['id']);
-}
-$query = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE id NOT IN ('.implode(',', $associateds).')
-;';
-display_select_cat_wrapper($query, array(), 'dissociated_options');
-
-// representing
-$query = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE representative_picture_id = '.$_GET['image_id'].'
-;';
-display_select_cat_wrapper($query, array(), 'elected_options');
-
-$query = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE representative_picture_id != '.$_GET['image_id'].'
- OR representative_picture_id IS NULL
-;';
-display_select_cat_wrapper($query, array(), 'dismissed_options');
-
-//----------------------------------------------------------- sending html code
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'picture_modify');
-?>
diff --git a/BSF/admin/plugin.php b/BSF/admin/plugin.php
deleted file mode 100644
index 3b4055230..000000000
--- a/BSF/admin/plugin.php
+++ /dev/null
@@ -1,62 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if( !defined("PHPWG_ROOT_PATH") )
-{
- die ("Hacking attempt!");
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-check_status(ACCESS_ADMINISTRATOR);
-
-$sections = explode('/', $_GET['section'] );
-for ($i=0; $i<count($sections); $i++)
-{
- if (empty($sections[$i]) or $sections[$i]=='..')
- {
- unset($sections[$i]);
- $i--;
- }
-}
-
-if (count($sections)<2)
-{
- die('Invalid plugin URL');
-}
-
-$plugin_id = $sections[0];
-if ( !isset($pwg_loaded_plugins[$plugin_id]) )
-{
- die('Invalid URL - plugin '.$plugin_id.' not active');
-}
-
-$filename = PHPWG_PLUGINS_PATH.implode('/', $sections);
-if (is_file($filename))
-{
- include_once($filename);
-}
-else
-{
- die('Missing file '.$filename);
-}
-?> \ No newline at end of file
diff --git a/BSF/admin/plugins_list.php b/BSF/admin/plugins_list.php
deleted file mode 100644
index ca8033164..000000000
--- a/BSF/admin/plugins_list.php
+++ /dev/null
@@ -1,154 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if( !defined("PHPWG_ROOT_PATH") )
-{
- die ("Hacking attempt!");
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/plugins.class.php');
-
-$template->set_filenames(array('plugins' => 'admin/plugins_list.tpl'));
-
-$order = isset($_GET['order']) ? $_GET['order'] : 'name';
-$base_url = get_root_url().'admin.php?page='.$page['page'].'&amp;order='.$order;
-
-$plugins = new plugins();
-
-//--------------------------------------------------perform requested actions
-if (isset($_GET['action']) and isset($_GET['plugin']) and !is_adviser())
-{
- $page['errors'] =
- $plugins->perform_action($_GET['action'], $_GET['plugin']);
-
- if (empty($page['errors'])) redirect($base_url);
-}
-
-//--------------------------------------------------------------------Tabsheet
-set_plugins_tabsheet($page['page']);
-
-//---------------------------------------------------------------Order options
-$link = get_root_url().'admin.php?page='.$page['page'].'&amp;order=';
-$template->assign('order_options',
- array(
- $link.'name' => l10n('Name'),
- $link.'status' => l10n('Status'),
- $link.'author' => l10n('Author'),
- $link.'id' => 'Id'));
-$template->assign('order_selected', $link.$order);
-
-// +-----------------------------------------------------------------------+
-// | start template output |
-// +-----------------------------------------------------------------------+
-$plugins->sort_fs_plugins($order);
-
-foreach($plugins->fs_plugins as $plugin_id => $fs_plugin)
-{
- $display_name = $fs_plugin['name'];
- if (!empty($fs_plugin['uri']))
- {
- $display_name = '<a href="' . $fs_plugin['uri']
- . '" onclick="window.open(this.href); return false;">'
- . $display_name . '</a>';
- }
- $desc = $fs_plugin['description'];
- if (!empty($fs_plugin['author']))
- {
- $desc .= ' (<em>';
- if (!empty($fs_plugin['author uri']))
- {
- $desc .= '<a href="' . $fs_plugin['author uri'] . '">'
- . $fs_plugin['author'] . '</a>';
- }
- else
- {
- $desc .= $fs_plugin['author'];
- }
- $desc .= '</em>)';
- }
- $tpl_plugin =
- array('NAME' => $display_name,
- 'VERSION' => $fs_plugin['version'],
- 'DESCRIPTION' => $desc);
-
- $action_url = $base_url.'&amp;plugin='.$plugin_id;
-
- if (isset($plugins->db_plugins_by_id[$plugin_id]))
- {
- $tpl_plugin['STATE'] = $plugins->db_plugins_by_id[$plugin_id]['state'];
- switch ($plugins->db_plugins_by_id[$plugin_id]['state'])
- {
- case 'active':
- $tpl_plugin['actions'][] =
- array('U_ACTION' => $action_url . '&amp;action=deactivate',
- 'L_ACTION' => l10n('Deactivate'));
- break;
-
- case 'inactive':
- $tpl_plugin['actions'][] =
- array('U_ACTION' => $action_url . '&amp;action=activate',
- 'L_ACTION' => l10n('Activate'));
- $tpl_plugin['actions'][] =
- array('U_ACTION' => $action_url . '&amp;action=uninstall',
- 'L_ACTION' => l10n('Uninstall'),
- 'CONFIRM' => l10n('Are you sure?'));
- break;
- }
- }
- else
- {
- $tpl_plugin['actions'][] =
- array('U_ACTION' => $action_url . '&amp;action=install',
- 'L_ACTION' => l10n('Install'),
- 'CONFIRM' => l10n('Are you sure?'));
- $tpl_plugin['actions'][] =
- array('U_ACTION' => $action_url . '&amp;action=delete',
- 'L_ACTION' => l10n('plugins_delete'),
- 'CONFIRM' => l10n('plugins_confirm_delete'));
- }
- $template->append('plugins', $tpl_plugin);
-}
-
-$missing_plugin_ids = array_diff(
- array_keys($plugins->db_plugins_by_id), array_keys($plugins->fs_plugins)
- );
-
-foreach($missing_plugin_ids as $plugin_id)
-{
- $action_url = $base_url.'&amp;plugin='.$plugin_id;
-
- $template->append( 'plugins',
- array(
- 'NAME' => $plugin_id,
- 'VERSION' => $plugins->db_plugins_by_id[$plugin_id]['version'],
- 'DESCRIPTION' => "ERROR: THIS PLUGIN IS MISSING BUT IT IS INSTALLED! UNINSTALL IT NOW !",
- 'actions' => array ( array (
- 'U_ACTION' => $action_url . '&amp;action=uninstall',
- 'L_ACTION' => l10n('Uninstall'),
- ) )
- )
- );
-}
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'plugins');
-?> \ No newline at end of file
diff --git a/BSF/admin/plugins_new.php b/BSF/admin/plugins_new.php
deleted file mode 100644
index 31171b443..000000000
--- a/BSF/admin/plugins_new.php
+++ /dev/null
@@ -1,139 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if( !defined("PHPWG_ROOT_PATH") )
-{
- die ("Hacking attempt!");
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/plugins.class.php');
-
-$template->set_filenames(array('plugins' => 'admin/plugins_new.tpl'));
-
-$order = isset($_GET['order']) ? $_GET['order'] : 'date';
-$base_url = get_root_url().'admin.php?page='.$page['page'].'&order='.$order;
-
-$plugins = new plugins();
-
-//------------------------------------------------------automatic installation
-if (isset($_GET['install']) and isset($_GET['extension']) and !is_adviser())
-{
- $install_status =
- $plugins->extract_plugin_files('install', $_GET['install'], $_GET['extension']);
-
- redirect($base_url.'&installstatus='.$install_status);
-}
-
-//--------------------------------------------------------------install result
-if (isset($_GET['installstatus']))
-{
- switch ($_GET['installstatus'])
- {
- case 'ok':
- array_push($page['infos'],
- l10n('plugins_install_ok'),
- l10n('plugins_install_need_activate'));
- break;
-
- case 'temp_path_error':
- array_push($page['errors'], l10n('plugins_temp_path_error'));
- break;
-
- case 'dl_archive_error':
- array_push($page['errors'], l10n('plugins_dl_archive_error'));
- break;
-
- case 'archive_error':
- array_push($page['errors'], l10n('plugins_archive_error'));
- break;
-
- default:
- array_push($page['errors'],
- sprintf(l10n('plugins_extract_error'), $_GET['installstatus']),
- l10n('plugins_check_chmod'));
- }
-}
-
-//--------------------------------------------------------------------Tabsheet
-set_plugins_tabsheet($page['page']);
-
-//---------------------------------------------------------------Order options
-$link = get_root_url().'admin.php?page='.$page['page'].'&amp;order=';
-$template->assign('order_options',
- array(
- $link.'date' => l10n('Post date'),
- $link.'revision' => l10n('plugins_revisions'),
- $link.'name' => l10n('Name'),
- $link.'author' => l10n('Author')));
-$template->assign('order_selected', $link.$order);
-
-// +-----------------------------------------------------------------------+
-// | start template output |
-// +-----------------------------------------------------------------------+
-$plugins->get_server_plugins(true);
-
-if (is_array($plugins->server_plugins))
-{
- $plugins->sort_server_plugins($order);
-
- foreach($plugins->server_plugins as $plugin)
- {
- $ext_desc = nl2br(htmlspecialchars(strip_tags(
- utf8_encode($plugin['ext_description']))));
-
- $ver_desc = sprintf(l10n('plugins_description'),
- $plugin['version'],
- date('Y-m-d', $plugin['date']),
- nl2br(htmlspecialchars(strip_tags(
- utf8_encode($plugin['description'])))));
-
- $url_auto_install = htmlentities($base_url)
- . '&amp;extension=' . $plugin['id_extension']
- . '&amp;install=%2Fupload%2Fextension-' . $plugin['id_extension']
- . '%2Frevision-' . $plugin['id_revision'] . '%2F'
- . str_replace(' ', '%20',$plugin['url']);
-
- $url_download = PEM_URL .'/upload/extension-'.$plugin['id_extension']
- . '/revision-' . $plugin['id_revision']
- . '/' . str_replace(' ', '%20',$plugin['url']);
-
- $template->append('plugins',
- array('EXT_NAME' => $plugin['ext_name'],
- 'EXT_URL' => PEM_URL.'/extension_view.php?eid='.$plugin['id_extension'],
- 'EXT_DESC' => $ext_desc,
- 'VERSION' => $plugin['version'],
- 'VERSION_URL' => PEM_URL.'/revision_view.php?rid='.$plugin['id_revision'],
- 'DATE' => date('Y-m-d', $plugin['date']),
- 'VER_DESC' => $ver_desc,
- 'AUTHOR' => $plugin['author'],
- 'URL_INSTALL' => $url_auto_install,
- 'URL_DOWNLOAD' => $url_download));
- }
-}
-else
-{
- array_push($page['errors'], l10n('plugins_server_error'));
-}
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'plugins');
-?> \ No newline at end of file
diff --git a/BSF/admin/plugins_update.php b/BSF/admin/plugins_update.php
deleted file mode 100644
index bdb8c5b9d..000000000
--- a/BSF/admin/plugins_update.php
+++ /dev/null
@@ -1,169 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if( !defined("PHPWG_ROOT_PATH") )
-{
- die ("Hacking attempt!");
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/plugins.class.php');
-
-$template->set_filenames(array('plugins' => 'admin/plugins_update.tpl'));
-
-$base_url = get_root_url().'admin.php?page='.$page['page'];
-
-$plugins = new plugins();
-
-//-----------------------------------------------------------automatic upgrade
-if (isset($_GET['upgrade']) and isset($_GET['plugin']) and !is_adviser())
-{
- $plugin_id = $_GET['plugin'];
-
- if (isset($plugins->db_plugins_by_id[$plugin_id])
- and $plugins->db_plugins_by_id[$plugin_id]['state'] == 'active')
- {
- $plugins->perform_action('deactivate', $plugin_id);
-
- redirect($base_url
- . '&upgrade=' . $_GET['upgrade']
- . '&plugin=' . $plugin_id
- . '&reactivate=true');
- }
-
- $upgrade_status =
- $plugins->extract_plugin_files('upgrade', $_GET['upgrade'], $plugin_id);
-
- if (isset($_GET['reactivate']))
- {
- $plugins->perform_action('activate', $plugin_id);
- }
- redirect($base_url.'&plugin='.$plugin_id.'&upgradestatus='.$upgrade_status);
-}
-
-//--------------------------------------------------------------upgrade result
-if (isset($_GET['upgradestatus']) and isset($_GET['plugin']))
-{
- switch ($_GET['upgradestatus'])
- {
- case 'ok':
- array_push($page['infos'],
- sprintf(
- l10n('plugins_upgrade_ok'),
- $plugins->fs_plugins[$_GET['plugin']]['name']));
- break;
-
- case 'temp_path_error':
- array_push($page['errors'], l10n('plugins_temp_path_error'));
- break;
-
- case 'dl_archive_error':
- array_push($page['errors'], l10n('plugins_dl_archive_error'));
- break;
-
- case 'archive_error':
- array_push($page['errors'], l10n('plugins_archive_error'));
- break;
-
- default:
- array_push($page['errors'],
- sprintf(l10n('plugins_extract_error'), $_GET['installstatus']),
- l10n('plugins_check_chmod'));
- }
-}
-
-//--------------------------------------------------------------------Tabsheet
-set_plugins_tabsheet($page['page']);
-
-// +-----------------------------------------------------------------------+
-// | start template output |
-// +-----------------------------------------------------------------------+
-$plugins->get_server_plugins();
-
-if (is_array($plugins->server_plugins))
-{
- foreach($plugins->fs_plugins as $plugin_id => $fs_plugin)
- {
- if (isset($fs_plugin['extension'])
- and isset($plugins->server_plugins[$fs_plugin['extension']]))
- {
- $plugin_info = $plugins->server_plugins[$fs_plugin['extension']];
-
- $ext_desc = nl2br(htmlspecialchars(strip_tags(
- utf8_encode($plugin_info['ext_description']))));
-
- $ver_desc = sprintf(l10n('plugins_description'),
- $plugin_info['version'],
- date('Y-m-d', $plugin_info['date']),
- nl2br(htmlspecialchars(strip_tags(
- utf8_encode($plugin_info['description'])))));
-
- if ($plugins->plugin_version_compare($fs_plugin, $plugin_info))
- {
- // Plugin is up to date
- $template->append('plugins_uptodate',
- array('URL' => $fs_plugin['uri'],
- 'NAME' => $fs_plugin['name'],
- 'EXT_DESC' => $ext_desc,
- 'VERSION' => $fs_plugin['version']));
- }
- else
- {
- // Plugin need upgrade
- $url_auto_update = $base_url
- . '&amp;plugin=' . $plugin_id
- . '&amp;upgrade=%2Fupload%2Fextension-' . $fs_plugin['extension']
- . '%2Frevision-' . $plugin_info['id_revision']
- . '%2F' . str_replace(' ', '%20',$plugin_info['url']);
-
- $url_download = PEM_URL.'/upload/extension-'. $fs_plugin['extension']
- . '/revision-' . $plugin_info['id_revision']
- . '/' . str_replace(' ', '%20',$plugin_info['url']);
-
- $template->append('plugins_not_uptodate',
- array('EXT_NAME' => $fs_plugin['name'],
- 'EXT_URL' => $fs_plugin['uri'],
- 'EXT_DESC' => $ext_desc,
- 'VERSION' => $fs_plugin['version'],
- 'VERSION_URL' => PEM_URL.'/revision_view.php?rid='.$plugin_info['id_revision'],
- 'NEW_VERSION' => $plugin_info['version'],
- 'NEW_VER_DESC' => $ver_desc,
- 'URL_UPDATE' => $url_auto_update,
- 'URL_DOWNLOAD' => $url_download));
- }
- }
- else
- {
- // Can't check plugin
- $template->append('plugins_cant_check',
- array('NAME' => $fs_plugin['name'],
- 'VERSION' => $fs_plugin['version']));
- }
- }
-}
-else
-{
- array_push($page['errors'], l10n('plugins_server_error'));
-}
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'plugins');
-?> \ No newline at end of file
diff --git a/BSF/admin/profile.php b/BSF/admin/profile.php
deleted file mode 100644
index 7c4244494..000000000
--- a/BSF/admin/profile.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if( !defined("PHPWG_ROOT_PATH") ) die ("Hacking attempt!");
-
-$edit_user = build_user( $_GET['user_id'], false );
-
-include_once(PHPWG_ROOT_PATH.'profile.php');
-
-
-$errors = array();
-if ( !is_adviser() )
-{
- save_profile_from_post($edit_user, $errors);
-}
-
-load_profile_in_template(
- get_root_url().'admin.php?page=profile&amp;user_id='.$edit_user['id'],
- get_root_url().'admin.php?page=user_list',
- $edit_user
- );
-$page['errors'] = array_merge($page['errors'], $errors);
-
-$template->set_filename('profile', 'admin/profile.tpl');
-$template->assign_var_from_handle('ADMIN_CONTENT', 'profile');
-?>
diff --git a/BSF/admin/rating.php b/BSF/admin/rating.php
deleted file mode 100644
index 18557b329..000000000
--- a/BSF/admin/rating.php
+++ /dev/null
@@ -1,258 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die ("Hacking attempt!");
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | initialization |
-// +-----------------------------------------------------------------------+
-if (isset($_GET['start']) and is_numeric($_GET['start']))
-{
- $start = $_GET['start'];
-}
-else
-{
- $start = 0;
-}
-
-$elements_per_page=10;
-if (isset($_GET['display']) and is_numeric($_GET['display']))
-{
- $elements_per_page = $_GET['display'];
-}
-
-$order_by_index=0;
-if (isset($_GET['order_by']) and is_numeric($_GET['order_by']))
-{
- $order_by_index = $_GET['order_by'];
-}
-
-$page['user_filter'] = '';
-if (isset($_GET['users']))
-{
- if ($_GET['users'] == 'user')
- {
- $page['user_filter'] = ' AND r.user_id <> '.$conf['guest_id'];
- }
- elseif ($_GET['users'] == 'guest')
- {
- $page['user_filter'] = ' AND r.user_id = '.$conf['guest_id'];
- }
-}
-
-if (isset($_GET['del']) and !is_adviser())
-{
- $del_params = urldecode( $_GET['del'] );
- parse_str($del_params, $vars);
- if ( !is_numeric($vars['e']) or !is_numeric($vars['u']) )
- {
- die('Hacking attempt');
- }
- $query = '
-DELETE FROM '. RATE_TABLE .'
-WHERE element_id=' . $vars['e'] . '
-AND user_id=' . $vars['u'] . '
-AND anonymous_id=\'' . $vars['a'] . '\'
-;';
- pwg_query($query);
- update_average_rate( $vars['e'] );
-}
-
-$users = array();
-$query = '
-SELECT '.$conf['user_fields']['username'].' as username, '.$conf['user_fields']['id'].' as id
- FROM '.USERS_TABLE.'
-;';
-$result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
-{
- $users[$row['id']]=$row['username'];
-}
-
-
-$query = 'SELECT COUNT(DISTINCT(i.id))
-FROM '.RATE_TABLE.' AS r, '.IMAGES_TABLE.' AS i
-WHERE r.element_id=i.id'. $page['user_filter'] .
-';';
-list($nb_images) = mysql_fetch_row(pwg_query($query));
-
-
-// +-----------------------------------------------------------------------+
-// | template init |
-// +-----------------------------------------------------------------------+
-
-$template->set_filename('rating', 'admin/rating.tpl');
-
-$template->assign(
- array(
- 'NAVBAR' => create_navigation_bar(
- PHPWG_ROOT_PATH.'admin.php'.get_query_string_diff(array('start','del')),
- $nb_images,
- $start,
- $elements_per_page
- ),
- 'F_ACTION' => PHPWG_ROOT_PATH.'admin.php',
- 'DISPLAY' => $elements_per_page,
- 'NB_ELEMENTS' => $nb_images,
- )
- );
-
-
-
-$available_order_by= array(
- array(l10n('Rate date'), 'recently_rated DESC'),
- array(l10n('Average rate'), 'average_rate DESC'),
- array(l10n('Number of rates'), 'nb_rates DESC'),
- array(l10n('Sum of rates'), 'sum_rates DESC'),
- array(l10n('Controversy'), 'std_rates DESC'),
- array(l10n('File name'), 'file DESC'),
- array(l10n('Creation date'), 'date_creation DESC'),
- array(l10n('Post date'), 'date_available DESC'),
-
- );
-
-for ($i=0; $i<count($available_order_by); $i++)
-{
- $template->append(
- 'order_by_options',
- $available_order_by[$i][0]
- );
-}
-$template->assign('order_by_options_selected', array($order_by_index) );
-
-
-$user_options = array(
- 'all' => l10n('all'),
- 'user' => l10n('Users'),
- 'guest' => l10n('Guests'),
- );
-
-$template->assign('user_options', $user_options );
-$template->assign('user_options_selected', array(@$_GET['users']) );
-
-
-$query = '
-SELECT i.id,
- i.path,
- i.file,
- i.tn_ext,
- i.average_rate,
- i.storage_category_id,
- MAX(r.date) AS recently_rated,
- COUNT(r.rate) AS nb_rates,
- SUM(r.rate) AS sum_rates,
- ROUND(STD(r.rate),2) AS std_rates
- FROM '.RATE_TABLE.' AS r
- LEFT JOIN '.IMAGES_TABLE.' AS i ON r.element_id = i.id
- WHERE 1 = 1 ' . $page['user_filter'] . '
- GROUP BY r.element_id
- ORDER BY ' . $available_order_by[$order_by_index][1] .'
- LIMIT '.$start.','.$elements_per_page.'
-;';
-
-$images = array();
-$result = pwg_query($query);
-while ($row = mysql_fetch_assoc($result))
-{
- array_push($images, $row);
-}
-
-$template->assign( 'images', array() );
-foreach ($images as $image)
-{
- $thumbnail_src = get_thumbnail_url($image);
-
- $image_url = PHPWG_ROOT_PATH.'admin.php?page=picture_modify'.
- '&amp;image_id='.$image['id'];
-
- $query = 'SELECT *
-FROM '.RATE_TABLE.' AS r
-WHERE r.element_id='.$image['id'] . '
-ORDER BY date DESC;';
- $result = pwg_query($query);
- $nb_rates = mysql_num_rows($result);
-
- $tpl_image =
- array(
- 'U_THUMB' => $thumbnail_src,
- 'U_URL' => $image_url,
- 'AVG_RATE' => $image['average_rate'],
- 'STD_RATE' => $image['std_rates'],
- 'SUM_RATE' => $image['sum_rates'],
- 'NB_RATES' => (int)$image['nb_rates'],
- 'NB_RATES_TOTAL' => (int)$nb_rates,
- 'FILE' => $image['file'],
- 'rates' => array()
- );
-
- while ($row = mysql_fetch_array($result))
- {
-
- $url_del = PHPWG_ROOT_PATH.'admin.php'.
- get_query_string_diff(array('del'));
-
- $del_param = 'e='.$image['id'].
- '&u='.$row['user_id'].
- '&a='.$row['anonymous_id'];
-
- $url_del .= '&amp;del='.urlencode(urlencode($del_param));
-
- if ( isset($users[$row['user_id']]) )
- {
- $user = $users[$row['user_id']];
- }
- else
- {
- $user = '? '. $row['user_id'];
- }
- if ( strlen($row['anonymous_id'])>0 )
- {
- $user .= '('.$row['anonymous_id'].')';
- }
-
- $tpl_image['rates'][] =
- array(
- 'DATE' => format_date($row['date']),
- 'RATE' => $row['rate'],
- 'USER' => $user,
- 'U_DELETE' => $url_del
- );
- }
- $template->append( 'images', $tpl_image );
-}
-
-// +-----------------------------------------------------------------------+
-// | sending html code |
-// +-----------------------------------------------------------------------+
-$template->assign_var_from_handle('ADMIN_CONTENT', 'rating');
-?>
diff --git a/BSF/admin/site_manager.php b/BSF/admin/site_manager.php
deleted file mode 100644
index def9fe579..000000000
--- a/BSF/admin/site_manager.php
+++ /dev/null
@@ -1,307 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die ("Hacking attempt!");
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-/**
- * requests the given $url (a remote create_listing_file.php) and fills a
- * list of lines corresponding to request output
- *
- * @param string $url
- * @return void
- */
-function remote_output($url)
-{
- global $template, $page;
-
- if($lines = @file($url))
- {
- // cleaning lines from HTML tags
- foreach ($lines as $line)
- {
- $line = trim(strip_tags($line));
- if (preg_match('/^PWG-([A-Z]+)-/', $line, $matches))
- {
- $template->append(
- 'remote_output',
- array(
- 'CLASS' => 'remote'.ucfirst(strtolower($matches[1])),
- 'CONTENT' => $line
- )
- );
- }
- }
- }
- else
- {
- array_push($page['errors'], l10n('site_err_remote_file_not_found'));
- }
-}
-
-
-// +-----------------------------------------------------------------------+
-// | template init |
-// +-----------------------------------------------------------------------+
-$template->set_filenames(array('site_manager'=>'admin/site_manager.tpl'));
-
-// +-----------------------------------------------------------------------+
-// | new site creation form |
-// +-----------------------------------------------------------------------+
-if (isset($_POST['submit']) and !empty($_POST['galleries_url'])
- and !is_adviser() )
-{
- $is_remote = url_is_remote( $_POST['galleries_url'] );
- $url = preg_replace('/[\/]*$/', '', $_POST['galleries_url']);
- $url.= '/';
- if (! $is_remote)
- {
- if ( ! (strpos($url, '.') === 0 ) )
- {
- $url = './' . $url;
- }
- }
-
- // site must not exists
- $query = '
-SELECT COUNT(id) AS count
- FROM '.SITES_TABLE.'
- WHERE galleries_url = \''.$url.'\'
-;';
- $row = mysql_fetch_array(pwg_query($query));
- if ($row['count'] > 0)
- {
- array_push($page['errors'],
- l10n('site_already_exists').' ['.$url.']');
- }
- if (count($page['errors']) == 0)
- {
- if ($is_remote)
- {
- if ( ! isset($_POST['no_check']) )
- {
- $clf_url = $url.'create_listing_file.php';
- $clf_url.= '?action=test';
- $clf_url.= '&version='.PHPWG_VERSION;
- if ( ($lines = @file($clf_url)) !== false)
- {
- $first_line = strip_tags($lines[0]);
- if (!preg_match('/^PWG-INFO-2:/', $first_line))
- {
- array_push($page['errors'],
- l10n('site_err').' : '.$first_line);
- }
- }
- else
- {
- array_push($page['errors'], l10n('site_err_remote_file_not_found') );
- }
- }
- }
- else
- { // local directory
- if ( ! file_exists($url) )
- {
- array_push($page['errors'],
- l10n('Directory does not exist').' ['.$url.']');
- }
- }
- }
-
- if (count($page['errors']) == 0)
- {
- $query = '
-INSERT INTO '.SITES_TABLE.'
- (galleries_url)
- VALUES
- (\''.$url.'\')
-;';
- pwg_query($query);
- array_push($page['infos'],
- $url.' '.l10n('site_created'));
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | actions on site |
-// +-----------------------------------------------------------------------+
-if (isset($_GET['site']) and is_numeric($_GET['site']))
-{
- $page['site'] = $_GET['site'];
-}
-if (isset($_GET['action']) and isset($page['site']) and !is_adviser())
-{
- $query = '
-SELECT galleries_url
- FROM '.SITES_TABLE.'
- WHERE id = '.$page['site'].'
-;';
- list($galleries_url) = mysql_fetch_array(pwg_query($query));
- switch($_GET['action'])
- {
- case 'generate' :
- {
- $title = $galleries_url.' : '.l10n('remote_site_generate');
- remote_output($galleries_url.'create_listing_file.php?action=generate');
- break;
- }
- case 'test' :
- {
- $title = $galleries_url.' : '.l10n('remote_site_test');
- remote_output($galleries_url.'create_listing_file.php?action=test&version='.PHPWG_VERSION);
- break;
- }
- case 'clean' :
- {
- $title = $galleries_url.' : '.l10n('remote_site_clean');
- remote_output($galleries_url.'create_listing_file.php?action=clean');
- break;
- }
- case 'delete' :
- {
- delete_site($page['site']);
- array_push($page['infos'],
- $galleries_url.' '.l10n('site_deleted'));
- break;
- }
- }
-}
-
-$template->assign( array(
- 'U_HELP' => get_root_url().'popuphelp.php?page=site_manager',
- 'F_ACTION' => get_root_url().'admin.php'
- .get_query_string_diff( array('action','site') )
- ) );
-
-// +-----------------------------------------------------------------------+
-// | remote sites list |
-// +-----------------------------------------------------------------------+
-
-if ( is_file(PHPWG_ROOT_PATH.'listing.xml') )
-{
- $xml_content = getXmlCode(PHPWG_ROOT_PATH.'listing.xml');
- $local_listing_site_url = getAttribute(
- getChild($xml_content, 'informations'),
- 'url'
- );
- if ( !url_is_remote($local_listing_site_url) )
- {
- $local_listing_site_url = null;
- }
-}
-
-$query = '
-SELECT c.site_id, COUNT(DISTINCT c.id) AS nb_categories, COUNT(i.id) AS nb_images
- FROM '.CATEGORIES_TABLE.' AS c LEFT JOIN '.IMAGES_TABLE.' AS i
- ON c.id=i.storage_category_id
- WHERE c.site_id IS NOT NULL
- GROUP BY c.site_id
-;';
-$sites_detail = hash_from_query($query, 'site_id');
-
-$query = '
-SELECT *
- FROM '.SITES_TABLE.'
-;';
-$result = pwg_query($query);
-
-while ($row = mysql_fetch_array($result))
-{
- $is_remote = url_is_remote($row['galleries_url']);
- $base_url = PHPWG_ROOT_PATH.'admin.php';
- $base_url.= '?page=site_manager';
- $base_url.= '&amp;site='.$row['id'];
- $base_url.= '&amp;action=';
-
- $update_url = PHPWG_ROOT_PATH.'admin.php';
- $update_url.= '?page=site_update';
- $update_url.= '&amp;site='.$row['id'];
-
- $tpl_var =
- array(
- 'NAME' => $row['galleries_url'],
- 'TYPE' => l10n( $is_remote ? 'site_remote' : 'site_local' ),
- 'CATEGORIES' => (int)@$sites_detail[$row['id']]['nb_categories'],
- 'IMAGES' => (int)@$sites_detail[$row['id']]['nb_images'],
- 'U_SYNCHRONIZE' => $update_url
- );
-
- if ($is_remote)
- {
- $tpl_var['remote'] =
- array(
- 'U_TEST' => $base_url.'test',
- 'U_GENERATE' => $row['galleries_url'].'create_listing_file.php?action=generate',
- 'U_CLEAN' => $base_url.'clean',
- );
- }
-
- if ($row['id'] != 1)
- {
- $tpl_var['U_DELETE'] = $base_url.'delete';
- }
-
- $plugin_links = array();
- //$plugin_links is array of array composed of U_HREF, U_HINT & U_CAPTION
- $plugin_links =
- trigger_event('get_admins_site_links',
- $plugin_links, $row['id'], $is_remote);
- $tpl_var['plugin_links'] = $plugin_links;
-
- $template->append('sites', $tpl_var);
-
- if ( isset($local_listing_site_url) and
- $row['galleries_url']==$local_listing_site_url )
- {
- $local_listing_site_id = $row['id'];
- $template->assign( 'local_listing',
- array(
- 'URL' => $local_listing_site_url,
- 'U_SYNCHRONIZE' => $update_url.'&amp;local_listing=1'
- )
- );
- }
-}
-
-if ( isset($local_listing_site_url) and !isset($local_listing_site_id) )
-{
- $template->assign( 'local_listing',
- array(
- 'URL' => $local_listing_site_url,
- 'CREATE' => true
- )
- );
-}
-
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'site_manager');
-?>
diff --git a/BSF/admin/site_reader_local.php b/BSF/admin/site_reader_local.php
deleted file mode 100644
index 6d6d252ee..000000000
--- a/BSF/admin/site_reader_local.php
+++ /dev/null
@@ -1,265 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// provides data for site synchronization from the local file system
-class LocalSiteReader
-{
-
-var $site_url;
-
-function LocalSiteReader($url)
-{
- $this->site_url = $url;
-}
-
-/**
- * Is this local site ok ?
- *
- * @return true on success, false otherwise
- */
-function open()
-{
- global $errors;
-
- if (!is_dir($this->site_url))
- {
- array_push(
- $errors,
- array(
- 'path' => $this->site_url,
- 'type' => 'PWG-ERROR-NO-FS'
- )
- );
-
- return false;
- }
-
- return true;
-}
-
-// retrieve file system sub-directories fulldirs
-function get_full_directories($basedir)
-{
- $fs_fulldirs = get_fs_directories($basedir);
- return $fs_fulldirs;
-}
-
-/**
- * Returns an array with all file system files according to $conf['file_ext']
- * and $conf['picture_ext']
- * @param string $path recurse in this directory
- * @return array like "pic.jpg"=>array('tn_ext'=>'jpg' ... )
- */
-function get_elements($path)
-{
- global $conf;
- if (!isset($conf['flip_file_ext']))
- {
- $conf['flip_file_ext'] = array_flip($conf['file_ext']);
- }
-
- $subdirs = array();
- $fs = array();
- if (is_dir($path) && $contents = opendir($path) )
- {
- while (($node = readdir($contents)) !== false)
- {
- if (is_file($path.'/'.$node))
- {
- $extension = get_extension($node);
- $filename_wo_ext = get_filename_wo_extension($node);
-
- if ( isset($conf['flip_file_ext'][$extension]) )
- {
- $tn_ext = $this->get_tn_ext($path, $filename_wo_ext);
- $fs[ $path.'/'.$node ] = array(
- 'tn_ext' => $tn_ext,
- );
- }
- }
- elseif (is_dir($path.'/'.$node)
- and $node != '.'
- and $node != '..'
- and $node != 'pwg_high'
- and $node != 'pwg_representative'
- and $node != 'thumbnail' )
- {
- array_push($subdirs, $node);
- }
- } //end while readdir
- closedir($contents);
-
- foreach ($subdirs as $subdir)
- {
- $tmp_fs = $this->get_elements($path.'/'.$subdir);
- $fs = array_merge($fs, $tmp_fs);
- }
- } //end if is_dir
- return $fs;
-}
-
-// returns the name of the attributes that are supported for
-// files update/synchronization
-function get_update_attributes()
-{
- return array('tn_ext', 'has_high', 'representative_ext');
-}
-
-function get_element_update_attributes($file)
-{
- global $conf;
- $data = array();
-
- $filename = basename($file);
- $dirname = dirname($file);
- $filename_wo_ext = get_filename_wo_extension($filename);
- $extension = get_extension($filename);
-
- $data['tn_ext'] = $this->get_tn_ext($dirname, $filename_wo_ext);
- $data['has_high'] = $this->get_has_high($dirname, $filename);
-
- if ( !isset($conf['flip_picture_ext'][$extension]) )
- {
- $data['representative_ext'] = $this->get_representative_ext(
- $dirname, $filename_wo_ext
- );
- }
- return $data;
-}
-
-// returns the name of the attributes that are supported for
-// metadata update/synchronization according to configuration
-function get_metadata_attributes()
-{
- global $conf;
-
- $update_fields = array('filesize', 'width', 'height', 'high_filesize');
-
- if ($conf['use_exif'])
- {
- $update_fields =
- array_merge(
- $update_fields,
- array_keys($conf['use_exif_mapping'])
- );
- }
-
- if ($conf['use_iptc'])
- {
- $update_fields =
- array_merge(
- $update_fields,
- array_keys($conf['use_iptc_mapping'])
- );
- }
-
- return $update_fields;
-}
-
-// returns a hash of attributes (metadata+filesize+width,...) for file
-function get_element_metadata($file, $has_high = false)
-{
- global $conf;
- if (!is_file($file))
- {
- return null;
- }
-
- $data = array();
-
- $data['filesize'] = floor(filesize($file)/1024);
-
- if ($image_size = @getimagesize($file))
- {
- $data['width'] = $image_size[0];
- $data['height'] = $image_size[1];
- }
-
- if ($has_high)
- {
- $high_file = dirname($file).'/pwg_high/'.basename($file);
-
- $data['high_filesize'] = floor(filesize($high_file)/1024);
- }
-
- if ($conf['use_exif'])
- {
- $data = array_merge($data, get_sync_exif_data($file) );
- }
-
- if ($conf['use_iptc'])
- {
- $data = array_merge($data, get_sync_iptc_data($file) );
- }
-
- return $data;
-}
-
-
-//-------------------------------------------------- private functions --------
-function get_representative_ext($path, $filename_wo_ext)
-{
- global $conf;
- $base_test = $path.'/pwg_representative/'.$filename_wo_ext.'.';
- foreach ($conf['picture_ext'] as $ext)
- {
- $test = $base_test.$ext;
- if (is_file($test))
- {
- return $ext;
- }
- }
- return null;
-}
-
-function get_tn_ext($path, $filename_wo_ext)
-{
- global $conf;
-
- $base_test =
- $path.'/thumbnail/'.$conf['prefix_thumbnail'].$filename_wo_ext.'.';
-
- foreach ($conf['picture_ext'] as $ext)
- {
- $test = $base_test.$ext;
- if (is_file($test))
- {
- return $ext;
- }
- }
-
- return null;
-}
-
-function get_has_high($path, $filename)
-{
- if (is_file($path.'/pwg_high/'.$filename))
- {
- return 'true';
- }
-
- return null;
-}
-
-}
-?> \ No newline at end of file
diff --git a/BSF/admin/site_reader_remote.php b/BSF/admin/site_reader_remote.php
deleted file mode 100644
index 31ae3e792..000000000
--- a/BSF/admin/site_reader_remote.php
+++ /dev/null
@@ -1,250 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-
-// provides data for site synchronization from a remote listing.xml
-class RemoteSiteReader
-{
-
-var $site_url;
-var $listing_url;
-var $site_dirs;
-var $site_files;
-var $insert_attributes;
-var $metadata_attributes;
-
-function RemoteSiteReader($url, $listing_url)
-{
- $this->site_url = $url;
- $this->insert_attributes = array(
- 'tn_ext',
- );
- $this->update_attributes = array(
- 'tn_ext', 'representative_ext', 'has_high',
- );
- $this->metadata_attributes = array(
- 'filesize', 'width', 'height', 'high_filesize'
- );
-
- if (!isset($listing_url))
- {
- $this->listing_url = $this->site_url.'/listing.xml';
- }
- else
- {
- $this->listing_url = $listing_url;
- }
-}
-
-/**
- * Is this remote site ok ?
- *
- * @return true on success, false otherwise
- */
-function open()
-{
- global $errors;
-
- if (@fopen($this->listing_url, 'r'))
- {
- $this->site_dirs = array();
- $this->site_files = array();
- $xml_content = getXmlCode($this->listing_url);
- $info_xml_element = getChild($xml_content, 'informations');
- if (getAttribute($info_xml_element , 'phpwg_version') != PHPWG_VERSION)
- {
- array_push(
- $errors,
- array(
- 'path' => $this->listing_url,
- 'type' => 'PWG-ERROR-VERSION'
- )
- );
-
- return false;
- }
-
- $additional_metadata = getAttribute($info_xml_element, 'metadata');
-
- if ($additional_metadata != '')
- {
- $this->metadata_attributes = array_merge(
- $this->metadata_attributes,
- explode(',', $additional_metadata)
- );
- }
-
- $this->build_structure($xml_content, '', 0);
-
- return true;
- }
- else
- {
- array_push(
- $errors,
- array(
- 'path' => $this->listing_url,
- 'type' => 'PWG-ERROR-NOLISTING'
- )
- );
-
- return false;
- }
-}
-
-// retrieve xml sub-directories fulldirs
-function get_full_directories($basedir)
-{
- $dirs = array();
- foreach ( array_keys($this->site_dirs) as $dir)
- {
- $full_dir = $this->site_url . $dir;
- if ($full_dir != $basedir
- and strpos($full_dir, $basedir) === 0
- )
- {
- array_push($dirs, $full_dir);
- }
- }
- return $dirs;
-}
-
-/**
- * Returns a hash with all elements (images and files) inside the full $path
- * according to listing.xml
- * @param string $path recurse in this directory only
- * @return array like "pic.jpg"=>array('tn_ext'=>'jpg' ... )
- */
-function get_elements($path)
-{
- $elements = array();
- foreach ( $this->site_dirs as $dir=>$files)
- {
- $full_dir = $this->site_url . $dir;
- if (strpos($full_dir, $path) === 0)
- {
- foreach ($files as $file)
- {
- $data = $this->get_element_attributes(
- $file,
- $this->insert_attributes
- );
- $elements[$file] = $data;
- }
- }
- }
-
- return $elements;
-}
-
-// returns the name of the attributes that are supported for
-// files update/synchronization
-function get_update_attributes()
-{
- return $this->update_attributes;
-}
-
-function get_element_update_attributes($file)
-{
- return $this->get_element_attributes(
- $file,
- $this->update_attributes
- );
-}
-
-// returns the name of the attributes that are supported for
-// metadata update/synchronization according to listing.xml
-function get_metadata_attributes()
-{
- return $this->metadata_attributes;
-}
-
-// returns a hash of attributes (metadata+width,...) for file
-function get_element_metadata($file, $has_high = false)
-{
- return $this->get_element_attributes(
- $file,
- $this->metadata_attributes
- );
-}
-
-//-------------------------------------------------- private functions --------
-/**
- * Returns a hash of image/file attributes
- * @param string $file fully qualified file name
- * @param array $attributes specifies which attributes to retrieve
- * returned
-*/
-function get_element_attributes($file, $attributes)
-{
- $xml_element = $this->site_files[$file];
- if (!isset($xml_element))
- {
- return null;
- }
- $data = array();
- foreach($attributes as $att)
- {
- if (getAttribute($xml_element, $att) != '')
- {
- $val = getAttribute($xml_element, $att);
- $data[$att] = addslashes($val);
- }
- }
- return $data;
-}
-
-// recursively parse the xml_content for later usage
-function build_structure($xml_content, $basedir, $level)
-{
- $temp_dirs = getChildren($xml_content, 'dir'.$level);
- foreach ($temp_dirs as $temp_dir)
- {
- $dir_name = $basedir;
- if ($dir_name != '' )
- {
- $dir_name .= '/';
- }
- $dir_name .= getAttribute($temp_dir, 'name');
- $this->site_dirs[ $dir_name ] = array();
- $this->build_structure($temp_dir, $dir_name, $level+1);
- }
-
- if ($basedir != '')
- {
- $xml_elements = getChildren(
- getChild($xml_content, 'root'),
- 'element'
- );
- foreach ($xml_elements as $xml_element)
- {
- $path = getAttribute($xml_element, 'path');
- $this->site_files[$path] = $xml_element;
- array_push($this->site_dirs[$basedir], $path);
- }
- }
-}
-
-}
-
-?>
diff --git a/BSF/admin/site_update.php b/BSF/admin/site_update.php
deleted file mode 100644
index e6fb6d4ef..000000000
--- a/BSF/admin/site_update.php
+++ /dev/null
@@ -1,991 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-if (!is_numeric($_GET['site']))
-{
- die ('site param missing or invalid');
-}
-$site_id = $_GET['site'];
-
-$query='
-SELECT galleries_url
- FROM '.SITES_TABLE.'
- WHERE id = '.$site_id.'
-;';
-list($site_url) = mysql_fetch_row(pwg_query($query));
-if (!isset($site_url))
-{
- die('site '.$site_id.' does not exist');
-}
-$site_is_remote = url_is_remote($site_url);
-
-list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
-define('CURRENT_DATE', $dbnow);
-
-$error_labels = array(
- 'PWG-UPDATE-1' => array(
- l10n('update_wrong_dirname_short'),
- l10n('update_wrong_dirname_info')
- ),
- 'PWG-UPDATE-2' => array(
- l10n('update_missing_tn_short'),
- l10n('update_missing_tn_info').implode(',', $conf['picture_ext'])
- ),
- 'PWG-ERROR-NO-FS' => array(
- l10n('update_missing_file_or_dir'),
- l10n('update_missing_file_or_dir_info')
- ),
- 'PWG-ERROR-VERSION' => array(
- l10n('update_err_pwg_version_differs'),
- l10n('update_err_pwg_version_differs_info')
- ),
- 'PWG-ERROR-NOLISTING' => array(
- l10n('update_err_remote_listing_not_found'),
- l10n('update_err_remote_listing_not_found_info')
- )
- );
-$errors = array();
-$infos = array();
-
-if ($site_is_remote)
-{
- include_once(PHPWG_ROOT_PATH.'admin/site_reader_remote.php');
- $local_listing = null;
- if ( isset($_GET['local_listing'])
- and $_GET['local_listing'] )
- {
- $local_listing = PHPWG_ROOT_PATH.'listing.xml';
- }
- $site_reader = new RemoteSiteReader($site_url, $local_listing);
-}
-else
-{
- include_once( PHPWG_ROOT_PATH.'admin/site_reader_local.php');
- $site_reader = new LocalSiteReader($site_url);
-}
-
-$general_failure = true;
-if (isset($_POST['submit']))
-{
- if (!isset($conf['flip_picture_ext']))
- {
- $conf['flip_picture_ext'] = array_flip($conf['picture_ext']);
- }
- if ($site_reader->open())
- {
- $general_failure = false;
- }
-
- // shall we simulate only
- if ((isset($_POST['simulate']) and $_POST['simulate'] == 1) or is_adviser())
- {
- $simulate = true;
- }
- else
- {
- $simulate = false;
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | directories / categories |
-// +-----------------------------------------------------------------------+
-if (isset($_POST['submit'])
- and ($_POST['sync'] == 'dirs' or $_POST['sync'] == 'files'))
-{
- $counts['new_categories'] = 0;
- $counts['del_categories'] = 0;
- $counts['del_elements'] = 0;
- $counts['new_elements'] = 0;
- $counts['upd_elements'] = 0;
-}
-
-
-if (isset($_POST['submit'])
- and ($_POST['sync'] == 'dirs' or $_POST['sync'] == 'files')
- and !$general_failure)
-{
- $start = get_moment();
- // which categories to update ?
- $cat_ids = array();
-
- $query = '
-SELECT id, uppercats, global_rank, status, visible
- FROM '.CATEGORIES_TABLE.'
- WHERE dir IS NOT NULL
- AND site_id = '.$site_id;
- if (isset($_POST['cat']) and is_numeric($_POST['cat']))
- {
- if (isset($_POST['subcats-included']) and $_POST['subcats-included'] == 1)
- {
- $query.= '
- AND uppercats REGEXP \'(^|,)'.$_POST['cat'].'(,|$)\'
-';
- }
- else
- {
- $query.= '
- AND id = '.$_POST['cat'].'
-';
- }
- }
- $query.= '
-;';
- $result = pwg_query($query);
-
- $db_categories = array();
- while ($row = mysql_fetch_array($result))
- {
- $db_categories[$row['id']] = $row;
- }
-
- // get categort full directories in an array for comparison with file
- // system directory tree
- $db_fulldirs = get_fulldirs(array_keys($db_categories));
-
- // what is the base directory to search file system sub-directories ?
- if (isset($_POST['cat']) and is_numeric($_POST['cat']))
- {
- $basedir = $db_fulldirs[$_POST['cat']];
- }
- else
- {
- $basedir = preg_replace('#/*$#', '', $site_url);
- }
-
- // we need to have fulldirs as keys to make efficient comparison
- $db_fulldirs = array_flip($db_fulldirs);
-
- // finding next rank for each id_uppercat. By default, each category id
- // has 1 for next rank on its sub-categories to create
- $next_rank['NULL'] = 1;
-
- $query = '
-SELECT id
- FROM '.CATEGORIES_TABLE.'
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $next_rank[$row['id']] = 1;
- }
-
- // let's see if some categories already have some sub-categories...
- $query = '
-SELECT id_uppercat, MAX(rank)+1 AS next_rank
- FROM '.CATEGORIES_TABLE.'
- GROUP BY id_uppercat
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- // for the id_uppercat NULL, we write 'NULL' and not the empty string
- if (!isset($row['id_uppercat']) or $row['id_uppercat'] == '')
- {
- $row['id_uppercat'] = 'NULL';
- }
- $next_rank[$row['id_uppercat']] = $row['next_rank'];
- }
-
- // next category id available
- $query = '
-SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_id
- FROM '.CATEGORIES_TABLE.'
-;';
- list($next_id) = mysql_fetch_array(pwg_query($query));
-
- // retrieve sub-directories fulldirs from the site reader
- $fs_fulldirs = $site_reader->get_full_directories($basedir);
-
- // get_full_directories doesn't include the base directory, so if it's a
- // category directory, we need to include it in our array
- if (isset($_POST['cat']))
- {
- array_push($fs_fulldirs, $basedir);
- }
- // If $_POST['subcats-included'] != 1 ("Search in subcategories" is unchecked)
- // $db_fulldirs doesn't include any subdirectories and $fs_fulldirs does
- // So $fs_fulldirs will be limited to the selected basedir
- // (if that one is in $fs_fulldirs)
- if (!isset($_POST['subcats-included']) or $_POST['subcats-included'] != 1)
- {
- $fs_fulldirs = array_intersect($fs_fulldirs, array_keys($db_fulldirs));
- }
- $inserts = array();
- // new categories are the directories not present yet in the database
- foreach (array_diff($fs_fulldirs, array_keys($db_fulldirs)) as $fulldir)
- {
- $dir = basename($fulldir);
- if (preg_match('/^[a-zA-Z0-9-_.]+$/', $dir))
- {
- $insert = array(
- 'id' => $next_id++,
- 'dir' => $dir,
- 'name' => str_replace('_', ' ', $dir),
- 'site_id' => $site_id,
- 'commentable' =>
- boolean_to_string($conf['newcat_default_commentable']),
- 'uploadable' => $site_is_remote
- ? 'false'
- : boolean_to_string($conf['newcat_default_uploadable']),
- 'status' => $conf{'newcat_default_status'},
- 'visible' => boolean_to_string($conf{'newcat_default_visible'}),
- );
-
- if (isset($db_fulldirs[dirname($fulldir)]))
- {
- $parent = $db_fulldirs[dirname($fulldir)];
-
- $insert{'id_uppercat'} = $parent;
- $insert{'uppercats'} =
- $db_categories[$parent]['uppercats'].','.$insert{'id'};
- $insert{'rank'} = $next_rank[$parent]++;
- $insert{'global_rank'} =
- $db_categories[$parent]['global_rank'].'.'.$insert{'rank'};
- if ('private' == $db_categories[$parent]['status'])
- {
- $insert{'status'} = 'private';
- }
- if ('false' == $db_categories[$parent]['visible'])
- {
- $insert{'visible'} = 'false';
- }
- }
- else
- {
- $insert{'uppercats'} = $insert{'id'};
- $insert{'rank'} = $next_rank['NULL']++;
- $insert{'global_rank'} = $insert{'rank'};
- }
-
- array_push($inserts, $insert);
- array_push(
- $infos,
- array(
- 'path' => $fulldir,
- 'info' => l10n('update_research_added')
- )
- );
-
- // add the new category to $db_categories and $db_fulldirs array
- $db_categories[$insert{'id'}] =
- array(
- 'id' => $insert{'id'},
- 'status' => $insert{'status'},
- 'visible' => $insert{'visible'},
- 'uppercats' => $insert{'uppercats'},
- 'global_rank' => $insert{'global_rank'}
- );
- $db_fulldirs[$fulldir] = $insert{'id'};
- $next_rank[$insert{'id'}] = 1;
- }
- else
- {
- array_push(
- $errors,
- array(
- 'path' => $fulldir,
- 'type' => 'PWG-UPDATE-1'
- )
- );
- }
- }
-
- if (count($inserts) > 0)
- {
- if (!$simulate)
- {
- $dbfields = array(
- 'id','dir','name','site_id','id_uppercat','uppercats','commentable',
- 'uploadable','visible','status','rank','global_rank'
- );
- mass_inserts(CATEGORIES_TABLE, $dbfields, $inserts);
- }
-
- $counts['new_categories'] = count($inserts);
- }
-
- // to delete categories
- $to_delete = array();
- foreach (array_diff(array_keys($db_fulldirs), $fs_fulldirs) as $fulldir)
- {
- array_push($to_delete, $db_fulldirs[$fulldir]);
- unset($db_fulldirs[$fulldir]);
- array_push($infos, array('path' => $fulldir,
- 'info' => l10n('update_research_deleted')));
- }
- if (count($to_delete) > 0)
- {
- if (!$simulate)
- {
- delete_categories($to_delete);
- }
- $counts['del_categories'] = count($to_delete);
- }
-
- $template->append('footer_elements', '<!-- scanning dirs : '
- . get_elapsed_time($start, get_moment())
- . ' -->' );
-}
-// +-----------------------------------------------------------------------+
-// | files / elements |
-// +-----------------------------------------------------------------------+
-if (isset($_POST['submit']) and $_POST['sync'] == 'files'
- and !$general_failure)
-{
- $start_files = get_moment();
- $start= $start_files;
-
- $fs = $site_reader->get_elements($basedir);
- $template->append('footer_elements', '<!-- get_elements: '
- . get_elapsed_time($start, get_moment())
- . ' -->' );
-
- $cat_ids = array_diff(array_keys($db_categories), $to_delete);
-
- $db_elements = array();
- $db_unvalidated = array();
-
- if (count($cat_ids) > 0)
- {
- $query = '
-SELECT id, path
- FROM '.IMAGES_TABLE.'
- WHERE storage_category_id IN ('
- .wordwrap(
- implode(', ', $cat_ids),
- 80,
- "\n"
- ).')
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $db_elements[$row['id']] = $row['path'];
- }
-
- // searching the unvalidated waiting elements (they must not be taken into
- // account)
- $query = '
-SELECT file,storage_category_id
- FROM '.WAITING_TABLE.'
- WHERE storage_category_id IN (
-'.wordwrap(implode(', ', $cat_ids), 80, "\n").')
- AND validated = \'false\'
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- array_push(
- $db_unvalidated,
- array_search(
- $row['storage_category_id'],
- $db_fulldirs)
- .'/'.$row['file']
- );
- }
- }
-
- // next element id available
- $query = '
-SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_element_id
- FROM '.IMAGES_TABLE.'
-;';
- list($next_element_id) = mysql_fetch_array(pwg_query($query));
-
- $start = get_moment();
-
- $inserts = array();
- $insert_links = array();
-
- foreach (array_diff(array_keys($fs), $db_elements, $db_unvalidated) as $path)
- {
- $insert = array();
- // storage category must exist
- $dirname = dirname($path);
- if (!isset($db_fulldirs[$dirname]))
- {
- continue;
- }
- $filename = basename($path);
- if (!preg_match('/^[a-zA-Z0-9-_.]+$/', $filename))
- {
- array_push(
- $errors,
- array(
- 'path' => $path,
- 'type' => 'PWG-UPDATE-1'
- )
- );
-
- continue;
- }
-
- if ( isset( $conf['flip_picture_ext'][get_extension($filename)] )
- and !isset($fs[$path]['tn_ext']) )
- { // For a picture thumbnail is mandatory and for non picture element,
- // thumbnail and representative are optionnal
- array_push(
- $errors,
- array(
- 'path' => $path,
- 'type' => 'PWG-UPDATE-2'
- )
- );
- }
- else
- {
- $insert = array(
- 'id' => $next_element_id++,
- 'file' => $filename,
- 'date_available' => CURRENT_DATE,
- 'path' => $path,
- 'tn_ext' => isset($fs[$path]['tn_ext'])
- ? $fs[$path]['tn_ext']
- : null,
- 'storage_category_id' => $db_fulldirs[$dirname],
- );
-
- if ( $_POST['privacy_level']!=0 )
- {
- $insert['level'] = $_POST['privacy_level'];
- }
-
- array_push(
- $inserts,
- $insert
- );
-
- array_push(
- $insert_links,
- array(
- 'image_id' => $insert{'id'},
- 'category_id' => $insert['storage_category_id'],
- )
- );
-
- array_push(
- $infos,
- array(
- 'path' => $insert{'path'},
- 'info' => l10n('update_research_added')
- )
- );
-
- $caddiables[] = $insert['id'];
- }
- }
-
- if (count($inserts) > 0)
- {
- if (!$simulate)
- {
- // inserts all new elements
- mass_inserts(
- IMAGES_TABLE,
- array_keys($inserts[0]),
- $inserts
- );
-
- // inserts all links between new elements and their storage category
- mass_inserts(
- IMAGE_CATEGORY_TABLE,
- array_keys($insert_links[0]),
- $insert_links
- );
-
- // add new elements to caddie
- if (isset($_POST['add_to_caddie']) and $_POST['add_to_caddie'] == 1)
- {
- fill_caddie($caddiables);
- }
- }
- $counts['new_elements'] = count($inserts);
- }
-
- // delete elements that are in database but not in the filesystem
- $to_delete_elements = array();
- foreach (array_diff($db_elements, array_keys($fs)) as $path)
- {
- array_push($to_delete_elements, array_search($path, $db_elements));
- array_push($infos, array('path' => $path,
- 'info' => l10n('update_research_deleted')));
- }
- if (count($to_delete_elements) > 0)
- {
- if (!$simulate)
- {
- delete_elements($to_delete_elements);
- }
- $counts['del_elements'] = count($to_delete_elements);
- }
-
- $template->append('footer_elements', '<!-- scanning files : '
- . get_elapsed_time($start_files, get_moment())
- . ' -->' );
-
- // retrieving informations given by uploaders
- if (!$simulate and count($cat_ids) > 0)
- {
- $query = '
-SELECT id,file,storage_category_id,infos
- FROM '.WAITING_TABLE.'
- WHERE storage_category_id IN (
-'.wordwrap(implode(', ', $cat_ids), 80, "\n").')
- AND validated = \'true\'
-;';
- $result = pwg_query($query);
-
- $datas = array();
- $fields =
- array(
- 'primary' => array('id'),
- 'update' => array('date_creation', 'author', 'name', 'comment')
- );
-
- $waiting_to_delete = array();
-
- while ($row = mysql_fetch_array($result))
- {
- $data = array();
-
- $query = '
-SELECT id
- FROM '.IMAGES_TABLE.'
- WHERE storage_category_id = '.$row['storage_category_id'].'
- AND file = \''.$row['file'].'\'
-;';
- list($data['id']) = mysql_fetch_array(pwg_query($query));
-
- foreach ($fields['update'] as $field)
- {
- $data[$field] = addslashes( getAttribute($row['infos'], $field) );
- }
-
- array_push($datas, $data);
- array_push($waiting_to_delete, $row['id']);
- }
-
- if (count($datas) > 0)
- {
- mass_updates(IMAGES_TABLE, $fields, $datas);
-
- // delete now useless waiting elements
- $query = '
-DELETE
- FROM '.WAITING_TABLE.'
- WHERE id IN ('.implode(',', $waiting_to_delete).')
-;';
- pwg_query($query);
- }
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | synchronize files |
-// +-----------------------------------------------------------------------+
-if (isset($_POST['submit'])
- and ($_POST['sync'] == 'dirs' or $_POST['sync'] == 'files')
- and !$general_failure )
-{
- if (!$simulate)
- {
- $start = get_moment();
- update_category('all');
- $template->append('footer_elements', '<!-- update_category(all) : '
- . get_elapsed_time($start,get_moment())
- . ' -->' );
- $start = get_moment();
- update_global_rank();
- $template->append('footer_elements', '<!-- ordering categories : '
- . get_elapsed_time($start, get_moment())
- . ' -->');
- }
-
- if ($_POST['sync'] == 'files')
- {
- $start = get_moment();
- $opts['category_id'] = '';
- $opts['recursive'] = true;
- if (isset($_POST['cat']))
- {
- $opts['category_id'] = $_POST['cat'];
- if (!isset($_POST['subcats-included']) or $_POST['subcats-included'] != 1)
- {
- $opts['recursive'] = false;
- }
- }
- $files = get_filelist($opts['category_id'], $site_id,
- $opts['recursive'],
- false);
- $template->append('footer_elements', '<!-- get_filelist : '
- . get_elapsed_time($start, get_moment())
- . ' -->');
- $start = get_moment();
-
- $datas = array();
- foreach ( $files as $id=>$file )
- {
- $data = $site_reader->get_element_update_attributes($file);
- if ( !is_array($data) )
- {
- continue;
- }
- $extension = get_extension($file);
- if ( isset($conf['flip_picture_ext'][$extension]) )
- {
- if ( !isset($data['tn_ext']) )
- {
- array_push(
- $errors,
- array(
- 'path' => $file,
- 'type' => 'PWG-UPDATE-2'
- )
- );
- continue;
- }
- }
-
- $data['id']=$id;
- array_push($datas, $data);
- } // end foreach file
-
- $counts['upd_elements'] = count($datas);
- if (!$simulate and count($datas)>0 )
- {
- mass_updates(
- IMAGES_TABLE,
- // fields
- array(
- 'primary' => array('id'),
- 'update' => $site_reader->get_update_attributes(),
- ),
- $datas
- );
- }
- $template->append('footer_elements', '<!-- update files : '
- . get_elapsed_time($start,get_moment())
- . ' -->');
- }// end if sync files
-}
-
-// +-----------------------------------------------------------------------+
-// | synchronize files |
-// +-----------------------------------------------------------------------+
-if (isset($_POST['submit'])
- and ($_POST['sync'] == 'dirs' or $_POST['sync'] == 'files'))
-{
- $template->assign(
- 'update_result',
- array(
- 'NB_NEW_CATEGORIES'=>$counts['new_categories'],
- 'NB_DEL_CATEGORIES'=>$counts['del_categories'],
- 'NB_NEW_ELEMENTS'=>$counts['new_elements'],
- 'NB_DEL_ELEMENTS'=>$counts['del_elements'],
- 'NB_UPD_ELEMENTS'=>$counts['upd_elements'],
- 'NB_ERRORS'=>count($errors),
- ));
-}
-
-// +-----------------------------------------------------------------------+
-// | synchronize metadata |
-// +-----------------------------------------------------------------------+
-if (isset($_POST['submit']) and preg_match('/^metadata/', $_POST['sync'])
- and !$general_failure)
-{
- // sync only never synchronized files ?
- if ($_POST['sync'] == 'metadata_new')
- {
- $opts['only_new'] = true;
- }
- else
- {
- $opts['only_new'] = false;
- }
- $opts['category_id'] = '';
- $opts['recursive'] = true;
-
- if (isset($_POST['cat']))
- {
- $opts['category_id'] = $_POST['cat'];
- // recursive ?
- if (!isset($_POST['subcats-included']) or $_POST['subcats-included'] != 1)
- {
- $opts['recursive'] = false;
- }
- }
- $start = get_moment();
- $files = get_filelist($opts['category_id'], $site_id,
- $opts['recursive'],
- $opts['only_new']);
-
- $template->append('footer_elements', '<!-- get_filelist : '
- . get_elapsed_time($start, get_moment())
- . ' -->');
-
- $start = get_moment();
- $datas = array();
- $tags_of = array();
-
- $has_high_images = array();
-
- $image_ids = array();
- foreach ($files as $id => $file)
- {
- array_push($image_ids, $id);
- }
-
- if (count($image_ids) > 0)
- {
- $query = '
-SELECT id
- FROM '.IMAGES_TABLE.'
- WHERE has_high = \'true\'
- AND id IN (
-'.wordwrap(implode(', ', $image_ids), 80, "\n").'
-)
-;';
-
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- array_push($has_high_images, $row['id']);
- }
- }
-
- foreach ( $files as $id=>$file )
- {
- $data = $site_reader->get_element_metadata(
- $file,
- in_array($id, $has_high_images)
- );
-
- if ( is_array($data) )
- {
- $data['date_metadata_update'] = CURRENT_DATE;
- $data['id']=$id;
- array_push($datas, $data);
-
- foreach (array('keywords', 'tags') as $key)
- {
- if (isset($data[$key]))
- {
- if (!isset($tags_of[$id]))
- {
- $tags_of[$id] = array();
- }
-
- foreach (explode(',', $data[$key]) as $tag_name)
- {
- array_push(
- $tags_of[$id],
- tag_id_from_tag_name($tag_name)
- );
- }
- }
- }
- }
- else
- {
- array_push($errors, array('path' => $file, 'type' => 'PWG-ERROR-NO-FS'));
- }
- }
-
- if (!$simulate)
- {
- if (count($datas) > 0)
- {
- mass_updates(
- IMAGES_TABLE,
- // fields
- array(
- 'primary' => array('id'),
- 'update' => array_unique(
- array_merge(
- array_diff(
- $site_reader->get_metadata_attributes(),
- // keywords and tags fields are managed separately
- array('keywords', 'tags')
- ),
- array('date_metadata_update'))
- )
- ),
- $datas
- );
- }
- set_tags_of($tags_of);
- }
-
- $template->append('footer_elements', '<!-- metadata update : '
- . get_elapsed_time($start, get_moment())
- . ' -->');
-
- $template->assign(
- 'metadata_result',
- array(
- 'NB_ELEMENTS_DONE' => count($datas),
- 'NB_ELEMENTS_CANDIDATES' => count($files),
- 'NB_ERRORS' => count($errors),
- ));
-}
-
-// +-----------------------------------------------------------------------+
-// | template initialization |
-// +-----------------------------------------------------------------------+
-$template->set_filenames(array('update'=>'admin/site_update.tpl'));
-$result_title = '';
-if (isset($simulate) and $simulate)
-{
- $result_title.= l10n('update_simulation_title').' ';
-}
-
-// used_metadata string is displayed to inform admin which metadata will be
-// used from files for synchronization
-$used_metadata = implode( ', ', $site_reader->get_metadata_attributes());
-if ($site_is_remote and !isset($_POST['submit']) )
-{
- $used_metadata.= ' + ...';
-}
-
-$template->assign(
- array(
- 'SITE_URL'=>$site_url,
- 'U_SITE_MANAGER'=> get_root_url().'admin.php?page=site_manager',
- 'L_RESULT_UPDATE'=>$result_title.l10n('update_part_research'),
- 'L_RESULT_METADATA'=>$result_title.l10n('update_result_metadata'),
- 'METADATA_LIST' => $used_metadata,
- 'U_HELP' => get_root_url().'popuphelp.php?page=synchronize',
- ));
-
-// +-----------------------------------------------------------------------+
-// | introduction : choices |
-// +-----------------------------------------------------------------------+
-if (!isset($_POST['submit']) or (isset($simulate) and $simulate))
-{
- if (isset($simulate) and $simulate)
- {
- $tpl_introduction = array(
- 'sync' => $_POST['sync'],
- 'display_info' => isset($_POST['display_info']) and $_POST['display_info']==1,
- 'add_to_caddie' => isset($_POST['add_to_caddie']) and $_POST['add_to_caddie']==1,
- 'subcats_included' => isset($_POST['subcats-included']) and $_POST['subcats-included']==1,
- 'privacy_level_selected' => (int)@$_POST['privacy_level'],
- );
-
- if (isset($_POST['cat']) and is_numeric($_POST['cat']))
- {
- $cat_selected = array($_POST['cat']);
- }
- else
- {
- $cat_selected = array();
- }
- }
- else
- {
- $tpl_introduction = array(
- 'sync' => 'dirs',
- 'display_info' => false,
- 'add_to_caddie' => false,
- 'subcats_included' => true,
- 'privacy_level_selected' => 0,
- );
-
- $cat_selected = array();
- }
-
- $tpl_introduction['privacy_level_options']=array();
- foreach ($conf['available_permission_levels'] as $level)
- {
- $tpl_introduction['privacy_level_options'][$level] = l10n( sprintf('Level %d', $level) );
- }
-
- $template->assign('introduction', $tpl_introduction);
-
- $query = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE site_id = '.$site_id.'
-;';
- display_select_cat_wrapper($query,
- $cat_selected,
- 'category_options',
- false);
-}
-
-if (count($errors) > 0)
-{
- foreach ($errors as $error)
- {
- $template->append(
- 'sync_errors',
- array(
- 'ELEMENT' => $error['path'],
- 'LABEL' => $error['type'].' ('.$error_labels[$error['type']][0].')'
- ));
- }
-
- foreach ($error_labels as $error_type=>$error_description)
- {
- $template->append(
- 'sync_error_captions',
- array(
- 'TYPE' => $error_type,
- 'LABEL' => $error_description[1]
- ));
- }
-}
-
-if (count($infos) > 0
- and isset($_POST['display_info'])
- and $_POST['display_info'] == 1)
-{
- foreach ($infos as $info)
- {
- $template->append(
- 'sync_infos',
- array(
- 'ELEMENT' => $info['path'],
- 'LABEL' => $info['info']
- ));
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | sending html code |
-// +-----------------------------------------------------------------------+
-$template->assign_var_from_handle('ADMIN_CONTENT', 'update');
-?>
diff --git a/BSF/admin/stats.php b/BSF/admin/stats.php
deleted file mode 100644
index 9892127c8..000000000
--- a/BSF/admin/stats.php
+++ /dev/null
@@ -1,514 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined("PHPWG_ROOT_PATH"))
-{
- die ("Hacking attempt!");
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/functions_history.inc.php');
-
-// +-----------------------------------------------------------------------+
-// | Functions |
-// +-----------------------------------------------------------------------+
-
-function get_summary($year = null, $month = null, $day = null)
-{
- $query = '
-SELECT
- year,
- month,
- day,
- hour,
- nb_pages
- FROM '.HISTORY_SUMMARY_TABLE;
-
- if (isset($day))
- {
- $query.= '
- WHERE year = '.$year.'
- AND month = '.$month.'
- AND day = '.$day.'
- AND hour IS NOT NULL
- ORDER BY
- year ASC,
- month ASC,
- day ASC,
- hour ASC
-;';
- }
- elseif (isset($month))
- {
- $query.= '
- WHERE year = '.$year.'
- AND month = '.$month.'
- AND day IS NOT NULL
- AND hour IS NULL
- ORDER BY
- year ASC,
- month ASC,
- day ASC
-;';
- }
- elseif (isset($year))
- {
- $query.= '
- WHERE year = '.$year.'
- AND month IS NOT NULL
- AND day IS NULL
- ORDER BY
- year ASC,
- month ASC
-;';
- }
- else
- {
- $query.= '
- WHERE year IS NOT NULL
- AND month IS NULL
- ORDER BY
- year ASC
-;';
- }
-
- $result = pwg_query($query);
-
- $output = array();
- while ($row = mysql_fetch_array($result))
- {
- array_push($output, $row);
- }
-
- return $output;
-}
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | Refresh summary from details |
-// +-----------------------------------------------------------------------+
-
-$query = '
-SELECT
- date,
- HOUR(time) AS hour,
- MAX(id) AS max_id,
- COUNT(*) AS nb_pages
- FROM '.HISTORY_TABLE.'
- WHERE summarized = \'false\'
- GROUP BY
- date ASC,
- HOUR(time) ASC
-;';
-$result = pwg_query($query);
-
-$need_update = array();
-
-$max_id = 0;
-$is_first = true;
-$first_time_key = null;
-
-while ($row = mysql_fetch_array($result))
-{
- $time_keys = array(
- substr($row['date'], 0, 4), //yyyy
- substr($row['date'], 0, 7), //yyyy-mm
- substr($row['date'], 0, 10),//yyyy-mm-dd
- sprintf(
- '%s-%02u',
- $row['date'], $row['hour']
- ),
- );
-
- foreach ($time_keys as $time_key)
- {
- if (!isset($need_update[$time_key]))
- {
- $need_update[$time_key] = 0;
- }
- $need_update[$time_key] += $row['nb_pages'];
- }
-
- if ($row['max_id'] > $max_id)
- {
- $max_id = $row['max_id'];
- }
-
- if ($is_first)
- {
- $is_first = false;
- $first_time_key = $time_keys[3];
- }
-}
-
-// Only the oldest time_key might be already summarized, so we have to
-// update the 4 corresponding lines instead of simply inserting them.
-//
-// For example, if the oldest unsummarized is 2005.08.25.21, the 4 lines
-// that can be updated are:
-//
-// +---------------+----------+
-// | id | nb_pages |
-// +---------------+----------+
-// | 2005 | 241109 |
-// | 2005-08 | 20133 |
-// | 2005-08-25 | 620 |
-// | 2005-08-25-21 | 151 |
-// +---------------+----------+
-
-
-$updates = array();
-$inserts = array();
-
-if (isset($first_time_key))
-{
- list($year, $month, $day, $hour) = explode('-', $first_time_key);
-
- $query = '
-SELECT *
- FROM '.HISTORY_SUMMARY_TABLE.'
- WHERE year='.$year.'
- AND ( month IS NULL
- OR ( month='.$month.'
- AND ( day is NULL
- OR (day='.$day.'
- AND (hour IS NULL OR hour='.$hour.')
- )
- )
- )
- )
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_assoc($result))
- {
- $key = sprintf('%4u', $row['year']);
- if ( isset($row['month']) )
- {
- $key .= sprintf('-%02u', $row['month']);
- if ( isset($row['day']) )
- {
- $key .= sprintf('-%02u', $row['day']);
- if ( isset($row['hour']) )
- {
- $key .= sprintf('-%02u', $row['hour']);
- }
- }
- }
-
- if (isset($need_update[$key]))
- {
- $row['nb_pages'] += $need_update[$key];
- array_push($updates, $row);
- unset($need_update[$key]);
- }
- }
-}
-
-foreach ($need_update as $time_key => $nb_pages)
-{
- $time_tokens = explode('-', $time_key);
-
- array_push(
- $inserts,
- array(
- 'year' => $time_tokens[0],
- 'month' => @$time_tokens[1],
- 'day' => @$time_tokens[2],
- 'hour' => @$time_tokens[3],
- 'nb_pages' => $nb_pages,
- )
- );
-}
-
-if (count($updates) > 0)
-{
- mass_updates(
- HISTORY_SUMMARY_TABLE,
- array(
- 'primary' => array('year','month','day','hour'),
- 'update' => array('nb_pages'),
- ),
- $updates
- );
-}
-
-if (count($inserts) > 0)
-{
- mass_inserts(
- HISTORY_SUMMARY_TABLE,
- array_keys($inserts[0]),
- $inserts
- );
-}
-
-if ($max_id != 0)
-{
- $query = '
-UPDATE '.HISTORY_TABLE.'
- SET summarized = \'true\'
- WHERE summarized = \'false\'
- AND id <= '.$max_id.'
-;';
- pwg_query($query);
-}
-
-// +-----------------------------------------------------------------------+
-// | Page parameters check |
-// +-----------------------------------------------------------------------+
-
-foreach (array('day', 'month', 'year') as $key)
-{
- if (isset($_GET[$key]))
- {
- $page[$key] = (int)$_GET[$key];
- }
-}
-
-if (isset($page['day']))
-{
- if (!isset($page['month']))
- {
- die('month is missing in URL');
- }
-}
-
-if (isset($page['month']))
-{
- if (!isset($page['year']))
- {
- die('year is missing in URL');
- }
-}
-
-$summary_lines = get_summary(
- @$page['year'],
- @$page['month'],
- @$page['day']
- );
-
-// +-----------------------------------------------------------------------+
-// | Display statistics header |
-// +-----------------------------------------------------------------------+
-
-// page title creation
-$title_parts = array();
-
-$url = PHPWG_ROOT_PATH.'admin.php?page=stats';
-
-array_push(
- $title_parts,
- '<a href="'.$url.'">'.l10n('Overall').'</a>'
- );
-
-$period_label = l10n('Year');
-
-if (isset($page['year']))
-{
- $url.= '&amp;year='.$page['year'];
-
- array_push(
- $title_parts,
- '<a href="'.$url.'">'.$page['year'].'</a>'
- );
-
- $period_label = l10n('Month');
-}
-
-if (isset($page['month']))
-{
- $url.= '&amp;month='.$page['month'];
-
- array_push(
- $title_parts,
- '<a href="'.$url.'">'.$lang['month'][$page['month']].'</a>'
- );
-
- $period_label = l10n('Day');
-}
-
-if (isset($page['day']))
-{
- $url.= '&amp;day='.$page['day'];
-
- $time = mktime(12, 0, 0, $page['month'], $page['day'], $page['year']);
-
- $day_title = sprintf(
- '%u (%s)',
- $page['day'],
- $lang['day'][date('w', $time)]
- );
-
- array_push(
- $title_parts,
- '<a href="'.$url.'">'.$day_title.'</a>'
- );
-
- $period_label = l10n('Hour');
-}
-
-$template->set_filename('stats', 'admin/stats.tpl');
-
-// TabSheet initialization
-history_tabsheet();
-
-$base_url = get_root_url().'admin.php?page=history';
-
-$template->assign(
- array(
- 'L_STAT_TITLE' => implode($conf['level_separator'], $title_parts),
- 'PERIOD_LABEL' => $period_label,
- 'U_HELP' => get_root_url().'popuphelp.php?page=history',
- 'F_ACTION' => $base_url,
- )
- );
-
-// +-----------------------------------------------------------------------+
-// | Display statistic rows |
-// +-----------------------------------------------------------------------+
-
-$max_width = 400;
-
-$datas = array();
-
-if (isset($page['day']))
-{
- $key = 'hour';
- $min_x = 0;
- $max_x = 23;
-}
-elseif (isset($page['month']))
-{
- $key = 'day';
- $min_x = 1;
- $max_x = date(
- 't',
- mktime(12, 0, 0, $page['month'], 1, $page['year'])
- );
-}
-elseif (isset($page['year']))
-{
- $key = 'month';
- $min_x = 1;
- $max_x = 12;
-}
-else
-{
- $key = 'year';
-}
-
-$max_pages = 1;
-foreach ($summary_lines as $line)
-{
- if ($line['nb_pages'] > $max_pages)
- {
- $max_pages = $line['nb_pages'];
- }
-
- $datas[ $line[$key] ] = $line['nb_pages'];
-}
-
-if (!isset($min_x) and !isset($max_x) and count($datas) > 0)
-{
- $min_x = min(array_keys($datas));
- $max_x = max(array_keys($datas));
-}
-
-if (count($datas) > 0)
-{
- for ($i = $min_x; $i <= $max_x; $i++)
- {
- if (!isset($datas[$i]))
- {
- $datas[$i] = 0;
- }
-
- $url = null;
-
- if (isset($page['day']))
- {
- $value = sprintf('%02u', $i);
- }
- else if (isset($page['month']))
- {
- $url =
- get_root_url().'admin.php'
- .'?page=stats'
- .'&amp;year='.$page['year']
- .'&amp;month='.$page['month']
- .'&amp;day='.$i
- ;
-
- $time = mktime(12, 0, 0, $page['month'], $i, $page['year']);
-
- $value = $i.' ('.$lang['day'][date('w', $time)].')';
- }
- else if (isset($page['year']))
- {
- $url =
- get_root_url().'admin.php'
- .'?page=stats'
- .'&amp;year='.$page['year']
- .'&amp;month='.$i
- ;
-
- $value = $lang['month'][$i];
- }
- else
- {
- // at least the year is defined
- $url =
- get_root_url().'admin.php'
- .'?page=stats'
- .'&amp;year='.$i
- ;
-
- $value = $i;
- }
-
- if ($datas[$i] != 0 and isset($url))
- {
- $value = '<a href="'.$url.'">'.$value.'</a>';
- }
-
- $template->append(
- 'statrows',
- array(
- 'VALUE' => $value,
- 'PAGES' => $datas[$i],
- 'WIDTH' => ceil(($datas[$i] * $max_width) / $max_pages ),
- )
- );
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | Sending html code |
-// +-----------------------------------------------------------------------+
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'stats');
-?> \ No newline at end of file
diff --git a/BSF/admin/tags.php b/BSF/admin/tags.php
deleted file mode 100644
index 36e668a3d..000000000
--- a/BSF/admin/tags.php
+++ /dev/null
@@ -1,246 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if( !defined("PHPWG_ROOT_PATH") )
-{
- die ("Hacking attempt!");
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | edit tags |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST['submit']) and !is_adviser())
-{
- $query = '
-SELECT name
- FROM '.TAGS_TABLE.'
-;';
- $existing_names = array_from_query($query, 'name');
-
-
- $current_name_of = array();
- $query = '
-SELECT id, name
- FROM '.TAGS_TABLE.'
- WHERE id IN ('.$_POST['edit_list'].')
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $current_name_of[ $row['id'] ] = $row['name'];
- }
-
- $updates = array();
- // we must not rename tag with an already existing name
- foreach (explode(',', $_POST['edit_list']) as $tag_id)
- {
- $tag_name = stripslashes($_POST['tag_name-'.$tag_id]);
-
- if ($tag_name != $current_name_of[$tag_id])
- {
- if (in_array($tag_name, $existing_names))
- {
- array_push(
- $page['errors'],
- sprintf(
- l10n('Tag "%s" already exists'),
- $tag_name
- )
- );
- }
- else if (!empty($tag_name))
- {
- array_push(
- $updates,
- array(
- 'id' => $tag_id,
- 'name' => addslashes($tag_name),
- 'url_name' => str2url($tag_name),
- )
- );
- }
- }
- }
- mass_updates(
- TAGS_TABLE,
- array(
- 'primary' => array('id'),
- 'update' => array('name', 'url_name'),
- ),
- $updates
- );
-}
-
-// +-----------------------------------------------------------------------+
-// | delete tags |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST['delete']) and isset($_POST['tags']) and !is_adviser())
-{
- $query = '
-SELECT name
- FROM '.TAGS_TABLE.'
- WHERE id IN ('.implode(',', $_POST['tags']).')
-;';
- $tag_names = array_from_query($query, 'name');
-
- $query = '
-DELETE
- FROM '.IMAGE_TAG_TABLE.'
- WHERE tag_id IN ('.implode(',', $_POST['tags']).')
-;';
- pwg_query($query);
-
- $query = '
-DELETE
- FROM '.TAGS_TABLE.'
- WHERE id IN ('.implode(',', $_POST['tags']).')
-;';
- pwg_query($query);
-
- array_push(
- $page['infos'],
- l10n_dec(
- 'The %d following tag were deleted',
- 'The %d following tags were deleted',
- count($tag_names)).' : '.
- implode(', ', $tag_names)
- );
-}
-
-// +-----------------------------------------------------------------------+
-// | add a tag |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST['add']) and !empty($_POST['add_tag']) and !is_adviser())
-{
- $tag_name = $_POST['add_tag'];
-
- // does the tag already exists?
- $query = '
-SELECT id
- FROM '.TAGS_TABLE.'
- WHERE name = \''.$tag_name.'\'
-;';
- $existing_tags = array_from_query($query, 'id');
-
- if (count($existing_tags) == 0)
- {
- mass_inserts(
- TAGS_TABLE,
- array('name', 'url_name'),
- array(
- array(
- 'name' => $tag_name,
- 'url_name' => str2url($tag_name),
- )
- )
- );
-
- array_push(
- $page['infos'],
- sprintf(
- l10n('Tag "%s" was added'),
- stripslashes($tag_name)
- )
- );
- }
- else
- {
- array_push(
- $page['errors'],
- sprintf(
- l10n('Tag "%s" already exists'),
- stripslashes($tag_name)
- )
- );
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | template init |
-// +-----------------------------------------------------------------------+
-
-$template->set_filenames(array('tags' => 'admin/tags.tpl'));
-
-$template->assign(
- array(
- 'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=tags'
- )
- );
-
-// +-----------------------------------------------------------------------+
-// | form creation |
-// +-----------------------------------------------------------------------+
-
-$template->assign(
- array(
- 'TAG_SELECTION' => get_html_tag_selection(
- get_all_tags(),
- 'tags'
- ),
- )
- );
-
-if (isset($_POST['edit']) and isset($_POST['tags']))
-{
- $template->assign(
- array(
- 'EDIT_TAGS_LIST' => implode(',', $_POST['tags']),
- )
- );
-
- $query = '
-SELECT id, name
- FROM '.TAGS_TABLE.'
- WHERE id IN ('.implode(',', $_POST['tags']).')
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $name_of[ $row['id'] ] = $row['name'];
- }
-
- foreach ($_POST['tags'] as $tag_id)
- {
- $template->append(
- 'tags',
- array(
- 'ID' => $tag_id,
- 'NAME' => $name_of[$tag_id],
- )
- );
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | sending html code |
-// +-----------------------------------------------------------------------+
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'tags');
-
-?>
diff --git a/BSF/admin/thumbnail.php b/BSF/admin/thumbnail.php
deleted file mode 100644
index 57ecf9cdb..000000000
--- a/BSF/admin/thumbnail.php
+++ /dev/null
@@ -1,352 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-//------------------------------------------------------------------- functions
-// RatioResizeImg creates a new picture (a thumbnail since it is supposed to
-// be smaller than original picture !) in the sub directory named
-// "thumbnail".
-function RatioResizeImg($path, $newWidth, $newHeight, $tn_ext)
-{
- global $conf, $lang, $page;
-
- if (!function_exists('gd_info'))
- {
- return;
- }
-
- $filename = basename($path);
- $dirname = dirname($path);
-
- // extension of the picture filename
- $extension = get_extension($filename);
-
- if (in_array($extension, array('jpg', 'JPG', 'jpeg', 'JPEG')))
- {
- $srcImage = @imagecreatefromjpeg($path);
- }
- else if ($extension == 'png' or $extension == 'PNG')
- {
- $srcImage = @imagecreatefrompng($path);
- }
- else
- {
- unset($extension);
- }
-
- if ( isset( $srcImage ) )
- {
- // width/height
- $srcWidth = imagesx( $srcImage );
- $srcHeight = imagesy( $srcImage );
- $ratioWidth = $srcWidth/$newWidth;
- $ratioHeight = $srcHeight/$newHeight;
-
- // maximal size exceeded ?
- if ( ( $ratioWidth > 1 ) or ( $ratioHeight > 1 ) )
- {
- if ( $ratioWidth < $ratioHeight)
- {
- $destWidth = $srcWidth/$ratioHeight;
- $destHeight = $newHeight;
- }
- else
- {
- $destWidth = $newWidth;
- $destHeight = $srcHeight/$ratioWidth;
- }
- }
- else
- {
- $destWidth = $srcWidth;
- $destHeight = $srcHeight;
- }
- // according to the GD version installed on the server
- if ( $_POST['gd'] == 2 )
- {
- // GD 2.0 or more recent -> good results (but slower)
- $destImage = imagecreatetruecolor( $destWidth, $destHeight);
- imagecopyresampled( $destImage, $srcImage, 0, 0, 0, 0,
- $destWidth,$destHeight,$srcWidth,$srcHeight );
- }
- else
- {
- // GD prior to version 2 -> pretty bad results :-/ (but fast)
- $destImage = imagecreate( $destWidth, $destHeight);
- imagecopyresized( $destImage, $srcImage, 0, 0, 0, 0,
- $destWidth,$destHeight,$srcWidth,$srcHeight );
- }
-
- if (($tndir = mkget_thumbnail_dir($dirname, $page['errors'])) == false)
- {
- return false;
- }
-
- $dest_file = $tndir.'/'.$conf['prefix_thumbnail'];
- $dest_file.= get_filename_wo_extension($filename);
- $dest_file.= '.'.$tn_ext;
-
- // creation and backup of final picture
- if (!is_writable($tndir))
- {
- array_push($page['errors'], '['.$tndir.'] : '.l10n('no_write_access'));
- return false;
- }
- imagejpeg($destImage, $dest_file);
- // freeing memory ressources
- imagedestroy( $srcImage );
- imagedestroy( $destImage );
-
- list($tn_width, $tn_height) = getimagesize($dest_file);
- $tn_size = floor(filesize($dest_file) / 1024).' KB';
-
- $info = array( 'path' => $path,
- 'tn_file' => $dest_file,
- 'tn_width' => $tn_width,
- 'tn_height' => $tn_height,
- 'tn_size' => $tn_size );
- return $info;
- }
- // error
- else
- {
- echo l10n('tn_no_support')." ";
- if ( isset( $extenstion ) )
- {
- echo l10n('tn_format').' '.$extension;
- }
- else
- {
- echo l10n('tn_thisformat');
- }
- exit();
- }
-}
-
-$pictures = array();
-$stats = array();
-// +-----------------------------------------------------------------------+
-// | template initialization |
-// +-----------------------------------------------------------------------+
-$template->set_filenames( array('thumbnail'=>'admin/thumbnail.tpl') );
-
-$template->assign(array(
- 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=thumbnail',
- ));
-// +-----------------------------------------------------------------------+
-// | search pictures without thumbnails |
-// +-----------------------------------------------------------------------+
-$wo_thumbnails = array();
-$thumbnalized = array();
-
-
-// what is the directory to search in ?
-$query = '
-SELECT galleries_url FROM '.SITES_TABLE.'
- WHERE galleries_url NOT LIKE "http://%"
-;';
-$result = pwg_query($query);
-while ( $row=mysql_fetch_assoc($result) )
-{
- $basedir = preg_replace('#/*$#', '', $row['galleries_url']);
- $fs = get_fs($basedir);
-
- // because isset is one hundred time faster than in_array
- $fs['thumbnails'] = array_flip($fs['thumbnails']);
-
- foreach ($fs['elements'] as $path)
- {
- // only pictures need thumbnails
- if (in_array(get_extension($path), $conf['picture_ext']))
- {
- $dirname = dirname($path);
- $filename = basename($path);
-
- // only files matching the authorized filename pattern can be considered
- // as "without thumbnail"
- if (!preg_match('/^[a-zA-Z0-9-_.]+$/', $filename))
- {
- continue;
- }
-
- // searching the element
- $filename_wo_ext = get_filename_wo_extension($filename);
- $tn_ext = '';
- $base_test = $dirname.'/thumbnail/';
- $base_test.= $conf['prefix_thumbnail'].$filename_wo_ext.'.';
- foreach ($conf['picture_ext'] as $ext)
- {
- if (isset($fs['thumbnails'][$base_test.$ext]))
- {
- $tn_ext = $ext;
- break;
- }
- }
-
- if (empty($tn_ext))
- {
- array_push($wo_thumbnails, $path);
- }
- }
- } // next element
-} // next site id
-// +-----------------------------------------------------------------------+
-// | thumbnails creation |
-// +-----------------------------------------------------------------------+
-if (isset($_POST['submit']))
-{
- $times = array();
- $infos = array();
-
- // checking criteria
- if (!ereg('^[0-9]{2,3}$', $_POST['width']) or $_POST['width'] < 10)
- {
- array_push($page['errors'], l10n('tn_err_width').' 10');
- }
- if (!ereg('^[0-9]{2,3}$', $_POST['height']) or $_POST['height'] < 10)
- {
- array_push($page['errors'], l10n('tn_err_height').' 10');
- }
-
- // picture miniaturization
- if (count($page['errors']) == 0)
- {
- $num = 1;
- foreach ($wo_thumbnails as $path)
- {
- if (is_numeric($_POST['n']) and $num > $_POST['n'])
- {
- break;
- }
-
- $starttime = get_moment();
- if ($info = RatioResizeImg($path,$_POST['width'],$_POST['height'],'jpg'))
- {
- $endtime = get_moment();
- $info['time'] = ($endtime - $starttime) * 1000;
- array_push($infos, $info);
- array_push($times, $info['time']);
- array_push($thumbnalized, $path);
- $num++;
- }
- else
- {
- break;
- }
- }
-
- if (count($infos) > 0)
- {
- $sum = array_sum($times);
- $average = $sum / count($times);
- sort($times, SORT_NUMERIC);
- $max = array_pop($times);
- if (count($thumbnalized) == 1)
- {
- $min = $max;
- }
- else
- {
- $min = array_shift($times);
- }
-
- $tpl_var =
- array(
- 'TN_NB'=>count($infos),
- 'TN_TOTAL'=>number_format($sum, 2, '.', ' ').' ms',
- 'TN_MAX'=>number_format($max, 2, '.', ' ').' ms',
- 'TN_MIN'=>number_format($min, 2, '.', ' ').' ms',
- 'TN_AVERAGE'=>number_format($average, 2, '.', ' ').' ms',
- 'elements' => array()
- );
-
- foreach ($infos as $i => $info)
- {
- $tpl_var['elements'][] =
- array(
- 'PATH'=>$info['path'],
- 'TN_FILE_IMG'=>$info['tn_file'],
- 'TN_FILESIZE_IMG'=>$info['tn_size'],
- 'TN_WIDTH_IMG'=>$info['tn_width'],
- 'TN_HEIGHT_IMG'=>$info['tn_height'],
- 'GEN_TIME'=>number_format($info['time'], 2, '.', ' ').' ms',
- );
- }
- $template->assign('results', $tpl_var);
- }
- }
-}
-// +-----------------------------------------------------------------------+
-// | form & pictures without thumbnails display |
-// +-----------------------------------------------------------------------+
-$remainings = array_diff($wo_thumbnails, $thumbnalized);
-
-if (count($remainings) > 0)
-{
- $form_url = get_root_url().'admin.php?page=thumbnail';
- $gd = !empty($_POST['gd']) ? $_POST['gd'] : 2;
- $width = !empty($_POST['width']) ? $_POST['width'] : $conf['tn_width'];
- $height = !empty($_POST['height']) ? $_POST['height'] : $conf['tn_height'];
- $n = !empty($_POST['n']) ? $_POST['n'] : 5;
-
- $template->assign(
- 'params',
- array(
- 'F_ACTION'=> $form_url,
- 'GD_SELECTED' => $gd,
- 'N_SELECTED' => $n,
- 'WIDTH_TN'=>$width,
- 'HEIGHT_TN'=>$height
- ));
-
- $template->assign(
- 'TOTAL_NB_REMAINING',
- count($remainings));
-
- foreach ($remainings as $path)
- {
- list($width, $height) = getimagesize($path);
- $size = floor(filesize($path) / 1024).' KB';
-
- $template->append(
- 'remainings',
- array(
- 'PATH'=>$path,
- 'FILESIZE_IMG'=>$size,
- 'WIDTH_IMG'=>$width,
- 'HEIGHT_IMG'=>$height,
- ));
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | return to admin |
-// +-----------------------------------------------------------------------+
-$template->assign_var_from_handle('ADMIN_CONTENT', 'thumbnail');
-?>
diff --git a/BSF/admin/upload.php b/BSF/admin/upload.php
deleted file mode 100644
index 6e258f05a..000000000
--- a/BSF/admin/upload.php
+++ /dev/null
@@ -1,209 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if( !defined("PHPWG_ROOT_PATH") )
-{
- die ("Hacking attempt!");
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/functions_waiting.inc.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-//--------------------------------------------------------------------- updates
-
-if (isset($_POST))
-{
- $to_validate = array();
- $to_reject = array();
-
- if (isset($_POST['submit']))
- {
- foreach (explode(',', $_POST['list']) as $waiting_id)
- {
- if (isset($_POST['action-'.$waiting_id]))
- {
- switch ($_POST['action-'.$waiting_id])
- {
- case 'reject' :
- {
- array_push($to_reject, $waiting_id);
- break;
- }
- case 'validate' :
- {
- array_push($to_validate, $waiting_id);
- break;
- }
- }
- }
- }
- }
- elseif (isset($_POST['validate-all']) and !empty($_POST['list']))
- {
- $to_validate = explode(',', $_POST['list']);
- }
- elseif (isset($_POST['reject-all']) and !empty($_POST['list']))
- {
- $to_reject = explode(',', $_POST['list']);
- }
-
- if (count($to_validate) > 0)
- {
- $query = '
-UPDATE '.WAITING_TABLE.'
- SET validated = \'true\'
- WHERE id IN ('.implode(',', $to_validate).')
-;';
- pwg_query($query);
-
- array_push(
- $page['infos'],
- sprintf(
- l10n('%d waiting pictures validated'),
- count($to_validate)
- )
- );
- }
-
- if (count($to_reject) > 0)
- {
- // The uploaded element was refused, we have to delete its reference in
- // the database and to delete the element as well.
- $query = '
-SELECT id, storage_category_id, file, tn_ext
- FROM '.WAITING_TABLE.'
- WHERE id IN ('.implode(',', $to_reject).')
-;';
- $result = pwg_query($query);
- while($row = mysql_fetch_array($result))
- {
- $dir = get_complete_dir($row['storage_category_id']);
- unlink($dir.$row['file']);
- $element_info = array(
- 'path' => $dir.$row['file'],
- 'tn_ext' =>
- (isset($row['tn_ext']) and $row['tn_ext']!='') ? $row['tn_ext']:'jpg'
- );
- $tn_path = get_thumbnail_path( $element_info );
-
- if ( @is_file($tn_path) )
- {
- unlink( $tn_path );
- }
- }
-
- $query = '
-DELETE
- FROM '.WAITING_TABLE.'
- WHERE id IN ('.implode(',', $to_reject).')
-;';
- pwg_query($query);
-
- array_push(
- $page['infos'],
- sprintf(
- l10n('%d waiting pictures rejected'),
- count($to_reject)
- )
- );
- }
-}
-
-//----------------------------------------------------- template initialization
-$template->set_filenames(array('upload'=>'admin/upload.tpl'));
-
-// TabSheet initialization
-waiting_tabsheet();
-
-$template->assign(array(
- 'F_ACTION'=>str_replace( '&', '&amp;', $_SERVER['REQUEST_URI'])
- ));
-
-//---------------------------------------------------------------- form display
-$cat_names = array();
-$list = array();
-
-$query = 'SELECT * FROM '.WAITING_TABLE;
-$query.= " WHERE validated = 'false'";
-$query.= ' ORDER BY storage_category_id';
-$query.= ';';
-$result = pwg_query( $query );
-while ( $row = mysql_fetch_array( $result ) )
-{
- if ( !isset( $cat_names[$row['storage_category_id']] ) )
- {
- $cat = get_cat_info( $row['storage_category_id'] );
- $cat_names[$row['storage_category_id']] = array();
- $cat_names[$row['storage_category_id']]['dir'] =
- PHPWG_ROOT_PATH.get_complete_dir( $row['storage_category_id'] );
- $cat_names[$row['storage_category_id']]['display_name'] =
- get_cat_display_name($cat['upper_names']);
- }
- $preview_url = PHPWG_ROOT_PATH.$cat_names[$row['storage_category_id']]['dir'].$row['file'];
-
- $tpl_var =
- array(
- 'CATEGORY_IMG'=>$cat_names[$row['storage_category_id']]['display_name'],
- 'ID_IMG'=>$row['id'],
- 'DATE_IMG' => date('Y-m-d H:i:s', $row['date']),
- 'FILE_TITLE'=>$row['file'],
- 'FILE_IMG' =>
- (strlen($row['file']) > 10) ?
- (substr($row['file'], 0, 10)).'...' : $row['file'],
- 'PREVIEW_URL_IMG'=>$preview_url,
- 'UPLOAD_EMAIL'=>get_email_address_as_display_text($row['mail_address']),
- 'UPLOAD_USERNAME'=>$row['username']
- );
-
- // is there an existing associated thumnail ?
- if ( !empty( $row['tn_ext'] ))
- {
- $thumbnail = $conf['prefix_thumbnail'];
- $thumbnail.= get_filename_wo_extension( $row['file'] );
- $thumbnail.= '.'.$row['tn_ext'];
- $url = $cat_names[$row['storage_category_id']]['dir'];
- $url.= 'thumbnail/'.$thumbnail;
-
- $tpl_var['thumbnail'] =
- array(
- 'PREVIEW_URL_TN_IMG' => $url,
- 'FILE_TN_IMG' =>
- (strlen($thumbnail) > 10) ?
- (substr($thumbnail, 0, 10)).'...' : $thumbnail,
- 'FILE_TN_TITLE' => $thumbnail
- );
- }
- $template->append('pictures', $tpl_var);
- array_push($list, $row['id']);
-}
-
-$template->assign('LIST',implode(',', $list) );
-
-//----------------------------------------------------------- sending html code
-$template->assign_var_from_handle('ADMIN_CONTENT', 'upload');
-?>
diff --git a/BSF/admin/user_list.php b/BSF/admin/user_list.php
deleted file mode 100644
index 635424b6a..000000000
--- a/BSF/admin/user_list.php
+++ /dev/null
@@ -1,688 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * Add users and manage users list
- */
-
-// +-----------------------------------------------------------------------+
-// | functions |
-// +-----------------------------------------------------------------------+
-
-/**
- * returns a list of users depending on page filters (in $_GET)
- *
- * Each user comes with his related informations : id, username, mail
- * address, list of groups.
- *
- * @return array
- */
-function get_filtered_user_list()
-{
- global $conf, $page;
-
- $users = array();
-
- // filter
- $filter = array();
-
- if (isset($_GET['username']) and !empty($_GET['username']))
- {
- $username = str_replace('*', '%', $_GET['username']);
- if (function_exists('mysql_real_escape_string'))
- {
- $filter['username'] = mysql_real_escape_string($username);
- }
- else
- {
- $filter['username'] = mysql_escape_string($username);
- }
- }
-
- if (isset($_GET['group'])
- and -1 != $_GET['group']
- and is_numeric($_GET['group']))
- {
- $filter['group'] = $_GET['group'];
- }
-
- if (isset($_GET['status'])
- and in_array($_GET['status'], get_enums(USER_INFOS_TABLE, 'status')))
- {
- $filter['status'] = $_GET['status'];
- }
-
- // how to order the list?
- $order_by = 'id';
- if (isset($_GET['order_by'])
- and in_array($_GET['order_by'], array_keys($page['order_by_items'])))
- {
- $order_by = $_GET['order_by'];
- }
-
- $direction = 'ASC';
- if (isset($_GET['direction'])
- and in_array($_GET['direction'], array_keys($page['direction_items'])))
- {
- $direction = strtoupper($_GET['direction']);
- }
-
- // search users depending on filters and order
- $query = '
-SELECT DISTINCT u.'.$conf['user_fields']['id'].' AS id,
- u.'.$conf['user_fields']['username'].' AS username,
- u.'.$conf['user_fields']['email'].' AS email,
- ui.status,
- ui.adviser,
- ui.enabled_high,
- ui.level
- FROM '.USERS_TABLE.' AS u
- INNER JOIN '.USER_INFOS_TABLE.' AS ui
- ON u.'.$conf['user_fields']['id'].' = ui.user_id
- LEFT JOIN '.USER_GROUP_TABLE.' AS ug
- ON u.'.$conf['user_fields']['id'].' = ug.user_id
- WHERE u.'.$conf['user_fields']['id'].' > 0';
- if (isset($filter['username']))
- {
- $query.= '
- AND u.'.$conf['user_fields']['username'].' LIKE \''.$filter['username'].'\'';
- }
- if (isset($filter['group']))
- {
- $query.= '
- AND ug.group_id = '.$filter['group'];
- }
- if (isset($filter['status']))
- {
- $query.= '
- AND ui.status = \''.$filter['status']."'";
- }
- $query.= '
- ORDER BY '.$order_by.' '.$direction.'
-;';
-
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $user = $row;
- $user['groups'] = array();
-
- array_push($users, $user);
- }
-
- // add group lists
- $user_ids = array();
- foreach ($users as $i => $user)
- {
- $user_ids[$i] = $user['id'];
- }
- $user_nums = array_flip($user_ids);
-
- if (count($user_ids) > 0)
- {
- $query = '
-SELECT user_id, group_id
- FROM '.USER_GROUP_TABLE.'
- WHERE user_id IN ('.implode(',', $user_ids).')
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- array_push(
- $users[$user_nums[$row['user_id']]]['groups'],
- $row['group_id']
- );
- }
- }
-
- return $users;
-}
-
-// +-----------------------------------------------------------------------+
-// | initialization |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-$page['order_by_items'] = array(
- 'id' => l10n('registration_date'),
- 'username' => l10n('Username'),
- 'level' => l10n('Privacy level'),
- 'language' => l10n('language'),
- );
-
-$page['direction_items'] = array(
- 'asc' => l10n('ascending'),
- 'desc' => l10n('descending')
- );
-
-// +-----------------------------------------------------------------------+
-// | add a user |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST['submit_add']))
-{
- $page['errors'] = register_user(
- $_POST['login'], $_POST['password'], $_POST['email'], false);
-
- if (count($page['errors']) == 0)
- {
- array_push(
- $page['infos'],
- sprintf(
- l10n('user "%s" added'),
- $_POST['login']
- )
- );
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | user list |
-// +-----------------------------------------------------------------------+
-
-$page['filtered_users'] = get_filtered_user_list();
-
-// +-----------------------------------------------------------------------+
-// | selected users |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST['delete']) or isset($_POST['pref_submit']))
-{
- $collection = array();
-
- switch ($_POST['target'])
- {
- case 'all' :
- {
- foreach($page['filtered_users'] as $local_user)
- {
- array_push($collection, $local_user['id']);
- }
- break;
- }
- case 'selection' :
- {
- if (isset($_POST['selection']))
- {
- $collection = $_POST['selection'];
- }
- break;
- }
- }
-
- if (count($collection) == 0)
- {
- array_push($page['errors'], l10n('Select at least one user'));
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | delete users |
-// +-----------------------------------------------------------------------+
-if (isset($_POST['delete']) and count($collection) > 0)
-{
- if (in_array($conf['guest_id'], $collection))
- {
- array_push($page['errors'], l10n('Guest cannot be deleted'));
- }
- if (($conf['guest_id'] != $conf['default_user_id']) and
- in_array($conf['default_user_id'], $collection))
- {
- array_push($page['errors'], l10n('Default user cannot be deleted'));
- }
- if (in_array($conf['webmaster_id'], $collection))
- {
- array_push($page['errors'], l10n('Webmaster cannot be deleted'));
- }
- if (in_array($user['id'], $collection))
- {
- array_push($page['errors'], l10n('You cannot delete your account'));
- }
-
- if (count($page['errors']) == 0)
- {
- if (isset($_POST['confirm_deletion']) and 1 == $_POST['confirm_deletion'])
- {
- foreach ($collection as $user_id)
- {
- delete_user($user_id);
- }
- array_push(
- $page['infos'],
- l10n_dec(
- '%d user deleted', '%d users deleted',
- count($collection)
- )
- );
- foreach ($page['filtered_users'] as $filter_key => $filter_user)
- {
- if (in_array($filter_user['id'], $collection))
- {
- unset($page['filtered_users'][$filter_key]);
- }
- }
- }
- else
- {
- array_push($page['errors'], l10n('You need to confirm deletion'));
- }
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | preferences form submission |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST['pref_submit']) and count($collection) > 0)
-{
- if (-1 != $_POST['associate'])
- {
- $datas = array();
-
- $query = '
-SELECT user_id
- FROM '.USER_GROUP_TABLE.'
- WHERE group_id = '.$_POST['associate'].'
-;';
- $associated = array_from_query($query, 'user_id');
-
- $associable = array_diff($collection, $associated);
-
- if (count($associable) > 0)
- {
- foreach ($associable as $item)
- {
- array_push($datas,
- array('group_id'=>$_POST['associate'],
- 'user_id'=>$item));
- }
-
- mass_inserts(USER_GROUP_TABLE,
- array('group_id', 'user_id'),
- $datas);
- }
- }
-
- if (-1 != $_POST['dissociate'])
- {
- $query = '
-DELETE FROM '.USER_GROUP_TABLE.'
- WHERE group_id = '.$_POST['dissociate'].'
- AND user_id IN ('.implode(',', $collection).')
-';
- pwg_query($query);
- }
-
- // properties to set for the collection (a user list)
- $datas = array();
- $dbfields = array('primary' => array('user_id'), 'update' => array());
-
- $formfields =
- array('nb_image_line', 'nb_line_page', 'template', 'language',
- 'recent_period', 'maxwidth', 'expand', 'show_nb_comments',
- 'show_nb_hits', 'maxheight', 'status', 'enabled_high',
- 'level');
-
- $true_false_fields = array('expand', 'show_nb_comments',
- 'show_nb_hits', 'enabled_high');
- if ($conf['allow_adviser'])
- {
- array_push($formfields, 'adviser');
- array_push($true_false_fields, 'adviser');
- }
-
- foreach ($formfields as $formfield)
- {
- // special for true/false fields
- if (in_array($formfield, $true_false_fields))
- {
- $test = $formfield;
- }
- else
- {
- $test = $formfield.'_action';
- }
-
- if ($_POST[$test] != 'leave')
- {
- array_push($dbfields['update'], $formfield);
- }
- }
-
- // updating elements is useful only if needed...
- if (count($dbfields['update']) > 0)
- {
- $datas = array();
-
- foreach ($collection as $user_id)
- {
- $data = array();
- $data['user_id'] = $user_id;
-
- // TODO : verify if submited values are semanticaly correct
- foreach ($dbfields['update'] as $dbfield)
- {
- // if the action is 'unset', the key won't be in row and
- // mass_updates function will set this field to NULL
- if (in_array($dbfield, $true_false_fields)
- or 'set' == $_POST[$dbfield.'_action'])
- {
- $data[$dbfield] = $_POST[$dbfield];
- }
- }
-
- // special users checks
- if
- (
- ($conf['webmaster_id'] == $user_id) or
- ($conf['guest_id'] == $user_id) or
- ($conf['default_user_id'] == $user_id)
- )
- {
- // status must not be changed
- if (isset($data['status']))
- {
- if ($conf['webmaster_id'] == $user_id)
- {
- $data['status'] = 'webmaster';
- }
- else
- {
- $data['status'] = 'guest';
- }
- }
-
- // could not be adivser
- if (isset($data['adviser']))
- {
- $data['adviser'] = 'false';
- }
- }
-
- array_push($datas, $data);
- }
-
- mass_updates(USER_INFOS_TABLE, $dbfields, $datas);
- }
-
- redirect(
- get_root_url().
- 'admin.php'.
- get_query_string_diff(array(), false)
- );
-}
-
-// +-----------------------------------------------------------------------+
-// | groups list |
-// +-----------------------------------------------------------------------+
-
-$groups[-1] = '------------';
-
-$query = '
-SELECT id, name
- FROM '.GROUPS_TABLE.'
- ORDER BY name ASC
-;';
-$result = pwg_query($query);
-
-while ($row = mysql_fetch_array($result))
-{
- $groups[$row['id']] = $row['name'];
-}
-
-// +-----------------------------------------------------------------------+
-// | template init |
-// +-----------------------------------------------------------------------+
-
-$template->set_filenames(array('user_list'=>'admin/user_list.tpl'));
-
-$base_url = PHPWG_ROOT_PATH.'admin.php?page=user_list';
-
-if (isset($_GET['start']) and is_numeric($_GET['start']))
-{
- $start = $_GET['start'];
-}
-else
-{
- $start = 0;
-}
-
-$template->assign(
- array(
- 'U_HELP' => get_root_url().'popuphelp.php?page=user_list',
-
- 'F_ADD_ACTION' => $base_url,
- 'F_USERNAME' => @htmlentities($_GET['username']),
- 'F_FILTER_ACTION' => get_root_url().'admin.php'
- ));
-
-// Hide radio-button if not allow to assign adviser
-if ($conf['allow_adviser'])
-{
- $template->assign('adviser', true);
-}
-
-// Filter status options
-$status_options[-1] = '------------';
-foreach (get_enums(USER_INFOS_TABLE, 'status') as $status)
-{
- $status_options[$status] = l10n('user_status_'.$status);
-}
-$template->assign('status_options', $status_options);
-$template->assign('status_selected',
- isset($_GET['status']) ? $_GET['status'] : '');
-
-// Filter group options
-$template->assign('group_options', $groups);
-$template->assign('group_selected',
- isset($_GET['group']) ? $_GET['group'] : '');
-
-// Filter order options
-$template->assign('order_options', $page['order_by_items']);
-$template->assign('order_selected',
- isset($_GET['order_by']) ? $_GET['order_by'] : '');
-
-// Filter direction options
-$template->assign('direction_options', $page['direction_items']);
-$template->assign('direction_selected',
- isset($_GET['direction']) ? $_GET['direction'] : '');
-
-
-if (isset($_POST['pref_submit']))
-{
- $template->assign(
- array(
- 'NB_IMAGE_LINE' => $_POST['nb_image_line'],
- 'NB_LINE_PAGE' => $_POST['nb_line_page'],
- 'MAXWIDTH' => $_POST['maxwidth'],
- 'MAXHEIGHT' => $_POST['maxheight'],
- 'RECENT_PERIOD' => $_POST['recent_period'],
- ));
-}
-else
-{
- $default_user = get_default_user_info(true);
- $template->assign(
- array(
- 'NB_IMAGE_LINE' => $default_user['nb_image_line'],
- 'NB_LINE_PAGE' => $default_user['nb_line_page'],
- 'MAXWIDTH' => $default_user['maxwidth'],
- 'MAXHEIGHT' => $default_user['maxheight'],
- 'RECENT_PERIOD' => $default_user['recent_period'],
- ));
-}
-
-// Template Options
-$template->assign('template_options', get_pwg_themes());
-$template->assign('template_selected',
- isset($_POST['pref_submit']) ? $_POST['template'] : get_default_template());
-
-// Language options
-$template->assign('language_options', get_languages());
-$template->assign('language_selected',
- isset($_POST['pref_submit']) ? $_POST['language'] : get_default_language());
-
-// Status options
-foreach (get_enums(USER_INFOS_TABLE, 'status') as $status)
-{
- // Only status <= can be assign
- if (is_autorize_status(get_access_type_status($status)))
- {
- $pref_status_options[$status] = l10n('user_status_'.$status);
- }
-}
-$template->assign('pref_status_options', $pref_status_options);
-$template->assign('pref_status_selected',
- isset($_POST['pref_submit']) ? $_POST['status'] : 'normal');
-
-// associate and dissociate options
-$template->assign('association_options', $groups);
-$template->assign('associate_selected',
- isset($_POST['pref_submit']) ? $_POST['associate'] : '');
-$template->assign('dissociate_selected',
- isset($_POST['pref_submit']) ? $_POST['dissociate'] : '');
-
-
-// user level options
-foreach ($conf['available_permission_levels'] as $level)
-{
- $level_options[$level] = l10n(sprintf('Level %d', $level));
-}
-$template->assign('level_options', $level_options);
-$template->assign('level_selected',
- isset($_POST['pref_submit']) ? $_POST['level'] : $default_user['level']);
-
-// +-----------------------------------------------------------------------+
-// | navigation bar |
-// +-----------------------------------------------------------------------+
-
-$url = PHPWG_ROOT_PATH.'admin.php'.get_query_string_diff(array('start'));
-
-$navbar = create_navigation_bar(
- $url,
- count($page['filtered_users']),
- $start,
- $conf['users_page']
- );
-
-$template->assign('NAVBAR', $navbar);
-
-// +-----------------------------------------------------------------------+
-// | user list |
-// +-----------------------------------------------------------------------+
-
-$profile_url = get_root_url().'admin.php?page=profile&amp;user_id=';
-$perm_url = get_root_url().'admin.php?page=user_perm&amp;user_id=';
-
-$visible_user_list = array();
-foreach ($page['filtered_users'] as $num => $local_user)
-{
- // simulate LIMIT $start, $conf['users_page']
- if ($num < $start)
- {
- continue;
- }
- if ($num >= $start + $conf['users_page'])
- {
- break;
- }
-
- $visible_user_list[] = $local_user;
-}
-
-// allow plugins to fill template var plugin_user_list_column_titles and
-// plugin_columns/plugin_actions for each user in the list
-$visible_user_list = trigger_event('loc_visible_user_list', $visible_user_list);
-
-foreach ($visible_user_list as $local_user)
-{
- $groups_string = preg_replace(
- '/(\d+)/e',
- "\$groups['$1']",
- implode(
- ', ',
- $local_user['groups']
- )
- );
-
- if (isset($_POST['pref_submit'])
- and isset($_POST['selection'])
- and in_array($local_user['id'], $_POST['selection']))
- {
- $checked = 'checked="checked"';
- }
- else
- {
- $checked = '';
- }
-
- $properties = array();
- if ( $local_user['level'] != 0 )
- {
- $properties[] = l10n( sprintf('Level %d', $local_user['level']) );
- }
- $properties[] =
- (isset($local_user['enabled_high']) and ($local_user['enabled_high'] == 'true'))
- ? l10n('is_high_enabled') : l10n('is_high_disabled');
-
- $template->append(
- 'users',
- array(
- 'ID' => $local_user['id'],
- 'CHECKED' => $checked,
- 'U_PROFILE' => $profile_url.$local_user['id'],
- 'U_PERM' => $perm_url.$local_user['id'],
- 'USERNAME' => $local_user['username']
- .($local_user['id'] == $conf['guest_id']
- ? '<BR />['.l10n('is_the_guest').']' : '')
- .($local_user['id'] == $conf['default_user_id']
- ? '<BR />['.l10n('is_the_default').']' : ''),
- 'STATUS' => l10n('user_status_'.
- $local_user['status']).(($local_user['adviser'] == 'true')
- ? '<BR />['.l10n('adviser').']' : ''),
- 'EMAIL' => get_email_address_as_display_text($local_user['email']),
- 'GROUPS' => $groups_string,
- 'PROPERTIES' => implode( ', ', $properties),
- 'plugin_columns' => isset($local_user['plugin_columns']) ? $local_user['plugin_columns'] : array(),
- 'plugin_actions' => isset($local_user['plugin_actions']) ? $local_user['plugin_actions'] : array(),
- )
- );
-}
-
-// +-----------------------------------------------------------------------+
-// | html code display |
-// +-----------------------------------------------------------------------+
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'user_list');
-?>
diff --git a/BSF/admin/user_perm.php b/BSF/admin/user_perm.php
deleted file mode 100644
index f7002455a..000000000
--- a/BSF/admin/user_perm.php
+++ /dev/null
@@ -1,223 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('IN_ADMIN'))
-{
- die('Hacking attempt!');
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | variables init |
-// +-----------------------------------------------------------------------+
-
-if (isset($_GET['user_id']) and is_numeric($_GET['user_id']))
-{
- $page['user'] = $_GET['user_id'];
-}
-else
-{
- die('user_id URL parameter is missing');
-}
-
-// +-----------------------------------------------------------------------+
-// | updates |
-// +-----------------------------------------------------------------------+
-
-if (isset($_POST['falsify'])
- and isset($_POST['cat_true'])
- and count($_POST['cat_true']) > 0)
-{
- // if you forbid access to a category, all sub-categories become
- // automatically forbidden
- $subcats = get_subcat_ids($_POST['cat_true']);
- $query = '
-DELETE FROM '.USER_ACCESS_TABLE.'
- WHERE user_id = '.$page['user'].'
- AND cat_id IN ('.implode(',', $subcats).')
-;';
- pwg_query($query);
-}
-else if (isset($_POST['trueify'])
- and isset($_POST['cat_false'])
- and count($_POST['cat_false']) > 0)
-{
- $uppercats = get_uppercat_ids($_POST['cat_false']);
- $private_uppercats = array();
-
- $query = '
-SELECT id
- FROM '.CATEGORIES_TABLE.'
- WHERE id IN ('.implode(',', $uppercats).')
- AND status = \'private\'
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- array_push($private_uppercats, $row['id']);
- }
-
- // retrying to authorize a category which is already authorized may cause
- // an error (in SQL statement), so we need to know which categories are
- // accesible
- $authorized_ids = array();
-
- $query = '
-SELECT cat_id
- FROM '.USER_ACCESS_TABLE.'
- WHERE user_id = '.$page['user'].'
-;';
- $result = pwg_query($query);
-
- while ($row = mysql_fetch_array($result))
- {
- array_push($authorized_ids, $row['cat_id']);
- }
-
- $inserts = array();
- $to_autorize_ids = array_diff($private_uppercats, $authorized_ids);
- foreach ($to_autorize_ids as $to_autorize_id)
- {
- array_push($inserts, array('user_id' => $page['user'],
- 'cat_id' => $to_autorize_id));
- }
-
- mass_inserts(USER_ACCESS_TABLE, array('user_id','cat_id'), $inserts);
-}
-
-// +-----------------------------------------------------------------------+
-// | template init |
-// +-----------------------------------------------------------------------+
-
-$template->set_filenames(
- array(
- 'user_perm' => 'admin/user_perm.tpl',
- 'double_select' => 'admin/double_select.tpl'
- )
- );
-
-$template->assign(
- array(
- 'TITLE' =>
- sprintf(
- l10n('Manage permissions for user "%s"'),
- get_username($page['user']
- )
- ),
- 'L_CAT_OPTIONS_TRUE'=>l10n('authorized'),
- 'L_CAT_OPTIONS_FALSE'=>l10n('forbidden'),
-
- 'F_ACTION' =>
- PHPWG_ROOT_PATH.
- 'admin.php?page=user_perm'.
- '&amp;user_id='.$page['user']
- )
- );
-
-
-// retrieve category ids authorized to the groups the user belongs to
-$group_authorized = array();
-
-$query = '
-SELECT DISTINCT cat_id, c.uppercats, c.global_rank
- FROM '.USER_GROUP_TABLE.' AS ug
- INNER JOIN '.GROUP_ACCESS_TABLE.' AS ga
- ON ug.group_id = ga.group_id
- INNER JOIN '.CATEGORIES_TABLE.' AS c
- ON c.id = ga.cat_id
- WHERE ug.user_id = '.$page['user'].'
-;';
-$result = pwg_query($query);
-
-if (mysql_num_rows($result) > 0)
-{
- $cats = array();
- while ($row = mysql_fetch_array($result))
- {
- array_push($cats, $row);
- array_push($group_authorized, $row['cat_id']);
- }
- usort($cats, 'global_rank_compare');
-
- foreach ($cats as $category)
- {
- $template->append(
- 'categories_because_of_groups',
- get_cat_display_name_cache($category['uppercats'], null, false)
- );
- }
-}
-
-// only private categories are listed
-$query_true = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_ACCESS_TABLE.' ON cat_id = id
- WHERE status = \'private\'
- AND user_id = '.$page['user'];
-if (count($group_authorized) > 0)
-{
- $query_true.= '
- AND cat_id NOT IN ('.implode(',', $group_authorized).')';
-}
-$query_true.= '
-;';
-display_select_cat_wrapper($query_true,array(),'category_option_true');
-
-$result = pwg_query($query_true);
-$authorized_ids = array();
-while ($row = mysql_fetch_array($result))
-{
- array_push($authorized_ids, $row['id']);
-}
-
-$query_false = '
-SELECT id,name,uppercats,global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE status = \'private\'';
-if (count($authorized_ids) > 0)
-{
- $query_false.= '
- AND id NOT IN ('.implode(',', $authorized_ids).')';
-}
-if (count($group_authorized) > 0)
-{
- $query_false.= '
- AND id NOT IN ('.implode(',', $group_authorized).')';
-}
-$query_false.= '
-;';
-display_select_cat_wrapper($query_false,array(),'category_option_false');
-
-// +-----------------------------------------------------------------------+
-// | sending html code |
-// +-----------------------------------------------------------------------+
-
-$template->assign_var_from_handle('DOUBLE_SELECT', 'double_select');
-$template->assign_var_from_handle('ADMIN_CONTENT', 'user_perm');
-?>
diff --git a/BSF/admin/ws_checker.php b/BSF/admin/ws_checker.php
deleted file mode 100644
index 7da8fac10..000000000
--- a/BSF/admin/ws_checker.php
+++ /dev/null
@@ -1,334 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Next evolution...
-// Out of parameter WS management
-// The remainer objective is to check
-// - Does Web Service working properly?
-// - Does any access return something really?
-// Give a way to check to the webmaster...
-// These questions are one of module name explanations (checker).
-
-if((!defined("PHPWG_ROOT_PATH")) or (!$conf['allow_web_services']))
-{
- die('Hacking attempt!');
-}
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'include/ws_functions.inc.php');
-
-/**
- * official_req returns the managed requests list in array format
- * FIXME A New list need to be build for ws_checker.php
- * returns array of authrorized request/methods
- * */
-function official_req()
-{
- $official = array( /* Requests are limited to */
- 'categories.' /* all categories. methods */
- , 'categories.getImages'
- , 'categories.getList'
- , 'images.' /* all images. methods */
- , 'images.getInfo'
- , 'images.addComment'
- , 'images.search'
- , 'tags.' /* all tags. methods */
- , 'tags.getImages'
- , 'tags.getList'
- );
- if (function_exists('local_req')) {
- $local = local_req();
- return array_merge( $official, $local );
- }
- return $official;
-}
-
-/**
- * check_target($string) verifies and corrects syntax of target parameter
- * example : check_target(cat/23,24,24,24,25,27) returns cat/23-25,27
- * */
-function check_target($list)
-{
- if ( $list !== '' )
- {
- $type = explode('/',$list); // Find type list
- if ( !in_array($type[0],array('list','cat','tag') ) )
- {
- $type[0] = 'list'; // Assume an id list
- }
- $ids = explode( ',',$type[1] );
- $list = $type[0] . '/';
-
- // 1,2,21,3,22,4,5,9-12,6,11,12,13,2,4,6,
-
- $result = expand_id_list( $ids );
-
- // 1,2,3,4,5,6,9,10,11,12,13,21,22,
- // I would like
- // 1-6,9-13,21-22
- $serial[] = $result[0]; // To be shifted
- foreach ($result as $k => $id)
- {
- $next_less_1 = (isset($result[$k + 1]))? $result[$k + 1] - 1:-1;
- if ( $id == $next_less_1 and end($serial)=='-' )
- { // nothing to do
- }
- elseif ( $id == $next_less_1 )
- {
- $serial[]=$id;
- $serial[]='-';
- }
- else
- {
- $serial[]=$id; // end serie or non serie
- }
- }
- $null = array_shift($serial); // remove first value
- $list .= array_shift($serial); // add the real first one
- $separ = ',';
- foreach ($serial as $id)
- {
- $list .= ($id=='-') ? '' : $separ . $id;
- $separ = ($id=='-') ? '-':','; // add comma except if hyphen
- }
- }
- return $list;
-}
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// accepted queries
-$req_type_list = official_req();
-
-//--------------------------------------------------------- update informations
-$chk_partner = '';
-// Is a new access required?
-
-if (isset($_POST['wsa_submit']))
-{
-// Check $_post (Some values are commented - maybe a future use)
-$add_partner = htmlspecialchars( $_POST['add_partner'], ENT_QUOTES);
-$add_target = check_target( $_POST['add_target']) ;
-$add_end = ( is_numeric($_POST['add_end']) ) ? $_POST['add_end']:0;
-$add_request = htmlspecialchars( $_POST['add_request'], ENT_QUOTES);
-$add_limit = ( is_numeric($_POST['add_limit']) ) ? $_POST['add_limit']:1;
-$add_comment = htmlspecialchars( $_POST['add_comment'], ENT_QUOTES);
-if ( strlen($add_partner) < 8 )
-{ // TODO What? Complete with some MD5...
-}
- $query = '
-INSERT INTO '.WEB_SERVICES_ACCESS_TABLE.'
-( `name` , `access` , `start` , `end` , `request` , `limit` , `comment` )
-VALUES (' . "
- '$add_partner', '$add_target',
- NOW(),
- ADDDATE( NOW(), INTERVAL $add_end DAY),
- '$add_request', '$add_limit', '$add_comment' );";
-
- pwg_query($query);
- $chk_partner = $add_partner;
-
- $template->append(
- 'update_results',
- l10n('ws_adding_legend').l10n('ws_success_upd')
- );
-}
-
-// Next, Update selected access
-if (isset($_POST['wsu_submit']))
-{
- $upd_end = ( is_numeric($_POST['upd_end']) ) ? $_POST['upd_end']:0;
- $settxt = ' end = ADDDATE(NOW(), INTERVAL '. $upd_end .' DAY)';
-
- if ((isset($_POST['selection'])) and (trim($settxt) != ''))
- {
- $uid = (int) $_POST['selection'];
- $query = '
- UPDATE '.WEB_SERVICES_ACCESS_TABLE.'
- SET '.$settxt.'
- WHERE id = '.$uid.'; ';
- pwg_query($query);
- $template->append(
- 'update_results',
- l10n('ws_update_legend').l10n('ws_success_upd')
- );
- } else {
- $template->append(
- 'update_results',
- l10n('ws_update_legend').l10n('ws_failed_upd')
- );
- }
-}
-// Next, Delete selected access
-
-if (isset($_POST['wsX_submit']))
-{
- if ((isset($_POST['delete_confirmation']))
- and (isset($_POST['selection'])))
- {
- $uid = (int) $_POST['selection'];
- $query = 'DELETE FROM '.WEB_SERVICES_ACCESS_TABLE.'
- WHERE id = '.$uid.'; ';
- pwg_query($query);
- $template->append(
- 'update_results',
- l10n('ws_delete_legend').l10n('ws_success_upd')
- );
- } else {
- $template->append(
- 'update_results',
- l10n('Not selected / Not confirmed').l10n('ws_failed_upd')
- );
- }
-}
-
-
-
-$template->assign(
- array(
- 'U_HELP' => get_root_url().'popuphelp.php?page=web_service',
- )
- );
-
-// Build where
-$where = '';
-$order = ' ORDER BY `id` DESC' ;
-
-$query = '
-SELECT *
- FROM '.WEB_SERVICES_ACCESS_TABLE.'
-WHERE 1=1 '
-.$where.
-' '
-.$order.
-';';
-$result = pwg_query($query);
-$acc_list = mysql_num_rows($result);
-$result = pwg_query($query);
-// +-----------------------------------------------------------------------+
-// | template init |
-// +-----------------------------------------------------------------------+
-
-$template->set_filenames(
- array(
- 'ws_checker' => 'admin/ws_checker.tpl'
- )
- );
-
-
-// Access List
-while ($row = mysql_fetch_array($result))
-{
- $chk_partner = ( $chk_partner == '' ) ? $row['name'] : $chk_partner;
- $template->append(
- 'access_list',
- array(
- 'ID' => $row['id'],
- 'NAME' =>
- (is_adviser()) ? '*********' : $row['name'],
- 'TARGET' => $row['access'],
- 'END' => $row['end'],
- 'REQUEST' => $row['request'],
- 'LIMIT' => $row['limit'],
- 'COMMENT' => $row['comment'],
- )
- );
-}
-
-$template->assign('add_requests', $req_type_list);
-
-$template->assign('add_limits', $conf['ws_allowed_limit'] );
-
-// Postponed Start Date
-// By default 0, 1, 2, 3, 5, 7, 14 or 30 days
-/*foreach ($conf['ws_postponed_start'] as $value) {
- $template->assign_block_vars(
- 'add_start',
- array(
- 'VALUE'=> $value,
- 'CONTENT' => $value,
- 'SELECTED' => ($conf['ws_postponed_start'][0] == $value) ? $selected:'',
- )
- );
-}*/
-
-// Durations (Allowed Web Services Period)
-// By default 10, 5, 2, 1 year(s) or 6, 3, 1 month(s) or 15, 10, 7, 5, 1, 0 day(s)
-$template->assign('add_ends', $conf['ws_durations']);
-
-if ( $chk_partner !== '' )
-{
- if (function_exists('curl_init'))
- {
- $request = get_absolute_root_url().'ws.php?method=pwg.getVersion&format=rest&'
- . "partner=$chk_partner" ;
- $session = curl_init($request);
- curl_setopt ($session, CURLOPT_POST, true);
- curl_setopt($session, CURLOPT_HEADER, true);
- curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
- $response = curl_exec($session);
- curl_close($session);
- $status_code = array();
- preg_match('/\d\d\d/', $response, $status_code);
- switch( $status_code[0] ) {
- case 200:
- $ws_status = l10n('Web Services under control');
- break;
- case 503:
- $ws_status = 'Piwigo Web Services failed and returned an '
- . 'HTTP status of 503. Service is unavailable. An internal '
- . 'problem prevented us from returning data to you.';
- break;
- case 403:
- $ws_status = 'Piwigo Web Services failed and returned an '
- . 'HTTP status of 403. Access is forbidden. You do not have '
- . 'permission to access this resource, or are over '
- . 'your rate limit.';
- break;
- case 400:
- // You may want to fall through here and read the specific XML error
- $ws_status = 'Piwigo Web Services failed and returned an '
- . 'HTTP status of 400. Bad request. The parameters passed '
- . 'to the service did not match as expected. The exact '
- . 'error is returned in the XML response.';
- break;
- default:
- $ws_status = 'Piwigo Web Services returned an unexpected HTTP '
- . 'status of:' . $status_code[0];
- }
- }
- else
- {
- $ws_status = 'Cannot check - curl not installed';
- }
- $template->assign( 'WS_STATUS', $ws_status );
-}
-
-//----------------------------------------------------------- sending html code
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'ws_checker');
-
-include_once(PHPWG_ROOT_PATH.'include/ws_core.inc.php');
-?>
diff --git a/BSF/category.php b/BSF/category.php
deleted file mode 100644
index 303cc903f..000000000
--- a/BSF/category.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/*
-This file contains now only code to ensure backward url compatibility with
-versions before 1.6
-*/
-
-define('PHPWG_ROOT_PATH','./');
-include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
-
-$url_params=array();
-if ( isset($_GET['cat']) )
-{
- if ( is_numeric($_GET['cat']) )
- {
- $url_params['section'] = 'categories';
- $result = get_cat_info( $_GET['cat'] );
- if ( !empty($result) )
- {
- $url_params['category'] = $result;
- }
- }
- elseif ( in_array($_GET['cat'],
- array('best_rated','most_visited','recent_pics','recent_cats')
- )
- )
- {
- $url_params['section'] = $_GET['cat'];
- }
- else
- {
- page_not_found('');
- }
-}
-
-$url = make_index_url($url_params);
-if (!headers_sent())
-{
- set_status_header(301);
- redirect_http( $url );
-}
-redirect ( $url );
-
-?>
diff --git a/BSF/comments.php b/BSF/comments.php
deleted file mode 100644
index 555986328..000000000
--- a/BSF/comments.php
+++ /dev/null
@@ -1,394 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// +-----------------------------------------------------------------------+
-// | initialization |
-// +-----------------------------------------------------------------------+
-define('PHPWG_ROOT_PATH','./');
-include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_GUEST);
-
-$sort_order = array(
- 'DESC' => l10n('descending'),
- 'ASC' => l10n('ascending')
- );
-
-// sort_by : database fields proposed for sorting comments list
-$sort_by = array(
- 'date' => l10n('comment date'),
- 'image_id' => l10n('picture')
- );
-
-// items_number : list of number of items to display per page
-$items_number = array(5,10,20,50,'all');
-
-// since when display comments ?
-//
-$since_options = array(
- 1 => array('label' => l10n('today'),
- 'clause' => 'date > SUBDATE(CURDATE(), INTERVAL 1 DAY)'),
- 2 => array('label' => sprintf(l10n('last %d days'), 7),
- 'clause' => 'date > SUBDATE(CURDATE(), INTERVAL 7 DAY)'),
- 3 => array('label' => sprintf(l10n('last %d days'), 30),
- 'clause' => 'date > SUBDATE(CURDATE(), INTERVAL 30 DAY)'),
- 4 => array('label' => l10n('the beginning'),
- 'clause' => '1=1') // stupid but generic
- );
-
-$page['since'] = isset($_GET['since']) ? $_GET['since'] : 4;
-
-// on which field sorting
-//
-$page['sort_by'] = 'date';
-// if the form was submitted, it overloads default behaviour
-if (isset($_GET['sort_by']))
-{
- $page['sort_by'] = $_GET['sort_by'];
-}
-
-// order to sort
-//
-$page['sort_order'] = 'DESC';
-// if the form was submitted, it overloads default behaviour
-if (isset($_GET['sort_order']))
-{
- $page['sort_order'] = $_GET['sort_order'];
-}
-
-// number of items to display
-//
-$page['items_number'] = 10;
-if (isset($_GET['items_number']))
-{
- $page['items_number'] = $_GET['items_number'];
-}
-
-$page['where_clauses'] = array();
-
-// which category to filter on ?
-if (isset($_GET['cat']) and 0 != $_GET['cat'])
-{
- $page['where_clauses'][] =
- 'category_id IN ('.implode(',', get_subcat_ids(array($_GET['cat']))).')';
-}
-
-// search a particular author
-if (isset($_GET['author']) and !empty($_GET['author']))
-{
- $page['where_clauses'][] = 'com.author = \''.$_GET['author'].'\'';
-}
-
-// search a substring among comments content
-if (isset($_GET['keyword']) and !empty($_GET['keyword']))
-{
- $page['where_clauses'][] =
- '('.
- implode(' AND ',
- array_map(
- create_function(
- '$s',
- 'return "content LIKE \'%$s%\'";'
- ),
- preg_split('/[\s,;]+/', $_GET['keyword'] )
- )
- ).
- ')';
-}
-
-$page['where_clauses'][] = $since_options[$page['since']]['clause'];
-
-// which status to filter on ?
-if ( !is_admin() )
-{
- $page['where_clauses'][] = 'validated="true"';
-}
-
-$page['where_clauses'][] = get_sql_condition_FandF
- (
- array
- (
- 'forbidden_categories' => 'category_id',
- 'visible_categories' => 'category_id',
- 'visible_images' => 'ic.image_id'
- ),
- '', true
- );
-
-// +-----------------------------------------------------------------------+
-// | comments management |
-// +-----------------------------------------------------------------------+
-if (isset($_GET['delete']) and is_numeric($_GET['delete'])
- and !is_adviser() )
-{// comments deletion
- check_status(ACCESS_ADMINISTRATOR);
- $query = '
-DELETE FROM '.COMMENTS_TABLE.'
- WHERE id='.$_GET['delete'].'
-;';
- pwg_query($query);
-}
-
-if (isset($_GET['validate']) and is_numeric($_GET['validate'])
- and !is_adviser() )
-{ // comments validation
- check_status(ACCESS_ADMINISTRATOR);
- $query = '
-UPDATE '.COMMENTS_TABLE.'
- SET validated = \'true\'
- , validation_date = NOW()
- WHERE id='.$_GET['validate'].'
-;';
- pwg_query($query);
-}
-
-// +-----------------------------------------------------------------------+
-// | page header and options |
-// +-----------------------------------------------------------------------+
-
-$title= l10n('User comments');
-$page['body_id'] = 'theCommentsPage';
-
-$template->set_filenames(array('comments'=>'comments.tpl'));
-$template->assign(
- array(
- 'F_ACTION'=>PHPWG_ROOT_PATH.'comments.php',
- 'F_KEYWORD'=>@htmlspecialchars(stripslashes($_GET['keyword'])),
- 'F_AUTHOR'=>@htmlspecialchars(stripslashes($_GET['author'])),
- )
- );
-
-// +-----------------------------------------------------------------------+
-// | form construction |
-// +-----------------------------------------------------------------------+
-
-// Search in a particular category
-$blockname = 'categories';
-
-$query = '
-SELECT id, name, uppercats, global_rank
- FROM '.CATEGORIES_TABLE.'
-'.get_sql_condition_FandF
- (
- array
- (
- 'forbidden_categories' => 'id',
- 'visible_categories' => 'id'
- ),
- 'WHERE'
- ).'
-;';
-display_select_cat_wrapper($query, array(@$_GET['cat']), $blockname, true);
-
-// Filter on recent comments...
-$tpl_var=array();
-foreach ($since_options as $id => $option)
-{
- $tpl_var[ $id ] = $option['label'];
-}
-$template->assign( 'since_options', $tpl_var);
-$template->assign( 'since_options_selected', $page['since']);
-
-// Sort by
-$template->assign( 'sort_by_options', $sort_by);
-$template->assign( 'sort_by_options_selected', $page['sort_by']);
-
-// Sorting order
-$template->assign( 'sort_order_options', $sort_order);
-$template->assign( 'sort_order_options_selected', $page['sort_order']);
-
-
-// Number of items
-$blockname = 'items_number_option';
-$tpl_var=array();
-foreach ($items_number as $option)
-{
- $tpl_var[ $option ] = is_numeric($option) ? $option : l10n($option);
-}
-$template->assign( 'item_number_options', $tpl_var);
-$template->assign( 'item_number_options_selected', $page['items_number']);
-
-
-// +-----------------------------------------------------------------------+
-// | navigation bar |
-// +-----------------------------------------------------------------------+
-
-if (isset($_GET['start']) and is_numeric($_GET['start']))
-{
- $start = $_GET['start'];
-}
-else
-{
- $start = 0;
-}
-
-$query = '
-SELECT COUNT(DISTINCT(id))
- FROM '.IMAGE_CATEGORY_TABLE.' AS ic
- INNER JOIN '.COMMENTS_TABLE.' AS com
- ON ic.image_id = com.image_id
- WHERE '.implode('
- AND ', $page['where_clauses']).'
-;';
-list($counter) = mysql_fetch_row(pwg_query($query));
-
-$url = PHPWG_ROOT_PATH
- .'comments.php'
- .get_query_string_diff(array('start','delete','validate'));
-
-$navbar = create_navigation_bar($url,
- $counter,
- $start,
- $page['items_number'],
- '');
-
-$template->assign('NAVBAR', $navbar);
-
-// +-----------------------------------------------------------------------+
-// | last comments display |
-// +-----------------------------------------------------------------------+
-
-$comments = array();
-$element_ids = array();
-$category_ids = array();
-
-$query = '
-SELECT com.id AS comment_id
- , com.image_id
- , ic.category_id
- , com.author
- , com.date
- , com.content
- , com.id AS comment_id
- , com.validated
- FROM '.IMAGE_CATEGORY_TABLE.' AS ic
- INNER JOIN '.COMMENTS_TABLE.' AS com
- ON ic.image_id = com.image_id
- WHERE '.implode('
- AND ', $page['where_clauses']).'
- GROUP BY comment_id
- ORDER BY '.$page['sort_by'].' '.$page['sort_order'];
-if ('all' != $page['items_number'])
-{
- $query.= '
- LIMIT '.$start.','.$page['items_number'];
-}
-$query.= '
-;';
-$result = pwg_query($query);
-while ($row = mysql_fetch_assoc($result))
-{
- array_push($comments, $row);
- array_push($element_ids, $row['image_id']);
- array_push($category_ids, $row['category_id']);
-}
-
-if (count($comments) > 0)
-{
- // retrieving element informations
- $elements = array();
- $query = '
-SELECT id, name, file, path, tn_ext
- FROM '.IMAGES_TABLE.'
- WHERE id IN ('.implode(',', $element_ids).')
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_assoc($result))
- {
- $elements[$row['id']] = $row;
- }
-
- // retrieving category informations
- $query = '
-SELECT id, name, permalink, uppercats
- FROM '.CATEGORIES_TABLE.'
- WHERE id IN ('.implode(',', $category_ids).')
-;';
- $categories = hash_from_query($query, 'id');
-
- foreach ($comments as $comment)
- {
- if (!empty($elements[$comment['image_id']]['name']))
- {
- $name=$elements[$comment['image_id']]['name'];
- }
- else
- {
- $name=get_name_from_file($elements[$comment['image_id']]['file']);
- }
-
- // source of the thumbnail picture
- $thumbnail_src = get_thumbnail_url( $elements[$comment['image_id']] );
-
- // link to the full size picture
- $url = make_picture_url(
- array(
- 'category' => $categories[ $comment['category_id'] ],
- 'image_id' => $comment['image_id'],
- 'image_file' => $elements[$comment['image_id']]['file'],
- )
- );
-
- $author = $comment['author'];
- if (empty($comment['author']))
- {
- $author = l10n('guest');
- }
-
- $tpl_comment =
- array(
- 'U_PICTURE' => $url,
- 'TN_SRC' => $thumbnail_src,
- 'ALT' => $name,
- 'AUTHOR' => trigger_event('render_comment_author', $author),
- 'DATE'=>format_date($comment['date'],'mysql_datetime',true),
- 'CONTENT'=>trigger_event('render_comment_content',$comment['content']),
- );
-
- if ( is_admin() )
- {
- $url = get_root_url().'comments.php'.get_query_string_diff(array('delete','validate'));
- $tpl_comment['U_DELETE'] = add_url_params($url,
- array('delete'=>$comment['comment_id'])
- );
-
- if ($comment['validated'] != 'true')
- {
- $tpl_comment['U_VALIDATE'] = add_url_params($url,
- array('validate'=>$comment['comment_id'])
- );
- }
- }
- $template->append('comments', $tpl_comment);
- }
-}
-// +-----------------------------------------------------------------------+
-// | html code display |
-// +-----------------------------------------------------------------------+
-include(PHPWG_ROOT_PATH.'include/page_header.php');
-$template->pparse('comments');
-include(PHPWG_ROOT_PATH.'include/page_tail.php');
-?> \ No newline at end of file
diff --git a/BSF/doc/COPYING b/BSF/doc/COPYING
deleted file mode 100644
index 5b6e7c66c..000000000
--- a/BSF/doc/COPYING
+++ /dev/null
@@ -1,340 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- <signature of Ty Coon>, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/BSF/doc/ChangeLog b/BSF/doc/ChangeLog
deleted file mode 100644
index 7c9c084d7..000000000
--- a/BSF/doc/ChangeLog
+++ /dev/null
@@ -1,822 +0,0 @@
-2005-11-07 Pierrick LE GALL
-
- * bug 180 fixed: remote_site.tpl doesn't validate.
-
- * translation bug fixed: generate_file_listing.php doesn't exist,
- it's create_listing_file.php !
-
-2005-11-07 Pierrick LE GALL
-
- * bug 184 fixed: for the third time...
-
-2005-11-07 Pierrick LE GALL
-
- * improvement: use a "filter" form for adding user comments.
-
-2005-11-05 Pierrick LE GALL
-
- * bug 186 fixed: useless template theme icons deleted. Remaining
- icons in GIF converted to PNG.
-
-2005-10-31 Pierrick LE GALL
-
- * bug 185 fixed: errors in language items.
-
-2005-10-31 Pierrick LE GALL
-
- * modification: use "filter" class for quickconnect box (with some
- custom modifications)
-
- * bug fixed: the total number of pictures had disappeared
-
-2005-10-30 volcom
-
- * bug 190 fixed: issue in stats.tpl display
- * bug fixed: labels of monthly, daily graph fixed
-
-2005-10-26 chrisaga
-
- * bug 177 fixed: for Safari (was fixed for Konqueror only)
-
-2005-10-25 Pierrick LE GALL
-
- * bug 183 fixed: Warning when trying to associate an image with an
- already associated category. Just coded the TODO instructions I
- had let some time ago.
-
-2005-10-23 chrisaga
-
- * bug 184 fixed: .png button left aligned in IE
-
-2005-10-23 Pierrick LE GALL
-
- * bug 182 fixed: newly created user is not displayed in the user
- list.
-
-2005-10-23 Pierrick LE GALL
-
- * bug fixed: during file tree synchronization, warning on finding
- the next rank of category which has no sub-categories yet.
-
-2005-10-23 chrisaga
-
- * bug fixed: cat-list.tpl validate now
-
- * improvement: removed some unnecessary css rules from old tests in
- FROM design in file default-layout.css
-
-2005-10-23 Pierrick LE GALL
-
- * bug 181 fixed: "Parameters not created in phpwebgallery_config
- during upgrade". gallery_title and gallery_description had not
- been added to config table. (use|show)_(exif|iptc) and
- authorize_remembering have also been removed...
-
-2005-10-22 chrisaga
-
- * bug 177 fixed: icon tools wrong position in Safari and Konqueror
- Needed a little trick to fix it. Put the trick in a fix-khtml.css
- Loading in header.tpl and protected from IE, Geko and Opera,
- just in case (couldn't found a safari css-only filter wich validate)
-
- * bug fixed: issue in the FORM in remote_site.tpl which prevented
- HTML validation (still something to do with the TABLE).
-
-2005-10-22 Pierrick LE GALL
-
- * bug fixed: link on a single day in
- Administration>General>History was missing
-
-2005-10-22 Pierrick LE GALL
-
- * bug 173 fixed: due to phpBB user identifiers management, the
- method to find the next user identifier has changer to MAX+1.
-
- * improvement: information message when new user added
-
- * bug fixed: language item "Username" used instead of "login".
-
-2005-10-20 chrisaga
-
- * bug 176 fixed: need a javascript to handle transparent PNG
- background in IE (tribute to Bob Osola
- http://homepage.ntlworld.com/bobosola/index.htm)
-
- * display: fixed another IE childselector bug in Categories
- Management admin page and improved display of this page in all
- browsers too.
-
-2005-10-18 Pierrick LE GALL
-
- * bug 174 fixed: use_exif_mapping configuration parameter was not
- used to list database fields to update from EXIF values.
-
-2005-10-18 Pierrick LE GALL
-
- * bug 172 fixed: crash when changing password with an external
- users table. The same kind of correction was also made in
- picture.php and register.php.
-
-2005-10-18 Pierrick LE GALL
-
- * bug 159 and 166 fixed: parameter "options" for mail() function
- disabled by default.
-
-2005-10-18 chrisaga
-
- * display : smaller font-size and, as requested, fonts more like 1.4
-
- * bug 165 fixed : La largeur par dĂŠfaut en PIXELS pas en Kb
-
-2005-10-18 chrisaga
-
- * display : in group_list.tpl - wrong form class, mixed html tags, ...
-
- * display : suppress bullets in admin->synchronize and checkbox
- under select
-
- * display : set standard font size to 12pt
-
-2005-10-17 Pierrick LE GALL
-
- * improvement: use new function get_language_filepath in about.php
- (complement of bug 168 correction)
-
-2005-10-17 Pierrick LE GALL
-
- * bug 154 fixed: "Calendar category, too precise dates". Bug came
- from the bigger precision of creation_date and available_date in
- images tables. Need to retrieve only the year-month-day
- information.
-
-2005-10-17 volcom
-
- * new: history details by month,day
-
-2005-10-15 Pierrick LE GALL
-
- * modification: localized labels in Administration>Pictures>Caddie
-
- * translation: bug fixed on special categories title in French
-
- * translation: all help pages were translated in french
-
-2005-10-09 Pierrick LE GALL
-
- * new: "quick start" section in Administration>General>Instructions
-
-2005-10-08 Pierrick LE GALL
-
- * translation: new items related to configuration parameters
- gallery_title and gallery_description in GUI.
-
-2005-10-08 Pierrick LE GALL
-
- * modification: configuration parameters gallery_title and
- gallery_description are GUI managed in
- Administration>Configuration>General
-
- * bug fixed: configuration parameters (use|show)_(exif|iptc) and
- authorize_remembering should have been deleted from config table
- some time ago.
-
-2005-10-08 Pierrick LE GALL
-
- * new: mass virtual categories movement manager in
- Administration>Categories>Move screen.
-
-2005-10-05 Pierrick LE GALL
-
- * bug 160 fixed: (part one of the bug) hard coded column name of
- users table had to be replaced by the configurable column
- name. This correction was made by a full rewrite of filtered users
- list management. The other bug (not submited in bugtracker) that
- needed this rewrite was that when you choose "all" as target for
- mass users modification, you expected to apply modification on
- filtered users, not all users.
-
- * bug 160 fixed: (part two of the bug) hard coded column name for
- primary key in mass_updates function.
-
- * modification: configuration parameter users_page is now located
- in the correct file (include/config_default.inc.php instead of
- admin/user_list.php)
-
-2005-09-27 Pierrick LE GALL
-
- * bug 168 fixed: crash when language file does not
- exists. Constant PHPWG_DEFAULT_LANGUAGE added. New function
- get_language_filepath always used to find language files.
-
-2005-09-26 Pierrick LE GALL
-
- * bug 158 fixed: display error on "double selects" screens (with
- MSIE, strange behavior). VDigital modification optimizes width
- usage :-)
-
-2005-09-25 Pierrick LE GALL
-
- * bug 163 fixed: link error when cookies disabled in admin/stats
-
-2005-09-24 Pierrick LE GALL
-
- * bug fixed: HTML error on nested UL in categories menu.
-
- * bug 161 fixed: guest_id not taken into account for history table
- insert.
-
- * bug 164 fixed: category inserted in history table becomes too
- long if HTML tags are kept.
-
-2005-09-24 Pierrick LE GALL
-
- * bug 162 fixed: division by zero when trying to view "all" items
- in admin/element_set_(global|unit)
-
- * bug 156 fixed: error when selection is empty was not catched.
-
-2005-09-21 Pierrick LE GALL
-
- * bug 151 fixed: default maxheight was not proposed as "set to"
- option in admin/user_list
-
-2005-09-21 Pierrick LE GALL
-
- * bug 150 fixed: in category permissions management, wrong column
- name when using an external users table.
-
-2005-09-20 Pierrick LE GALL
-
- * update: upgrade from 1.4.0 or 1.4.1. Upgrade from 1.3.x is not
- available anymore.
-
- * update: README files updated for very near branch 1.5 :-)
-
- * new: file tools/config_local.inc.php as example for optional
- include/config_local.inc.php
-
- * bug fixed: configuration parameter show_picture_name_on_title
- was useless
-
-2005-09-18 Pierrick LE GALL
-
- * bug 111 fixed: "Can't add virtual category when cookie
- disabled". Correction reported from branch 1.4.
-
- * bug 109 fixed : "disabled "best rated" menu item when rating is
- not enabled". Correction reported from branch 1.4.
-
- * bug 95 fixed : "default maxwidth and maxheight not registered
- ". Correction reported from branch 1.4.
-
-2005-09-18 Pierrick LE GALL
-
- * bug 107 fixed: crash when logging visit on a category containing
- "'" character. Correction reported from branch 1.4
-
- * bug fixed: in admin/stats, incorrect SQL queries gave no result.
-
-2005-09-18 Pierrick LE GALL
-
- * bug 101 fixed: "problem with IE search on keywords". correction
- reported from branch 1.4
-
-2005-09-17 Pierrick LE GALL
-
- * new: automatic new password sent by mail when requested by user
-
-2005-09-17 Pierrick LE GALL
-
- * improvement: add information about how to use an external table
- for users
-
- * bug fixed: uses user configuration fields for filtering in
- admin/user_list
-
- * bug fixed: don't try to create feeds automatically during
- sync_users (when line in user_infos is missing)
-
- * bug fixed: create_user_infos function gives status admin if user
- id matches $conf['webmaster_id']
-
-2005-09-17 Pierrick LE GALL
-
- * new: the number of elements waiting for validation is notified
- in RSS feed.
-
-2005-09-17 Pierrick LE GALL
-
- * translation: common and admin strings translated in french from
- english files
-
-2005-09-14 Pierrick LE GALL
-
- * improvement: long localized messages are in HTML files instead
- of $lang array. This is the case of admin/help and about pages.
-
- * deletion: of unused functions (ts_to_mysqldt, is_image,
- TN_exists, check_date_format, date_convert,
- get_category_directories, get_used_metadata_list, array_remove,
- pwg_write_debug, get_group_restrictions,
- get_all_group_restrictions, is_group_allowed, style_select,
- deprecated_getAttribute).
-
- * new: many new contextual help pages to replace descriptions
- previously included in pages.
-
- * modification: reorganisation of language files. Deletion of
- unused language keys, alphabetical sort. No faq.lang.php anymore
- (replaced by help.html). Only done for en_UK.iso-8859-1.
-
-2005-09-03 Pierrick LE GALL
-
- * bug fixed : no display of first added element date in
- admin/intro if no element in the gallery.
-
-2005-09-03 Pierrick LE GALL
-
- * new : template yoga, made by yoDan, helped by chrisaga for
- integration becomes the official template.
-
-2005-09-03 Pierrick LE GALL
-
- * modification : less configuration parameters in administration
- screen. These parameters are move to
- include/config_default.inc.php.
-
- * new : ability to add a single picture to caddie from picture.php
-
- * new : contextual help, only a few pages are available.
-
- * new : ability to delete users from admin/user_list
-
- * modification : reorganization of configuration file
-
- * new : configuration parameter use_exif_mapping
-
- * improvement : MOD hidemail added to standard
-
-2005-08-26 Pierrick LE GALL
-
- * new : HTML BODY identifier to let CSS stylesheets manage
- specific behaviour.
-
- * deletion : admin/search useless
-
- * improvement : in admin/user_list, special behaviour for
- true/false fields (expand, show_comments)
-
- * new : gallery_title and gallery_description are displayed at the
- top of each page.
-
- * improvement : simplification in HTML for categories menu.
-
- * improvement : standardization of presentation in all public
- pages (identification, registration, search, profile,
- notification, comments, etc.)
-
-2005-08-25 Pierrick LE GALL
-
- * deletion : no mail notification anymore. Feature replaced by RSS
- feed notification.
-
- * improvement : on waiting pictures management. Ability to
- validate all or reject all in one clic.
-
-2005-08-21 Pierrick LE GALL
-
- * modification : adaptation of template variables and blocks in
- comments page to display comment by comment instead of picture by
- picture.
-
-2005-08-20 Pierrick LE GALL
-
- * improvement : dedicated page for user comments validation/reject
- in administration. (screen is not shared with public part of the
- gallery). Ability to validate all or reject all in one clic.
-
-2005-08-19 Pierrick LE GALL
-
- * improvement : less compact presentation of screen
- admin/element_set_unit.
-
-2005-08-19 Pierrick LE GALL
-
- * improvement : standardization of categories navigation bar on
- top of administration screen element_set_(global|unit),
- cat_modify, cat_list, cat_perm.
-
- * new : direct link to admin/cat_modify from category.php.
-
-2005-08-19 Pierrick LE GALL
-
- * modification : RSS feed work only with a given feed
- identifier. Thus we can avoid fixed frequency notification to
- concentrate on variable frequency notification, which is much more
- interesting. To do this, feeds have moved to a dedicated table
- allowing each user (including guest user) to have more than on
- feed.
-
-2005-08-18 Pierrick LE GALL
-
- * bug 133 fixed : (report from branch 1.4) Deleting user favorites
- is too restrictive. Instead of deleting a favorite because it
- belongs to at least one forbidden category, a favorite is deleted
- if it belongs to no authorized category (which was the expected
- behaviour).
-
-2005-08-18 Pierrick LE GALL
-
- * bug 134 fixed : "Nb of images incorectly rendered in "tool tip"
- near category in category menu". Correction reported (and
- improved) from branch 1.4
-
-2005-08-18 Pierrick LE GALL
-
- * improvement : screen admin/picture_modify
- rewritten. Presentation copied from admin/cat_modify : fieldsets
- regroup fields. Ability to synchronize metadata for the displayed
- item.
-
- * bug 110 fixed : "return to element view from element edition
- fails depending on permissions". If a reachable (for the connected
- admin) category is available, a "jump to" link is displayed, by
- default, using the category given in URL.
-
- * bug fixed : in mass_updates function, the first item of
- $fields['update'] has not always 0 for id (as in any array).
-
- * modification : get_keywords function understands spaces as
- separator, allow less than 3 chars keywords, allow quotes.
-
- * new : ability to allow HTML in picture or category description
- (false by default)
-
-2005-08-17 Pierrick LE GALL
-
- * improvement : in admin/user_perm, already authorized categories
- thanks to group associations are displayed and not taken into
- account for user specific permissions.
-
-2005-08-17 Pierrick LE GALL
-
- * modification : major simplification of admin.php. Titles are
- managed by included page, localized items are managed directly in
- the template.
-
- * new : sub template admin/double_select is included in templates
- admin/cat_options, admin/user_perm and admin/group_perm. I haven't
- been able to use it in admin/picture_modify because it seems
- impossible to have two instance of the same sub-template without
- interfering.
-
- * modification : bug 99, in profile manager, no auto submit when
- changing language (useless and generate accessibility problem).
-
- * improvement : HTML semantically correct for administration menu,
- simpler syntax, less tags, correct tags (dl/dt/dd instead of
- div/div).
-
- * modification : number of waiting elements and unvalidated
- comments are displayed in admin/intro instead of administration
- menu (with a link to the dedicated pages).
-
- * deletion : no link to profile from admin/user_list anymore (no
- need).
-
-2005-08-16 Pierrick LE GALL
-
- * modification : admin/group_list screen completely rewrite to
- present the list of existing groups and a form to add a new
- group. Here you can delete a group, go to permissions management
- for a group, go to member list of a group (on admin/user_list with
- a filter on group).
-
- * modification : admin/user_perm and admin/group_perm are not
- directly reachable by the admin menu anymore. Only the user/group
- list lets you reach user/group permissions management screen.
-
-2005-08-15 Pierrick LE GALL
-
- * new : introduction page to administration section. This page
- gives informations about PhpWebGallery version, PHP version, MySQL
- version, gallery database informations (number of categories,
- elements, users, comments). Ability to request phpwebgallery.net
- for upgrade.
-
- * deletion : of obsolete admin/admin_phpinfo.php page replaced by
- a link in introduction page.
-
-2005-08-14 Pierrick LE GALL
-
- * modification : simplification of HTML/CSS code for double select
- screen to manage categories properties (admin/cat_options)
-
-2005-08-14 Pierrick LE GALL
-
- * new : ability to set an element as representant of its category
- directly from picture.php screen.
-
- * improvement : dedicated icon to add elements into caddie. Ths
- icon is displayed in the category title bar.
-
-2005-08-14 Pierrick LE GALL
-
- * new : maintenance screen in administration. There you can update
- categories informations (number of images, date of the last added
- element), update images informations (path, average rate), purge
- obsolete sessions, purge history.
-
- * new : ability to have random representative for categories. This
- configuration parameter is set to false by default.
-
- * new : ability to set an element as representative of a category
- without belonging to the category. Thus, administrator can choose
- representative even for empty categories.
-
- * improvement : semantically superior design for category edition
- screen by regrouping fields in fieldsets. The improved screen
- contains action buttons as in category list screen.
-
- * new : ability to move a virtual category (ie change its parent
- category).
-
- * bug fixed : the sync_users function checks all user children
- tables (access, cache, group association).
-
-2005-08-08 Pierrick LE GALL
-
- * new : external authentication in another users table. Previous
- users table is divided between users (common properties with any
- web application) and user_infos (phpwebgallery specific
- informations). External table and fields can be configured.
-
- * modification : profile.php is not reachable through
- administration anymore (not useful).
-
- * modification : in profile.php, current password is mandatory
- only if user tries to change his password. Username can't be
- changed.
-
- * deletion : of obsolete functions get_user_restrictions,
- update_user_restrictions, get_user_all_restrictions,
- is_user_allowed, update_user
-
- * modification : $user['forbidden_categories'] equals at least
- "-1" so that category_id NOT IN ($user['forbidden_categories'])
- can always be used.
-
- * modification : user_forbidden table becomes user_cache so that
- not only restriction informations can be stored in this table.
-
-2005-07-17 Pierrick LE GALL
-
- * improvement : in admin/element_set_global, javascript is not
- used anymore to select an item with its thumbnail
-
-2005-07-17 Pierrick LE GALL
-
- * bug fixed : in admin/user_list, if target is "selection" and
- that no user is selected, an error occurs
-
-2005-07-17 Pierrick LE GALL
-
- * new feature : use Apache authentication. If
- $conf['apache_authentication'] is set true : if no user matches
- $_SERVER['REMOTE_USER'] in "users" table, PWG automatically
- creates one. This way, users can customize the behaviour of the
- application.
-
- * template : new organisation of identification menu
- (category.php). Simplification is required for Apache
- authentication (no logout link even if user is externally logged
- in)
-
- * new : usernames can contain quotes (required because Apache
- authentication authorized quotes in usernames)
-
-2005-07-17 Pierrick LE GALL
-
- * new configuration parameter : hide thumbnail captions on main
- page with $conf['show_thumbnail_caption']
-
- * new configuration parameter : hide picture name in title on
- picture presentation page with $conf['show_picture_name_on_title']
-
- * template : new CSS classes to manage picture.php title
-
-2005-07-16 Pierrick LE GALL
-
- * new feature : RSS notification feed. Feed generator is an
- external tool (FeedCreator class v1.7.2). New file feed.php
-
- * new database field : comments.validation_date (datetime). This
- field is required for notification feed.
-
- * new database field : users.feed_id (varchar(50)). users.feed_id
- is an alias of users.id but is much more complicated to find (50
- characters, figures or letters, case sensitive) : the purpose is
- to keep it secret (as far as possible).
-
- * new database field : users.last_feed_check (datetime)
-
- * new database field : users.registration_date (datetime)
-
- * bug fixed : no need to add the (unavailable) session id to
- install.php in the installation form.
-
- * modified database field : images.date_available become more
- precise (date to datetime). This precision is needed for
- notification feed.
-
- * new index : comments_i1 (validation_date). Might be useful for
- feed queries.
-
- * new index : comments_i2 (image_id). Useful each time you want to
- have informations about an element and its associated comments.
-
- * version 9.11 of mysqldump outputs database field names and table
- names with backquote "`" (didn't find how to take them off)
-
-2005-06-30 Pierrick LE GALL
-
- * category permissions management comes back! (it disappeared in
- branch 1.4) This time, it is designed to support better long users
- list. On this screen, for a particular category, admin can say
- which groups and users are permitted.
-
-2005-06-30 Pierrick LE GALL
-
- * users managment : change display of filter (according to filter
- on user comments)
-
-2005-06-30 Pierrick LE GALL
-
- * categories management : new display with icon for actions
- (delete, sub-categories, elements, edit, jump to, permissions)
-
- * categories management : semantic HTML layout (using common
- lists)
-
- * categories management : new way to order categories of the same
- level : a text field let the admin reorder all categories at once.
-
-2005-06-25 Pierrick LE GALL
-
- * new feature : ability to add links on the main page (see
- include/config_default.inc.php)
-
-2005-06-21 Pierrick LE GALL
-
- * comments page rewritten : comments are displayed one by one,
- with filters and display options available. The list of comments
- is paginated.
-
-2005-06-21 Pierrick LE GALL
-
- * direct communication between templates and language items,
- without needing a mapping in the PHP code.
-
-2005-06-21 Pierrick LE GALL
-
- * new function get_name_from_file to centralize the construction
- of displayed name from the filename
-
- * new function l10n which returns the corresponding value from
- $lang if existing. Else, the key is returned. This means that if a
- language item is not translated, the key is displayed instead
- (better than nothing).
-
-2005-06-11 Pierrick LE GALL
-
- * errors and informations boxes : management centralized in
- admin.php, $errors and $infos arrays replaced by $page['errors']
- and $page['infos'], special management for admin/update.php (more
- complex management)
-
-2005-06-11 Pierrick LE GALL
-
- * bug 96 (informations given by uploaders are lost) correction
- reported from branch 1.4
-
-2005-05-10 Pierrick LE GALL
-
- * user list : links to profile page and permissions page are
- represented by icons (more compact)
-
- * user list : ability to associate to a group or to dissociate
- from a group a list of selected users
-
- * user list : ability to set user properties in "batch" mode (a
- selection of users at once)
-
- * user list : alternate background color for each line
-
-2005-04-30 Pierrick LE GALL
-
- * user list updated : ability to filter list on status. Function
- get_enums comes back to retrieve the list of possible status in
- the database.
-
-2005-04-28 Pierrick LE GALL
-
- * user list updated : ability to filter list on group
-
-2005-04-25 Pierrick LE GALL
-
- * include/config.inc.php becomes include/config_default.inc.php :
- this file should not be modified. A new file
- include/config_local.inc.php can be used for overwriting
- configuration parameters
-
-2005-04-25 Pierrick LE GALL
-
- * come back to previous version of include/constants.php :
- %PWGVERSION% was not a mistake
-
-2005-04-25 Pierrick LE GALL
-
- * profile.php is no longer used for listing users :
- admin/user_list.php comes back (as in 1.3 branch)
-
- * user list updated : ability to filter list on username
-
-2005-04-25 Gweltas
-
- * ability to install even if file include/mysql.inc.php doesn't
- exist
-
- * monthly statistics
-
- * installation labels updated (english only)
-
-2005-04-16 Pierrick LE GALL <pierrick /at/ phpwebgallery {dot} net>
-
- * elements batch management : element_set page becomes the
- frontend to element_set_global and element_set_unit, infos_images
- (after a long time of use) become deprecated : the more powerful
- element_set is used instead. Consequently, batch management
- concerns caddie but also "normal categories".
-
- * refactoring code in admin.php to include the sub-file (clearer)
-
- * caddie : function fill_caddie replaces the code in category.php
- and can be used in admin/element_set.php
-
- * caddie : caddie table is added in delete_elements function
-
-2005-04-16 Pierrick LE GALL <pierrick /at/ phpwebgallery {dot} net>
-
- * elements batch management : in addition to global mode, a unit
- mode is added : ability to manage a set of elements, element by
- element. This screen is very close to the existing "infos_images"
- (which will soon disappear).
-
- * elements batch management : in screen element_set_global, the
- display options are displayed at the top as in element_set_unit
-
-2005-04-11 Pierrick LE GALL <pierrick /at/ phpwebgallery {dot} net>
-
- * functions get_day_list and get_month_list moved from search.php
- to include/functions.inc.php : these functions are now also used
- in admin/element_set_global.php
-
- * elements batch management improved : ability to set the number
- of elements to display per line, ability to set {author, name,
- creation date} fields, ability to add and remove keywords, ability
- to take selected elements out of caddie
-
-2005-03-31 Pierrick LE GALL <pierrick at phpwebgallery dot net>
-
- * apply category name and element name separation in calendar
- special category
-
- * change method of counting total number of viewable pictures :
- pictures linked to more than one category are not counted twice.
-
-2005-03-26 Pierrick LE GALL <pierrick at phpwebgallery dot net>
-
- * "add to caddie" link is visible only when categories contains
- elements. Only admin users can see this link
-
- * elements batch management : impossible to create a link between
- category and element that already exists
-
- * logical separation of category name under thumbnail and element
- name
-
-2005-03-25 Pierrick LE GALL <pierrick at phpwebgallery dot net>
-
- * application version is defined at build or release
- creation. This way, include/constants.php won't change at each
- build.
-
-2005-03-25 Pierrick LE GALL <pierrick at phpwebgallery dot net>
-
- * typo fixed : wrong block name closed in template
-
-2005-03-25 Pierrick LE GALL <pierrick at phpwebgallery dot net>
-
- * new feature : caddie. The purpose is batch management,
- especially concerning elements to categories associations.This is
- the very first release, needs many improvements.
diff --git a/BSF/doc/README_en.txt b/BSF/doc/README_en.txt
deleted file mode 100644
index 91b5eecc8..000000000
--- a/BSF/doc/README_en.txt
+++ /dev/null
@@ -1,105 +0,0 @@
-=============
-Piwigo
-=============
-
-http://piwigo.org
-
-
-Installation
-============
-
-1. extract files from the downloaded file (using tar or unzip command, or
- softwares like 7-zip or winzip)
-
-2. place de source files on your website in the directory of your choice
- ("gallery" for example)
-
-3. go to the URL http://your.domain/gallery/install.php and follow the
- instructions of installation
-
-Upgrade
-=======
-
-1. elements to save :
-
- - file "include/mysql.inc.php"
- - file "include/config_local.inc.php"
- - file "template-common/local-layout.css"
- - file "template/yoga/local-layout.css"
- - directory "galleries"
- - any optional theme or extension you have intalled
- - your database (create a dump, using PhpMyAdmin for instance)
-
-2. delete all files and directories of your previous installation (but not
- the previous listed elements)
-
-3. extract files from the downloaded file (using tar or unzip command, or
- softwares like 7-zip or winzip)
-
-4. upload all the new version files to your website but the previous listed
- elements. The only elements coming from the previous installed version
- are the elements listed above.
-
-5. go to the URL http://your.domain/gallery/upgrade.php and follow the
- instructions
-
-How to start
-============
-
-Once installed or upgraded, your gallery is ready to run. Start by
-displaying the installation directory in your browser :
-
-http://your.domain/gallery
-
-Then identify as an administrator. A new link in Identification menu of main
-page will appear : Administration. Enter the administration panel.
-
-In the administration panel, take all your time for reading instructions
-explaining how to use your gallery.
-
-Communication
-=============
-
-Newsletter
-----------
-
-https://gna.org/mail/?group=phpwebgallery
-
-It is *highly* recommended to subscribe to Piwigo newsletter. This is
-extremely low-traffic, but will provide you with announcements of new
-Piwigo releases and serious bug notification. You will find available
-mailing lists at this URL :
-
-No spam, no commercial use.
-
-Freshmeat
----------
-
-http://freshmeat.net/projects/phpwebgallery
-
-Want to stay informed at each release, stable and development
-release. Development releases notification are not send in the newsletter.
-
-Bugtracker
-----------
-
-http://bugs.phpwebgallery.net
-
-Bugs and change requests tracking. The best way to have your bug corrected:
-it won't be forgotten (as in the forum).
-
-Wiki
-----
-
-http://phpwebgallery.net/doc
-
-Wiki documentation: everyone can participate to improve documentation
-content.
-
-Message board
--------------
-
-http://forum.phpwebgallery.net
-
-All communications (installation help, technical discussions) that can't be
-done in other channels.
diff --git a/BSF/doc/README_fr.txt b/BSF/doc/README_fr.txt
deleted file mode 100644
index 2915c1253..000000000
--- a/BSF/doc/README_fr.txt
+++ /dev/null
@@ -1,116 +0,0 @@
-=============
-Piwigo
-=============
-
-http://piwigo.org
-
-Installation
-============
-
-1. décompresser ŕ l'aide de winzip par exemple (winrar, winace et beaucoup
- d'autres le permettent également) le fichier téléchargé.
-
-2. placer les fichiers décompressés sur votre serveur web dans le répertoire
- de votre choix ("galerie" par exemple)
-
-3. se rendre ŕ l'URL http://votre.domaine/galerie/install.php et suivre les
- instructions
-
-Mise ŕ jour
-===========
-
-1. éléments ŕ sauvegarder :
-
- - fichier "include/mysql.inc.php"
- - fichier "include/config_local.inc.php"
- - fichier "template-common/local-layout.css"
- - fichier "template/yoga/local-layout.css"
- - répertoire "galleries"
- - éventuellement thčmes supplémentaires et extensions
- - votre base de données (en créant un dump, avec PhpMyAdmin par exemple)
-
-2. supprimer tous les fichiers et répertoires de la précédente installation
- (sauf les éléments listés ci-dessus)
-
-3. décompresser ŕ l'aide de winzip par exemple (winrar, winace et beaucoup
- d'autres le permettent également) le fichier téléchargé.
-
-4. placer tous les fichiers de la nouvelle version sur votre site web sauf
- pour les élements listés ci-dessus. Les seuls éléments venant de la
- précédente installation sont ceux listés ci-dessus.
-
-5. se rendre ŕ l'URL http://votre.domaine/galerie/upgrade.php et suivre les
- instructions
-
-Comment commencer
-=================
-
-Une fois installée ou mise ŕ jour, votre galerie est pręte ŕ
-fonctionner. Commencez par vous rendre sur le répertoire d'installation dans
-votre navigateur :
-
-http://votre.domaine/galerie
-
-Ensuite, identifiez-vous en tant qu'un administrateur. Un nouveau lien dans
-le menu d'identification de la page principale va apparaître :
-Administration. Suivre ce lien :-)
-
-Dans la zone d'administration, prenez tout le temps nécessaire pour
-consulter les instructions, expliquant comment utiliser votre galerie.
-
-Communication
-=============
-
-Newsletter
-----------
-
-https://gna.org/mail/?group=phpwebgallery
-
-Il est *fortement* recommandé de souscrire ŕ la newsletter de
-Piwigo. Trčs peu de mails sont envoyés, mais les informations sont
-importantes : nouvelles versions de l'application, notification de bugs
-importants (relatifs ŕ la sécurité). Vous trouverez les listes de
-discussions disponibles sur la page suivante :
-
-Pas de spam, pas d'utilisation commerciale.
-
-Freshmeat
----------
-
-http://freshmeat.net/projects/phpwebgallery
-
-Permet d'ętre au courant des sorties de toutes les releases, et en
-exclusivité les builds de la branche de développement (ce qui n'est pas
-prévu sur les mailing lists "announce").
-
-Outil de suivi de bogues
-------------------------
-
-http://bugs.phpwebgallery.net
-
-Gestion des bugs, mais aussi demande de nouvelles fonctionnalités. Rien de
-plus efficace pour qu'un bug soit corrigé : tant qu'il ne l'est pas, la
-"fiche" reste lŕ ŕ attendre, on ne l'oublie pas comme un topic sur le
-forum.
-
-Les demandes d'évolutions sont également gérées dans cet outil. Ce n'est pas
-forcément idéal car il ne s'agit pas de la męme chose, mais le suivi du dev
-d'une nouvelle fonctionnalité peut se modéliser de la męme façon que le
-suivi de la correction d'un bug.
-
-Wiki
-----
-
-http://phpwebgallery.net/doc
-
-Documentation suivant le systčme du wiki. Chacun peut participer ŕ
-l'amélioration de la doc.
-
-Forum de discussion
--------------------
-
-http://forum.phpwebgallery.net
-
-Un forum est disponible et recommandé pour toutes les questions autres que
-les demandes d'évolution et rapport de bogue (installation, discussions
-techniques).
diff --git a/BSF/doc/index.php b/BSF/doc/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/doc/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/feed.php b/BSF/feed.php
deleted file mode 100644
index 3c435cff1..000000000
--- a/BSF/feed.php
+++ /dev/null
@@ -1,202 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-define('PHPWG_ROOT_PATH','./');
-include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
-include_once(PHPWG_ROOT_PATH.'include/functions_notification.inc.php');
-
-// +-----------------------------------------------------------------------+
-// | functions |
-// +-----------------------------------------------------------------------+
-
-/**
- * creates a Unix timestamp (number of seconds since 1970-01-01 00:00:00
- * GMT) from a MySQL datetime format (2005-07-14 23:01:37)
- *
- * @param string mysql datetime format
- * @return int timestamp
- */
-function mysqldt_to_ts($mysqldt)
-{
- $date = explode_mysqldt($mysqldt);
- return mktime($date['hour'], $date['minute'], $date['second'],
- $date['month'], $date['day'], $date['year']);
-}
-
-/**
- * creates an ISO 8601 format date (2003-01-20T18:05:41+04:00) from Unix
- * timestamp (number of seconds since 1970-01-01 00:00:00 GMT)
- *
- * function copied from Dotclear project http://dotclear.net
- *
- * @param int timestamp
- * @return string ISO 8601 date format
- */
-function ts_to_iso8601($ts)
-{
- $tz = date('O',$ts);
- $tz = substr($tz, 0, -2).':'.substr($tz, -2);
- return date('Y-m-d\\TH:i:s',$ts).$tz;
-}
-
-// +-----------------------------------------------------------------------+
-// | initialization |
-// +-----------------------------------------------------------------------+
-
-$feed_id= isset($_GET['feed']) ? $_GET['feed'] : '';
-$image_only=isset($_GET['image_only']);
-
-// echo '<pre>'.generate_key(50).'</pre>';
-if ( !empty($feed_id) )
-{
- $query = '
-SELECT user_id,
- last_check
- FROM '.USER_FEED_TABLE.'
- WHERE id = \''.$feed_id.'\'
-;';
- $feed_row = mysql_fetch_assoc(pwg_query($query));
- if ( empty($feed_row) )
- {
- page_not_found('Unknown/missing feed identifier');
- }
- if ($feed_row['user_id']!=$user['id'])
- { // new user
- $user = build_user( $feed_row['user_id'], true );
- }
-}
-else
-{
- $image_only = true;
- if (!is_a_guest())
- {// auto session was created - so switch to guest
- $user = build_user( $conf['guest_id'], true );
- }
-}
-
-// Check the status now after the user has been loaded
-check_status(ACCESS_GUEST);
-
-list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
-
-include_once(PHPWG_ROOT_PATH.'include/feedcreator.class.php');
-
-set_make_full_url();
-
-$rss = new UniversalFeedCreator();
-$rss->encoding=get_pwg_charset();
-$rss->title = $conf['gallery_title'];
-$rss->title.= ' (as '.$user['username'].')';
-
-$rss->link = $conf['gallery_url'];
-
-// +-----------------------------------------------------------------------+
-// | Feed creation |
-// +-----------------------------------------------------------------------+
-
-$news = array();
-if (!$image_only)
-{
- $news = news($feed_row['last_check'], $dbnow, true, true);
-
- if (count($news) > 0)
- {
- $item = new FeedItem();
- $item->title = sprintf(l10n('New on %s'),
- format_date($dbnow, 'mysql_datetime') );
- $item->link = $conf['gallery_url'];
-
- // content creation
- $item->description = '<ul>';
- foreach ($news as $line)
- {
- $item->description.= '<li>'.$line.'</li>';
- }
- $item->description.= '</ul>';
- $item->descriptionHtmlSyndicated = true;
-
- $item->date = mysqldt_to_ts($dbnow);
- $item->author = 'Piwigo notifier';
- $item->guid= sprintf('%s', $dbnow);;
-
- $rss->addItem($item);
-
- $query = '
-UPDATE '.USER_FEED_TABLE.'
- SET last_check = \''.$dbnow.'\'
- WHERE id = \''.$feed_id.'\'
-;';
- pwg_query($query);
- }
-}
-
-if ( !empty($feed_id) and empty($news) )
-{// update the last check from time to time to avoid deletion by maintenance tasks
- if ( !isset($feed_row['last_check'])
- or time()-mysqldt_to_ts($feed_row['last_check']) > 30*24*3600 )
- {
- $query = '
-UPDATE '.USER_FEED_TABLE.'
- SET last_check = DATE_ADD(\''.$dbnow.'\', INTERVAL -15 DAY )
- WHERE id = \''.$feed_id.'\'
-;';
- pwg_query($query);
- }
-}
-
-$dates = get_recent_post_dates_array($conf['recent_post_dates']['RSS']);
-
-foreach($dates as $date_detail)
-{ // for each recent post date we create a feed item
- $item = new FeedItem();
- $date = $date_detail['date_available'];
- $item->title = get_title_recent_post_date($date_detail);
- $item->link = make_index_url(
- array(
- 'chronology_field' => 'posted',
- 'chronology_style'=> 'monthly',
- 'chronology_view' => 'calendar',
- 'chronology_date' => explode('-', substr($date,0,10) )
- )
- );
-
- $item->description .=
- '<a href="'.make_index_url().'">'.$conf['gallery_title'].'</a><br/> ';
-
- $item->description .= get_html_description_recent_post_date($date_detail);
-
- $item->descriptionHtmlSyndicated = true;
-
- $item->date = mysqldt_to_ts($date);
- $item->author = 'Piwigo notifier';
- $item->guid= sprintf('%s', 'pics-'.$date);;
-
- $rss->addItem($item);
-}
-
-$fileName= $conf['local_data_dir'].'/tmp';
-@mkdir($fileName); // just in case
-$fileName.='/feed.xml';
-// send XML feed
-echo $rss->saveFeed('RSS2.0', $fileName, true);
-?> \ No newline at end of file
diff --git a/BSF/galleries/.cvsignore b/BSF/galleries/.cvsignore
deleted file mode 100644
index 72e8ffc0d..000000000
--- a/BSF/galleries/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*
diff --git a/BSF/galleries/index.php b/BSF/galleries/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/galleries/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/identification.php b/BSF/identification.php
deleted file mode 100644
index 877e51a65..000000000
--- a/BSF/identification.php
+++ /dev/null
@@ -1,93 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-//--------------------------------------------------------------------- include
-define('PHPWG_ROOT_PATH','./');
-include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_FREE);
-
-//-------------------------------------------------------------- identification
-$errors = array();
-
-$redirect_to = '';
-if ( !empty($_GET['redirect']) )
-{
- $redirect_to = urldecode($_GET['redirect']);
- if ( is_a_guest() )
- {
- array_push($errors, l10n('access_forbiden'));
- }
-}
-
-if (isset($_POST['login']))
-{
- $redirect_to = isset($_POST['redirect']) ? $_POST['redirect'] : '';
- $remember_me = isset($_POST['remember_me']) and $_POST['remember_me']==1;
- if ( try_log_user($_POST['username'], $_POST['password'], $remember_me) )
- {
- redirect(empty($redirect_to) ? make_index_url() : $redirect_to);
- }
- else
- {
- array_push( $errors, l10n('invalid_pwd') );
- }
-}
-
-//----------------------------------------------------- template initialization
-//
-// Start output of page
-//
-$title = l10n('identification');
-$page['body_id'] = 'theIdentificationPage';
-include(PHPWG_ROOT_PATH.'include/page_header.php');
-
-$template->set_filenames( array('identification'=>'identification.tpl') );
-
-$template->assign(
- array(
- 'U_LOST_PASSWORD' => get_root_url().'password.php',
- 'U_REDIRECT' => $redirect_to,
-
- 'F_LOGIN_ACTION' => get_root_url().'identification.php',
- 'authorize_remembering' => $conf['authorize_remembering'],
- ));
-
-if ($conf['allow_user_registration'])
-{
- $template->assign('U_REGISTER', get_root_url().'register.php' );
-}
-
-//-------------------------------------------------------------- errors display
-if ( sizeof( $errors ) != 0 )
-{
- $template->assign('errors', $errors);
-}
-
-//----------------------------------------------------------- html code display
-$template->pparse('identification');
-include(PHPWG_ROOT_PATH.'include/page_tail.php');
-?>
diff --git a/BSF/include/calendar_base.class.php b/BSF/include/calendar_base.class.php
deleted file mode 100644
index bd3d2b180..000000000
--- a/BSF/include/calendar_base.class.php
+++ /dev/null
@@ -1,351 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * Base class for monthly and weekly calendar styles
- */
-class CalendarBase
-{
- // db column on which this calendar works
- var $date_field;
- // used for queries (INNER JOIN or normal)
- var $inner_sql;
- //
- var $calendar_levels;
-
- /**
- * Initialize the calendar
- * @param string inner_sql used for queries (INNER JOIN or normal)
- */
- function initialize($inner_sql)
- {
- global $page;
- if ($page['chronology_field']=='posted')
- {
- $this->date_field = 'date_available';
- }
- else
- {
- $this->date_field = 'date_creation';
- }
- $this->inner_sql = $inner_sql;
- }
-
- function get_display_name()
- {
- global $conf, $page;
- $res = '';
-
- for ($i=0; $i<count($page['chronology_date']); $i++)
- {
- $res .= $conf['level_separator'];
- if ( isset($page['chronology_date'][$i+1]) )
- {
- $chronology_date = array_slice($page['chronology_date'],0, $i+1);
- $url = duplicate_index_url(
- array( 'chronology_date'=>$chronology_date ),
- array( 'start' )
- );
- $res .=
- '<a href="'.$url.'">'
- .$this->get_date_component_label($i, $page['chronology_date'][$i])
- .'</a>';
- }
- else
- {
- $res .=
- '<span class="calInHere">'
- .$this->get_date_component_label($i, $page['chronology_date'][$i])
- .'</span>';
- }
- }
- return $res;
- }
-
-//--------------------------------------------------------- private members ---
- /**
- * Returns a display name for a date component optionally using labels
- */
- function get_date_component_label($level, $date_component)
- {
- $label = $date_component;
- if (isset($this->calendar_levels[$level]['labels'][$date_component]))
- {
- $label = $this->calendar_levels[$level]['labels'][$date_component];
- }
- elseif ('any' === $date_component )
- {
- $label = l10n('calendar_any');
- }
- return $label;
- }
-
- /**
- * Gets a nice display name for a date to be shown in previos/next links.
- */
- function get_date_nice_name($date)
- {
- $date_components = explode('-', $date);
- $res = '';
- for ($i=count($date_components)-1; $i>=0; $i--)
- {
- if ('any' !== $date_components[$i])
- {
- $label = $this->get_date_component_label($i, $date_components[$i] );
- if ( $res!='' )
- {
- $res .= ' ';
- }
- $res .= $label;
- }
- }
- return $res;
- }
-
- /**
- * Creates a calendar navigation bar.
- *
- * @param array date_components
- * @param array items - hash of items to put in the bar (e.g. 2005,2006)
- * @param string class_prefix - html class attribute prefix for span elements
- * @param bool show_any - adds any link to the end of the bar
- * @param bool show_empty - shows all labels even those without items
- * @param array labels - optional labels for items (e.g. Jan,Feb,...)
- * @return string the navigation bar
- */
- function get_nav_bar_from_items($date_components, $items,
- $class_prefix, $show_any,
- $show_empty=false, $labels=null)
- {
- global $conf, $page;
-
- $nav_bar = '';
-
- if ($conf['calendar_show_empty'] and $show_empty and !empty($labels) )
- {
- foreach ($labels as $item => $label)
- {
- if ( ! isset($items[$item]) )
- {
- $items[$item] = -1;
- }
- }
- ksort($items);
- }
-
- foreach ($items as $item => $nb_images)
- {
- $label = $item;
- if (isset($labels[$item]))
- {
- $label = $labels[$item];
- }
- if ($nb_images==-1)
- {
- $nav_bar .= '<span class="'.$class_prefix.'Empty">';
- $nav_bar .= $label;
- }
- else
- {
- $nav_bar .= '<span class="'.$class_prefix.'">';
- $url = duplicate_index_url(
- array('chronology_date'=>array_merge($date_components,array($item))),
- array( 'start' )
- );
- $nav_bar .= '<a href="'.$url.'">';
- $nav_bar .= $label;
- $nav_bar .= '</a>';
- }
- if ($nb_images > 0)
- {
- $nav_bar .= '('.$nb_images.')';
- }
- $nav_bar.= '</span>';
- }
-
- if ($conf['calendar_show_any'] and $show_any and count($items)>1 and
- count($date_components)<count($this->calendar_levels)-1 )
- {
- $label = l10n('calendar_any');
- $nav_bar .= '<span class="'.$class_prefix.'">';
- $url = duplicate_index_url(
- array('chronology_date'=>array_merge($date_components,array('any'))),
- array( 'start' )
- );
- $nav_bar .= '<a href="'.$url.'">';
- $nav_bar .= $label;
- $nav_bar .= '</a>';
- $nav_bar.= '</span>';
- }
- return $nav_bar;
- }
-
- /**
- * Creates a calendar navigation bar for a given level.
- *
- * @param int level - the level (0-year,1-month/week,2-day)
- * @return void
- */
- function build_nav_bar($level, $labels=null)
- {
- global $template, $conf, $page;
-
- $query = '
-SELECT DISTINCT('.$this->calendar_levels[$level]['sql']
- .') as period';
- $query.= $this->inner_sql;
- $query.= $this->get_date_where($level);
- $query.= '
- GROUP BY period
-;';
-
- $level_items = array();
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $level_items[$row['period']] = 0;
- }
-
- if ( count($level_items)==1 and
- count($page['chronology_date'])<count($this->calendar_levels)-1)
- {
- if ( ! isset($page['chronology_date'][$level]) )
- {
- list($key) = array_keys($level_items);
- $page['chronology_date'][$level] = (int)$key;
-
- if ( $level<count($page['chronology_date']) and
- $level!=count($this->calendar_levels)-1 )
- {
- return;
- }
- }
- }
-
- $dates = $page['chronology_date'];
- while ($level<count($dates))
- {
- array_pop($dates);
- }
-
- $nav_bar = $this->get_nav_bar_from_items(
- $dates,
- $level_items,
- 'calItem',
- true,
- true,
- isset($labels) ? $labels : $this->calendar_levels[$level]['labels']
- );
-
- $template->append(
- 'chronology_navigation_bars',
- array(
- 'CONTENT' => $nav_bar,
- )
- );
- }
-
- /**
- * Assigns the next/previous link to the template with regards to
- * the currently choosen date.
- */
- function build_next_prev()
- {
- global $template, $page;
- $prev = $next =null;
- if ( empty($page['chronology_date']) )
- return;
- $query = 'SELECT CONCAT_WS("-"';
- for ($i=0; $i<count($page['chronology_date']); $i++)
- {
- if ( 'any' === $page['chronology_date'][$i] )
- {
- $query .= ','.'"any"';
- }
- else
- {
- $query .= ','.$this->calendar_levels[$i]['sql'];
- }
- }
- $current = implode('-', $page['chronology_date'] );
-
- $query.=') as period' . $this->inner_sql .'
-AND ' . $this->date_field . ' IS NOT NULL
-GROUP BY period';
-
- $upper_items = array_from_query( $query, 'period');
-
- usort($upper_items, 'version_compare');
- $upper_items_rank = array_flip($upper_items);
- if ( !isset($upper_items_rank[$current]) )
- {
- array_push($upper_items, $current);// just in case (external link)
- usort($upper_items, 'version_compare');
- $upper_items_rank = array_flip($upper_items);
- }
- $current_rank = $upper_items_rank[$current];
-
- $tpl_var = array();
-
- if ( $current_rank>0 )
- { // has previous
- $prev = $upper_items[$current_rank-1];
- $chronology_date = explode('-', $prev);
- $tpl_var['previous'] =
- array(
- 'LABEL' => $this->get_date_nice_name($prev),
- 'URL' => duplicate_index_url(
- array('chronology_date'=>$chronology_date), array('start')
- )
- );
- }
-
- if ( $current_rank < count($upper_items)-1 )
- { // has next
- $next = $upper_items[$current_rank+1];
- $chronology_date = explode('-', $next);
- $tpl_var['next'] =
- array(
- 'LABEL' => $this->get_date_nice_name($next),
- 'URL' => duplicate_index_url(
- array('chronology_date'=>$chronology_date), array('start')
- )
- );
- }
-
- if ( !empty($tpl_var) )
- {
- $existing = & $template->get_template_vars('chronology_navigation_bars');
- if ( !empty($existing) )
- {
- $existing[ sizeof($existing)-1 ] =
- array_merge( $existing[ sizeof($existing)-1 ], $tpl_var);
- }
- else
- {
- $template->append( 'chronology_navigation_bars', $tpl_var );
- }
- }
- }
-}
-?>
diff --git a/BSF/include/calendar_monthly.class.php b/BSF/include/calendar_monthly.class.php
deleted file mode 100644
index b29997cef..000000000
--- a/BSF/include/calendar_monthly.class.php
+++ /dev/null
@@ -1,515 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-include_once(PHPWG_ROOT_PATH.'include/calendar_base.class.php');
-
-define ('CYEAR', 0);
-define ('CMONTH', 1);
-define ('CDAY', 2);
-
-/**
- * Monthly calendar style (composed of years/months and days)
- */
-class Calendar extends CalendarBase
-{
-
- /**
- * Initialize the calendar
- * @param string inner_sql used for queries (INNER JOIN or normal)
- */
- function initialize($inner_sql)
- {
- parent::initialize($inner_sql);
- global $lang;
- $this->calendar_levels = array(
- array(
- 'sql'=> 'YEAR('.$this->date_field.')',
- 'labels' => null
- ),
- array(
- 'sql'=> 'MONTH('.$this->date_field.')',
- 'labels' => $lang['month']
- ),
- array(
- 'sql'=> 'DAYOFMONTH('.$this->date_field.')',
- 'labels' => null
- ),
- );
- }
-
-/**
- * Generate navigation bars for category page
- * @return boolean false to indicate that thumbnails
- * where not included here, true otherwise
- */
-function generate_category_content()
-{
- global $conf, $page;
-
- $view_type = $page['chronology_view'];
- if ($view_type==CAL_VIEW_CALENDAR)
- {
- global $template;
- $tpl_var = array();
- if ( count($page['chronology_date'])==0 )
- {//case A: no year given - display all years+months
- if ($this->build_global_calendar($tpl_var))
- {
- $template->assign('chronology_calendar', $tpl_var);
- return true;
- }
- }
-
- if ( count($page['chronology_date'])==1 )
- {//case B: year given - display all days in given year
- if ($this->build_year_calendar($tpl_var))
- {
- $template->assign('chronology_calendar', $tpl_var);
- $this->build_nav_bar(CYEAR); // years
- return true;
- }
- }
-
- if ( count($page['chronology_date'])==2 )
- {//case C: year+month given - display a nice month calendar
- if ( $this->build_month_calendar($tpl_var) )
- {
- $template->assign('chronology_calendar', $tpl_var);
- }
- $this->build_next_prev();
- return true;
- }
- }
-
- if ($view_type==CAL_VIEW_LIST or count($page['chronology_date'])==3)
- {
- if ( count($page['chronology_date'])==0 )
- {
- $this->build_nav_bar(CYEAR); // years
- }
- if ( count($page['chronology_date'])==1)
- {
- $this->build_nav_bar(CMONTH); // month
- }
- if ( count($page['chronology_date'])==2 )
- {
- $day_labels = range( 1, $this->get_all_days_in_month(
- $page['chronology_date'][CYEAR] ,$page['chronology_date'][CMONTH] ) );
- array_unshift($day_labels, 0);
- unset( $day_labels[0] );
- $this->build_nav_bar( CDAY, $day_labels ); // days
- }
- $this->build_next_prev();
- }
- return false;
-}
-
-
-/**
- * Returns a sql where subquery for the date field
- * @param int max_levels return the where up to this level
- * (e.g. 2=only year and month)
- * @return string
- */
-function get_date_where($max_levels=3)
-{
- global $page;
- $date = $page['chronology_date'];
- while (count($date)>$max_levels)
- {
- array_pop($date);
- }
- $res = '';
- if (isset($date[CYEAR]) and $date[CYEAR]!=='any')
- {
- $b = $date[CYEAR] . '-';
- $e = $date[CYEAR] . '-';
- if (isset($date[CMONTH]) and $date[CMONTH]!=='any')
- {
- $b .= $date[CMONTH] . '-';
- $e .= $date[CMONTH] . '-';
- if (isset($date[CDAY]) and $date[CDAY]!=='any')
- {
- $b .= $date[CDAY];
- $e .= $date[CDAY];
- }
- else
- {
- $b .= '01';
- $e .= '31';
- }
- }
- else
- {
- $b .= '01-01';
- $e .= '12-31';
- if (isset($date[CMONTH]) and $date[CMONTH]!=='any')
- {
- $res .= ' AND '.$this->calendar_levels[CMONTH]['sql'].'='.$date[CMONTH];
- }
- if (isset($date[CDAY]) and $date[CDAY]!=='any')
- {
- $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY];
- }
- }
- $res = " AND $this->date_field BETWEEN '$b' AND '$e 23:59:59'" . $res;
- }
- else
- {
- $res = ' AND '.$this->date_field.' IS NOT NULL';
- if (isset($date[CMONTH]) and $date[CMONTH]!=='any')
- {
- $res .= ' AND '.$this->calendar_levels[CMONTH]['sql'].'='.$date[CMONTH];
- }
- if (isset($date[CDAY]) and $date[CDAY]!=='any')
- {
- $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY];
- }
- }
- return $res;
-}
-
-
-
-//--------------------------------------------------------- private members ---
-
-// returns an array with alll the days in a given month
-function get_all_days_in_month($year, $month)
-{
- $md= array(1=>31,28,31,30,31,30,31,31,30,31,30,31);
-
- if ( is_numeric($year) and $month==2)
- {
- $nb_days = $md[2];
- if ( ($year%4==0) and ( ($year%100!=0) or ($year%400!=0) ) )
- {
- $nb_days++;
- }
- }
- elseif ( is_numeric($month) )
- {
- $nb_days = $md[ $month ];
- }
- else
- {
- $nb_days = 31;
- }
- return $nb_days;
-}
-
-function build_global_calendar(&$tpl_var)
-{
- global $page;
- assert( count($page['chronology_date']) == 0 );
- $query='SELECT DISTINCT(DATE_FORMAT('.$this->date_field.',"%Y%m")) as period,
- COUNT( DISTINCT(id) ) as count';
- $query.= $this->inner_sql;
- $query.= $this->get_date_where();
- $query.= '
- GROUP BY period
- ORDER BY YEAR('.$this->date_field.') DESC, MONTH('.$this->date_field.')';
-
- $result = pwg_query($query);
- $items=array();
- while ($row = mysql_fetch_array($result))
- {
- $y = substr($row['period'], 0, 4);
- $m = (int)substr($row['period'], 4, 2);
- if ( ! isset($items[$y]) )
- {
- $items[$y] = array('nb_images'=>0, 'children'=>array() );
- }
- $items[$y]['children'][$m] = $row['count'];
- $items[$y]['nb_images'] += $row['count'];
- }
- //echo ('<pre>'. var_export($items, true) . '</pre>');
- if (count($items)==1)
- {// only one year exists so bail out to year view
- list($y) = array_keys($items);
- $page['chronology_date'][CYEAR] = $y;
- return false;
- }
-
- global $lang;
- foreach ( $items as $year=>$year_data)
- {
- $chronology_date = array( $year );
- $url = duplicate_index_url( array('chronology_date'=>$chronology_date) );
-
- $nav_bar = $this->get_nav_bar_from_items( $chronology_date,
- $year_data['children'], 'calCal', false, false, $lang['month'] );
-
- $tpl_var['calendar_bars'][] =
- array(
- 'U_HEAD' => $url,
- 'NB_IMAGES' => $year_data['nb_images'],
- 'HEAD_LABEL' => $year,
- 'NAV_BAR' => $nav_bar,
- );
- }
- return true;
-}
-
-function build_year_calendar(&$tpl_var)
-{
- global $page;
- assert( count($page['chronology_date']) == 1 );
- $query='SELECT DISTINCT(DATE_FORMAT('.$this->date_field.',"%m%d")) as period,
- COUNT( DISTINCT(id) ) as count';
- $query.= $this->inner_sql;
- $query.= $this->get_date_where();
- $query.= '
- GROUP BY period';
-
- $result = pwg_query($query);
- $items=array();
- while ($row = mysql_fetch_array($result))
- {
- $m = (int)substr($row['period'], 0, 2);
- $d = substr($row['period'], 2, 2);
- if ( ! isset($items[$m]) )
- {
- $items[$m] = array('nb_images'=>0, 'children'=>array() );
- }
- $items[$m]['children'][$d] = $row['count'];
- $items[$m]['nb_images'] += $row['count'];
- }
- if (count($items)==1)
- { // only one month exists so bail out to month view
- list($m) = array_keys($items);
- $page['chronology_date'][CMONTH] = $m;
- return false;
- }
- global $lang;
- foreach ( $items as $month=>$month_data)
- {
- $chronology_date = array( $page['chronology_date'][CYEAR], $month );
- $url = duplicate_index_url( array('chronology_date'=>$chronology_date) );
-
- $nav_bar = $this->get_nav_bar_from_items( $chronology_date,
- $month_data['children'], 'calCal', false );
-
- $tpl_var['calendar_bars'][] =
- array(
- 'U_HEAD' => $url,
- 'NB_IMAGES' => $month_data['nb_images'],
- 'HEAD_LABEL' => $lang['month'][$month],
- 'NAV_BAR' => $nav_bar,
- );
- }
- return true;
-
-}
-
-function build_month_calendar(&$tpl_var)
-{
- global $page;
- $query='SELECT DISTINCT(DAYOFMONTH('.$this->date_field.')) as period,
- COUNT( DISTINCT(id) ) as count';
- $query.= $this->inner_sql;
- $query.= $this->get_date_where();
- $query.= '
- GROUP BY period';
-
- $items=array();
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $d = (int)$row['period'];
- $items[$d] = array('nb_images'=>$row['count']);
- }
-
- foreach ( $items as $day=>$data)
- {
- $page['chronology_date'][CDAY]=$day;
- $query = '
-SELECT id, file,tn_ext,path, width, height, DAYOFWEEK('.$this->date_field.')-1 as dow';
- $query.= $this->inner_sql;
- $query.= $this->get_date_where();
- $query.= '
- ORDER BY RAND()
- LIMIT 0,1';
- unset ( $page['chronology_date'][CDAY] );
-
- $row = mysql_fetch_assoc(pwg_query($query));
- $items[$day]['tn_url'] = get_thumbnail_url($row);
- $items[$day]['file'] = $row['file'];
- $items[$day]['path'] = $row['path'];
- $items[$day]['tn_ext'] = @$row['tn_ext'];
- $items[$day]['width'] = $row['width'];
- $items[$day]['height'] = $row['height'];
- $items[$day]['dow'] = $row['dow'];
- }
-
- global $lang, $conf;
-
- if ( !empty($items)
- and $conf['calendar_month_cell_width']>0
- and $conf['calendar_month_cell_height']>0)
- {
- list($known_day) = array_keys($items);
- $known_dow = $items[$known_day]['dow'];
- $first_day_dow = ($known_dow-($known_day-1))%7;
- if ($first_day_dow<0)
- {
- $first_day_dow += 7;
- }
- //first_day_dow = week day corresponding to the first day of this month
- $wday_labels = $lang['day'];
-
- // BEGIN - pass now in week starting Monday
- if ($first_day_dow==0)
- {
- $first_day_dow = 6;
- }
- else
- {
- $first_day_dow -= 1;
- }
- array_push( $wday_labels, array_shift($wday_labels) );
- // END - pass now in week starting Monday
-
- $cell_width = $conf['calendar_month_cell_width'];
- $cell_height = $conf['calendar_month_cell_height'];
-
- $tpl_weeks = array();
- $tpl_crt_week = array();
-
- //fill the empty days in the week before first day of this month
- for ($i=0; $i<$first_day_dow; $i++)
- {
- $tpl_crt_week[] = array();
- }
-
- for ( $day = 1;
- $day <= $this->get_all_days_in_month(
- $page['chronology_date'][CYEAR], $page['chronology_date'][CMONTH]
- );
- $day++)
- {
- $dow = ($first_day_dow + $day-1)%7;
- if ($dow==0 and $day!=1)
- {
- $tpl_weeks[] = $tpl_crt_week; // add finished week to week list
- $tpl_crt_week = array(); // start new week
- }
-
- if ( !isset($items[$day]) )
- {// empty day
- $tpl_crt_week[] =
- array(
- 'DAY' => $day
- );
- }
- else
- {
- $thumb = get_thumbnail_path($items[$day]);
- $tn_size = @getimagesize($thumb);
-
- $tn_width = $tn_size[0];
- $tn_height = $tn_size[1];
-
- // now need to fit the thumbnail of size tn_size within
- // a cell of size cell_size by playing with CSS position (left/top)
- // and the width and height of <img>.
- $ratio_w = $tn_width/$cell_width;
- $ratio_h = $tn_height/$cell_height;
-
- $pos_top=$pos_left=0;
- $css_style = '';
-
- if ( $ratio_w>1 and $ratio_h>1)
- {// cell completely smaller than the thumbnail so we will let the browser
- // resize the thumbnail
- if ($ratio_w > $ratio_h )
- {// thumbnail ratio compared to cell -> wide format
- $css_style = 'height:'.$cell_height.'px;';
- $browser_img_width = $cell_height*$tn_width/$tn_height;
- $pos_left = ($browser_img_width-$cell_width)/2;
- }
- else
- {
- $css_style = 'width:'.$cell_width.'px;';
- $browser_img_height = $cell_width*$tn_height/$tn_width;
- $pos_top = ($browser_img_height-$cell_height)/2;
- }
- }
- else
- {
- $pos_left = ($tn_width-$cell_width)/2;
- $pos_top = ($tn_height-$cell_height)/2;
- }
-
- if ( round($pos_left)!=0)
- {
- $css_style.='left:'.round(-$pos_left).'px;';
- }
- if ( round($pos_top)!=0)
- {
- $css_style.='top:'.round(-$pos_top).'px;';
- }
- $url = duplicate_index_url(
- array(
- 'chronology_date' =>
- array(
- $page['chronology_date'][CYEAR],
- $page['chronology_date'][CMONTH],
- $day
- )
- )
- );
-
- $tpl_crt_week[] =
- array(
- 'DAY' => $day,
- 'DOW' => $dow,
- 'NB_ELEMENTS' => $items[$day]['nb_images'],
- 'IMAGE' => $items[$day]['tn_url'],
- 'U_IMG_LINK' => $url,
- 'IMAGE_STYLE' => $css_style,
- 'IMAGE_ALT' => $items[$day]['file'],
- );
- }
- }
- //fill the empty days in the week after the last day of this month
- while ( $dow<6 )
- {
- $tpl_crt_week[] = array();
- $dow++;
- }
- $tpl_weeks[] = $tpl_crt_week;
-
- $tpl_var['month_view'] =
- array(
- 'CELL_WIDTH' => $cell_width,
- 'CELL_HEIGHT' => $cell_height,
- 'wday_labels' => $wday_labels,
- 'weeks' => $tpl_weeks,
- );
- }
-
- return true;
-}
-
-}
-?>
diff --git a/BSF/include/calendar_weekly.class.php b/BSF/include/calendar_weekly.class.php
deleted file mode 100644
index 2077bc594..000000000
--- a/BSF/include/calendar_weekly.class.php
+++ /dev/null
@@ -1,136 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-include_once(PHPWG_ROOT_PATH.'include/calendar_base.class.php');
-
-define ('CYEAR', 0);
-define ('CWEEK', 1);
-define ('CDAY', 2);
-
-/**
- * Weekly calendar style (composed of years/week in years and days in week)
- */
-class Calendar extends CalendarBase
-{
-
- /**
- * Initialize the calendar
- * @param string inner_sql used for queries (INNER JOIN or normal)
- */
- function initialize($inner_sql)
- {
- parent::initialize($inner_sql);
- global $lang;
- $week_no_labels=array();
- for ($i=1; $i<=53; $i++)
- {
- $week_no_labels[$i] = sprintf( l10n("Week %d"), $i);
- //$week_no_labels[$i] = $i;
- }
-
- $this->calendar_levels = array(
- array(
- 'sql'=> 'YEAR('.$this->date_field.')',
- 'labels' => null
- ),
- array(
- 'sql'=> 'WEEK('.$this->date_field.')+1',
- 'labels' => $week_no_labels,
- ),
- array(
- 'sql'=> 'DAYOFWEEK('.$this->date_field.')-1',
- 'labels' => $lang['day']
- ),
- );
- //Comment next lines for week starting on Sunday or if MySQL version<4.0.17
- //WEEK(date,5) = "0-53 - Week 1=the first week with a Monday in this year"
- $this->calendar_levels[CWEEK]['sql'] = 'WEEK('.$this->date_field.',5)+1';
- $this->calendar_levels[CDAY]['sql'] = 'WEEKDAY('.$this->date_field.')';
- array_push( $this->calendar_levels[CDAY]['labels'],
- array_shift( $this->calendar_levels[CDAY]['labels'] ) );
- }
-
-/**
- * Generate navigation bars for category page
- * @return boolean false to indicate that thumbnails where not included here
- */
-function generate_category_content()
-{
- global $conf, $page;
-
- if ( count($page['chronology_date'])==0 )
- {
- $this->build_nav_bar(CYEAR); // years
- }
- if ( count($page['chronology_date'])==1 )
- {
- $this->build_nav_bar(CWEEK, array()); // week nav bar 1-53
- }
- if ( count($page['chronology_date'])==2 )
- {
- $this->build_nav_bar(CDAY); // days nav bar Mon-Sun
- }
- $this->build_next_prev();
- return false;
-}
-
-
-/**
- * Returns a sql where subquery for the date field
- * @param int max_levels return the where up to this level
- * (e.g. 2=only year and week in year)
- * @return string
- */
-function get_date_where($max_levels=3)
-{
- global $page;
- $date = $page['chronology_date'];
- while (count($date)>$max_levels)
- {
- array_pop($date);
- }
- $res = '';
- if (isset($date[CYEAR]) and $date[CYEAR]!=='any')
- {
- $y = $date[CYEAR];
- $res = " AND $this->date_field BETWEEN '$y-01-01' AND '$y-12-31 23:59:59'";
- }
-
- if (isset($date[CWEEK]) and $date[CWEEK]!=='any')
- {
- $res .= ' AND '.$this->calendar_levels[CWEEK]['sql'].'='.$date[CWEEK];
- }
- if (isset($date[CDAY]) and $date[CDAY]!=='any')
- {
- $res .= ' AND '.$this->calendar_levels[CDAY]['sql'].'='.$date[CDAY];
- }
- if (empty($res))
- {
- $res = ' AND '.$this->date_field.' IS NOT NULL';
- }
- return $res;
-}
-
-}
-
-?>
diff --git a/BSF/include/category_cats.inc.php b/BSF/include/category_cats.inc.php
deleted file mode 100644
index e7f9a168a..000000000
--- a/BSF/include/category_cats.inc.php
+++ /dev/null
@@ -1,298 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * This file is included by the main page to show thumbnails for a category
- * that have only subcategories or to show recent categories
- *
- */
-
-if ($page['section']=='recent_cats')
-{
- // $user['forbidden_categories'] including with USER_CACHE_CATEGORIES_TABLE
- $query = '
-SELECT
- id, name, permalink, representative_picture_id, comment, nb_images, uppercats,
- date_last, max_date_last, count_images, count_categories, global_rank
- FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.'
- ON id = cat_id and user_id = '.$user['id'].'
- WHERE date_last >= SUBDATE(
- CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY
- )
-'.get_sql_condition_FandF
- (
- array
- (
- 'visible_categories' => 'id',
- ),
- 'AND'
- ).'
-;';
-}
-else
-{
- // $user['forbidden_categories'] including with USER_CACHE_CATEGORIES_TABLE
- $query = '
-SELECT
- id, name, permalink, representative_picture_id, comment, nb_images, uppercats,
- date_last, max_date_last, count_images, count_categories
- FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.'
- ON id = cat_id and user_id = '.$user['id'].'
- WHERE id_uppercat '.
- (!isset($page['category']) ? 'is NULL' : '= '.$page['category']['id']).'
-'.get_sql_condition_FandF
- (
- array
- (
- 'visible_categories' => 'id',
- ),
- 'AND'
- ).'
- ORDER BY rank
-;';
-}
-
-$result = pwg_query($query);
-$categories = array();
-$category_ids = array();
-$image_ids = array();
-
-while ($row = mysql_fetch_assoc($result))
-{
- $row['is_child_date_last'] = @$row['max_date_last']>@$row['date_last'];
-
- if (isset($row['representative_picture_id'])
- and is_numeric($row['representative_picture_id']))
- { // if a representative picture is set, it has priority
- $image_id = $row['representative_picture_id'];
- }
- else if ($conf['allow_random_representative'])
- {// searching a random representant among elements in sub-categories
- $query = '
-SELECT image_id
- FROM '.CATEGORIES_TABLE.' AS c INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic
- ON ic.category_id = c.id';
- $query.= '
- WHERE (c.id='.$row['id'].' OR uppercats LIKE \''.$row['uppercats'].',%\')'
- .get_sql_condition_FandF
- (
- array
- (
- 'forbidden_categories' => 'c.id',
- 'visible_categories' => 'c.id',
- 'visible_images' => 'image_id'
- ),
- "\n AND"
- ).'
- ORDER BY RAND()
- LIMIT 0,1
-;';
- $subresult = pwg_query($query);
- if (mysql_num_rows($subresult) > 0)
- {
- list($image_id) = mysql_fetch_row($subresult);
- }
- }
- else
- { // searching a random representant among representant of sub-categories
- $query = '
-SELECT representative_picture_id
- FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.'
- ON id = cat_id and user_id = '.$user['id'].'
- WHERE uppercats LIKE \''.$row['uppercats'].',%\'
- AND representative_picture_id IS NOT NULL'
- .get_sql_condition_FandF
- (
- array
- (
- 'visible_categories' => 'id',
- ),
- "\n AND"
- ).'
- ORDER BY RAND()
- LIMIT 0,1
-;';
- $subresult = pwg_query($query);
- if (mysql_num_rows($subresult) > 0)
- {
- list($image_id) = mysql_fetch_row($subresult);
- }
- }
-
- if (isset($image_id))
- {
- $row['representative_picture_id'] = $image_id;
- array_push($image_ids, $image_id);
- array_push($categories, $row);
- array_push($category_ids, $row['id']);
- }
- unset($image_id);
-}
-
-if ($conf['display_fromto'])
-{
- $dates_of_category = array();
- if (count($category_ids) > 0)
- {
- $query = '
-SELECT
- category_id,
- MIN(date_creation) AS date_creation_min,
- MAX(date_creation) AS date_creation_max
- FROM '.IMAGE_CATEGORY_TABLE.'
- INNER JOIN '.IMAGES_TABLE.' ON image_id = id
- WHERE category_id IN ('.implode(',', $category_ids).')
-'.get_sql_condition_FandF
- (
- array
- (
- 'visible_categories' => 'category_id',
- 'visible_images' => 'id'
- ),
- 'AND'
- ).'
- GROUP BY category_id
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $dates_of_category[ $row['category_id'] ] = array(
- 'from' => $row['date_creation_min'],
- 'to' => $row['date_creation_max'],
- );
- }
- }
-}
-
-if ($page['section']=='recent_cats')
-{
- usort($categories, 'global_rank_compare');
-}
-if (count($categories) > 0)
-{
- $thumbnail_src_of = array();
-
- $query = '
-SELECT id, path, tn_ext
- FROM '.IMAGES_TABLE.'
- WHERE id IN ('.implode(',', $image_ids).')
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_assoc($result))
- {
- $thumbnail_src_of[$row['id']] = get_thumbnail_url($row);
- }
-}
-
-if (count($categories) > 0)
-{
- // Update filtered data
- if (function_exists('update_cats_with_filtered_data'))
- {
- update_cats_with_filtered_data($categories);
- }
-
- $template->set_filename('index_category_thumbnails', 'mainpage_categories.tpl');
-
- trigger_action('loc_begin_index_category_thumbnails', $categories);
-
- foreach ($categories as $category)
- {
- if ($page['section']=='recent_cats')
- {
- $name = get_cat_display_name_cache($category['uppercats'], null, false);
- }
- else
- {
- $name = $category['name'];
- }
-
- $icon_ts = get_icon($category['max_date_last'], $category['is_child_date_last']);
-
- $tpl_var =
- array(
- 'ID' => $category['id'],
- 'TN_SRC' => $thumbnail_src_of[$category['representative_picture_id']],
- 'ALT' => $category['name'],
- 'ICON' => $icon_ts,
-
- 'URL' => make_index_url(
- array(
- 'category' => $category
- )
- ),
- 'CAPTION_NB_IMAGES' => get_display_images_count
- (
- $category['nb_images'],
- $category['count_images'],
- $category['count_categories'],
- true,
- '<br />'
- ),
- 'DESCRIPTION' =>
- trigger_event('render_category_literal_description',
- trigger_event('render_category_description',
- @$category['comment'],
- 'subcatify_category_description')),
- 'NAME' => $name,
- );
-
- if ($conf['display_fromto'])
- {
- if (isset($dates_of_category[ $category['id'] ]))
- {
- $from = $dates_of_category[ $category['id'] ]['from'];
- $to = $dates_of_category[ $category['id'] ]['to'];
-
- if (!empty($from))
- {
- $info = '';
-
- if ($from == $to)
- {
- $info = format_date($from);
- }
- else
- {
- $info = sprintf(
- l10n('from %s to %s'),
- format_date($from),
- format_date($to)
- );
- }
- $tpl_var['INFO_DATES'] = $info;
- }
- }
- }//fromto
-
- //plugins need to add/modify sth in this loop ?
- $tpl_var = trigger_event('loc_index_category_thumbnail',
- $tpl_var, $category );
-
- $template->append( 'category_thumbnails', $tpl_var);
- }
-
- trigger_action('loc_end_index_category_thumbnails', $categories);
- $template->assign_var_from_handle('CATEGORIES', 'index_category_thumbnails');
-}
-?>
diff --git a/BSF/include/category_default.inc.php b/BSF/include/category_default.inc.php
deleted file mode 100644
index 8dad04d90..000000000
--- a/BSF/include/category_default.inc.php
+++ /dev/null
@@ -1,170 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * This file is included by the main page to show thumbnails for the default
- * case
- *
- */
-
-$page['rank_of'] = array_flip($page['items']);
-
-$pictures = array();
-
-$selection = array_slice(
- $page['items'],
- $page['start'],
- $page['nb_image_page']
- );
-
-if (count($selection) > 0)
-{
- $query = '
-SELECT *
- FROM '.IMAGES_TABLE.'
- WHERE id IN ('.implode(',', $selection).')
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_assoc($result))
- {
- $row['rank'] = $page['rank_of'][ $row['id'] ];
-
- array_push($pictures, $row);
- }
-
- usort($pictures, 'rank_compare');
-}
-
-if (count($pictures) > 0)
-{
- // define category slideshow url
- $row = reset($pictures);
- $page['cat_slideshow_url'] =
- add_url_params(
- duplicate_picture_url(
- array(
- 'image_id' => $row['id'],
- 'image_file' => $row['file']
- ),
- array('start')
- ),
- array('slideshow' =>
- (isset($_GET['slideshow']) ? $_GET['slideshow']
- : '' ))
- );
-
- if ($user['show_nb_comments'])
- {
- $query = '
-SELECT image_id, COUNT(*) AS nb_comments
- FROM '.COMMENTS_TABLE.'
- WHERE validated = \'true\'
- AND image_id IN ('.implode(',', $selection).')
- GROUP BY image_id
-;';
- $nb_comments_of = simple_hash_from_query($query, 'image_id', 'nb_comments');
- }
-}
-
-// template thumbnail initialization
-$template->set_filenames( array( 'index_thumbnails' => 'thumbnails.tpl',));
-
-trigger_action('loc_begin_index_thumbnails', $pictures);
-
-foreach ($pictures as $row)
-{
- $thumbnail_url = get_thumbnail_url($row);
-
- // link on picture.php page
- $url = duplicate_picture_url(
- array(
- 'image_id' => $row['id'],
- 'image_file' => $row['file']
- ),
- array('start')
- );
-
- $tpl_var =
- array(
- 'ID' => $row['id'],
- 'IMAGE' => $thumbnail_url,
- 'IMAGE_ALT' => $row['file'],
- 'IMAGE_TITLE' => get_thumbnail_title($row),
- 'IMAGE_TS' => get_icon($row['date_available']),
- 'U_IMG_LINK' => $url,
- );
-
- if ($user['show_nb_hits'])
- {
- $tpl_var['NB_HITS'] = $row['hit'];
- }
-
- if ($conf['show_thumbnail_caption'])
- {
- // name of the picture
- if (isset($row['name']) and $row['name'] != '')
- {
- $name = $row['name'];
- }
- else
- {
- $name = str_replace('_', ' ', get_filename_wo_extension($row['file']));
- }
-
- switch ($page['section'])
- {
- case 'best_rated' :
- {
- $name = '('.$row['average_rate'].') '.$name;
- break;
- }
- case 'most_visited' :
- {
- if ( !$user['show_nb_hits']) {
- $name = '('.$row['hit'].') '.$name;
- }
- break;
- }
- }
-
- $tpl_var['ELEMENT_NAME'] = $name;
- }
-
- if ( isset($nb_comments_of) )
- {
- $row['nb_comments'] = isset($nb_comments_of[$row['id']])
- ? (int)$nb_comments_of[$row['id']] : 0;
- $tpl_var['NB_COMMENTS'] = $row['nb_comments'];
- }
-
- //plugins need to add/modify sth in this loop ?
- $tpl_var = trigger_event('loc_index_thumbnail', $tpl_var, $row);
-
- $template->append('thumbnails', $tpl_var);
-}
-
-trigger_action('loc_end_index_thumbnails', $pictures);
-$template->assign_var_from_handle('THUMBNAILS', 'index_thumbnails');
-
-pwg_debug('end include/category_default.inc.php');
-?>
diff --git a/BSF/include/class_smtp_mail.inc.php b/BSF/include/class_smtp_mail.inc.php
deleted file mode 100644
index 06ef69efd..000000000
--- a/BSF/include/class_smtp_mail.inc.php
+++ /dev/null
@@ -1,157 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// These function were originally a part of the punBB.
-
-class smtp_mail
-{
- var $socket;
- var $no_error;
- var $host;
- var $user;
- var $password;
- var $email_webmaster;
-
- function smtp_mail($host, $user, $password, $email_webmaster)
- {
- $this->host = $host;
- $this->user = $user;
- $this->password = $password;
- $this->email_webmaster = $email_webmaster;
- }
-
- // Adaptation of server_parse
- function server_parse($expected_response)
- {
- if ($this->no_error)
- {
- $server_response = '';
- while (substr($server_response, 3, 1) != ' ')
- {
- if (!($server_response = fgets($this->socket, 256)))
- {
- trigger_error('Couldn\'t get mail server response codes.', E_USER_WARNING);
- $this->no_error = false;
- }
- }
- }
-
- if ($this->no_error)
- {
- if (!(substr($server_response, 0, 3) == $expected_response))
- {
- trigger_error('Unable to send e-mail. Error message reported by the SMTP server: "'.$server_response.'"', E_USER_WARNING);
- $this->no_error = false;
- }
- }
- return $this->no_error;
- }
-
- function server_write($s)
- {
- $this->no_error = $this->no_error && (fwrite($this->socket, $s) !== false);
- return $this->no_error;
- }
-
- // Adaptation of pun_mail
- function mail($to, $subject, $message, $headers = '')
- {
- $this->no_error = true;
-
- $recipients = explode(',', $to);
-
- // Are we using port 25 or a custom port?
- if (strpos($this->host, ':') !== false)
- {
- list($smtp_host, $smtp_port) = explode(':', $this->host);
- }
- else
- {
- $smtp_host = $this->host;
- $smtp_port = 25;
- }
-
- if ($this->socket = fsockopen($smtp_host, $smtp_port, $errno, $errstr, 15))
- {
- $this->server_parse('220');
-
- if (!empty($this->user) && !empty($this->password))
- {
- $this->server_write('EHLO '.$smtp_host."\r\n");
- $this->server_parse('250');
-
- $this->server_write('AUTH LOGIN'."\r\n");
- $this->server_parse('334');
-
- $this->server_write(base64_encode($this->user)."\r\n");
- $this->no_error = $this->no_error && $this->no_error = $this->server_parse('334');
-
- $this->server_write(base64_encode($this->password)."\r\n");
- $this->server_parse('235');
- }
- else
- {
- $this->server_write('HELO '.$smtp_host."\r\n");
- $this->server_parse('250');
- }
-
- $this->server_write('MAIL FROM: <'.$this->email_webmaster.'>'."\r\n");
- $this->server_parse('250');
-
- if (preg_match('/^\s*to\s*:.*/mi', $headers) === 0)
- {
- $to_header = 'To: '.implode(',', array_map(create_function('$email','return "<".$email.">";'), $recipients));
- }
- else
- {
- $to_header = '';
- }
-
- @reset($recipients);
- while (list(, $email) = @each($recipients))
- {
- $this->server_write('RCPT TO: <'.$email.'>'."\r\n");
- $this->server_parse('250');
- }
-
- $this->server_write('DATA'."\r\n");
- $this->server_parse('354');
-
- $this->server_write('Subject: '.$subject."\r\n".(empty($to_header) ? "" : $to_header."\r\n").$headers."\r\n\r\n".$message."\r\n");
- $this->server_write('.'."\r\n");
- $this->server_parse('250');
-
- $this->server_write('QUIT'."\r\n");
- fclose($this->socket);
- }
- else
- {
- trigger_error('Could not connect to smtp host "'.$this->host.'" ('.$errno.') ('.$errstr.')', E_USER_WARNING);
- $this->no_error = false;;
- }
-
- return $this->no_error;
- }
-}
-
-?>
diff --git a/BSF/include/common.inc.php b/BSF/include/common.inc.php
deleted file mode 100644
index 45c6a3845..000000000
--- a/BSF/include/common.inc.php
+++ /dev/null
@@ -1,283 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-// determine the initial instant to indicate the generation time of this page
-$t1 = explode( ' ', microtime() );
-$t2 = explode( '.', $t1[0] );
-$t2 = $t1[1].'.'.$t2[1];
-
-set_magic_quotes_runtime(0); // Disable magic_quotes_runtime
-
-//
-// addslashes to vars if magic_quotes_gpc is off this is a security
-// precaution to prevent someone trying to break out of a SQL statement.
-//
-if( !get_magic_quotes_gpc() )
-{
- if( is_array( $_GET ) )
- {
- while( list($k, $v) = each($_GET) )
- {
- if( is_array($_GET[$k]) )
- {
- while( list($k2, $v2) = each($_GET[$k]) )
- {
- $_GET[$k][$k2] = addslashes($v2);
- }
- @reset($_GET[$k]);
- }
- else
- {
- $_GET[$k] = addslashes($v);
- }
- }
- @reset($_GET);
- }
-
- if( is_array($_POST) )
- {
- while( list($k, $v) = each($_POST) )
- {
- if( is_array($_POST[$k]) )
- {
- while( list($k2, $v2) = each($_POST[$k]) )
- {
- $_POST[$k][$k2] = addslashes($v2);
- }
- @reset($_POST[$k]);
- }
- else
- {
- $_POST[$k] = addslashes($v);
- }
- }
- @reset($_POST);
- }
-
- if( is_array($_COOKIE) )
- {
- while( list($k, $v) = each($_COOKIE) )
- {
- if( is_array($_COOKIE[$k]) )
- {
- while( list($k2, $v2) = each($_COOKIE[$k]) )
- {
- $_COOKIE[$k][$k2] = addslashes($v2);
- }
- @reset($_COOKIE[$k]);
- }
- else
- {
- $_COOKIE[$k] = addslashes($v);
- }
- }
- @reset($_COOKIE);
- }
-}
-
-//
-// Define some basic configuration arrays this also prevents malicious
-// rewriting of language and otherarray values via URI params
-//
-$conf = array();
-$page = array();
-$user = array();
-$lang = array();
-$header_msgs = array();
-$header_notes = array();
-$filter = array();
-
-@include(PHPWG_ROOT_PATH .'include/mysql.inc.php');
-if (!defined('PHPWG_INSTALLED'))
-{
- header('Location: install.php');
- exit;
-}
-
-foreach( array(
- 'array_intersect_key', //PHP 5 >= 5.1.0RC1
- 'hash_hmac', //(hash) - enabled by default as of PHP 5.1.2
- 'preg_last_error', // PHP 5 >= 5.2.0
- 'file_put_contents', //PHP5
- ) as $func)
-{
- if (!function_exists($func))
- {
- include_once(PHPWG_ROOT_PATH . 'include/php_compat/'.$func.'.php');
- }
-}
-
-include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
-@include(PHPWG_ROOT_PATH. 'include/config_local.inc.php');
-include(PHPWG_ROOT_PATH . 'include/constants.php');
-include(PHPWG_ROOT_PATH . 'include/functions.inc.php');
-include(PHPWG_ROOT_PATH . 'include/template.class.php');
-
-// Database connection
-mysql_connect( $cfgHote, $cfgUser, $cfgPassword )
-or die ( "Could not connect to database server" );
-mysql_select_db( $cfgBase )
-or die ( "Could not connect to database" );
-
-defined('PWG_CHARSET') and defined('DB_CHARSET')
- or die('PWG_CHARSET and/or DB_CHARSET is not defined');
-if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') )
-{
- if (DB_CHARSET!='')
- {
- pwg_query('SET NAMES "'.DB_CHARSET.'"');
- }
-}
-else
-{
- if ( strtolower(PWG_CHARSET)!='iso-8859-1' )
- {
- die('PWG supports only iso-8859-1 charset on MySql version '.mysql_get_server_info());
- }
-}
-
-//
-// Setup gallery wide options, if this fails then we output a CRITICAL_ERROR
-// since basic gallery information is not available
-//
-load_conf_from_db();
-load_plugins();
-
-include(PHPWG_ROOT_PATH.'include/user.inc.php');
-
-
-// language files
-load_language('common.lang');
-if (defined('IN_ADMIN') and IN_ADMIN)
-{
- load_language('admin.lang');
-}
-trigger_action('loading_lang');
-load_language('local.lang');
-
-// only now we can set the localized username of the guest user (and not in
-// include/user.inc.php)
-if (is_a_guest())
-{
- $user['username'] = l10n('guest');
-}
-
-// template instance
-if
- (
- defined('IN_ADMIN') and IN_ADMIN and
- isset($user['admin_template']) and
- isset($user['admin_theme'])
- )
-{
- // Admin template
- $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['admin_template'], $user['admin_theme'] );
-}
-else
-{
- // Classic template
- $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template'], $user['theme'] );
-}
-
-if (isset($user['internal_status']['guest_must_be_guest'])
- and
- $user['internal_status']['guest_must_be_guest'] === true)
-{
- $header_msgs[] = l10n('guest_must_be_guest');
-}
-
-if ($conf['gallery_locked'])
-{
- $header_msgs[] = l10n('gallery_locked_message');
-
- if ( script_basename() != 'identification' and !is_admin() )
- {
- set_status_header(503, 'Service Unavailable');
- @header('Retry-After: 900');
- echo l10n('gallery_locked_message')
- .'<a href="'.get_absolute_root_url(false).'identification.php">.</a>';
- exit();
- }
-}
-
-if ($conf['check_upgrade_feed']
- and defined('PHPWG_IN_UPGRADE')
- and PHPWG_IN_UPGRADE)
-{
-
- // retrieve already applied upgrades
- $query = '
-SELECT id
- FROM '.UPGRADE_TABLE.'
-;';
- $applied = array_from_query($query, 'id');
-
- // retrieve existing upgrades
- $existing = get_available_upgrade_ids();
-
- // which upgrades need to be applied?
- if (count(array_diff($existing, $applied)) > 0)
- {
- $header_msgs[] = 'Some database upgrades are missing, '
- .'<a href="'.get_absolute_root_url(false).'upgrade_feed.php">upgrade now</a>';
- }
-}
-
-if (is_adviser())
-{
- $header_msgs[] = l10n('adviser_mode_enabled');
-}
-
-if (count($header_msgs) > 0)
-{
- $template->assign('header_msgs', $header_msgs);
- $header_msgs=array();
-}
-
-if (!empty($conf['filter_pages']) and get_filter_page_value('used'))
-{
- include(PHPWG_ROOT_PATH.'include/functions_filter.inc.php');
- include(PHPWG_ROOT_PATH.'include/filter.inc.php');
-}
-else
-{
- $filter['enabled'] = false;
-}
-
-if (isset($conf['header_notes']))
-{
- $header_notes = array_merge($header_notes, $conf['header_notes']);
-}
-
-// default event handlers
-add_event_handler('render_category_literal_description', 'render_category_literal_description');
-add_event_handler('render_category_description', 'render_category_description');
-add_event_handler('render_comment_content', 'htmlspecialchars');
-add_event_handler('render_comment_content', 'parse_comment_content');
-add_event_handler('render_comment_author', 'strip_tags');
-trigger_action('init');
-?>
diff --git a/BSF/include/config_default.inc.php b/BSF/include/config_default.inc.php
deleted file mode 100644
index cb78729ef..000000000
--- a/BSF/include/config_default.inc.php
+++ /dev/null
@@ -1,700 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * configuration page
- *
- * Set configuration parameters that are not in the table config. In the
- * application, configuration parameters are considered in the same way
- * coming from config table or config_default.inc.php.
- *
- * It is recommended to let config_default.inc.php as provided and to
- * overwrite configuration in your local configuration file
- * config_local.inc.php. See tools/config_local.inc.php as an example.
- *
- * Why having some parameters in config table and others in
- * config_*.inc.php? Modifying config_*.inc.php is a "hard" task for low
- * skilled users, they need a GUI for this : admin/configuration. But only
- * parameters that might be modified by low skilled users are in config
- * table, other parameters are in config_*.inc.php
- */
-
-// +-----------------------------------------------------------------------+
-// | misc |
-// +-----------------------------------------------------------------------+
-
-// order_by : how to change the order of display for images in a category ?
-//
-// There are several fields that can order the display :
-//
-// - date_available : the date of the adding to the gallery
-// - file : the name of the file
-// - id : element identifier
-// - date_creation : date of element creation
-//
-// Once you've chosen which field(s) to use for ordering, you must chose the
-// ascending or descending order for each field. examples :
-//
-// 1. $conf['order_by'] = " order by date_available desc, file asc";
-// will order pictures by date_available descending & by filename ascending
-//
-// 2. $conf['order_by'] = " order by file asc";
-// will only order pictures by file ascending without taking into account
-// the date_available
-$conf['order_by'] = ' ORDER BY date_available DESC, file ASC, id ASC';
-
-// file_ext : file extensions (case sensitive) authorized
-$conf['file_ext'] = array('jpg','JPG','jpeg','JPEG',
- 'png','PNG','gif','GIF','mpg','zip',
- 'avi','mp3','ogg');
-
-// picture_ext : file extensions for picture file, must be a subset of
-// file_ext
-$conf['picture_ext'] = array('jpg','JPG','jpeg','JPEG',
- 'png','PNG','gif','GIF');
-
-// top_number : number of element to display for "best rated" and "most
-// visited" categories
-$conf['top_number'] = 15;
-
-// anti-flood_time : number of seconds between 2 comments : 0 to disable
-$conf['anti-flood_time'] = 60;
-
-// qualified spam comments are not registered (false will register them
-// but they will require admin validation)
-$conf['comment_spam_reject'] = true;
-
-// maximum number of links in a comment before it is qualified spam
-$conf['comment_spam_max_links'] = 3;
-
-// calendar_datefield : date field of table "images" used for calendar
-// catgory
-$conf['calendar_datefield'] = 'date_creation';
-
-// calendar_show_any : the calendar shows an aditional 'any' button in the
-// year/month/week/day navigation bars
-$conf['calendar_show_any'] = true;
-
-// calendar_show_empty : the calendar shows month/weeks/days even if there are
-//no elements for these
-$conf['calendar_show_empty'] = true;
-
-// calendar_month_cell_width, calendar_month_cell_height : define the
-// width and the height of a cell in the monthly calendar when viewing a
-// given month. a value of 0 means that the pretty view is not shown.
-// a good suggestion would be to have the width and the height equal
-// and smaller than tn_width and tn_height.
-$conf['calendar_month_cell_width'] =80;
-$conf['calendar_month_cell_height']=80;
-
-// newcat_default_commentable : at creation, must a category be commentable
-// or not ?
-$conf['newcat_default_commentable'] = true;
-
-// newcat_default_uploadable : at creation, must a category be uploadable or
-// not ?
-$conf['newcat_default_uploadable'] = false;
-
-// newcat_default_visible : at creation, must a category be visible or not ?
-// Warning : if the parent category is invisible, the category is
-// automatically create invisible. (invisible = locked)
-$conf['newcat_default_visible'] = true;
-
-// newcat_default_status : at creation, must a category be public or private
-// ? Warning : if the parent category is private, the category is
-// automatically create private.
-$conf['newcat_default_status'] = 'public';
-
-// level_separator : character string used for separating a category level
-// to the sub level. Suggestions : ' / ', ' &raquo; ', ' &rarr; ', ' - ',
-// ' &gt;'
-$conf['level_separator'] = ' / ';
-
-// paginate_pages_around : on paginate navigation bar, how many pages
-// display before and after the current page ?
-$conf['paginate_pages_around'] = 2;
-
-// tn_width : default width for thumbnails creation
-$conf['tn_width'] = 128;
-
-// tn_height : default height for thumbnails creation
-$conf['tn_height'] = 128;
-
-// show_version : shall the version of Piwigo be displayed at the
-// bottom of each page ?
-$conf['show_version'] = true;
-
-
-// links : list of external links to add in the menu. An example is the best
-// than a long explanation :
-//
-// Simple use:
-// for each link is associated a label
-// $conf['links'] = array(
-// 'http://piwigo.org' => 'PWG website',
-// 'http://forum.phpwebgallery.net' => 'PWG forum',
-// 'http://phpwebgallery.net/doc' => 'PWG wiki'
-// );
-//
-// Advenced use:
-// You can also used special options. Instead to pass a string like parameter value
-// you can pass a array with different optional parameter values
-// $conf['links'] = array(
-// 'http://piwigo.org' => array('label' => 'PWG website', 'new_window' => false, 'eval_visible' => 'return true;'),
-// 'http://forum.phpwebgallery.net' => array('label' => 'For ADMIN', 'new_window' => true, 'eval_visible' => 'return is_admin();'),
-// 'http://phpwebgallery.net/doc' => array('label' => 'For Guest', 'new_window' => true, 'eval_visible' => 'return is_a_guest();'),
-// 'http://download.gna.org/phpwebgallery/' =>
-// array('label' => 'PopUp', 'new_window' => true,
-// 'nw_name' => 'PopUp', 'nw_features' => 'width=800,height=450,location=no,status=no,toolbar=no,scrollbars=no,menubar=no'),
-// );
-// Parameters:
-// 'label':
-// Label to display for the link, must be defined
-// 'new_window':
-// If true open link on tab/window
-// [Default value is true if it's not defined]
-// 'nw_name':
-// Name use when new_window is true
-// [Default value is '' if it's not defined]
-// 'nw_features':
-// features use when new_window is true
-// [Default value is '' if it's not defined]
-// 'eval_visible':
-// It's php code witch must return if the link is visible or not
-// [Default value is true if it's not defined]
-//
-// Equivalence:
-// $conf['links'] = array(
-// 'http://piwigo.org' => 'PWG website',
-// );
-// $conf['links'] = array(
-// 'http://piwigo.org' => array('label' => 'PWG website', 'new_window' => false, 'visible' => 'return true;'),
-// );
-//
-// If the array is empty, the "Links" box won't be displayed on the main
-// page.
-$conf['links'] = array();
-
-// random_index_redirect: list of 'internal' links to use when no section is defined on index.php.
-// An example is the best than a long explanation :
-//
-// for each link is associated a php condition
-// '' condition is equivalent to 'return true;'
-// $conf['random_index_redirect'] = array(
-// PHPWG_ROOT_PATH.'index.php?/best_rated' => 'return true;',
-// PHPWG_ROOT_PATH.'index.php?/recent_pics' => 'return is_a_guest();',
-// PHPWG_ROOT_PATH.'random.php' => '',
-// PHPWG_ROOT_PATH.'index.php?/categories' => '',
-// );
-$conf['random_index_redirect'] = array();
-
-// List of notes to display on all header page
-// example $conf['header_notes'] = array('Test', 'Hello');
-$conf['header_notes'] = array();
-
-// show_thumbnail_caption : on thumbnails page, show thumbnail captions ?
-$conf['show_thumbnail_caption'] = true;
-
-// show_picture_name_on_title : on picture presentation page, show picture
-// name ?
-$conf['show_picture_name_on_title'] = true;
-
-// display_fromto: in subcatify mode, display the date creation bounds of a
-// category.
-$conf['display_fromto'] = false;
-
-// allow_random_representative : do you wish Piwigo to search among
-// categories elements a new representative at each reload ?
-//
-// If false, an element is randomly or manually chosen to represent its
-// category and remains the representative as long as an admin does not
-// change it.
-//
-// Warning : setting this parameter to true is CPU consuming. Each time you
-// change the value of this parameter from false to true, an administrator
-// must update categories informations in screen [Admin > General >
-// Maintenance].
-$conf['allow_random_representative'] = false;
-
-// allow_html_descriptions : authorize administrators to use HTML in
-// category and element description.
-$conf['allow_html_descriptions'] = true;
-
-// prefix_thumbnail : string before filename. Thumbnail's prefix must only
-// contain characters among : a to z (case insensitive), "-" or "_".
-$conf['prefix_thumbnail'] = 'TN-';
-
-// users_page: how many users to display in screen
-// Administration>Identification>Users?
-$conf['users_page'] = 20;
-
-// image level permissions available in the admin interface
-$conf['available_permission_levels'] = array(0,1,2,4,8);
-
-// mail_options: only set it true if you have a send mail warning with
-// "options" parameter missing on mail() function execution.
-$conf['mail_options'] = false;
-
-// send_bcc_mail_webmaster: send bcc mail to webmaster. Set true for debug
-// or test.
-$conf['send_bcc_mail_webmaster'] = false;
-
-// default_email_format:
-// Define the default email format use to send email
-// Value could be text/plain or text/html
-$conf['default_email_format'] = 'text/html';
-
-// define the name of sender mail:
-// If value is empty, gallery title is used
-$conf['mail_sender_name'] = '';
-
-// smtp configuration
-// (work if fsockopen function is allowed for smtp port)
-// smtp_host: smtp server host
-// if null, regular mail function is used
-// format: hoststring[:port]
-// exemple: smtp.pwg.net:21
-// smtp_user/smtp_password: user & password for smtp identication
-$conf['smtp_host'] = '';
-$conf['smtp_user'] = '';
-$conf['smtp_password'] = '';
-
-
-// check_upgrade_feed: check if there are database upgrade required. Set to
-// true, a message will strongly encourage you to upgrade your database if
-// needed.
-//
-// This configuration parameter is set to true in BSF branch and to false
-// elsewhere.
-$conf['check_upgrade_feed'] = true;
-
-// rate_items: available rates for a picture
-$conf['rate_items'] = array(0,1,2,3,4,5);
-
-// Define default method to use ('http' or 'html' in order to do redirect)
-$conf['default_redirect_method'] = 'http';
-
-// +-----------------------------------------------------------------------+
-// | metadata |
-// +-----------------------------------------------------------------------+
-
-// show_iptc: Show IPTC metadata on picture.php if asked by user
-$conf['show_iptc'] = false;
-
-// show_iptc_mapping : is used for showing IPTC metadata on picture.php
-// page. For each key of the array, you need to have the same key in the
-// $lang array. For example, if my first key is 'iptc_keywords' (associated
-// to '2#025') then you need to have $lang['iptc_keywords'] set in
-// language/$user['language']/common.lang.php. If you don't have the lang
-// var set, the key will be simply displayed
-//
-// To know how to associated iptc_field with their meaning, use
-// tools/metadata.php
-$conf['show_iptc_mapping'] = array(
- 'iptc_keywords' => '2#025',
- 'iptc_caption_writer' => '2#122',
- 'iptc_byline_title' => '2#085',
- 'iptc_caption' => '2#120'
- );
-
-// use_iptc: Use IPTC data during database synchronization with files
-// metadata
-$conf['use_iptc'] = false;
-
-// use_iptc_mapping : in which IPTC fields will Piwigo find image
-// information ? This setting is used during metadata synchronisation. It
-// associates a piwigo_images column name to a IPTC key
-$conf['use_iptc_mapping'] = array(
- 'keywords' => '2#025',
- 'date_creation' => '2#055',
- 'author' => '2#122',
- 'name' => '2#005',
- 'comment' => '2#120'
- );
-
-// show_exif: Show EXIF metadata on picture.php (table or line presentation
-// avalaible)
-$conf['show_exif'] = true;
-
-// show_exif_fields : in EXIF fields, you can choose to display fields in
-// sub-arrays, for example ['COMPUTED']['ApertureFNumber']. for this, add
-// 'COMPUTED;ApertureFNumber' in $conf['show_exif_fields']
-//
-// The key displayed in picture.php will be $lang['exif_field_Make'] for
-// example and if it exists. For compound fields, only take into account the
-// last part : for key 'COMPUTED;ApertureFNumber', you need
-// $lang['exif_field_ApertureFNumber']
-//
-// for PHP version newer than 4.1.2 :
-// $conf['show_exif_fields'] = array('CameraMake','CameraModel','DateTime');
-//
-$conf['show_exif_fields'] = array(
- 'Make',
- 'Model',
- 'DateTimeOriginal',
- 'COMPUTED;ApertureFNumber'
- );
-
-// use_exif: Use EXIF data during database synchronization with files
-// metadata
-$conf['use_exif'] = true;
-
-// use_exif_mapping: same behaviour as use_iptc_mapping
-$conf['use_exif_mapping'] = array(
- 'date_creation' => 'DateTimeOriginal'
- );
-
-// +-----------------------------------------------------------------------+
-// | sessions |
-// +-----------------------------------------------------------------------+
-
-// session_use_cookies: specifies to use cookie to store
-// the session id on client side
-$conf['session_use_cookies'] = true;
-
-// session_use_only_cookies: specifies to only use cookie to store
-// the session id on client side
-$conf['session_use_only_cookies'] = true;
-
-// session_use_trans_sid: do not use transparent session id support
-$conf['session_use_trans_sid'] = false;
-
-// session_name: specifies the name of the session which is used as cookie name
-$conf['session_name'] = 'pwg_id';
-
-// session_save_handler: comment the line below
-// to use file handler for sessions.
-$conf['session_save_handler'] = 'db';
-
-// authorize_remembering : permits user to stay logged for a long time. It
-// creates a cookie on client side.
-$conf['authorize_remembering'] = true;
-
-// remember_me_name: specifies the name of the cookie used to stay logged
-$conf['remember_me_name'] = 'pwg_remember';
-
-// remember_me_length : time of validity for "remember me" cookies, in
-// seconds.
-$conf['remember_me_length'] = 5184000;
-
-// session_length : time of validity for normal session, in seconds.
-$conf['session_length'] = 3600;
-
-// +-----------------------------------------------------------------------+
-// | debug |
-// +-----------------------------------------------------------------------+
-
-// show_queries : for debug purpose, show queries and execution times
-$conf['show_queries'] = false;
-
-// show_gt : display generation time at the bottom of each page
-$conf['show_gt'] = true;
-
-// debug_l10n : display a warning message each time an unset language key is
-// accessed
-$conf['debug_l10n'] = false;
-
-// activate template debugging - a new window will appear
-$conf['debug_template'] = false;
-
-// die_on_sql_error: if an SQL query fails, should everything stop?
-$conf['die_on_sql_error'] = true;
-
-// +-----------------------------------------------------------------------+
-// | authentication |
-// +-----------------------------------------------------------------------+
-
-// apache_authentication : use Apache authentication as reference instead of
-// users table ?
-$conf['apache_authentication'] = false;
-
-// users_table: which table is the reference for users? Can be a different
-// table than Piwigo table
-//
-// If you decide to use another table than the default one, you need to
-// prepare your database by deleting some datas :
-//
-// delete from piwigo_user_access;
-// delete from piwigo_user_cache;
-// delete from piwigo_user_feed;
-// delete from piwigo_user_group;
-// delete from piwigo_user_infos;
-// delete from piwigo_sessions;
-// delete from piwigo_rate;
-// update piwigo_images set average_rate = null;
-// delete from piwigo_caddie;
-// delete from piwigo_favorites;
-//
-// All informations contained in these tables and column are related to
-// piwigo_users table.
-$conf['users_table'] = $prefixeTable.'users';
-
-// Other tables can be changed, if you define associated constants
-// Example:
-// define('USER_INFOS_TABLE', 'pwg_main'.'user_infos');
-
-
-// user_fields : mapping between generic field names and table specific
-// field names. For example, in PWG, the mail address is names
-// "mail_address" and in punbb, it's called "email".
-$conf['user_fields'] = array(
- 'id' => 'id',
- 'username' => 'username',
- 'password' => 'password',
- 'email' => 'mail_address'
- );
-
-// pass_convert : function to crypt or hash the clear user password to store
-// it in the database
-$conf['pass_convert'] = create_function('$s', 'return md5($s);');
-
-// guest_id : id of the anonymous user
-$conf['guest_id'] = 2;
-// default_user_id : id of user used for default value
-$conf['default_user_id'] = $conf['guest_id'];
-
-// webmaster_id : webmaster'id.
-$conf['webmaster_id'] = 1;
-
-// allow to use adviser mode
-$conf['allow_adviser'] = false;
-
-// does the guest have access ?
-// (not a security feature, set your categories "private" too)
-// If false it'll be redirected from index.php to identification.php
-$conf['guest_access'] = true;
-
-// +-----------------------------------------------------------------------+
-// | upload |
-// +-----------------------------------------------------------------------+
-
-// upload_maxfilesize: maximum filesize for the uploaded pictures. In
-// kilobytes.
-$conf['upload_maxfilesize'] = 200;
-
-// upload_maxheight: maximum height authorized for the uploaded images. In
-// pixels.
-$conf['upload_maxheight'] = 800;
-
-// upload_maxwidth: maximum width authorized for the uploaded images. In
-// pixels.
-$conf['upload_maxwidth'] = 800;
-
-// upload_maxheight_thumbnail: maximum height authorized for the uploaded
-// thumbnails
-$conf['upload_maxheight_thumbnail'] = 128;
-
-// upload_maxwidth_thumbnail: maximum width authorized for the uploaded
-// thumbnails
-$conf['upload_maxwidth_thumbnail'] = 128;
-
-// +-----------------------------------------------------------------------+
-// | history |
-// +-----------------------------------------------------------------------+
-
-// nb_logs_page : how many logs to display on a page
-$conf['nb_logs_page'] = 300;
-
-// +-----------------------------------------------------------------------+
-// | urls |
-// +-----------------------------------------------------------------------+
-
-// question_mark_in_urls : the generated urls contain a ? sign. This can be
-// changed to false only if the server translates PATH_INFO variable
-// (depends on the server AcceptPathInfo directive configuration)
-$conf['question_mark_in_urls'] = true;
-
-// php_extension_in_urls : if true, the urls generated for picture and
-// category will not contain the .php extension. This will work only if
-// .htaccess defines Options +MultiViews parameter or url rewriting rules
-// are active.
-$conf['php_extension_in_urls'] = true;
-
-// category_url_style : one of 'id' (default) or 'id-name'. 'id-name'
-// means that an simplified ascii represntation of the category name will
-// appear in the url
-$conf['category_url_style'] = 'id';
-
-// picture_url_style : one of 'id' (default), 'id-file' or 'file'. 'id-file'
-// or 'file' mean that the file name (without extension will appear in the
-// url). Note that one aditionnal sql query will occur if 'file' is choosen.
-// Note that you might experience navigation issues if you choose 'file'
-// and your file names are not unique
-$conf['picture_url_style'] = 'id';
-
-// tag_url_style : one of 'id-tag' (default), 'id' or 'tag'.
-// Note that if you choose 'tag' and the url (ascii) representation of your
-// tags is not unique, all tags with the same url representation will be shown
-$conf['tag_url_style'] = 'id-tag';
-
-// +-----------------------------------------------------------------------+
-// | tags |
-// +-----------------------------------------------------------------------+
-
-// full_tag_cloud_items_number: number of tags to show in the full tag
-// cloud. Only the most represented tags will be shown
-$conf['full_tag_cloud_items_number'] = 200;
-
-// menubar_tag_cloud_items_number: number of tags to show in the tag
-// cloud in the menubar. Only the most represented tags will be shown
-$conf['menubar_tag_cloud_items_number'] = 100;
-
-// content_tag_cloud_items_number: number of tags to show in the tag
-// cloud on the content page. Only the most represented tags will be shown
-$conf['content_tag_cloud_items_number'] = 12;
-
-// tags_levels: number of levels to use for display. Each level is bind to a
-// CSS class tagLevelX.
-$conf['tags_levels'] = 5;
-
-// +-----------------------------------------------------------------------+
-// | Notification by mail |
-// +-----------------------------------------------------------------------+
-
-// Default Value for nbm user
-$conf['nbm_default_value_user_enabled'] = false;
-
-// Search list user to send quickly (List all without to check news)
-// More quickly but less fun to use
-$conf['nbm_list_all_enabled_users_to_send'] = false;
-
-// Max time used on one pass in order to send mails.
-// Timeout delay ratio.
-$conf['nbm_max_treatment_timeout_percent'] = 0.8;
-
-// If timeout cannot be compite with nbm_max_treatment_timeout_percent,
-// nbm_treatment_timeout_default is used by default
-$conf['nbm_treatment_timeout_default'] = 20;
-
-// Parameters used in get_recent_post_dates for the 2 kind of notification
-$conf['recent_post_dates'] = array(
- 'RSS' => array('max_dates' => 5, 'max_elements' => 6, 'max_cats' => 6),
- 'NBM' => array('max_dates' => 7, 'max_elements' => 3, 'max_cats' => 9)
- );
-
-// +-----------------------------------------------------------------------+
-// | Set admin layout |
-// +-----------------------------------------------------------------------+
-
-$conf['admin_layout'] = 'yoga/admin';
-
-// should we load the active plugins ? true=Yes, false=No
-$conf['enable_plugins']=true;
-
-// Web services are allowed (true) or completely forbidden (false)
-$conf['allow_web_services'] = true;
-
-// Maximum number of images to be returned foreach call to the web service
-$conf['ws_max_images_per_page'] = 500;
-
-// On Access control false / Admim Web Service need Php cURL extension
-// Controls are done on public basis or
-// if connected on member authorization basis
-$conf['ws_access_control'] = false;
-
-// Additionnal controls are made based on Web Service Access Table
-// Max returned rows number ( > 0 )
-$conf['ws_allowed_limit'] = array(1,2,3,5,10,25);
-
-// By default can be delayed by 0, 1, 2, 3, 5, 7, 14 or 30 days
-// 0 it's Now(), don't remove that one
-$conf['ws_postponed_start'] = array(0,1,2,3,5,7,14,30); /* In days */
-
-// By default 10, 5, 2, 1 year(s) or 6, 3, 1 month(s)
-// or 15, 10, 7, 5, 1, 0 day(s)
-// 0 it's temporary closed (Useful for one access)
-$conf['ws_durations'] = array(3650,1825,730,365,182,91,30,15,10,7,5,1,0);
-
-// +-----------------------------------------------------------------------+
-// | Filter |
-// +-----------------------------------------------------------------------+
-// $conf['filter_pages'] contains configuration for each pages
-// o If values are not defined for a specific page, default value are used
-// o Array is composed by the basename of each page without extention
-// o List of value names:
-// - used: filter function are used
-// (if false nothing is done [start, cancel, stop, ...]
-// - cancel: cancel current started filter
-// - add_notes: add notes about current started filter on the header
-// o Empty configuration in order to disable completely filter functions
-// No filter, No icon,...
-// $conf['filter_pages'] = array();
-$conf['filter_pages'] = array
- (
- // Default page
- 'default' => array(
- 'used' => true, 'cancel' => false, 'add_notes' => false),
- // Real pages
- 'index' => array('add_notes' => true),
- 'tags' => array('add_notes' => true),
- 'search' => array('add_notes' => true),
- 'comments' => array('add_notes' => true),
- 'admin' => array('used' => false),
- 'feed' => array('used' => false),
- 'notification' => array('used' => false),
- 'nbm' => array('used' => false),
- 'popuphelp' => array('used' => false),
- 'profile' => array('used' => false),
- 'web_service' => array('used' => false),
- 'ws' => array('used' => false),
- 'identification' => array('cancel' => true),
- 'install' => array('cancel' => true),
- 'password' => array('cancel' => true),
- 'register' => array('cancel' => true),
- 'upgrade_feed' => array('cancel' => true),
- );
-
-// +-----------------------------------------------------------------------+
-// | Slideshow |
-// +-----------------------------------------------------------------------+
-// slideshow_period : waiting time in seconds before loading a new page
-// during automated slideshow
-// slideshow_period_min, slideshow_period_max are bounds of slideshow_period
-// slideshow_period_step is the step of navigation between min and max
-$conf['slideshow_period_min'] = 1;
-$conf['slideshow_period_max'] = 10;
-$conf['slideshow_period_step'] = 1;
-$conf['slideshow_period'] = 4;
-
-// slideshow_repeat : slideshow loops on pictures
-$conf['slideshow_repeat'] = true;
-
-// $conf['light_slideshow'] indicates to use slideshow.tpl in state of
-// picture.tpl for slideshow
-// Take care to have slideshow.tpl in all available templates
-// Or set it false.
-// Check if Picture's plugins are compliant with it
-// Every plugin from 1.7 would be design to manage light_slideshow case.
-$conf['light_slideshow'] = true;
-
-// the local data directory is used to store data such as compiled templates
-// or other plugin variables etc
-$conf['local_data_dir'] = dirname(dirname(__FILE__)).'/_data';
-
-// if true, some language strings are replaced during template compilation
-// (insted of template output). this results in better performance. however
-// any change in the language file will not be propagated until you purge
-// the compiled templates from the admin / maintenance menu
-$conf['compiled_template_cache_language'] = false;
-
-?> \ No newline at end of file
diff --git a/BSF/include/constants.php b/BSF/include/constants.php
deleted file mode 100644
index 42854a9d4..000000000
--- a/BSF/include/constants.php
+++ /dev/null
@@ -1,112 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Default settings
-define('PHPWG_VERSION', 'Butterfly');
-define('PHPWG_DOMAIN', 'phpwebgallery.net');
-define('PHPWG_URL', 'http://www.'.PHPWG_DOMAIN);
-define('PEM_URL', 'http://' . PHPWG_DOMAIN . '/ext');
-define('PHPWG_DEFAULT_LANGUAGE', 'en_UK');
-define('PHPWG_DEFAULT_TEMPLATE', 'yoga/clear');
-
-// Required versions
-define('REQUIRED_PHP_VERSION', '5.0.0');
-define('REQUIRED_MYSQL_VERSION', '4.1.22');
-
-// Error codes
-define('GENERAL_MESSAGE', 200);
-define('GENERAL_ERROR', 202);
-define('CRITICAL_MESSAGE', 203);
-define('CRITICAL_ERROR', 204);
-
-// Access codes
-define('ACCESS_FREE', 0);
-define('ACCESS_GUEST', 1);
-define('ACCESS_CLASSIC', 2);
-define('ACCESS_ADMINISTRATOR', 3);
-define('ACCESS_WEBMASTER', 4);
-define('ACCESS_CLOSED', 5);
-
-// Table names
-if (!defined('CATEGORIES_TABLE'))
- define('CATEGORIES_TABLE', $prefixeTable.'categories');
-if (!defined('COMMENTS_TABLE'))
- define('COMMENTS_TABLE', $prefixeTable.'comments');
-if (!defined('CONFIG_TABLE'))
- define('CONFIG_TABLE', $prefixeTable.'config');
-if (!defined('FAVORITES_TABLE'))
- define('FAVORITES_TABLE', $prefixeTable.'favorites');
-if (!defined('GROUP_ACCESS_TABLE'))
- define('GROUP_ACCESS_TABLE', $prefixeTable.'group_access');
-if (!defined('GROUPS_TABLE'))
- define('GROUPS_TABLE', $prefixeTable.'groups');
-if (!defined('HISTORY_TABLE'))
- define('HISTORY_TABLE', $prefixeTable.'history');
-if (!defined('HISTORY_SUMMARY_TABLE'))
- define('HISTORY_SUMMARY_TABLE', $prefixeTable.'history_summary');
-if (!defined('IMAGE_CATEGORY_TABLE'))
- define('IMAGE_CATEGORY_TABLE', $prefixeTable.'image_category');
-if (!defined('IMAGES_TABLE'))
- define('IMAGES_TABLE', $prefixeTable.'images');
-if (!defined('SESSIONS_TABLE'))
- define('SESSIONS_TABLE', $prefixeTable.'sessions');
-if (!defined('SITES_TABLE'))
- define('SITES_TABLE', $prefixeTable.'sites');
-if (!defined('USER_ACCESS_TABLE'))
- define('USER_ACCESS_TABLE', $prefixeTable.'user_access');
-if (!defined('USER_GROUP_TABLE'))
- define('USER_GROUP_TABLE', $prefixeTable.'user_group');
-if (!defined('USERS_TABLE'))
- define('USERS_TABLE', $conf['users_table']);
-if (!defined('USER_INFOS_TABLE'))
- define('USER_INFOS_TABLE', $prefixeTable.'user_infos');
-if (!defined('USER_FEED_TABLE'))
- define('USER_FEED_TABLE', $prefixeTable.'user_feed');
-if (!defined('WAITING_TABLE'))
- define('WAITING_TABLE', $prefixeTable.'waiting');
-if (!defined('RATE_TABLE'))
- define('RATE_TABLE', $prefixeTable.'rate');
-if (!defined('USER_CACHE_TABLE'))
- define('USER_CACHE_TABLE', $prefixeTable.'user_cache');
-if (!defined('USER_CACHE_CATEGORIES_TABLE'))
- define('USER_CACHE_CATEGORIES_TABLE', $prefixeTable.'user_cache_categories');
-if (!defined('CADDIE_TABLE'))
- define('CADDIE_TABLE', $prefixeTable.'caddie');
-if (!defined('UPGRADE_TABLE'))
- define('UPGRADE_TABLE', $prefixeTable.'upgrade');
-if (!defined('SEARCH_TABLE'))
- define('SEARCH_TABLE', $prefixeTable.'search');
-if (!defined('USER_MAIL_NOTIFICATION_TABLE'))
- define('USER_MAIL_NOTIFICATION_TABLE', $prefixeTable.'user_mail_notification');
-if (!defined('TAGS_TABLE'))
- define('TAGS_TABLE', $prefixeTable.'tags');
-if (!defined('IMAGE_TAG_TABLE'))
- define('IMAGE_TAG_TABLE', $prefixeTable.'image_tag');
-if (!defined('PLUGINS_TABLE'))
- define('PLUGINS_TABLE', $prefixeTable.'plugins');
-if (!defined('WEB_SERVICES_ACCESS_TABLE'))
- define('WEB_SERVICES_ACCESS_TABLE', $prefixeTable.'ws_access');
-if (!defined('OLD_PERMALINKS_TABLE'))
- define('OLD_PERMALINKS_TABLE', $prefixeTable.'old_permalinks');
-
-?>
diff --git a/BSF/include/feedcreator.class.php b/BSF/include/feedcreator.class.php
deleted file mode 100644
index f274b8417..000000000
--- a/BSF/include/feedcreator.class.php
+++ /dev/null
@@ -1,1541 +0,0 @@
-<?php
-/***************************************************************************
-
-FeedCreator class v1.7.2
-originally (c) Kai Blankenhorn
-www.bitfolge.de
-kaib@bitfolge.de
-v1.3 work by Scott Reynen (scott@randomchaos.com) and Kai Blankenhorn
-v1.5 OPML support by Dirk Clemens
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-****************************************************************************
-
-
-Changelog:
-
-v1.7.2 10-11-04
- license changed to LGPL
-
-v1.7.1
- fixed a syntax bug
- fixed left over debug code
-
-v1.7 07-18-04
- added HTML and JavaScript feeds (configurable via CSS) (thanks to Pascal Van Hecke)
- added HTML descriptions for all feed formats (thanks to Pascal Van Hecke)
- added a switch to select an external stylesheet (thanks to Pascal Van Hecke)
- changed default content-type to application/xml
- added character encoding setting
- fixed numerous smaller bugs (thanks to Sören Fuhrmann of golem.de)
- improved changing ATOM versions handling (thanks to August Trometer)
- improved the UniversalFeedCreator's useCached method (thanks to Sören Fuhrmann of golem.de)
- added charset output in HTTP headers (thanks to Sören Fuhrmann of golem.de)
- added Slashdot namespace to RSS 1.0 (thanks to Sören Fuhrmann of golem.de)
-
-v1.6 05-10-04
- added stylesheet to RSS 1.0 feeds
- fixed generator comment (thanks Kevin L. Papendick and Tanguy Pruvot)
- fixed RFC822 date bug (thanks Tanguy Pruvot)
- added TimeZone customization for RFC8601 (thanks Tanguy Pruvot)
- fixed Content-type could be empty (thanks Tanguy Pruvot)
- fixed author/creator in RSS1.0 (thanks Tanguy Pruvot)
-
-v1.6 beta 02-28-04
- added Atom 0.3 support (not all features, though)
- improved OPML 1.0 support (hopefully - added more elements)
- added support for arbitrary additional elements (use with caution)
- code beautification :-)
- considered beta due to some internal changes
-
-v1.5.1 01-27-04
- fixed some RSS 1.0 glitches (thanks to Stéphane Vanpoperynghe)
- fixed some inconsistencies between documentation and code (thanks to Timothy Martin)
-
-v1.5 01-06-04
- added support for OPML 1.0
- added more documentation
-
-v1.4 11-11-03
- optional feed saving and caching
- improved documentation
- minor improvements
-
-v1.3 10-02-03
- renamed to FeedCreator, as it not only creates RSS anymore
- added support for mbox
- tentative support for echo/necho/atom/pie/???
-
-v1.2 07-20-03
- intelligent auto-truncating of RSS 0.91 attributes
- don't create some attributes when they're not set
- documentation improved
- fixed a real and a possible bug with date conversions
- code cleanup
-
-v1.1 06-29-03
- added images to feeds
- now includes most RSS 0.91 attributes
- added RSS 2.0 feeds
-
-v1.0 06-24-03
- initial release
-
-
-
-***************************************************************************/
-
-/*** GENERAL USAGE *********************************************************
-
-include("feedcreator.class.php");
-
-$rss = new UniversalFeedCreator();
-$rss->useCached(); // use cached version if age<1 hour
-$rss->title = "PHP news";
-$rss->description = "daily news from the PHP scripting world";
-
-//optional
-$rss->descriptionTruncSize = 500;
-$rss->descriptionHtmlSyndicated = true;
-
-$rss->link = "http://www.dailyphp.net/news";
-$rss->syndicationURL = "http://www.dailyphp.net/".$_SERVER["PHP_SELF"];
-
-$image = new FeedImage();
-$image->title = "dailyphp.net logo";
-$image->url = "http://www.dailyphp.net/images/logo.gif";
-$image->link = "http://www.dailyphp.net";
-$image->description = "Feed provided by dailyphp.net. Click to visit.";
-
-//optional
-$image->descriptionTruncSize = 500;
-$image->descriptionHtmlSyndicated = true;
-
-$rss->image = $image;
-
-// get your news items from somewhere, e.g. your database:
-mysql_select_db($dbHost, $dbUser, $dbPass);
-$res = mysql_query("SELECT * FROM news ORDER BY newsdate DESC");
-while ($data = mysql_fetch_object($res)) {
- $item = new FeedItem();
- $item->title = $data->title;
- $item->link = $data->url;
- $item->description = $data->short;
-
- //optional
- item->descriptionTruncSize = 500;
- item->descriptionHtmlSyndicated = true;
-
- $item->date = $data->newsdate;
- $item->source = "http://www.dailyphp.net";
- $item->author = "John Doe";
-
- $rss->addItem($item);
-}
-
-// valid format strings are: RSS0.91, RSS1.0, RSS2.0, PIE0.1 (deprecated),
-// MBOX, OPML, ATOM, ATOM0.3, HTML, JS
-echo $rss->saveFeed("RSS1.0", "news/feed.xml");
-
-
-***************************************************************************
-* A little setup *
-**************************************************************************/
-
-// your local timezone, set to "" to disable or for GMT
-define("TIME_ZONE","+00:00");
-
-
-
-
-/**
- * Version string.
- **/
-define("FEEDCREATOR_VERSION", "FeedCreator 1.7.2");
-
-
-
-/**
- * A FeedItem is a part of a FeedCreator feed.
- *
- * @author Kai Blankenhorn <kaib@bitfolge.de>
- * @since 1.3
- */
-class FeedItem extends HtmlDescribable {
- /**
- * Mandatory attributes of an item.
- */
- var $title, $description, $link;
-
- /**
- * Optional attributes of an item.
- */
- var $author, $authorEmail, $image, $category, $comments, $guid, $source, $creator;
-
- /**
- * Publishing date of an item. May be in one of the following formats:
- *
- * RFC 822:
- * "Mon, 20 Jan 03 18:05:41 +0400"
- * "20 Jan 03 18:05:41 +0000"
- *
- * ISO 8601:
- * "2003-01-20T18:05:41+04:00"
- *
- * Unix:
- * 1043082341
- */
- var $date;
-
- /**
- * Any additional elements to include as an assiciated array. All $key => $value pairs
- * will be included unencoded in the feed item in the form
- * <$key>$value</$key>
- * Again: No encoding will be used! This means you can invalidate or enhance the feed
- * if $value contains markup. This may be abused to embed tags not implemented by
- * the FeedCreator class used.
- */
- var $additionalElements = Array();
-
- // on hold
- // var $source;
-}
-
-
-
-/**
- * An FeedImage may be added to a FeedCreator feed.
- * @author Kai Blankenhorn <kaib@bitfolge.de>
- * @since 1.3
- */
-class FeedImage extends HtmlDescribable {
- /**
- * Mandatory attributes of an image.
- */
- var $title, $url, $link;
-
- /**
- * Optional attributes of an image.
- */
- var $width, $height, $description;
-}
-
-
-
-/**
- * An HtmlDescribable is an item within a feed that can have a description that may
- * include HTML markup.
- */
-class HtmlDescribable {
- /**
- * Indicates whether the description field should be rendered in HTML.
- */
- var $descriptionHtmlSyndicated;
-
- /**
- * Indicates whether and to how many characters a description should be truncated.
- */
- var $descriptionTruncSize;
-
- /**
- * Returns a formatted description field, depending on descriptionHtmlSyndicated and
- * $descriptionTruncSize properties
- * @return string the formatted description
- */
- function getDescription() {
- $descriptionField = new FeedHtmlField($this->description);
- $descriptionField->syndicateHtml = $this->descriptionHtmlSyndicated;
- $descriptionField->truncSize = $this->descriptionTruncSize;
- return $descriptionField->output();
- }
-
-}
-
-
-/**
- * An FeedHtmlField describes and generates
- * a feed, item or image html field (probably a description). Output is
- * generated based on $truncSize, $syndicateHtml properties.
- * @author Pascal Van Hecke <feedcreator.class.php@vanhecke.info>
- * @version 1.6
- */
-class FeedHtmlField {
- /**
- * Mandatory attributes of a FeedHtmlField.
- */
- var $rawFieldContent;
-
- /**
- * Optional attributes of a FeedHtmlField.
- *
- */
- var $truncSize, $syndicateHtml;
-
- /**
- * Creates a new instance of FeedHtmlField.
- * @param $string: if given, sets the rawFieldContent property
- */
- function FeedHtmlField($parFieldContent) {
- if ($parFieldContent) {
- $this->rawFieldContent = $parFieldContent;
- }
- }
-
-
- /**
- * Creates the right output, depending on $truncSize, $syndicateHtml properties.
- * @return string the formatted field
- */
- function output() {
- // when field available and syndicated in html we assume
- // - valid html in $rawFieldContent and we enclose in CDATA tags
- // - no truncation (truncating risks producing invalid html)
- if (!$this->rawFieldContent) {
- $result = "";
- } elseif ($this->syndicateHtml) {
- $result = "<![CDATA[".$this->rawFieldContent."]]>";
- } else {
- if ($this->truncSize and is_int($this->truncSize)) {
- $result = FeedCreator::iTrunc(htmlspecialchars($this->rawFieldContent),$this->truncSize);
- } else {
- $result = htmlspecialchars($this->rawFieldContent);
- }
- }
- return $result;
- }
-
-}
-
-
-
-/**
- * UniversalFeedCreator lets you choose during runtime which
- * format to build.
- * For general usage of a feed class, see the FeedCreator class
- * below or the example above.
- *
- * @since 1.3
- * @author Kai Blankenhorn <kaib@bitfolge.de>
- */
-class UniversalFeedCreator extends FeedCreator {
- var $_feed;
-
- function _setFormat($format) {
- switch (strtoupper($format)) {
-
- case "2.0":
- // fall through
- case "RSS2.0":
- $this->_feed = new RSSCreator20();
- break;
-
- case "1.0":
- // fall through
- case "RSS1.0":
- $this->_feed = new RSSCreator10();
- break;
-
- case "0.91":
- // fall through
- case "RSS0.91":
- $this->_feed = new RSSCreator091();
- break;
-
- case "PIE0.1":
- $this->_feed = new PIECreator01();
- break;
-
- case "MBOX":
- $this->_feed = new MBOXCreator();
- break;
-
- case "OPML":
- $this->_feed = new OPMLCreator();
- break;
-
- case "ATOM":
- // fall through: always the latest ATOM version
-
- case "ATOM0.3":
- $this->_feed = new AtomCreator03();
- break;
-
- case "HTML":
- $this->_feed = new HTMLCreator();
- break;
-
- case "JS":
- // fall through
- case "JAVASCRIPT":
- $this->_feed = new JSCreator();
- break;
-
- default:
- $this->_feed = new RSSCreator091();
- break;
- }
-
- $vars = get_object_vars($this);
- foreach ($vars as $key => $value) {
- // prevent overwriting of properties "contentType", "encoding"; do not copy "_feed" itself
- if (!in_array($key, array("_feed", "contentType"/*PWG, "encoding"*/))) {
- $this->_feed->{$key} = $this->{$key};
- }
- }
- }
-
- /**
- * Creates a syndication feed based on the items previously added.
- *
- * @see FeedCreator::addItem()
- * @param string format format the feed should comply to. Valid values are:
- * "PIE0.1", "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3", "HTML", "JS"
- * @return string the contents of the feed.
- */
- function createFeed($format = "RSS0.91") {
- $this->_setFormat($format);
- return $this->_feed->createFeed();
- }
-
-
-
- /**
- * Saves this feed as a file on the local disk. After the file is saved, an HTTP redirect
- * header may be sent to redirect the use to the newly created file.
- * @since 1.4
- *
- * @param string format format the feed should comply to. Valid values are:
- * "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM", "ATOM0.3", "HTML", "JS"
- * @param string filename optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
- * @param boolean displayContents optional send the content of the file or not. If true, the file will be sent in the body of the response.
- */
- function saveFeed($format="RSS0.91", $filename="", $displayContents=true) {
- $this->_setFormat($format);
- $this->_feed->saveFeed($filename, $displayContents);
- }
-
-
- /**
- * Turns on caching and checks if there is a recent version of this feed in the cache.
- * If there is, an HTTP redirect header is sent.
- * To effectively use caching, you should create the FeedCreator object and call this method
- * before anything else, especially before you do the time consuming task to build the feed
- * (web fetching, for example).
- *
- * @param string format format the feed should comply to. Valid values are:
- * "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM0.3".
- * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
- * @param timeout int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour)
- */
- function useCached($format="RSS0.91", $filename="", $timeout=3600) {
- $this->_setFormat($format);
- $this->_feed->useCached($filename, $timeout);
- }
-
-}
-
-
-/**
- * FeedCreator is the abstract base implementation for concrete
- * implementations that implement a specific format of syndication.
- *
- * @abstract
- * @author Kai Blankenhorn <kaib@bitfolge.de>
- * @since 1.4
- */
-class FeedCreator extends HtmlDescribable {
-
- /**
- * Mandatory attributes of a feed.
- */
- var $title, $description, $link;
-
-
- /**
- * Optional attributes of a feed.
- */
- var $syndicationURL, $image, $language, $copyright, $pubDate, $lastBuildDate, $editor, $editorEmail, $webmaster, $category, $docs, $ttl, $rating, $skipHours, $skipDays;
-
- /**
- * The url of the external xsl stylesheet used to format the naked rss feed.
- * Ignored in the output when empty.
- */
- var $xslStyleSheet = "";
-
-
- /**
- * @access private
- */
- var $items = Array();
-
-
- /**
- * This feed's MIME content type.
- * @since 1.4
- * @access private
- */
- var $contentType = "application/xml";
-
-
- /**
- * This feed's character encoding.
- * @since 1.6.1
- **/
- var $encoding = "ISO-8859-1";
-
-
- /**
- * Any additional elements to include as an assiciated array. All $key => $value pairs
- * will be included unencoded in the feed in the form
- * <$key>$value</$key>
- * Again: No encoding will be used! This means you can invalidate or enhance the feed
- * if $value contains markup. This may be abused to embed tags not implemented by
- * the FeedCreator class used.
- */
- var $additionalElements = Array();
-
-
- /**
- * Adds an FeedItem to the feed.
- *
- * @param object FeedItem $item The FeedItem to add to the feed.
- * @access public
- */
- function addItem($item) {
- $this->items[] = $item;
- }
-
-
- /**
- * Truncates a string to a certain length at the most sensible point.
- * First, if there's a '.' character near the end of the string, the string is truncated after this character.
- * If there is no '.', the string is truncated after the last ' ' character.
- * If the string is truncated, " ..." is appended.
- * If the string is already shorter than $length, it is returned unchanged.
- *
- * @static
- * @param string string A string to be truncated.
- * @param int length the maximum length the string should be truncated to
- * @return string the truncated string
- */
- function iTrunc($string, $length) {
- if (strlen($string)<=$length) {
- return $string;
- }
-
- $pos = strrpos($string,".");
- if ($pos>=$length-4) {
- $string = substr($string,0,$length-4);
- $pos = strrpos($string,".");
- }
- if ($pos>=$length*0.4) {
- return substr($string,0,$pos+1)." ...";
- }
-
- $pos = strrpos($string," ");
- if ($pos>=$length-4) {
- $string = substr($string,0,$length-4);
- $pos = strrpos($string," ");
- }
- if ($pos>=$length*0.4) {
- return substr($string,0,$pos)." ...";
- }
-
- return substr($string,0,$length-4)." ...";
-
- }
-
-
- /**
- * Creates a comment indicating the generator of this feed.
- * The format of this comment seems to be recognized by
- * Syndic8.com.
- */
- function _createGeneratorComment() {
- return "<!-- generator=\"".FEEDCREATOR_VERSION."\" -->\n";
- }
-
-
- /**
- * Creates a string containing all additional elements specified in
- * $additionalElements.
- * @param elements array an associative array containing key => value pairs
- * @param indentString string a string that will be inserted before every generated line
- * @return string the XML tags corresponding to $additionalElements
- */
- function _createAdditionalElements($elements, $indentString="") {
- $ae = "";
- if (is_array($elements)) {
- foreach($elements AS $key => $value) {
- $ae.= $indentString."<$key>$value</$key>\n";
- }
- }
- return $ae;
- }
-
- function _createStylesheetReferences() {
- $xml = "";
- if (isset($this->cssStyleSheet)) $xml .= "<?xml-stylesheet href=\"".$this->cssStyleSheet."\" type=\"text/css\"?>\n";
- if ($this->xslStyleSheet) $xml .= "<?xml-stylesheet href=\"".$this->xslStyleSheet."\" type=\"text/xsl\"?>\n";
- return $xml;
- }
-
-
- /**
- * Builds the feed's text.
- * @abstract
- * @return string the feed's complete text
- */
- function createFeed() {
- }
-
- /**
- * Generate a filename for the feed cache file. The result will be $_SERVER["PHP_SELF"] with the extension changed to .xml.
- * For example:
- *
- * echo $_SERVER["PHP_SELF"]."\n";
- * echo FeedCreator::_generateFilename();
- *
- * would produce:
- *
- * /rss/latestnews.php
- * latestnews.xml
- *
- * @return string the feed cache filename
- * @since 1.4
- * @access private
- */
- function _generateFilename() {
- $fileInfo = pathinfo($_SERVER["PHP_SELF"]);
- return substr($fileInfo["basename"],0,-(strlen($fileInfo["extension"])+1)).".xml";
- }
-
-
- /**
- * @since 1.4
- * @access private
- */
- function _redirect($filename) {
- // attention, heavily-commented-out-area
-
- // maybe use this in addition to file time checking
- //Header("Expires: ".date("r",time()+$this->_timeout));
-
- /* no caching at all, doesn't seem to work as good:
- Header("Cache-Control: no-cache");
- Header("Pragma: no-cache");
- */
-
- // HTTP redirect, some feed readers' simple HTTP implementations don't follow it
- //Header("Location: ".$filename);
-
- Header("Content-Type: ".$this->contentType."; charset=".$this->encoding."; filename=".basename($filename));
- Header("Content-Disposition: inline; filename=".basename($filename));
- readfile($filename, "r");
- die();
- }
-
- /**
- * Turns on caching and checks if there is a recent version of this feed in the cache.
- * If there is, an HTTP redirect header is sent.
- * To effectively use caching, you should create the FeedCreator object and call this method
- * before anything else, especially before you do the time consuming task to build the feed
- * (web fetching, for example).
- * @since 1.4
- * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
- * @param timeout int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour)
- */
- function useCached($filename="", $timeout=3600) {
- $this->_timeout = $timeout;
- if ($filename=="") {
- $filename = $this->_generateFilename();
- }
- if (file_exists($filename) AND (time()-filemtime($filename) < $timeout)) {
- $this->_redirect($filename);
- }
- }
-
-
- /**
- * Saves this feed as a file on the local disk. After the file is saved, a redirect
- * header may be sent to redirect the user to the newly created file.
- * @since 1.4
- *
- * @param filename string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
- * @param redirect boolean optional send an HTTP redirect header or not. If true, the user will be automatically redirected to the created file.
- */
- function saveFeed($filename="", $displayContents=true) {
- if ($filename=="") {
- $filename = $this->_generateFilename();
- }
- $feedFile = fopen($filename, "w+");
- if ($feedFile) {
- fputs($feedFile,$this->createFeed());
- fclose($feedFile);
- if ($displayContents) {
- $this->_redirect($filename);
- }
- } else {
- echo "<br /><b>Error creating feed file, please check write permissions.</b><br />";
- }
- }
-
-}
-
-
-/**
- * FeedDate is an internal class that stores a date for a feed or feed item.
- * Usually, you won't need to use this.
- */
-class FeedDate {
- var $unix;
-
- /**
- * Creates a new instance of FeedDate representing a given date.
- * Accepts RFC 822, ISO 8601 date formats as well as unix time stamps.
- * @param mixed $dateString optional the date this FeedDate will represent. If not specified, the current date and time is used.
- */
- function FeedDate($dateString="") {
- if ($dateString=="") $dateString = date("r");
-
- if (is_integer($dateString)) {
- $this->unix = $dateString;
- return;
- }
- if (preg_match("~(?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),\\s+)?(\\d{1,2})\\s+([a-zA-Z]{3})\\s+(\\d{4})\\s+(\\d{2}):(\\d{2}):(\\d{2})\\s+(.*)~",$dateString,$matches)) {
- $months = Array("Jan"=>1,"Feb"=>2,"Mar"=>3,"Apr"=>4,"May"=>5,"Jun"=>6,"Jul"=>7,"Aug"=>8,"Sep"=>9,"Oct"=>10,"Nov"=>11,"Dec"=>12);
- $this->unix = mktime($matches[4],$matches[5],$matches[6],$months[$matches[2]],$matches[1],$matches[3]);
- if (substr($matches[7],0,1)=='+' OR substr($matches[7],0,1)=='-') {
- $tzOffset = (substr($matches[7],0,3) * 60 + substr($matches[7],-2)) * 60;
- } else {
- if (strlen($matches[7])==1) {
- $oneHour = 3600;
- $ord = ord($matches[7]);
- if ($ord < ord("M")) {
- $tzOffset = (ord("A") - $ord - 1) * $oneHour;
- } elseif ($ord >= ord("M") AND $matches[7]!="Z") {
- $tzOffset = ($ord - ord("M")) * $oneHour;
- } elseif ($matches[7]=="Z") {
- $tzOffset = 0;
- }
- }
- switch ($matches[7]) {
- case "UT":
- case "GMT": $tzOffset = 0;
- }
- }
- $this->unix += $tzOffset;
- return;
- }
- if (preg_match("~(\\d{4})-(\\d{2})-(\\d{2})T(\\d{2}):(\\d{2}):(\\d{2})(.*)~",$dateString,$matches)) {
- $this->unix = mktime($matches[4],$matches[5],$matches[6],$matches[2],$matches[3],$matches[1]);
- if (substr($matches[7],0,1)=='+' OR substr($matches[7],0,1)=='-') {
- $tzOffset = (substr($matches[7],0,3) * 60 + substr($matches[7],-2)) * 60;
- } else {
- if ($matches[7]=="Z") {
- $tzOffset = 0;
- }
- }
- $this->unix += $tzOffset;
- return;
- }
- $this->unix = 0;
- }
-
- /**
- * Gets the date stored in this FeedDate as an RFC 822 date.
- *
- * @return a date in RFC 822 format
- */
- function rfc822() {
- //return gmdate("r",$this->unix);
- $date = gmdate("D, d M Y H:i:s", $this->unix);
- if (TIME_ZONE!="") $date .= " ".str_replace(":","",TIME_ZONE);
- return $date;
- }
-
- /**
- * Gets the date stored in this FeedDate as an ISO 8601 date.
- *
- * @return a date in ISO 8601 format
- */
- function iso8601() {
- $date = gmdate("Y-m-d\TH:i:sO",$this->unix);
- $date = substr($date,0,22) . ':' . substr($date,-2);
- if (TIME_ZONE!="") $date = str_replace("+00:00",TIME_ZONE,$date);
- return $date;
- }
-
- /**
- * Gets the date stored in this FeedDate as unix time stamp.
- *
- * @return a date as a unix time stamp
- */
- function unix() {
- return $this->unix;
- }
-}
-
-
-/**
- * RSSCreator10 is a FeedCreator that implements RDF Site Summary (RSS) 1.0.
- *
- * @see http://www.purl.org/rss/1.0/
- * @since 1.3
- * @author Kai Blankenhorn <kaib@bitfolge.de>
- */
-class RSSCreator10 extends FeedCreator {
-
- /**
- * Builds the RSS feed's text. The feed will be compliant to RDF Site Summary (RSS) 1.0.
- * The feed will contain all items previously added in the same order.
- * @return string the feed's complete text
- */
- function createFeed() {
- $feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
- $feed.= $this->_createGeneratorComment();
- if ($this->cssStyleSheet=="") {
- $cssStyleSheet = "http://www.w3.org/2000/08/w3c-synd/style.css";
- }
- $feed.= $this->_createStylesheetReferences();
- $feed.= "<rdf:RDF\n";
- $feed.= " xmlns=\"http://purl.org/rss/1.0/\"\n";
- $feed.= " xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n";
- $feed.= " xmlns:slash=\"http://purl.org/rss/1.0/modules/slash/\"\n";
- $feed.= " xmlns:dc=\"http://purl.org/dc/elements/1.1/\">\n";
- $feed.= " <channel rdf:about=\"".$this->syndicationURL."\">\n";
- $feed.= " <title>".htmlspecialchars($this->title)."</title>\n";
- $feed.= " <description>".htmlspecialchars($this->description)."</description>\n";
- $feed.= " <link>".$this->link."</link>\n";
- if ($this->image!=null) {
- $feed.= " <image rdf:resource=\"".$this->image->url."\" />\n";
- }
- $now = new FeedDate();
- $feed.= " <dc:date>".htmlspecialchars($now->iso8601())."</dc:date>\n";
- $feed.= " <items>\n";
- $feed.= " <rdf:Seq>\n";
- for ($i=0;$i<count($this->items);$i++) {
- $feed.= " <rdf:li rdf:resource=\"".htmlspecialchars($this->items[$i]->link)."\"/>\n";
- }
- $feed.= " </rdf:Seq>\n";
- $feed.= " </items>\n";
- $feed.= " </channel>\n";
- if ($this->image!=null) {
- $feed.= " <image rdf:about=\"".$this->image->url."\">\n";
- $feed.= " <title>".$this->image->title."</title>\n";
- $feed.= " <link>".$this->image->link."</link>\n";
- $feed.= " <url>".$this->image->url."</url>\n";
- $feed.= " </image>\n";
- }
- $feed.= $this->_createAdditionalElements($this->additionalElements, " ");
-
- for ($i=0;$i<count($this->items);$i++) {
- $feed.= " <item rdf:about=\"".htmlspecialchars($this->items[$i]->link)."\">\n";
- //$feed.= " <dc:type>Posting</dc:type>\n";
- $feed.= " <dc:format>text/html</dc:format>\n";
- if ($this->items[$i]->date!=null) {
- $itemDate = new FeedDate($this->items[$i]->date);
- $feed.= " <dc:date>".htmlspecialchars($itemDate->iso8601())."</dc:date>\n";
- }
- if ($this->items[$i]->source!="") {
- $feed.= " <dc:source>".htmlspecialchars($this->items[$i]->source)."</dc:source>\n";
- }
- if ($this->items[$i]->author!="") {
- $feed.= " <dc:creator>".htmlspecialchars($this->items[$i]->author)."</dc:creator>\n";
- }
- $feed.= " <title>".htmlspecialchars(strip_tags(strtr($this->items[$i]->title,"\n\r"," ")))."</title>\n";
- $feed.= " <link>".htmlspecialchars($this->items[$i]->link)."</link>\n";
- $feed.= " <description>".htmlspecialchars($this->items[$i]->description)."</description>\n";
- $feed.= $this->_createAdditionalElements($this->items[$i]->additionalElements, " ");
- $feed.= " </item>\n";
- }
- $feed.= "</rdf:RDF>\n";
- return $feed;
- }
-}
-
-
-
-/**
- * RSSCreator091 is a FeedCreator that implements RSS 0.91 Spec, revision 3.
- *
- * @see http://my.netscape.com/publish/formats/rss-spec-0.91.html
- * @since 1.3
- * @author Kai Blankenhorn <kaib@bitfolge.de>
- */
-class RSSCreator091 extends FeedCreator {
-
- /**
- * Stores this RSS feed's version number.
- * @access private
- */
- var $RSSVersion;
-
- function RSSCreator091() {
- $this->_setRSSVersion("0.91");
- $this->contentType = "application/rss+xml";
- }
-
- /**
- * Sets this RSS feed's version number.
- * @access private
- */
- function _setRSSVersion($version) {
- $this->RSSVersion = $version;
- }
-
- /**
- * Builds the RSS feed's text. The feed will be compliant to RDF Site Summary (RSS) 1.0.
- * The feed will contain all items previously added in the same order.
- * @return string the feed's complete text
- */
- function createFeed() {
- $feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
- $feed.= $this->_createGeneratorComment();
- $feed.= $this->_createStylesheetReferences();
- $feed.= "<rss version=\"".$this->RSSVersion."\">\n";
- $feed.= " <channel>\n";
- $feed.= " <title>".FeedCreator::iTrunc(htmlspecialchars($this->title),100)."</title>\n";
- $this->descriptionTruncSize = 500;
- $feed.= " <description>".$this->getDescription()."</description>\n";
- $feed.= " <link>".$this->link."</link>\n";
- $now = new FeedDate();
- $feed.= " <lastBuildDate>".htmlspecialchars($now->rfc822())."</lastBuildDate>\n";
- $feed.= " <generator>".FEEDCREATOR_VERSION."</generator>\n";
-
- if ($this->image!=null) {
- $feed.= " <image>\n";
- $feed.= " <url>".$this->image->url."</url>\n";
- $feed.= " <title>".FeedCreator::iTrunc(htmlspecialchars($this->image->title),100)."</title>\n";
- $feed.= " <link>".$this->image->link."</link>\n";
- if ($this->image->width!="") {
- $feed.= " <width>".$this->image->width."</width>\n";
- }
- if ($this->image->height!="") {
- $feed.= " <height>".$this->image->height."</height>\n";
- }
- if ($this->image->description!="") {
- $feed.= " <description>".$this->image->getDescription()."</description>\n";
- }
- $feed.= " </image>\n";
- }
- if ($this->language!="") {
- $feed.= " <language>".$this->language."</language>\n";
- }
- if ($this->copyright!="") {
- $feed.= " <copyright>".FeedCreator::iTrunc(htmlspecialchars($this->copyright),100)."</copyright>\n";
- }
- if ($this->editor!="") {
- $feed.= " <managingEditor>".FeedCreator::iTrunc(htmlspecialchars($this->editor),100)."</managingEditor>\n";
- }
- if ($this->webmaster!="") {
- $feed.= " <webMaster>".FeedCreator::iTrunc(htmlspecialchars($this->webmaster),100)."</webMaster>\n";
- }
- if ($this->pubDate!="") {
- $pubDate = new FeedDate($this->pubDate);
- $feed.= " <pubDate>".htmlspecialchars($pubDate->rfc822())."</pubDate>\n";
- }
- if ($this->category!="") {
- $feed.= " <category>".htmlspecialchars($this->category)."</category>\n";
- }
- if ($this->docs!="") {
- $feed.= " <docs>".FeedCreator::iTrunc(htmlspecialchars($this->docs),500)."</docs>\n";
- }
- if ($this->ttl!="") {
- $feed.= " <ttl>".htmlspecialchars($this->ttl)."</ttl>\n";
- }
- if ($this->rating!="") {
- $feed.= " <rating>".FeedCreator::iTrunc(htmlspecialchars($this->rating),500)."</rating>\n";
- }
- if ($this->skipHours!="") {
- $feed.= " <skipHours>".htmlspecialchars($this->skipHours)."</skipHours>\n";
- }
- if ($this->skipDays!="") {
- $feed.= " <skipDays>".htmlspecialchars($this->skipDays)."</skipDays>\n";
- }
- $feed.= $this->_createAdditionalElements($this->additionalElements, " ");
-
- for ($i=0;$i<count($this->items);$i++) {
- $feed.= " <item>\n";
- $feed.= " <title>".FeedCreator::iTrunc(htmlspecialchars(strip_tags($this->items[$i]->title)),100)."</title>\n";
- $feed.= " <link>".htmlspecialchars($this->items[$i]->link)."</link>\n";
- $feed.= " <description>".$this->items[$i]->getDescription()."</description>\n";
-
- if ($this->items[$i]->author!="") {
- $feed.= " <author>".htmlspecialchars($this->items[$i]->author)."</author>\n";
- }
- /*
- // on hold
- if ($this->items[$i]->source!="") {
- $feed.= " <source>".htmlspecialchars($this->items[$i]->source)."</source>\n";
- }
- */
- if ($this->items[$i]->category!="") {
- $feed.= " <category>".htmlspecialchars($this->items[$i]->category)."</category>\n";
- }
- if ($this->items[$i]->comments!="") {
- $feed.= " <comments>".htmlspecialchars($this->items[$i]->comments)."</comments>\n";
- }
- if ($this->items[$i]->date!="") {
- $itemDate = new FeedDate($this->items[$i]->date);
- $feed.= " <pubDate>".htmlspecialchars($itemDate->rfc822())."</pubDate>\n";
- }
- if ($this->items[$i]->guid!="") {
- $feed.= " <guid isPermaLink=\"false\">".htmlspecialchars($this->items[$i]->guid)."</guid>\n";
- }
- $feed.= $this->_createAdditionalElements($this->items[$i]->additionalElements, " ");
- $feed.= " </item>\n";
- }
- $feed.= " </channel>\n";
- $feed.= "</rss>\n";
- return $feed;
- }
-}
-
-
-
-/**
- * RSSCreator20 is a FeedCreator that implements RDF Site Summary (RSS) 2.0.
- *
- * @see http://backend.userland.com/rss
- * @since 1.3
- * @author Kai Blankenhorn <kaib@bitfolge.de>
- */
-class RSSCreator20 extends RSSCreator091 {
-
- function RSSCreator20() {
- parent::_setRSSVersion("2.0");
- }
-
-}
-
-
-/**
- * PIECreator01 is a FeedCreator that implements the emerging PIE specification,
- * as in http://intertwingly.net/wiki/pie/Syntax.
- *
- * @deprecated
- * @since 1.3
- * @author Scott Reynen <scott@randomchaos.com> and Kai Blankenhorn <kaib@bitfolge.de>
- */
-class PIECreator01 extends FeedCreator {
-
- function PIECreator01() {
- $this->encoding = "utf-8";
- }
-
- function createFeed() {
- $feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
- $feed.= $this->_createStylesheetReferences();
- $feed.= "<feed version=\"0.1\" xmlns=\"http://example.com/newformat#\">\n";
- $feed.= " <title>".FeedCreator::iTrunc(htmlspecialchars($this->title),100)."</title>\n";
- $this->truncSize = 500;
- $feed.= " <subtitle>".$this->getDescription()."</subtitle>\n";
- $feed.= " <link>".$this->link."</link>\n";
- for ($i=0;$i<count($this->items);$i++) {
- $feed.= " <entry>\n";
- $feed.= " <title>".FeedCreator::iTrunc(htmlspecialchars(strip_tags($this->items[$i]->title)),100)."</title>\n";
- $feed.= " <link>".htmlspecialchars($this->items[$i]->link)."</link>\n";
- $itemDate = new FeedDate($this->items[$i]->date);
- $feed.= " <created>".htmlspecialchars($itemDate->iso8601())."</created>\n";
- $feed.= " <issued>".htmlspecialchars($itemDate->iso8601())."</issued>\n";
- $feed.= " <modified>".htmlspecialchars($itemDate->iso8601())."</modified>\n";
- $feed.= " <id>".htmlspecialchars($this->items[$i]->guid)."</id>\n";
- if ($this->items[$i]->author!="") {
- $feed.= " <author>\n";
- $feed.= " <name>".htmlspecialchars($this->items[$i]->author)."</name>\n";
- if ($this->items[$i]->authorEmail!="") {
- $feed.= " <email>".$this->items[$i]->authorEmail."</email>\n";
- }
- $feed.=" </author>\n";
- }
- $feed.= " <content type=\"text/html\" xml:lang=\"en-us\">\n";
- $feed.= " <div xmlns=\"http://www.w3.org/1999/xhtml\">".$this->items[$i]->getDescription()."</div>\n";
- $feed.= " </content>\n";
- $feed.= " </entry>\n";
- }
- $feed.= "</feed>\n";
- return $feed;
- }
-}
-
-
-/**
- * AtomCreator03 is a FeedCreator that implements the atom specification,
- * as in http://www.intertwingly.net/wiki/pie/FrontPage.
- * Please note that just by using AtomCreator03 you won't automatically
- * produce valid atom files. For example, you have to specify either an editor
- * for the feed or an author for every single feed item.
- *
- * Some elements have not been implemented yet. These are (incomplete list):
- * author URL, item author's email and URL, item contents, alternate links,
- * other link content types than text/html. Some of them may be created with
- * AtomCreator03::additionalElements.
- *
- * @see FeedCreator#additionalElements
- * @since 1.6
- * @author Kai Blankenhorn <kaib@bitfolge.de>, Scott Reynen <scott@randomchaos.com>
- */
-class AtomCreator03 extends FeedCreator {
-
- function AtomCreator03() {
- $this->contentType = "application/atom+xml";
- $this->encoding = "utf-8";
- }
-
- function createFeed() {
- $feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
- $feed.= $this->_createGeneratorComment();
- $feed.= $this->_createStylesheetReferences();
- $feed.= "<feed version=\"0.3\" xmlns=\"http://purl.org/atom/ns#\"";
- if ($this->language!="") {
- $feed.= " xml:lang=\"".$this->language."\"";
- }
- $feed.= ">\n";
- $feed.= " <title>".htmlspecialchars($this->title)."</title>\n";
- $feed.= " <tagline>".htmlspecialchars($this->description)."</tagline>\n";
- $feed.= " <link rel=\"alternate\" type=\"text/html\" href=\"".htmlspecialchars($this->link)."\"/>\n";
- $feed.= " <id>".htmlspecialchars($this->link)."</id>\n";
- $now = new FeedDate();
- $feed.= " <modified>".htmlspecialchars($now->iso8601())."</modified>\n";
- if ($this->editor!="") {
- $feed.= " <author>\n";
- $feed.= " <name>".$this->editor."</name>\n";
- if ($this->editorEmail!="") {
- $feed.= " <email>".$this->editorEmail."</email>\n";
- }
- $feed.= " </author>\n";
- }
- $feed.= " <generator>".FEEDCREATOR_VERSION."</generator>\n";
- $feed.= $this->_createAdditionalElements($this->additionalElements, " ");
- for ($i=0;$i<count($this->items);$i++) {
- $feed.= " <entry>\n";
- $feed.= " <title>".htmlspecialchars(strip_tags($this->items[$i]->title))."</title>\n";
- $feed.= " <link rel=\"alternate\" type=\"text/html\" href=\"".htmlspecialchars($this->items[$i]->link)."\"/>\n";
- if ($this->items[$i]->date=="") {
- $this->items[$i]->date = time();
- }
- $itemDate = new FeedDate($this->items[$i]->date);
- $feed.= " <created>".htmlspecialchars($itemDate->iso8601())."</created>\n";
- $feed.= " <issued>".htmlspecialchars($itemDate->iso8601())."</issued>\n";
- $feed.= " <modified>".htmlspecialchars($itemDate->iso8601())."</modified>\n";
- $feed.= " <id>".htmlspecialchars($this->items[$i]->link)."</id>\n";
- $feed.= $this->_createAdditionalElements($this->items[$i]->additionalElements, " ");
- if ($this->items[$i]->author!="") {
- $feed.= " <author>\n";
- $feed.= " <name>".htmlspecialchars($this->items[$i]->author)."</name>\n";
- $feed.= " </author>\n";
- }
- if ($this->items[$i]->description!="") {
- $feed.= " <summary>".htmlspecialchars($this->items[$i]->description)."</summary>\n";
- }
- $feed.= " </entry>\n";
- }
- $feed.= "</feed>\n";
- return $feed;
- }
-}
-
-
-/**
- * MBOXCreator is a FeedCreator that implements the mbox format
- * as described in http://www.qmail.org/man/man5/mbox.html
- *
- * @since 1.3
- * @author Kai Blankenhorn <kaib@bitfolge.de>
- */
-class MBOXCreator extends FeedCreator {
-
- function MBOXCreator() {
- $this->contentType = "text/plain";
- $this->encoding = "ISO-8859-15";
- }
-
- function qp_enc($input = "", $line_max = 76) {
- $hex = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
- $lines = preg_split("/(?:\r\n|\r|\n)/", $input);
- $eol = "\r\n";
- $escape = "=";
- $output = "";
- while( list(, $line) = each($lines) ) {
- //$line = rtrim($line); // remove trailing white space -> no =20\r\n necessary
- $linlen = strlen($line);
- $newline = "";
- for($i = 0; $i < $linlen; $i++) {
- $c = substr($line, $i, 1);
- $dec = ord($c);
- if ( ($dec == 32) && ($i == ($linlen - 1)) ) { // convert space at eol only
- $c = "=20";
- } elseif ( ($dec == 61) || ($dec < 32 ) || ($dec > 126) ) { // always encode "\t", which is *not* required
- $h2 = floor($dec/16); $h1 = floor($dec%16);
- $c = $escape.$hex["$h2"].$hex["$h1"];
- }
- if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted
- $output .= $newline.$escape.$eol; // soft line break; " =\r\n" is okay
- $newline = "";
- }
- $newline .= $c;
- } // end of for
- $output .= $newline.$eol;
- }
- return trim($output);
- }
-
-
- /**
- * Builds the MBOX contents.
- * @return string the feed's complete text
- */
- function createFeed() {
- for ($i=0;$i<count($this->items);$i++) {
- if ($this->items[$i]->author!="") {
- $from = $this->items[$i]->author;
- } else {
- $from = $this->title;
- }
- $itemDate = new FeedDate($this->items[$i]->date);
- $feed.= "From ".strtr(MBOXCreator::qp_enc($from)," ","_")." ".date("D M d H:i:s Y",$itemDate->unix())."\n";
- $feed.= "Content-Type: text/plain;\n";
- $feed.= " charset=\"".$this->encoding."\"\n";
- $feed.= "Content-Transfer-Encoding: quoted-printable\n";
- $feed.= "Content-Type: text/plain\n";
- $feed.= "From: \"".MBOXCreator::qp_enc($from)."\"\n";
- $feed.= "Date: ".$itemDate->rfc822()."\n";
- $feed.= "Subject: ".MBOXCreator::qp_enc(FeedCreator::iTrunc($this->items[$i]->title,100))."\n";
- $feed.= "\n";
- $body = chunk_split(MBOXCreator::qp_enc($this->items[$i]->description));
- $feed.= preg_replace("~\nFrom ([^\n]*)(\n?)~","\n>From $1$2\n",$body);
- $feed.= "\n";
- $feed.= "\n";
- }
- return $feed;
- }
-
- /**
- * Generate a filename for the feed cache file. Overridden from FeedCreator to prevent XML data types.
- * @return string the feed cache filename
- * @since 1.4
- * @access private
- */
- function _generateFilename() {
- $fileInfo = pathinfo($_SERVER["PHP_SELF"]);
- return substr($fileInfo["basename"],0,-(strlen($fileInfo["extension"])+1)).".mbox";
- }
-}
-
-
-/**
- * OPMLCreator is a FeedCreator that implements OPML 1.0.
- *
- * @see http://opml.scripting.com/spec
- * @author Dirk Clemens, Kai Blankenhorn
- * @since 1.5
- */
-class OPMLCreator extends FeedCreator {
-
- function OPMLCreator() {
- $this->encoding = "utf-8";
- }
-
- function createFeed() {
- $feed = "<?xml version=\"1.0\" encoding=\"".$this->encoding."\"?>\n";
- $feed.= $this->_createGeneratorComment();
- $feed.= $this->_createStylesheetReferences();
- $feed.= "<opml xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\n";
- $feed.= " <head>\n";
- $feed.= " <title>".htmlspecialchars($this->title)."</title>\n";
- if ($this->pubDate!="") {
- $date = new FeedDate($this->pubDate);
- $feed.= " <dateCreated>".$date->rfc822()."</dateCreated>\n";
- }
- if ($this->lastBuildDate!="") {
- $date = new FeedDate($this->lastBuildDate);
- $feed.= " <dateModified>".$date->rfc822()."</dateModified>\n";
- }
- if ($this->editor!="") {
- $feed.= " <ownerName>".$this->editor."</ownerName>\n";
- }
- if ($this->editorEmail!="") {
- $feed.= " <ownerEmail>".$this->editorEmail."</ownerEmail>\n";
- }
- $feed.= " </head>\n";
- $feed.= " <body>\n";
- for ($i=0;$i<count($this->items);$i++) {
- $feed.= " <outline type=\"rss\" ";
- $title = htmlspecialchars(strip_tags(strtr($this->items[$i]->title,"\n\r"," ")));
- $feed.= " title=\"".$title."\"";
- $feed.= " text=\"".$title."\"";
- //$feed.= " description=\"".htmlspecialchars($this->items[$i]->description)."\"";
- $feed.= " url=\"".htmlspecialchars($this->items[$i]->link)."\"";
- $feed.= "/>\n";
- }
- $feed.= " </body>\n";
- $feed.= "</opml>\n";
- return $feed;
- }
-}
-
-
-
-/**
- * HTMLCreator is a FeedCreator that writes an HTML feed file to a specific
- * location, overriding the createFeed method of the parent FeedCreator.
- * The HTML produced can be included over http by scripting languages, or serve
- * as the source for an IFrame.
- * All output by this class is embedded in <div></div> tags to enable formatting
- * using CSS.
- *
- * @author Pascal Van Hecke
- * @since 1.7
- */
-class HTMLCreator extends FeedCreator {
-
- var $contentType = "text/html";
-
- /**
- * Contains HTML to be output at the start of the feed's html representation.
- */
- var $header;
-
- /**
- * Contains HTML to be output at the end of the feed's html representation.
- */
- var $footer ;
-
- /**
- * Contains HTML to be output between entries. A separator is only used in
- * case of multiple entries.
- */
- var $separator;
-
- /**
- * Used to prefix the stylenames to make sure they are unique
- * and do not clash with stylenames on the users' page.
- */
- var $stylePrefix;
-
- /**
- * Determines whether the links open in a new window or not.
- */
- var $openInNewWindow = true;
-
- var $imageAlign ="right";
-
- /**
- * In case of very simple output you may want to get rid of the style tags,
- * hence this variable. There's no equivalent on item level, but of course you can
- * add strings to it while iterating over the items ($this->stylelessOutput .= ...)
- * and when it is non-empty, ONLY the styleless output is printed, the rest is ignored
- * in the function createFeed().
- */
- var $stylelessOutput ="";
-
- /**
- * Writes the HTML.
- * @return string the scripts's complete text
- */
- function createFeed() {
- // if there is styleless output, use the content of this variable and ignore the rest
- if ($this->stylelessOutput!="") {
- return $this->stylelessOutput;
- }
-
- //if no stylePrefix is set, generate it yourself depending on the script name
- if ($this->stylePrefix=="") {
- $this->stylePrefix = str_replace(".", "_", $this->_generateFilename())."_";
- }
-
- //set an openInNewWindow_token_to be inserted or not
- if ($this->openInNewWindow) {
- $targetInsert = " target='_blank'";
- }
-
- // use this array to put the lines in and implode later with "document.write" javascript
- $feedArray = array();
- if ($this->image!=null) {
- $imageStr = "<a href='".$this->image->link."'".$targetInsert.">".
- "<img src='".$this->image->url."' border='0' alt='".
- FeedCreator::iTrunc(htmlspecialchars($this->image->title),100).
- "' align='".$this->imageAlign."' ";
- if ($this->image->width) {
- $imageStr .=" width='".$this->image->width. "' ";
- }
- if ($this->image->height) {
- $imageStr .=" height='".$this->image->height."' ";
- }
- $imageStr .="/></a>";
- $feedArray[] = $imageStr;
- }
-
- if ($this->title) {
- $feedArray[] = "<div class='".$this->stylePrefix."title'><a href='".$this->link."' ".$targetInsert." class='".$this->stylePrefix."title'>".
- FeedCreator::iTrunc(htmlspecialchars($this->title),100)."</a></div>";
- }
- if ($this->getDescription()) {
- $feedArray[] = "<div class='".$this->stylePrefix."description'>".
- str_replace("]]>", "", str_replace("<![CDATA[", "", $this->getDescription())).
- "</div>";
- }
-
- if ($this->header) {
- $feedArray[] = "<div class='".$this->stylePrefix."header'>".$this->header."</div>";
- }
-
- for ($i=0;$i<count($this->items);$i++) {
- if ($this->separator and $i > 0) {
- $feedArray[] = "<div class='".$this->stylePrefix."separator'>".$this->separator."</div>";
- }
-
- if ($this->items[$i]->title) {
- if ($this->items[$i]->link) {
- $feedArray[] =
- "<div class='".$this->stylePrefix."item_title'><a href='".$this->items[$i]->link."' class='".$this->stylePrefix.
- "item_title'".$targetInsert.">".FeedCreator::iTrunc(htmlspecialchars(strip_tags($this->items[$i]->title)),100).
- "</a></div>";
- } else {
- $feedArray[] =
- "<div class='".$this->stylePrefix."item_title'>".
- FeedCreator::iTrunc(htmlspecialchars(strip_tags($this->items[$i]->title)),100).
- "</div>";
- }
- }
- if ($this->items[$i]->getDescription()) {
- $feedArray[] =
- "<div class='".$this->stylePrefix."item_description'>".
- str_replace("]]>", "", str_replace("<![CDATA[", "", $this->items[$i]->getDescription())).
- "</div>";
- }
- }
- if ($this->footer) {
- $feedArray[] = "<div class='".$this->stylePrefix."footer'>".$this->footer."</div>";
- }
-
- $feed= "".join($feedArray, "\r\n");
- return $feed;
- }
-
- /**
- * Overrrides parent to produce .html extensions
- *
- * @return string the feed cache filename
- * @since 1.4
- * @access private
- */
- function _generateFilename() {
- $fileInfo = pathinfo($_SERVER["PHP_SELF"]);
- return substr($fileInfo["basename"],0,-(strlen($fileInfo["extension"])+1)).".html";
- }
-}
-
-
-/**
- * JSCreator is a class that writes a js file to a specific
- * location, overriding the createFeed method of the parent HTMLCreator.
- *
- * @author Pascal Van Hecke
- */
-class JSCreator extends HTMLCreator {
- var $contentType = "text/javascript";
-
- /**
- * writes the javascript
- * @return string the scripts's complete text
- */
- function createFeed()
- {
- $feed = parent::createFeed();
- $feedArray = explode("\n",$feed);
-
- $jsFeed = "";
- foreach ($feedArray as $value) {
- $jsFeed .= "document.write('".trim(addslashes($value))."');\n";
- }
- return $jsFeed;
- }
-
- /**
- * Overrrides parent to produce .js extensions
- *
- * @return string the feed cache filename
- * @since 1.4
- * @access private
- */
- function _generateFilename() {
- $fileInfo = pathinfo($_SERVER["PHP_SELF"]);
- return substr($fileInfo["basename"],0,-(strlen($fileInfo["extension"])+1)).".js";
- }
-
-}
-
-
-
-/*** TEST SCRIPT *********************************************************
-
-//include("feedcreator.class.php");
-
-$rss = new UniversalFeedCreator();
-$rss->useCached();
-$rss->title = "PHP news";
-$rss->description = "daily news from the PHP scripting world";
-
-//optional
-//$rss->descriptionTruncSize = 500;
-//$rss->descriptionHtmlSyndicated = true;
-//$rss->xslStyleSheet = "http://feedster.com/rss20.xsl";
-
-$rss->link = "http://www.dailyphp.net/news";
-$rss->feedURL = "http://www.dailyphp.net/".$PHP_SELF;
-
-$image = new FeedImage();
-$image->title = "dailyphp.net logo";
-$image->url = "http://www.dailyphp.net/images/logo.gif";
-$image->link = "http://www.dailyphp.net";
-$image->description = "Feed provided by dailyphp.net. Click to visit.";
-
-//optional
-$image->descriptionTruncSize = 500;
-$image->descriptionHtmlSyndicated = true;
-
-$rss->image = $image;
-
-// get your news items from somewhere, e.g. your database:
-//mysql_select_db($dbHost, $dbUser, $dbPass);
-//$res = mysql_query("SELECT * FROM news ORDER BY newsdate DESC");
-//while ($data = mysql_fetch_object($res)) {
- $item = new FeedItem();
- $item->title = "This is an the test title of an item";
- $item->link = "http://localhost/item/";
- $item->description = "<b>description in </b><br/>HTML";
-
- //optional
- //item->descriptionTruncSize = 500;
- $item->descriptionHtmlSyndicated = true;
-
- $item->date = time();
- $item->source = "http://www.dailyphp.net";
- $item->author = "John Doe";
-
- $rss->addItem($item);
-//}
-
-// valid format strings are: RSS0.91, RSS1.0, RSS2.0, PIE0.1, MBOX, OPML, ATOM0.3, HTML, JS
-echo $rss->saveFeed("RSS0.91", "feed.xml");
-
-
-
-***************************************************************************/
-
-?>
diff --git a/BSF/include/filter.inc.php b/BSF/include/filter.inc.php
deleted file mode 100644
index b77ddca98..000000000
--- a/BSF/include/filter.inc.php
+++ /dev/null
@@ -1,141 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// $filter['enabled']: Filter is enabled
-// $filter['check_key']: Check key to valitade computed filter data
-// $filter['recent_period']: Recent period used to computed filter data
-// $filter['categories']: Computed data of filtered categories
-// $filter['visible_categories']:
-// List of visible categories (count(visible) < count(forbidden) more often)
-// $filter['visible_images']: List of visible images
-
-if (!get_filter_page_value('cancel'))
-{
- if (isset($_GET['filter']))
- {
- $filter['matches'] = array();
- $filter['enabled'] =
- preg_match('/^start-recent-(\d+)$/', $_GET['filter'], $filter['matches']) === 1;
- }
- else
- {
- $filter['enabled'] = pwg_get_session_var('filter_enabled', false);
- }
-}
-else
-{
- $filter['enabled'] = false;
-}
-
-if ($filter['enabled'])
-{
- if (isset($filter['matches']))
- {
- $filter['recent_period'] = $filter['matches'][1];
- }
- else
- {
- $filter['recent_period'] = pwg_get_session_var('filter_recent_period', $user['recent_period']);
- }
-
- if (
- // New filter
- !pwg_get_session_var('filter_enabled', false) or
- // Cache data updated
- $user['need_update_done'] or
- // Date, period, user are changed
- (pwg_get_session_var('filter_check_key', '') != get_filter_check_key())
- )
- {
- // Need to compute dats
- $filter['check_key'] = get_filter_check_key();
- $filter['categories'] = get_computed_categories($user, (int)$filter['recent_period']);
-
- $filter['visible_categories'] = implode(',', array_keys($filter['categories']));
- if (empty($filter['visible_categories']))
- {
- // Must be not empty
- $filter['visible_categories'] = -1;
- }
-
- $query ='
-SELECT
- distinct image_id
-FROM '.
- IMAGE_CATEGORY_TABLE.' INNER JOIN '.IMAGES_TABLE.' ON image_id = id
-WHERE ';
- if (!empty($filter['visible_categories']))
- {
- $query.= '
- category_id IN ('.$filter['visible_categories'].') and';
- }
- $query.= '
- date_available >= SUBDATE(
- CURRENT_DATE,INTERVAL '.$filter['recent_period'].' DAY)';
-
- $filter['visible_images'] = implode(',', array_from_query($query, 'image_id'));
-
- if (empty($filter['visible_images']))
- {
- // Must be not empty
- $filter['visible_images'] = -1;
- }
-
- // Save filter data on session
- pwg_set_session_var('filter_enabled', $filter['enabled']);
- pwg_set_session_var('filter_check_key', $filter['check_key']);
- pwg_set_session_var('filter_recent_period', $filter['recent_period']);
- pwg_set_session_var('filter_categories', serialize($filter['categories']));
- pwg_set_session_var('filter_visible_categories', $filter['visible_categories']);
- pwg_set_session_var('filter_visible_images', $filter['visible_images']);
-
- }
- else
- {
- // Read only data
- $filter['check_key'] = pwg_get_session_var('filter_check_key', '');
- $filter['categories'] = unserialize(pwg_get_session_var('filter_categories', serialize(array())));
- $filter['visible_categories'] = pwg_get_session_var('filter_visible_categories', '');
- $filter['visible_images'] = pwg_get_session_var('filter_visible_images', '');
- }
-
- if (get_filter_page_value('add_notes'))
- {
- $header_notes[] = l10n_dec('note_filter_day', 'note_filter_days', $filter['recent_period']);
- }
-}
-else
-{
- if (pwg_get_session_var('filter_enabled', false))
- {
- pwg_unset_session_var('filter_enabled');
- pwg_unset_session_var('filter_check_key');
- pwg_unset_session_var('filter_recent_period');
- pwg_unset_session_var('filter_categories');
- pwg_unset_session_var('filter_visible_categories');
- pwg_unset_session_var('filter_visible_images');
- }
-}
-
-
-?>
diff --git a/BSF/include/functions.inc.php b/BSF/include/functions.inc.php
deleted file mode 100644
index a1b589999..000000000
--- a/BSF/include/functions.inc.php
+++ /dev/null
@@ -1,1557 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-include_once( PHPWG_ROOT_PATH .'include/functions_user.inc.php' );
-include_once( PHPWG_ROOT_PATH .'include/functions_cookie.inc.php' );
-include_once( PHPWG_ROOT_PATH .'include/functions_session.inc.php' );
-include_once( PHPWG_ROOT_PATH .'include/functions_category.inc.php' );
-include_once( PHPWG_ROOT_PATH .'include/functions_xml.inc.php' );
-include_once( PHPWG_ROOT_PATH .'include/functions_group.inc.php' );
-include_once( PHPWG_ROOT_PATH .'include/functions_html.inc.php' );
-include_once( PHPWG_ROOT_PATH .'include/functions_tag.inc.php' );
-include_once( PHPWG_ROOT_PATH .'include/functions_url.inc.php' );
-include_once( PHPWG_ROOT_PATH .'include/functions_plugins.inc.php' );
-
-//----------------------------------------------------------- generic functions
-
-/**
- * returns an array containing the possible values of an enum field
- *
- * @param string tablename
- * @param string fieldname
- */
-function get_enums($table, $field)
-{
- // retrieving the properties of the table. Each line represents a field :
- // columns are 'Field', 'Type'
- $result = pwg_query('desc '.$table);
- while ($row = mysql_fetch_array($result))
- {
- // we are only interested in the the field given in parameter for the
- // function
- if ($row['Field'] == $field)
- {
- // retrieving possible values of the enum field
- // enum('blue','green','black')
- $options = explode(',', substr($row['Type'], 5, -1));
- foreach ($options as $i => $option)
- {
- $options[$i] = str_replace("'", '',$option);
- }
- }
- }
- mysql_free_result($result);
- return $options;
-}
-
-// get_boolean transforms a string to a boolean value. If the string is
-// "false" (case insensitive), then the boolean value false is returned. In
-// any other case, true is returned.
-function get_boolean( $string )
-{
- $boolean = true;
- if ( preg_match( '/^false$/i', $string ) )
- {
- $boolean = false;
- }
- return $boolean;
-}
-
-/**
- * returns boolean string 'true' or 'false' if the given var is boolean
- *
- * @param mixed $var
- * @return mixed
- */
-function boolean_to_string($var)
-{
- if (is_bool($var))
- {
- if ($var)
- {
- return 'true';
- }
- else
- {
- return 'false';
- }
- }
- else
- {
- return $var;
- }
-}
-
-// The function get_moment returns a float value coresponding to the number
-// of seconds since the unix epoch (1st January 1970) and the microseconds
-// are precised : e.g. 1052343429.89276600
-function get_moment()
-{
- $t1 = explode( ' ', microtime() );
- $t2 = explode( '.', $t1[0] );
- $t2 = $t1[1].'.'.$t2[1];
- return $t2;
-}
-
-// The function get_elapsed_time returns the number of seconds (with 3
-// decimals precision) between the start time and the end time given.
-function get_elapsed_time( $start, $end )
-{
- return number_format( $end - $start, 3, '.', ' ').' s';
-}
-
-// - The replace_space function replaces space and '-' characters
-// by their HTML equivalent &nbsb; and &minus;
-// - The function does not replace characters in HTML tags
-// - This function was created because IE5 does not respect the
-// CSS "white-space: nowrap;" property unless space and minus
-// characters are replaced like this function does.
-// - Example :
-// <div class="foo">My friend</div>
-// ( 01234567891111111111222222222233 )
-// ( 0123456789012345678901 )
-// becomes :
-// <div class="foo">My&nbsp;friend</div>
-function replace_space( $string )
-{
- //return $string;
- $return_string = '';
- // $remaining is the rest of the string where to replace spaces characters
- $remaining = $string;
- // $start represents the position of the next '<' character
- // $end represents the position of the next '>' character
- $start = 0;
- $end = 0;
- $start = strpos ( $remaining, '<' ); // -> 0
- $end = strpos ( $remaining, '>' ); // -> 16
- // as long as a '<' and his friend '>' are found, we loop
- while ( is_numeric( $start ) and is_numeric( $end ) )
- {
- // $treatment is the part of the string to treat
- // In the first loop of our example, this variable is empty, but in the
- // second loop, it equals 'My friend'
- $treatment = substr ( $remaining, 0, $start );
- // Replacement of ' ' by his equivalent '&nbsp;'
- $treatment = str_replace( ' ', '&nbsp;', $treatment );
- $treatment = str_replace( '-', '&minus;', $treatment );
- // composing the string to return by adding the treated string and the
- // following HTML tag -> 'My&nbsp;friend</div>'
- $return_string.= $treatment.substr( $remaining, $start, $end-$start+1 );
- // the remaining string is deplaced to the part after the '>' of this
- // loop
- $remaining = substr ( $remaining, $end + 1, strlen( $remaining ) );
- $start = strpos ( $remaining, '<' );
- $end = strpos ( $remaining, '>' );
- }
- $treatment = str_replace( ' ', '&nbsp;', $remaining );
- $treatment = str_replace( '-', '&minus;', $treatment );
- $return_string.= $treatment;
-
- return $return_string;
-}
-
-// get_extension returns the part of the string after the last "."
-function get_extension( $filename )
-{
- return substr( strrchr( $filename, '.' ), 1, strlen ( $filename ) );
-}
-
-// get_filename_wo_extension returns the part of the string before the last
-// ".".
-// get_filename_wo_extension( 'test.tar.gz' ) -> 'test.tar'
-function get_filename_wo_extension( $filename )
-{
- $pos = strrpos( $filename, '.' );
- return ($pos===false) ? $filename : substr( $filename, 0, $pos);
-}
-
-/**
- * returns an array contening sub-directories, excluding "CVS"
- *
- * @param string $dir
- * @return array
- */
-function get_dirs($directory)
-{
- $sub_dirs = array();
-
- if ($opendir = opendir($directory))
- {
- while ($file = readdir($opendir))
- {
- if ($file != '.'
- and $file != '..'
- and is_dir($directory.'/'.$file)
- and $file != 'CVS'
- and $file != '.svn')
- {
- array_push($sub_dirs, $file);
- }
- }
- }
- return $sub_dirs;
-}
-
-/**
- * returns thumbnail directory name of input diretoty name
- * make thumbnail directory is necessary
- * set error messages on array messages
- *
- * @param:
- * string $dirname
- * arrayy $errors
- * @return bool false on error else string directory name
- */
-function mkget_thumbnail_dir($dirname, &$errors)
-{
- $tndir = $dirname.'/thumbnail';
- if (!is_dir($tndir))
- {
- if (!is_writable($dirname))
- {
- array_push($errors,
- '['.$dirname.'] : '.l10n('no_write_access'));
- return false;
- }
- umask(0000);
- mkdir($tndir, 0777);
- }
-
- return $tndir;
-}
-
-// The get_picture_size function return an array containing :
-// - $picture_size[0] : final width
-// - $picture_size[1] : final height
-// The final dimensions are calculated thanks to the original dimensions and
-// the maximum dimensions given in parameters. get_picture_size respects
-// the width/height ratio
-function get_picture_size( $original_width, $original_height,
- $max_width, $max_height )
-{
- $width = $original_width;
- $height = $original_height;
- $is_original_size = true;
-
- if ( $max_width != "" )
- {
- if ( $original_width > $max_width )
- {
- $width = $max_width;
- $height = floor( ( $width * $original_height ) / $original_width );
- }
- }
- if ( $max_height != "" )
- {
- if ( $original_height > $max_height )
- {
- $height = $max_height;
- $width = floor( ( $height * $original_width ) / $original_height );
- $is_original_size = false;
- }
- }
- if ( is_numeric( $max_width ) and is_numeric( $max_height )
- and $max_width != 0 and $max_height != 0 )
- {
- $ratioWidth = $original_width / $max_width;
- $ratioHeight = $original_height / $max_height;
- if ( ( $ratioWidth > 1 ) or ( $ratioHeight > 1 ) )
- {
- if ( $ratioWidth < $ratioHeight )
- {
- $width = floor( $original_width / $ratioHeight );
- $height = $max_height;
- }
- else
- {
- $width = $max_width;
- $height = floor( $original_height / $ratioWidth );
- }
- $is_original_size = false;
- }
- }
- $picture_size = array();
- $picture_size[0] = $width;
- $picture_size[1] = $height;
- return $picture_size;
-}
-
-/* Returns true if the string appears to be encoded in UTF-8. (from wordpress)
- * @param string Str
- */
-function seems_utf8($Str) { # by bmorel at ssi dot fr
- for ($i=0; $i<strlen($Str); $i++) {
- if (ord($Str[$i]) < 0x80) continue; # 0bbbbbbb
- elseif ((ord($Str[$i]) & 0xE0) == 0xC0) $n=1; # 110bbbbb
- elseif ((ord($Str[$i]) & 0xF0) == 0xE0) $n=2; # 1110bbbb
- elseif ((ord($Str[$i]) & 0xF8) == 0xF0) $n=3; # 11110bbb
- elseif ((ord($Str[$i]) & 0xFC) == 0xF8) $n=4; # 111110bb
- elseif ((ord($Str[$i]) & 0xFE) == 0xFC) $n=5; # 1111110b
- else return false; # Does not match any model
- for ($j=0; $j<$n; $j++) { # n bytes matching 10bbbbbb follow ?
- if ((++$i == strlen($Str)) || ((ord($Str[$i]) & 0xC0) != 0x80))
- return false;
- }
- }
- return true;
-}
-
-/* Remove accents from a UTF-8 or ISO-859-1 string (from wordpress)
- * @param string sstring - an UTF-8 or ISO-8859-1 string
- */
-function remove_accents($string)
-{
- if ( !preg_match('/[\x80-\xff]/', $string) )
- return $string;
-
- if (seems_utf8($string)) {
- $chars = array(
- // Decompositions for Latin-1 Supplement
- chr(195).chr(128) => 'A', chr(195).chr(129) => 'A',
- chr(195).chr(130) => 'A', chr(195).chr(131) => 'A',
- chr(195).chr(132) => 'A', chr(195).chr(133) => 'A',
- chr(195).chr(135) => 'C', chr(195).chr(136) => 'E',
- chr(195).chr(137) => 'E', chr(195).chr(138) => 'E',
- chr(195).chr(139) => 'E', chr(195).chr(140) => 'I',
- chr(195).chr(141) => 'I', chr(195).chr(142) => 'I',
- chr(195).chr(143) => 'I', chr(195).chr(145) => 'N',
- chr(195).chr(146) => 'O', chr(195).chr(147) => 'O',
- chr(195).chr(148) => 'O', chr(195).chr(149) => 'O',
- chr(195).chr(150) => 'O', chr(195).chr(153) => 'U',
- chr(195).chr(154) => 'U', chr(195).chr(155) => 'U',
- chr(195).chr(156) => 'U', chr(195).chr(157) => 'Y',
- chr(195).chr(159) => 's', chr(195).chr(160) => 'a',
- chr(195).chr(161) => 'a', chr(195).chr(162) => 'a',
- chr(195).chr(163) => 'a', chr(195).chr(164) => 'a',
- chr(195).chr(165) => 'a', chr(195).chr(167) => 'c',
- chr(195).chr(168) => 'e', chr(195).chr(169) => 'e',
- chr(195).chr(170) => 'e', chr(195).chr(171) => 'e',
- chr(195).chr(172) => 'i', chr(195).chr(173) => 'i',
- chr(195).chr(174) => 'i', chr(195).chr(175) => 'i',
- chr(195).chr(177) => 'n', chr(195).chr(178) => 'o',
- chr(195).chr(179) => 'o', chr(195).chr(180) => 'o',
- chr(195).chr(181) => 'o', chr(195).chr(182) => 'o',
- chr(195).chr(182) => 'o', chr(195).chr(185) => 'u',
- chr(195).chr(186) => 'u', chr(195).chr(187) => 'u',
- chr(195).chr(188) => 'u', chr(195).chr(189) => 'y',
- chr(195).chr(191) => 'y',
- // Decompositions for Latin Extended-A
- chr(196).chr(128) => 'A', chr(196).chr(129) => 'a',
- chr(196).chr(130) => 'A', chr(196).chr(131) => 'a',
- chr(196).chr(132) => 'A', chr(196).chr(133) => 'a',
- chr(196).chr(134) => 'C', chr(196).chr(135) => 'c',
- chr(196).chr(136) => 'C', chr(196).chr(137) => 'c',
- chr(196).chr(138) => 'C', chr(196).chr(139) => 'c',
- chr(196).chr(140) => 'C', chr(196).chr(141) => 'c',
- chr(196).chr(142) => 'D', chr(196).chr(143) => 'd',
- chr(196).chr(144) => 'D', chr(196).chr(145) => 'd',
- chr(196).chr(146) => 'E', chr(196).chr(147) => 'e',
- chr(196).chr(148) => 'E', chr(196).chr(149) => 'e',
- chr(196).chr(150) => 'E', chr(196).chr(151) => 'e',
- chr(196).chr(152) => 'E', chr(196).chr(153) => 'e',
- chr(196).chr(154) => 'E', chr(196).chr(155) => 'e',
- chr(196).chr(156) => 'G', chr(196).chr(157) => 'g',
- chr(196).chr(158) => 'G', chr(196).chr(159) => 'g',
- chr(196).chr(160) => 'G', chr(196).chr(161) => 'g',
- chr(196).chr(162) => 'G', chr(196).chr(163) => 'g',
- chr(196).chr(164) => 'H', chr(196).chr(165) => 'h',
- chr(196).chr(166) => 'H', chr(196).chr(167) => 'h',
- chr(196).chr(168) => 'I', chr(196).chr(169) => 'i',
- chr(196).chr(170) => 'I', chr(196).chr(171) => 'i',
- chr(196).chr(172) => 'I', chr(196).chr(173) => 'i',
- chr(196).chr(174) => 'I', chr(196).chr(175) => 'i',
- chr(196).chr(176) => 'I', chr(196).chr(177) => 'i',
- chr(196).chr(178) => 'IJ',chr(196).chr(179) => 'ij',
- chr(196).chr(180) => 'J', chr(196).chr(181) => 'j',
- chr(196).chr(182) => 'K', chr(196).chr(183) => 'k',
- chr(196).chr(184) => 'k', chr(196).chr(185) => 'L',
- chr(196).chr(186) => 'l', chr(196).chr(187) => 'L',
- chr(196).chr(188) => 'l', chr(196).chr(189) => 'L',
- chr(196).chr(190) => 'l', chr(196).chr(191) => 'L',
- chr(197).chr(128) => 'l', chr(197).chr(129) => 'L',
- chr(197).chr(130) => 'l', chr(197).chr(131) => 'N',
- chr(197).chr(132) => 'n', chr(197).chr(133) => 'N',
- chr(197).chr(134) => 'n', chr(197).chr(135) => 'N',
- chr(197).chr(136) => 'n', chr(197).chr(137) => 'N',
- chr(197).chr(138) => 'n', chr(197).chr(139) => 'N',
- chr(197).chr(140) => 'O', chr(197).chr(141) => 'o',
- chr(197).chr(142) => 'O', chr(197).chr(143) => 'o',
- chr(197).chr(144) => 'O', chr(197).chr(145) => 'o',
- chr(197).chr(146) => 'OE',chr(197).chr(147) => 'oe',
- chr(197).chr(148) => 'R',chr(197).chr(149) => 'r',
- chr(197).chr(150) => 'R',chr(197).chr(151) => 'r',
- chr(197).chr(152) => 'R',chr(197).chr(153) => 'r',
- chr(197).chr(154) => 'S',chr(197).chr(155) => 's',
- chr(197).chr(156) => 'S',chr(197).chr(157) => 's',
- chr(197).chr(158) => 'S',chr(197).chr(159) => 's',
- chr(197).chr(160) => 'S', chr(197).chr(161) => 's',
- chr(197).chr(162) => 'T', chr(197).chr(163) => 't',
- chr(197).chr(164) => 'T', chr(197).chr(165) => 't',
- chr(197).chr(166) => 'T', chr(197).chr(167) => 't',
- chr(197).chr(168) => 'U', chr(197).chr(169) => 'u',
- chr(197).chr(170) => 'U', chr(197).chr(171) => 'u',
- chr(197).chr(172) => 'U', chr(197).chr(173) => 'u',
- chr(197).chr(174) => 'U', chr(197).chr(175) => 'u',
- chr(197).chr(176) => 'U', chr(197).chr(177) => 'u',
- chr(197).chr(178) => 'U', chr(197).chr(179) => 'u',
- chr(197).chr(180) => 'W', chr(197).chr(181) => 'w',
- chr(197).chr(182) => 'Y', chr(197).chr(183) => 'y',
- chr(197).chr(184) => 'Y', chr(197).chr(185) => 'Z',
- chr(197).chr(186) => 'z', chr(197).chr(187) => 'Z',
- chr(197).chr(188) => 'z', chr(197).chr(189) => 'Z',
- chr(197).chr(190) => 'z', chr(197).chr(191) => 's',
- // Euro Sign
- chr(226).chr(130).chr(172) => 'E',
- // GBP (Pound) Sign
- chr(194).chr(163) => '');
-
- $string = strtr($string, $chars);
- } else {
- // Assume ISO-8859-1 if not UTF-8
- $chars['in'] = chr(128).chr(131).chr(138).chr(142).chr(154).chr(158)
- .chr(159).chr(162).chr(165).chr(181).chr(192).chr(193).chr(194)
- .chr(195).chr(196).chr(197).chr(199).chr(200).chr(201).chr(202)
- .chr(203).chr(204).chr(205).chr(206).chr(207).chr(209).chr(210)
- .chr(211).chr(212).chr(213).chr(214).chr(216).chr(217).chr(218)
- .chr(219).chr(220).chr(221).chr(224).chr(225).chr(226).chr(227)
- .chr(228).chr(229).chr(231).chr(232).chr(233).chr(234).chr(235)
- .chr(236).chr(237).chr(238).chr(239).chr(241).chr(242).chr(243)
- .chr(244).chr(245).chr(246).chr(248).chr(249).chr(250).chr(251)
- .chr(252).chr(253).chr(255);
-
- $chars['out'] = "EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy";
-
- $string = strtr($string, $chars['in'], $chars['out']);
- $double_chars['in'] = array(chr(140), chr(156), chr(198), chr(208), chr(222), chr(223), chr(230), chr(240), chr(254));
- $double_chars['out'] = array('OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th');
- $string = str_replace($double_chars['in'], $double_chars['out'], $string);
- }
-
- return $string;
-}
-
-/**
- * simplify a string to insert it into an URL
- *
- * @param string
- * @return string
- */
-function str2url($str)
-{
- $str = remove_accents($str);
- $str = preg_replace('/[^a-z0-9_\s\'\:\/\[\],-]/','',strtolower($str));
- $str = preg_replace('/[\s\'\:\/\[\],-]+/',' ',trim($str));
- $res = str_replace(' ','_',$str);
-
- return $res;
-}
-
-//-------------------------------------------- Piwigo specific functions
-
-/**
- * returns an array with a list of {language_code => language_name}
- *
- * @returns array
- */
-function get_languages($target_charset = null)
-{
- if ( empty($target_charset) )
- {
- $target_charset = get_pwg_charset();
- }
- $target_charset = strtolower($target_charset);
-
- $dir = opendir(PHPWG_ROOT_PATH.'language');
- $languages = array();
-
- while ($file = readdir($dir))
- {
- $path = PHPWG_ROOT_PATH.'language/'.$file;
- if (is_dir($path) and !is_link($path) and file_exists($path.'/iso.txt'))
- {
- list($language_name) = @file($path.'/iso.txt');
-
- $langdef = explode('.',$file);
- if (count($langdef)>1) // (langCode,encoding)
- {
- $langdef[1] = strtolower($langdef[1]);
-
- if (
- $target_charset==$langdef[1]
- or
- ($target_charset=='utf-8' and $langdef[1]=='iso-8859-1')
- or
- ($target_charset=='iso-8859-1' and
- in_array( substr($langdef[0],2), array('en','fr','de','es','it','nl')))
- )
- {
- $language_name = convert_charset($language_name,
- $langdef[1], $target_charset);
- $languages[ $langdef[0] ] = $language_name;
- }
- else
- continue; // the language encoding is not compatible with our charset
- }
- else
- { // UTF-8
- $language_name = convert_charset($language_name,
- 'utf-8', $target_charset);
- $languages[$file] = $language_name;
- }
- }
- }
- closedir($dir);
- @asort($languages);
- @reset($languages);
-
- return $languages;
-}
-
-function pwg_log($image_id = null, $image_type = null)
-{
- global $conf, $user, $page;
-
- $do_log = true;
- if (!$conf['log'])
- {
- $do_log = false;
- }
- if (is_admin() and !$conf['history_admin'])
- {
- $do_log = false;
- }
- if (is_a_guest() and !$conf['history_guest'])
- {
- $do_log = false;
- }
-
- $do_log = trigger_event('pwg_log_allowed', $do_log, $image_id, $image_type);
-
- if (!$do_log)
- {
- return false;
- }
-
- $tags_string = null;
- if (isset($page['section']) and $page['section'] == 'tags')
- {
- $tag_ids = array();
- foreach ($page['tags'] as $tag)
- {
- array_push($tag_ids, $tag['id']);
- }
-
- $tags_string = implode(',', $tag_ids);
- }
-
- $query = '
-INSERT INTO '.HISTORY_TABLE.'
- (
- date,
- time,
- user_id,
- IP,
- section,
- category_id,
- image_id,
- image_type,
- tag_ids
- )
- VALUES
- (
- CURDATE(),
- CURTIME(),
- '.$user['id'].',
- \''.$_SERVER['REMOTE_ADDR'].'\',
- '.(isset($page['section']) ? "'".$page['section']."'" : 'NULL').',
- '.(isset($page['category']['id']) ? $page['category']['id'] : 'NULL').',
- '.(isset($image_id) ? $image_id : 'NULL').',
- '.(isset($image_type) ? "'".$image_type."'" : 'NULL').',
- '.(isset($tags_string) ? "'".$tags_string."'" : 'NULL').'
- )
-;';
- pwg_query($query);
-
- return true;
-}
-
-// format_date returns a formatted date for display. The date given in
-// argument can be a unixdate (number of seconds since the 01.01.1970) or an
-// american format (2003-09-15). By option, you can show the time. The
-// output is internationalized.
-//
-// format_date( "2003-09-15", 'us', true ) -> "Monday 15 September 2003 21:52"
-function format_date($date, $type = 'us', $show_time = false)
-{
- global $lang;
-
- list($year,$month,$day,$hour,$minute,$second) = array(0,0,0,0,0,0);
-
- switch ( $type )
- {
- case 'us' :
- {
- list($year,$month,$day) = explode('-', $date);
- break;
- }
- case 'unix' :
- {
- list($year,$month,$day,$hour,$minute) =
- explode('.', date('Y.n.j.G.i', $date));
- break;
- }
- case 'mysql_datetime' :
- {
- preg_match('/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})$/',
- $date, $out);
- list($year,$month,$day,$hour,$minute,$second) =
- array($out[1],$out[2],$out[3],$out[4],$out[5],$out[6]);
- break;
- }
- }
- $formated_date = '';
- // before 1970, Microsoft Windows can't mktime
- if ($year >= 1970)
- {
- // we ask midday because Windows think it's prior to midnight with a
- // zero and refuse to work
- $formated_date.= $lang['day'][date('w', mktime(12,0,0,$month,$day,$year))];
- }
- $formated_date.= ' '.$day;
- $formated_date.= ' '.$lang['month'][(int)$month];
- $formated_date.= ' '.$year;
- if ($show_time)
- {
- $formated_date.= ' '.$hour.':'.$minute;
- }
-
- return $formated_date;
-}
-
-function pwg_query($query)
-{
- global $conf,$page,$debug,$t2;
-
- $start = get_moment();
- $result = mysql_query($query) or my_error($query."\n");
-
- $time = get_moment() - $start;
-
- if (!isset($page['count_queries']))
- {
- $page['count_queries'] = 0;
- $page['queries_time'] = 0;
- }
-
- $page['count_queries']++;
- $page['queries_time']+= $time;
-
- if ($conf['show_queries'])
- {
- $output = '';
- $output.= '<pre>['.$page['count_queries'].'] ';
- $output.= "\n".$query;
- $output.= "\n".'(this query time : ';
- $output.= '<b>'.number_format($time, 3, '.', ' ').' s)</b>';
- $output.= "\n".'(total SQL time : ';
- $output.= number_format($page['queries_time'], 3, '.', ' ').' s)';
- $output.= "\n".'(total time : ';
- $output.= number_format( ($time+$start-$t2), 3, '.', ' ').' s)';
- if ( $result!=null and preg_match('/\s*SELECT\s+/i',$query) )
- {
- $output.= "\n".'(num rows : ';
- $output.= mysql_num_rows($result).' )';
- }
- elseif ( $result!=null
- and preg_match('/\s*INSERT|UPDATE|REPLACE|DELETE\s+/i',$query) )
- {
- $output.= "\n".'(affected rows : ';
- $output.= mysql_affected_rows().' )';
- }
- $output.= "</pre>\n";
-
- $debug .= $output;
- }
-
- return $result;
-}
-
-function pwg_debug( $string )
-{
- global $debug,$t2,$page;
-
- $now = explode( ' ', microtime() );
- $now2 = explode( '.', $now[0] );
- $now2 = $now[1].'.'.$now2[1];
- $time = number_format( $now2 - $t2, 3, '.', ' ').' s';
- $debug .= '<p>';
- $debug.= '['.$time.', ';
- $debug.= $page['count_queries'].' queries] : '.$string;
- $debug.= "</p>\n";
-}
-
-/**
- * Redirects to the given URL (HTTP method)
- *
- * Note : once this function called, the execution doesn't go further
- * (presence of an exit() instruction.
- *
- * @param string $url
- * @return void
- */
-function redirect_http( $url )
-{
- if (ob_get_length () !== FALSE)
- {
- ob_clean();
- }
- // default url is on html format
- $url = html_entity_decode($url);
- header('Request-URI: '.$url);
- header('Content-Location: '.$url);
- header('Location: '.$url);
- exit();
-}
-
-/**
- * Redirects to the given URL (HTML method)
- *
- * Note : once this function called, the execution doesn't go further
- * (presence of an exit() instruction.
- *
- * @param string $url
- * @param string $title_msg
- * @param integer $refreh_time
- * @return void
- */
-function redirect_html( $url , $msg = '', $refresh_time = 0)
-{
- global $user, $template, $lang_info, $conf, $lang, $t2, $page, $debug;
-
- if (!isset($lang_info))
- {
- $user = build_user( $conf['guest_id'], true);
- load_language('common.lang');
- trigger_action('loading_lang');
- load_language('local.lang');
- list($tmpl, $thm) = explode('/', get_default_template());
- $template = new Template(PHPWG_ROOT_PATH.'template/'.$tmpl, $thm);
- }
- else
- {
- $template = new Template(PHPWG_ROOT_PATH.'template/'.$user['template'], $user['theme']);
- }
-
- if (empty($msg))
- {
- $redirect_msg = l10n('redirect_msg');
- }
- else
- {
- $redirect_msg = $msg;
- }
- $redirect_msg = nl2br($redirect_msg);
-
- $refresh = $refresh_time;
- $url_link = $url;
- $title = 'redirection';
-
- $template->set_filenames( array( 'redirect' => 'redirect.tpl' ) );
-
- include( PHPWG_ROOT_PATH.'include/page_header.php' );
-
- $template->set_filenames( array( 'redirect' => 'redirect.tpl' ) );
- $template->parse('redirect');
-
- include( PHPWG_ROOT_PATH.'include/page_tail.php' );
-
- exit();
-}
-
-/**
- * Redirects to the given URL (Switch to HTTP method or HTML method)
- *
- * Note : once this function called, the execution doesn't go further
- * (presence of an exit() instruction.
- *
- * @param string $url
- * @param string $title_msg
- * @param integer $refreh_time
- * @return void
- */
-function redirect( $url , $msg = '', $refresh_time = 0)
-{
- global $conf;
-
- // with RefeshTime <> 0, only html must be used
- if ($conf['default_redirect_method']=='http'
- and $refresh_time==0
- and !headers_sent()
- )
- {
- redirect_http($url);
- }
- else
- {
- redirect_html($url, $msg, $refresh_time);
- }
-}
-
-/**
- * returns $_SERVER['QUERY_STRING'] whitout keys given in parameters
- *
- * @param array $rejects
- * @param boolean $escape - if true escape & to &amp; (for html)
- * @returns string
- */
-function get_query_string_diff($rejects=array(), $escape=true)
-{
- $query_string = '';
-
- $str = $_SERVER['QUERY_STRING'];
- parse_str($str, $vars);
-
- $is_first = true;
- foreach ($vars as $key => $value)
- {
- if (!in_array($key, $rejects))
- {
- $query_string.= $is_first ? '?' : ($escape ? '&amp;' : '&' );
- $is_first = false;
- $query_string.= $key.'='.$value;
- }
- }
-
- return $query_string;
-}
-
-function url_is_remote($url)
-{
- if ( strncmp($url, 'http://', 7)==0
- or strncmp($url, 'https://', 8)==0 )
- {
- return true;
- }
- return false;
-}
-
-/**
- * returns available template/theme
- */
-function get_pwg_themes()
-{
- global $conf;
- $themes = array();
-
- $template_dir = PHPWG_ROOT_PATH.'template';
-
- foreach (get_dirs($template_dir) as $template)
- {
- foreach (get_dirs($template_dir.'/'.$template.'/theme') as $theme)
- {
- if ( ($template.'/'.$theme) != $conf['admin_layout'] )
- array_push($themes, $template.'/'.$theme);
- }
- }
-
- return $themes;
-}
-
-/* Returns the PATH to the thumbnail to be displayed. If the element does not
- * have a thumbnail, the default mime image path is returned. The PATH can be
- * used in the php script, but not sent to the browser.
- * @param array element_info assoc array containing element info from db
- * at least 'path', 'tn_ext' and 'id' should be present
- */
-function get_thumbnail_path($element_info)
-{
- $path = get_thumbnail_location($element_info);
- if ( !url_is_remote($path) )
- {
- $path = PHPWG_ROOT_PATH.$path;
- }
- return $path;
-}
-
-/* Returns the URL of the thumbnail to be displayed. If the element does not
- * have a thumbnail, the default mime image url is returned. The URL can be
- * sent to the browser, but not used in the php script.
- * @param array element_info assoc array containing element info from db
- * at least 'path', 'tn_ext' and 'id' should be present
- */
-function get_thumbnail_url($element_info)
-{
- $path = get_thumbnail_location($element_info);
- if ( !url_is_remote($path) )
- {
- $path = embellish_url(get_root_url().$path);
- }
-
- // plugins want another url ?
- $path = trigger_event('get_thumbnail_url', $path, $element_info);
- return $path;
-}
-
-/* returns the relative path of the thumnail with regards to to the root
-of piwigo (not the current page!).This function is not intended to be
-called directly from code.*/
-function get_thumbnail_location($element_info)
-{
- global $conf;
- if ( !empty( $element_info['tn_ext'] ) )
- {
- $path = substr_replace(
- get_filename_wo_extension($element_info['path']),
- '/thumbnail/'.$conf['prefix_thumbnail'],
- strrpos($element_info['path'],'/'),
- 1
- );
- $path.= '.'.$element_info['tn_ext'];
- }
- else
- {
- $path = get_themeconf('mime_icon_dir')
- .strtolower(get_extension($element_info['path'])).'.png';
- }
-
- // plugins want another location ?
- $path = trigger_event( 'get_thumbnail_location', $path, $element_info);
- return $path;
-}
-
-/* returns the title of the thumnail */
-function get_thumbnail_title($element_info)
-{
- // message in title for the thumbnail
- if (isset($element_info['file']))
- {
- $thumbnail_title = $element_info['file'];
- }
- else
- {
- $thumbnail_title = '';
- }
-
- if (!empty($element_info['filesize']))
- {
- $thumbnail_title .= ' : '.l10n_dec('%d Kb', '%d Kb', $element_info['filesize']);
- }
-
- return $thumbnail_title;
-}
-
-// my_error returns (or send to standard output) the message concerning the
-// error occured for the last mysql query.
-function my_error($header)
-{
- global $conf;
-
- $error = '<pre>';
- $error.= $header;
- $error.= '[mysql error '.mysql_errno().'] ';
- $error.= mysql_error();
- $error.= '</pre>';
-
- if ($conf['die_on_sql_error'])
- {
- die($error);
- }
- else
- {
- echo $error;
- }
-}
-
-/**
- * creates an array based on a query, this function is a very common pattern
- * used here
- *
- * @param string $query
- * @param string $fieldname
- * @return array
- */
-function array_from_query($query, $fieldname)
-{
- $array = array();
-
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- array_push($array, $row[$fieldname]);
- }
-
- return $array;
-}
-
-/**
- * fill the current user caddie with given elements, if not already in
- * caddie
- *
- * @param array elements_id
- */
-function fill_caddie($elements_id)
-{
- global $user;
-
- include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
- $query = '
-SELECT element_id
- FROM '.CADDIE_TABLE.'
- WHERE user_id = '.$user['id'].'
-;';
- $in_caddie = array_from_query($query, 'element_id');
-
- $caddiables = array_diff($elements_id, $in_caddie);
-
- $datas = array();
-
- foreach ($caddiables as $caddiable)
- {
- array_push($datas, array('element_id' => $caddiable,
- 'user_id' => $user['id']));
- }
-
- if (count($caddiables) > 0)
- {
- mass_inserts(CADDIE_TABLE, array('element_id','user_id'), $datas);
- }
-}
-
-/**
- * returns the element name from its filename
- *
- * @param string filename
- * @return string name
- */
-function get_name_from_file($filename)
-{
- return str_replace('_',' ',get_filename_wo_extension($filename));
-}
-
-/**
- * returns the corresponding value from $lang if existing. Else, the key is
- * returned
- *
- * @param string key
- * @return string
- */
-function l10n($key)
-{
- global $lang, $conf;
-
- if ($conf['debug_l10n'] and !isset($lang[$key]) and !empty($key))
- {
- trigger_error('[l10n] language key "'.$key.'" is not defined', E_USER_NOTICE);
- }
-
- return isset($lang[$key]) ? $lang[$key] : $key;
-}
-
-/**
- * returns the prinft value for strings including %d
- * return is concorded with decimal value (singular, plural)
- *
- * @param singular string key
- * @param plural string key
- * @param decimal value
- * @return string
- */
-function l10n_dec($singular_fmt_key, $plural_fmt_key, $decimal)
-{
- global $lang_info;
-
- return
- sprintf(
- l10n((
- (($decimal > 1) or ($decimal == 0 and $lang_info['zero_plural']))
- ? $plural_fmt_key
- : $singular_fmt_key
- )), $decimal);
-}
-/*
- * returns a single element to use with l10n_args
- *
- * @param string key: translation key
- * @param array/string/../number args:
- * arguments to use on sprintf($key, args)
- * if args is a array, each values are used on sprintf
- * @return string
- */
-function get_l10n_args($key, $args)
-{
- if (is_array($args))
- {
- $key_arg = array_merge(array($key), $args);
- }
- else
- {
- $key_arg = array($key, $args);
- }
- return array('key_args' => $key_arg);
-}
-
-/*
- * returns a string with formated with l10n_args elements
- *
- * @param element/array $key_args: element or array of l10n_args elements
- * @param $sep: if $key_args is array,
- * separator is used when translated l10n_args elements are concated
- * @return string
- */
-function l10n_args($key_args, $sep = "\n")
-{
- if (is_array($key_args))
- {
- foreach ($key_args as $key => $element)
- {
- if (isset($result))
- {
- $result .= $sep;
- }
- else
- {
- $result = '';
- }
-
- if ($key === 'key_args')
- {
- array_unshift($element, l10n(array_shift($element)));
- $result .= call_user_func_array('sprintf', $element);
- }
- else
- {
- $result .= l10n_args($element, $sep);
- }
- }
- }
- else
- {
- die('l10n_args: Invalid arguments');
- }
-
- return $result;
-}
-
-/**
- * returns the corresponding value from $themeconf if existing. Else, the
- * key is returned
- *
- * @param string key
- * @return string
- */
-function get_themeconf($key)
-{
- global $template;
-
- return $template->get_themeconf($key);
-}
-
-/**
- * Returns webmaster mail address depending on $conf['webmaster_id']
- *
- * @return string
- */
-function get_webmaster_mail_address()
-{
- global $conf;
-
- $query = '
-SELECT '.$conf['user_fields']['email'].'
- FROM '.USERS_TABLE.'
- WHERE '.$conf['user_fields']['id'].' = '.$conf['webmaster_id'].'
-;';
- list($email) = mysql_fetch_array(pwg_query($query));
-
- return $email;
-}
-
-/**
- * which upgrades are available ?
- *
- * @return array
- */
-function get_available_upgrade_ids()
-{
- $upgrades_path = PHPWG_ROOT_PATH.'install/db';
-
- $available_upgrade_ids = array();
-
- if ($contents = opendir($upgrades_path))
- {
- while (($node = readdir($contents)) !== false)
- {
- if (is_file($upgrades_path.'/'.$node)
- and preg_match('/^(.*?)-database\.php$/', $node, $match))
- {
- array_push($available_upgrade_ids, $match[1]);
- }
- }
- }
- natcasesort($available_upgrade_ids);
-
- return $available_upgrade_ids;
-}
-
-/**
- * Add configuration parameters from database to global $conf array
- *
- * @return void
- */
-function load_conf_from_db($condition = '')
-{
- global $conf;
-
- $query = '
-SELECT param, value
- FROM '.CONFIG_TABLE.'
- '.(!empty($condition) ? 'WHERE '.$condition : '').'
-;';
- $result = pwg_query($query);
-
- if ((mysql_num_rows($result) == 0) and !empty($condition))
- {
- die('No configuration data');
- }
-
- while ($row = mysql_fetch_array($result))
- {
- $conf[ $row['param'] ] = isset($row['value']) ? $row['value'] : '';
-
- // If the field is true or false, the variable is transformed into a
- // boolean value.
- if ($conf[$row['param']] == 'true' or $conf[$row['param']] == 'false')
- {
- $conf[ $row['param'] ] = get_boolean($conf[ $row['param'] ]);
- }
- }
-}
-
-/**
- * Prepends and appends a string at each value of the given array.
- *
- * @param array
- * @param string prefix to each array values
- * @param string suffix to each array values
- */
-function prepend_append_array_items($array, $prepend_str, $append_str)
-{
- array_walk(
- $array,
- create_function('&$s', '$s = "'.$prepend_str.'".$s."'.$append_str.'";')
- );
-
- return $array;
-}
-
-/**
- * creates an hashed based on a query, this function is a very common
- * pattern used here. Among the selected columns fetched, choose one to be
- * the key, another one to be the value.
- *
- * @param string $query
- * @param string $keyname
- * @param string $valuename
- * @return array
- */
-function simple_hash_from_query($query, $keyname, $valuename)
-{
- $array = array();
-
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- $array[ $row[$keyname] ] = $row[$valuename];
- }
-
- return $array;
-}
-
-/**
- * creates an hashed based on a query, this function is a very common
- * pattern used here. The key is given as parameter, the value is an associative
- * array.
- *
- * @param string $query
- * @param string $keyname
- * @return array
- */
-function hash_from_query($query, $keyname)
-{
- $array = array();
- $result = pwg_query($query);
- while ($row = mysql_fetch_assoc($result))
- {
- $array[ $row[$keyname] ] = $row;
- }
- return $array;
-}
-
-/**
- * Return basename of the current script
- * Lower case convertion is applied on return value
- * Return value is without file extention ".php"
- *
- * @param void
- *
- * @return script basename
- */
-function script_basename()
-{
- global $conf;
-
- foreach (array('SCRIPT_NAME', 'SCRIPT_FILENAME', 'PHP_SELF') as $value)
- {
- $continue = !empty($_SERVER[$value]);
- if ($continue)
- {
- $filename = strtolower($_SERVER[$value]);
-
- if ($conf['php_extension_in_urls'])
- {
- $continue = get_extension($filename) === 'php';
- }
-
- if ($continue)
- {
- $basename = basename($filename, '.php');
- $continue = !empty($basename);
- }
-
- if ($continue)
- {
- return $basename;
- }
- }
- }
-
- return '';
-}
-
-/**
- * Return value for the current page define on $conf['filter_pages']
- * Îf value is not defined, default value are returned
- *
- * @param value name
- *
- * @return filter page value
- */
-function get_filter_page_value($value_name)
-{
- global $conf;
-
- $page_name = script_basename();
-
- if (isset($conf['filter_pages'][$page_name][$value_name]))
- {
- return $conf['filter_pages'][$page_name][$value_name];
- }
- else if (isset($conf['filter_pages']['default'][$value_name]))
- {
- return $conf['filter_pages']['default'][$value_name];
- }
- else
- {
- return null;
- }
-}
-
-/**
- * returns the character set of data sent to browsers / received from forms
- */
-function get_pwg_charset()
-{
- defined('PWG_CHARSET') or die('load_language PWG_CHARSET undefined');
- return PWG_CHARSET;
-}
-
-/**
- * includes a language file or returns the content of a language file
- * availability of the file
- *
- * in descending order of preference:
- * param language, user language, default language
- * Piwigo default language.
- *
- * @param string filename
- * @param string dirname
- * @param string language
- * @param bool return_content - if true the file content is returned otherwise
- * the file is evaluated as php
- * @return boolean success status or a string if return_content is true
- */
-function load_language($filename, $dirname = '', $language = '',
- $return_content=false, $target_charset=null)
-{
- global $user;
-
- if (!$return_content)
- {
- $filename .= '.php'; //MAYBE to do .. load .po and .mo localization files
- }
- if (empty($dirname))
- {
- $dirname = PHPWG_ROOT_PATH;
- }
- $dirname .= 'language/';
-
- $languages = array();
- if ( !empty($language) )
- {
- $languages[] = $language;
- }
- if ( !empty($user['language']) )
- {
- $languages[] = $user['language'];
- }
- if ( defined('PHPWG_INSTALLED') )
- {
- $languages[] = get_default_language();
- }
- $languages[] = PHPWG_DEFAULT_LANGUAGE;
- $languages = array_unique($languages);
-
- if ( empty($target_charset) )
- {
- $target_charset = get_pwg_charset();
- }
- $target_charset = strtolower($target_charset);
- $source_charset = '';
- $source_file = '';
- foreach ($languages as $language)
- {
- $dir = $dirname.$language;
-
- // exact charset match - no conversion required
- $f = $dir.'.'.$target_charset.'/'.$filename;
- if (file_exists($f))
- {
- $source_file = $f;
- break;
- }
-
- // UTF-8 ?
- $f = $dir.'/'.$filename;
- if (file_exists($f))
- {
- $source_charset = 'utf-8';
- $source_file = $f;
- break;
- }
-
- if ($target_charset=='utf-8')
- { // we accept conversion from ISO-8859-1 to UTF-8
- $f = $dir.'.iso-8859-1/'.$filename;
- if (file_exists($f))
- {
- $source_charset = 'iso-8859-1';
- $source_file = $f;
- break;
- }
- }
- }
-
- if ( !empty($source_file) )
- {
- if (!$return_content)
- {
- @include($source_file);
- $load_lang = @$lang;
- $load_lang_info = @$lang_info;
-
- global $lang, $lang_info;
- if ( !isset($lang) ) $lang=array();
- if ( !isset($lang_info) ) $lang_info=array();
-
- if ( !empty($source_charset) and $source_charset!=$target_charset)
- {
- if ( is_array($load_lang) )
- {
- foreach ($load_lang as $k => $v)
- {
- if ( is_array($v) )
- {
- $func = create_function('$v', 'return convert_charset($v, "'.$source_charset.'","'.$target_charset.'");' );
- $lang[$k] = array_map($func, $v);
- }
- else
- $lang[$k] = convert_charset($v, $source_charset, $target_charset);
- }
- }
- if ( is_array($load_lang_info) )
- {
- foreach ($load_lang_info as $k => $v)
- {
- $lang_info[$k] = convert_charset($v, $source_charset, $target_charset);
- }
- }
- }
- else
- {
- $lang = array_merge( $lang, (array)$load_lang );
- $lang_info = array_merge( $lang_info, (array)$load_lang_info );
- }
- return true;
- }
- else
- {
- $content = @file_get_contents($source_file);
- if ( !empty($source_charset) and $source_charset!=$target_charset)
- {
- $content = convert_charset($content, $source_charset, $target_charset);
- }
- return $content;
- }
- }
- return false;
-}
-
-/**
- * converts a string from a character set to another character set
- * @param string str the string to be converted
- * @param string source_charset the character set in which the string is encoded
- * @param string dest_charset the destination character set
- */
-function convert_charset($str, $source_charset, $dest_charset)
-{
- if ($source_charset==$dest_charset)
- return $str;
- if ($source_charset=='iso-8859-1' and $dest_charset=='utf-8')
- {
- return utf8_encode($str);
- }
- if ($source_charset=='utf-8' and $dest_charset=='iso-8859-1')
- {
- return utf8_decode($str);
- }
- if (function_exists('iconv'))
- {
- return iconv($source_charset, $dest_charset, $str);
- }
- if (function_exists('mb_convert_encoding'))
- {
- return mb_convert_encoding( $str, $dest_charset, $source_charset );
- }
- return $str; //???
-}
-?> \ No newline at end of file
diff --git a/BSF/include/functions_calendar.inc.php b/BSF/include/functions_calendar.inc.php
deleted file mode 100644
index baa72b927..000000000
--- a/BSF/include/functions_calendar.inc.php
+++ /dev/null
@@ -1,295 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-define('CAL_VIEW_LIST', 'list');
-define('CAL_VIEW_CALENDAR', 'calendar');
-
-function initialize_calendar()
-{
- global $page, $conf, $user, $template, $filter;
-
-//------------------ initialize the condition on items to take into account ---
- $inner_sql = ' FROM ' . IMAGES_TABLE;
-
- if ($page['section']=='categories')
- { // we will regenerate the items by including subcats elements
- $page['items'] = array();
- $inner_sql .= '
-INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id = image_id';
-
- if ( isset($page['category']) )
- {
- $sub_ids = array_diff(
- get_subcat_ids(array($page['category']['id'])),
- explode(',', $user['forbidden_categories'])
- );
-
- if (empty($sub_ids))
- {
- return; // nothing to do
- }
- $inner_sql .= '
-WHERE category_id IN ('.implode(',',$sub_ids).')';
- $inner_sql .= '
- '.get_sql_condition_FandF
- (
- array
- (
- 'visible_images' => 'id'
- ),
- 'AND', false
- );
- }
- else
- {
- $inner_sql .= '
- '.get_sql_condition_FandF
- (
- array
- (
- 'forbidden_categories' => 'category_id',
- 'visible_categories' => 'category_id',
- 'visible_images' => 'id'
- ),
- 'WHERE', true
- );
- }
- }
- else
- {
- if ( empty($page['items']) )
- {
- return; // nothing to do
- }
- $inner_sql .= '
-WHERE id IN (' . implode(',',$page['items']) .')';
- }
-
-//-------------------------------------- initialize the calendar parameters ---
- pwg_debug('start initialize_calendar');
-
- $fields = array(
- // Created
- 'created' => array(
- 'label' => l10n('Creation date'),
- ),
- // Posted
- 'posted' => array(
- 'label' => l10n('Post date'),
- ),
- );
-
- $styles = array(
- // Monthly style
- 'monthly' => array(
- 'include' => 'calendar_monthly.class.php',
- 'view_calendar' => true,
- ),
- // Weekly style
- 'weekly' => array(
- 'include' => 'calendar_weekly.class.php',
- 'view_calendar' => false,
- ),
- );
-
- $views = array(CAL_VIEW_LIST,CAL_VIEW_CALENDAR);
-
- // Retrieve calendar field
- if ( !isset( $fields[ $page['chronology_field'] ] ) )
- {
- die('bad chronology field');
- }
-
- // Retrieve style
- if ( !isset( $styles[ $page['chronology_style'] ] ) )
- {
- $page['chronology_style'] = 'monthly';
- }
- $cal_style = $page['chronology_style'];
- include(PHPWG_ROOT_PATH.'include/'. $styles[$cal_style]['include']);
- $calendar = new Calendar();
-
- // Retrieve view
-
- if ( !isset($page['chronology_view']) or
- !in_array( $page['chronology_view'], $views ) )
- {
- $page['chronology_view'] = CAL_VIEW_LIST;
- }
-
- if ( CAL_VIEW_CALENDAR==$page['chronology_view'] and
- !$styles[$cal_style]['view_calendar'] )
- {
-
- $page['chronology_view'] = CAL_VIEW_LIST;
- }
-
- // perform a sanity check on $requested
- if (!isset($page['chronology_date']))
- {
- $page['chronology_date'] = array();
- }
- while ( count($page['chronology_date']) > 3)
- {
- array_pop($page['chronology_date']);
- }
-
- $any_count = 0;
- for ($i = 0; $i < count($page['chronology_date']); $i++)
- {
- if ($page['chronology_date'][$i] == 'any')
- {
- if ($page['chronology_view'] == CAL_VIEW_CALENDAR)
- {// we dont allow any in calendar view
- while ($i < count($page['chronology_date']))
- {
- array_pop($page['chronology_date']);
- }
- break;
- }
- $any_count++;
- }
- elseif ($page['chronology_date'][$i] == '')
- {
- while ($i < count($page['chronology_date']))
- {
- array_pop($page['chronology_date']);
- }
- }
- else
- {
- $page['chronology_date'][$i] = (int)$page['chronology_date'][$i];
- }
- }
- if ($any_count == 3)
- {
- array_pop($page['chronology_date']);
- }
-
- $calendar->initialize($inner_sql);
-
- //echo ('<pre>'. var_export($calendar, true) . '</pre>');
-
- $must_show_list = true; // true until calendar generates its own display
- if (script_basename() != 'picture') // basename without file extention
- {
- if ($calendar->generate_category_content())
- {
- $page['items'] = array();
- $must_show_list = false;
- }
-
- $page['comment'] = '';
- $template->assign('FILE_CHRONOLOGY_VIEW', 'month_calendar.tpl');
-
- foreach ($styles as $style => $style_data)
- {
- foreach ($views as $view)
- {
- if ( $style_data['view_calendar'] or $view != CAL_VIEW_CALENDAR)
- {
- $selected = false;
-
- if ($style!=$cal_style)
- {
- $chronology_date = array();
- if ( isset($page['chronology_date'][0]) )
- {
- array_push($chronology_date, $page['chronology_date'][0]);
- }
- }
- else
- {
- $chronology_date = $page['chronology_date'];
- }
- $url = duplicate_index_url(
- array(
- 'chronology_style' => $style,
- 'chronology_view' => $view,
- 'chronology_date' => $chronology_date,
- )
- );
-
- if ($style==$cal_style and $view==$page['chronology_view'] )
- {
- $selected = true;
- }
-
- $template->append(
- 'chronology_views',
- array(
- 'VALUE' => $url,
- 'CONTENT' => l10n('chronology_'.$style.'_'.$view),
- 'SELECTED' => $selected,
- )
- );
- }
- }
- }
- $url = duplicate_index_url(
- array(), array('start', 'chronology_date')
- );
- $calendar_title = '<a href="'.$url.'">'
- .$fields[$page['chronology_field']]['label'].'</a>';
- $calendar_title.= $calendar->get_display_name();
- $template->assign('chronology',
- array(
- 'TITLE' => $calendar_title
- )
- );
- } // end category calling
-
- if ($must_show_list)
- {
- $query = 'SELECT DISTINCT(id)';
- $query .= $calendar->inner_sql.'
- '.$calendar->get_date_where();
- if ( isset($page['super_order_by']) )
- {
- $query .= '
- '.$conf['order_by'];
- }
- else
- {
- if ( count($page['chronology_date'])==0
- or in_array('any', $page['chronology_date']) )
- {// selected period is very big so we show newest first
- $order = ' DESC, ';
- }
- else
- {// selected period is small (month,week) so we show oldest first
- $order = ' ASC, ';
- }
- $order_by = str_replace(
- 'ORDER BY ',
- 'ORDER BY '.$calendar->date_field.$order, $conf['order_by']
- );
- $query .= '
- '.$order_by;
- }
- $page['items'] = array_from_query($query, 'id');
- }
- pwg_debug('end initialize_calendar');
-}
-
-?> \ No newline at end of file
diff --git a/BSF/include/functions_category.inc.php b/BSF/include/functions_category.inc.php
deleted file mode 100644
index 721cc0038..000000000
--- a/BSF/include/functions_category.inc.php
+++ /dev/null
@@ -1,509 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * Provides functions to handle categories.
- *
- *
- */
-
-/**
- * Is the category accessible to the connected user ?
- *
- * Note : if the user is not authorized to see this category, page creation
- * ends (exit command in this function)
- *
- * @param int category id to verify
- * @return void
- */
-function check_restrictions($category_id)
-{
- global $user;
-
- // $filter['visible_categories'] and $filter['visible_images']
- // are not used because it's not necessary (filter <> restriction)
- if (in_array($category_id, explode(',', $user['forbidden_categories'])))
- {
- access_denied();
- }
-}
-
-function get_categories_menu()
-{
- global $page, $user, $filter;
-
- $query = '
-SELECT ';
- // From CATEGORIES_TABLE
- $query.= '
- id, name, permalink, nb_images, global_rank,';
- // From USER_CACHE_CATEGORIES_TABLE
- $query.= '
- date_last, max_date_last, count_images, count_categories';
-
- // $user['forbidden_categories'] including with USER_CACHE_CATEGORIES_TABLE
- $query.= '
-FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.'
- ON id = cat_id and user_id = '.$user['id'];
-
- // Always expand when filter is activated
- if (!$user['expand'] and !$filter['enabled'])
- {
- $where = '
-(id_uppercat is NULL';
- if (isset($page['category']))
- {
- $where .= ' OR id_uppercat IN ('.$page['category']['uppercats'].')';
- }
- $where .= ')';
- }
- else
- {
- $where = '
- '.get_sql_condition_FandF
- (
- array
- (
- 'visible_categories' => 'id',
- ),
- null,
- true
- );
- }
-
- $where = trigger_event('get_categories_menu_sql_where',
- $where, $user['expand'], $filter['enabled'] );
-
- $query.= '
-WHERE '.$where.'
-;';
-
- $result = pwg_query($query);
- $cats = array();
- while ($row = mysql_fetch_assoc($result))
- {
- array_push($cats, $row);
- }
- usort($cats, 'global_rank_compare');
-
- // Update filtered data
- if (function_exists('update_cats_with_filtered_data'))
- {
- update_cats_with_filtered_data($cats);
- }
-
- return get_html_menu_category($cats, @$page['category'] );
-}
-
-
-/**
- * Retrieve informations about a category in the database
- *
- * Returns an array with following keys :
- *
- * - comment
- * - dir : directory, might be empty for virtual categories
- * - name : an array with indexes from 0 (lowest cat name) to n (most
- * uppercat name findable)
- * - nb_images
- * - id_uppercat
- * - site_id
- * -
- *
- * @param int category id
- * @return array
- */
-function get_cat_info( $id )
-{
- $query = '
-SELECT *
- FROM '.CATEGORIES_TABLE.'
- WHERE id = '.$id.'
-;';
- $cat = mysql_fetch_assoc(pwg_query($query));
- if (empty($cat))
- return null;
-
- foreach ($cat as $k => $v)
- {
- // If the field is true or false, the variable is transformed into a
- // boolean value.
- if ($cat[$k] == 'true' or $cat[$k] == 'false')
- {
- $cat[$k] = get_boolean( $cat[$k] );
- }
- }
-
- $upper_ids = explode(',', $cat['uppercats']);
- if ( count($upper_ids)==1 )
- {// no need to make a query for level 1
- $cat['upper_names'] = array(
- array(
- 'id' => $cat['id'],
- 'name' => $cat['name'],
- 'permalink' => $cat['permalink'],
- )
- );
- }
- else
- {
- $names = array();
- $query = '
- SELECT id, name, permalink
- FROM '.CATEGORIES_TABLE.'
- WHERE id IN ('.$cat['uppercats'].')
- ;';
- $names = hash_from_query($query, 'id');
-
- // category names must be in the same order than uppercats list
- $cat['upper_names'] = array();
- foreach ($upper_ids as $cat_id)
- {
- array_push( $cat['upper_names'], $names[$cat_id]);
- }
- }
- return $cat;
-}
-
-// get_complete_dir returns the concatenation of get_site_url and
-// get_local_dir
-// Example : "pets > rex > 1_year_old" is on the the same site as the
-// Piwigo files and this category has 22 for identifier
-// get_complete_dir(22) returns "./galleries/pets/rex/1_year_old/"
-function get_complete_dir( $category_id )
-{
- return get_site_url($category_id).get_local_dir($category_id);
-}
-
-// get_local_dir returns an array with complete path without the site url
-// Example : "pets > rex > 1_year_old" is on the the same site as the
-// Piwigo files and this category has 22 for identifier
-// get_local_dir(22) returns "pets/rex/1_year_old/"
-function get_local_dir( $category_id )
-{
- global $page;
-
- $uppercats = '';
- $local_dir = '';
-
- if ( isset( $page['plain_structure'][$category_id]['uppercats'] ) )
- {
- $uppercats = $page['plain_structure'][$category_id]['uppercats'];
- }
- else
- {
- $query = 'SELECT uppercats';
- $query.= ' FROM '.CATEGORIES_TABLE.' WHERE id = '.$category_id;
- $query.= ';';
- $row = mysql_fetch_array( pwg_query( $query ) );
- $uppercats = $row['uppercats'];
- }
-
- $upper_array = explode( ',', $uppercats );
-
- $database_dirs = array();
- $query = 'SELECT id,dir';
- $query.= ' FROM '.CATEGORIES_TABLE.' WHERE id IN ('.$uppercats.')';
- $query.= ';';
- $result = pwg_query( $query );
- while( $row = mysql_fetch_array( $result ) )
- {
- $database_dirs[$row['id']] = $row['dir'];
- }
- foreach ($upper_array as $id)
- {
- $local_dir.= $database_dirs[$id].'/';
- }
-
- return $local_dir;
-}
-
-// retrieving the site url : "http://domain.com/gallery/" or
-// simply "./galleries/"
-function get_site_url($category_id)
-{
- global $page;
-
- $query = '
-SELECT galleries_url
- FROM '.SITES_TABLE.' AS s,'.CATEGORIES_TABLE.' AS c
- WHERE s.id = c.site_id
- AND c.id = '.$category_id.'
-;';
- $row = mysql_fetch_array(pwg_query($query));
- return $row['galleries_url'];
-}
-
-// returns an array of image orders available for users/visitors
-function get_category_preferred_image_orders()
-{
- global $conf;
- return array(
- array(l10n('default_sort'), '', true),
- array(l10n('Average rate'), 'average_rate DESC', $conf['rate']),
- array(l10n('most_visited_cat'), 'hit DESC', true),
- array(l10n('Creation date'), 'date_creation DESC', true),
- array(l10n('Post date'), 'date_available DESC', true),
- array(l10n('File name'), 'file ASC', true)
- );
-}
-
-function display_select_categories($categories,
- $selecteds,
- $blockname,
- $fullname = true)
-{
- global $template;
-
- $tpl_cats = array();
- foreach ($categories as $category)
- {
- if ($fullname)
- {
- $option = get_cat_display_name_cache($category['uppercats'],
- null,
- false);
- }
- else
- {
- $option = str_repeat('&nbsp;',
- (3 * substr_count($category['global_rank'], '.')));
- $option.= '- '.$category['name'];
- }
- $tpl_cats[ $category['id'] ] = $option;
- }
-
- $template->assign( $blockname, $tpl_cats);
- $template->assign( $blockname.'_selected', $selecteds);
-}
-
-function display_select_cat_wrapper($query, $selecteds, $blockname,
- $fullname = true)
-{
- $result = pwg_query($query);
- $categories = array();
- if (!empty($result))
- {
- while ($row = mysql_fetch_assoc($result))
- {
- array_push($categories, $row);
- }
- }
- usort($categories, 'global_rank_compare');
- display_select_categories($categories, $selecteds, $blockname, $fullname);
-}
-
-/**
- * returns all subcategory identifiers of given category ids
- *
- * @param array ids
- * @return array
- */
-function get_subcat_ids($ids)
-{
- $query = '
-SELECT DISTINCT(id)
- FROM '.CATEGORIES_TABLE.'
- WHERE ';
- foreach ($ids as $num => $category_id)
- {
- is_numeric($category_id)
- or trigger_error(
- 'get_subcat_ids expecting numeric, not '.gettype($category_id),
- E_USER_WARNING
- );
- if ($num > 0)
- {
- $query.= '
- OR ';
- }
- $query.= 'uppercats REGEXP \'(^|,)'.$category_id.'(,|$)\'';
- }
- $query.= '
-;';
- $result = pwg_query($query);
-
- $subcats = array();
- while ($row = mysql_fetch_array($result))
- {
- array_push($subcats, $row['id']);
- }
- return $subcats;
-}
-
-/** finds a matching category id from a potential list of permalinks
- * @param array permalinks example: holiday holiday/france holiday/france/paris
- * @param int idx - output of the index in $permalinks that matches
- * return category id or null if no match
- */
-function get_cat_id_from_permalinks( $permalinks, &$idx )
-{
- $in = '';
- foreach($permalinks as $permalink)
- {
- if ( !empty($in) ) $in.=', ';
- $in .= '"'.$permalink.'"';
- }
- $query ='
-SELECT cat_id AS id, permalink, 1 AS is_old
- FROM '.OLD_PERMALINKS_TABLE.'
- WHERE permalink IN ('.$in.')
-UNION
-SELECT id, permalink, 0 AS is_old
- FROM '.CATEGORIES_TABLE.'
- WHERE permalink IN ('.$in.')
-;';
- $perma_hash = hash_from_query($query, 'permalink');
-
- if ( empty($perma_hash) )
- return null;
- for ($i=count($permalinks)-1; $i>=0; $i--)
- {
- if ( isset( $perma_hash[ $permalinks[$i] ] ) )
- {
- $idx = $i;
- $cat_id = $perma_hash[ $permalinks[$i] ]['id'];
- if ($perma_hash[ $permalinks[$i] ]['is_old'])
- {
- $query='
-UPDATE '.OLD_PERMALINKS_TABLE.' SET last_hit=NOW(), hit=hit+1
- WHERE permalink="'.$permalinks[$i].'" AND cat_id='.$cat_id.'
- LIMIT 1';
- pwg_query($query);
- }
- return $cat_id;
- }
- }
- return null;
-}
-
-function global_rank_compare($a, $b)
-{
- return strnatcasecmp($a['global_rank'], $b['global_rank']);
-}
-
-function rank_compare($a, $b)
-{
- if ($a['rank'] == $b['rank'])
- {
- return 0;
- }
-
- return ($a['rank'] < $b['rank']) ? -1 : 1;
-}
-
-/**
- * returns display text for information images of category
- *
- * @param array categories
- * @return string
- */
-function get_display_images_count($cat_nb_images, $cat_count_images, $cat_count_categories, $short_message = true, $Separator = '\n')
-{
- $display_text = '';
-
- if ($cat_count_images > 0)
- {
- if ($cat_nb_images > 0 and $cat_nb_images < $cat_count_images)
- {
- $display_text.= get_display_images_count($cat_nb_images, $cat_nb_images, 0, $short_message, $Separator).$Separator;
- $cat_count_images-= $cat_nb_images;
- $cat_nb_images = 0;
- }
-
- //at least one image direct or indirect
- $display_text.= l10n_dec('%d element', '%d elements', $cat_count_images);
-
- if ($cat_count_categories == 0 or $cat_nb_images == $cat_count_images)
- {
- //no descendant categories or descendants do not contain images
- if (! $short_message)
- {
- $display_text.= ' '.l10n('images_available_cpl');
- }
- }
- else
- {
- $display_text.= ' '.l10n_dec('images_available_cat', 'images_available_cats', $cat_count_categories);
- }
- }
-
- return $display_text;
-}
-
-/**
- * returns the link of upload menu
- *
- * @param null
- * @return string or null
- */
-function get_upload_menu_link()
-{
- global $conf, $page, $user;
-
- $show_link = false;
- $arg_link = null;
-
- if (is_autorize_status($conf['upload_user_access']))
- {
- if (isset($page['category']) and $page['category']['uploadable'] )
- {
- // upload a picture in the category
- $show_link = true;
- $arg_link = 'cat='.$page['category']['id'];
- }
- else
- if ($conf['upload_link_everytime'])
- {
- // upload a picture in the category
- $query = '
-SELECT
- 1
-FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.'
- ON id = cat_id and user_id = '.$user['id'].'
-WHERE
- uploadable = \'true\'
- '.get_sql_condition_FandF
- (
- array
- (
- 'visible_categories' => 'id',
- ),
- 'AND'
- ).'
-LIMIT 1';
-
- $show_link = mysql_num_rows(pwg_query($query)) <> 0;
- }
- }
- if ($show_link)
- {
- return get_root_url().'upload.php'.(empty($arg_link) ? '' : '?'.$arg_link);
- }
- else
- {
- return;
- }
-}
-
-?>
diff --git a/BSF/include/functions_comment.inc.php b/BSF/include/functions_comment.inc.php
deleted file mode 100644
index 6e6498c38..000000000
--- a/BSF/include/functions_comment.inc.php
+++ /dev/null
@@ -1,228 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * returns a "secret key" that is to be sent back when a user enters a comment
- */
-function get_comment_post_key($image_id)
-{
- global $conf;
-
- $time = time();
-
- return sprintf(
- '%s:%s',
- $time,
- hash_hmac(
- 'md5',
- $time.':'.$image_id,
- $conf['secret_key']
- )
- );
-}
-
-//returns string action to perform on a new comment: validate, moderate, reject
-function user_comment_check($action, $comment)
-{
- global $conf,$user;
-
- if ($action=='reject')
- return $action;
-
- $my_action = $conf['comment_spam_reject'] ? 'reject':'moderate';
-
- if ($action==$my_action)
- return $action;
-
- // we do here only BASIC spam check (plugins can do more)
- if ( !is_a_guest() )
- return $action;
-
- $link_count = preg_match_all( '/https?:\/\//',
- $comment['content'], $matches);
-
- if ( strpos($comment['author'], 'http://')!==false )
- {
- $link_count++;
- }
-
- if ( $link_count>$conf['comment_spam_max_links'] )
- return $my_action;
-
- return $action;
-}
-
-
-add_event_handler('user_comment_check', 'user_comment_check',
- EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
-
-/**
- * Tries to insert a user comment in the database and returns one of :
- * validate, moderate, reject
- * @param array comm contains author, content, image_id
- * @param string key secret key sent back to the browser
- * @param array infos out array of messages
- */
-function insert_user_comment( &$comm, $key, &$infos )
-{
- global $conf, $user;
-
- $comm = array_merge( $comm,
- array(
- 'ip' => $_SERVER['REMOTE_ADDR'],
- 'agent' => $_SERVER['HTTP_USER_AGENT']
- )
- );
-
- $infos = array();
- if (!$conf['comments_validation'] or is_admin())
- {
- $comment_action='validate'; //one of validate, moderate, reject
- }
- else
- {
- $comment_action='moderate'; //one of validate, moderate, reject
- }
-
- // display author field if the user status is guest or generic
- if (!is_classic_user())
- {
- if ( empty($comm['author']) )
- {
- $comm['author'] = 'guest';
- }
- // if a guest try to use the name of an already existing user, he must be
- // rejected
- if ( $comm['author'] != 'guest' )
- {
- $query = '
-SELECT COUNT(*) AS user_exists
- FROM '.USERS_TABLE.'
- WHERE '.$conf['user_fields']['username']." = '".addslashes($comm['author'])."'";
- $row = mysql_fetch_assoc( pwg_query( $query ) );
- if ( $row['user_exists'] == 1 )
- {
- array_push($infos, l10n('comment_user_exists') );
- $comment_action='reject';
- }
- }
- }
- else
- {
- $comm['author'] = $user['username'];
- }
- if ( empty($comm['content']) )
- { // empty comment content
- $comment_action='reject';
- }
-
- $key = explode( ':', @$key );
- if ( count($key)!=2
- or $key[0]>time()-2 // page must have been retrieved more than 2 sec ago
- or $key[0]<time()-3600 // 60 minutes expiration
- or hash_hmac(
- 'md5', $key[0].':'.$comm['image_id'], $conf['secret_key']
- ) != $key[1]
- )
- {
- $comment_action='reject';
- }
-
- if ($comment_action!='reject' and $conf['anti-flood_time']>0 )
- { // anti-flood system
- $reference_date = time() - $conf['anti-flood_time'];
- $query = '
-SELECT id FROM '.COMMENTS_TABLE.'
- WHERE date > FROM_UNIXTIME('.$reference_date.')
- AND author = "'.addslashes($comm['author']).'"';
- if ( mysql_num_rows( pwg_query( $query ) ) > 0 )
- {
- array_push( $infos, l10n('comment_anti-flood') );
- $comment_action='reject';
- }
- }
-
- // perform more spam check
- $comment_action = trigger_event('user_comment_check',
- $comment_action, $comm
- );
-
- if ( $comment_action!='reject' )
- {
- $query = '
-INSERT INTO '.COMMENTS_TABLE.'
- (author, content, date, validated, validation_date, image_id)
- VALUES (
- "'.addslashes($comm['author']).'",
- "'.addslashes($comm['content']).'",
- NOW(),
- "'.($comment_action=='validate' ? 'true':'false').'",
- '.($comment_action=='validate' ? 'NOW()':'NULL').',
- '.$comm['image_id'].'
- )
-';
-
- pwg_query($query);
-
- $comm['id'] = mysql_insert_id();
-
- if
- (
- ($comment_action=='validate' and $conf['email_admin_on_comment'])
- or
- ($comment_action!='validate' and $conf['email_admin_on_comment_validation'])
- )
- {
- include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
-
- $del_url =
- get_absolute_root_url().'comments.php?delete='.$comm['id'];
-
- $keyargs_content = array
- (
- get_l10n_args('Author: %s', $comm['author']),
- get_l10n_args('Comment: %s', $comm['content']),
- get_l10n_args('', ''),
- get_l10n_args('Delete: %s', $del_url)
- );
-
- if ($comment_action!='validate')
- {
- $keyargs_content[] =
- get_l10n_args('', '');
- $keyargs_content[] =
- get_l10n_args('Validate: %s',
- get_absolute_root_url().'comments.php?validate='.$comm['id']);
- }
-
- pwg_mail_notification_admins
- (
- get_l10n_args('Comment by %s', $comm['author']),
- $keyargs_content
- );
- }
- }
- return $comment_action;
-}
-
-?> \ No newline at end of file
diff --git a/BSF/include/functions_cookie.inc.php b/BSF/include/functions_cookie.inc.php
deleted file mode 100644
index 159a5b538..000000000
--- a/BSF/include/functions_cookie.inc.php
+++ /dev/null
@@ -1,115 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// cookie_path returns the path to use for the Piwigo cookie.
-// If Piwigo is installed on :
-// http://domain.org/meeting/gallery/category.php
-// cookie_path will return : "/meeting/gallery"
-function cookie_path()
-{
- if ( isset($_SERVER['REDIRECT_SCRIPT_NAME']) and
- !empty($_SERVER['REDIRECT_SCRIPT_NAME']) )
- {
- $scr = $_SERVER['REDIRECT_SCRIPT_NAME'];
- }
- else if ( isset($_SERVER['REDIRECT_URL']) )
- {
- // mod_rewrite is activated for upper level directories. we must set the
- // cookie to the path shown in the browser otherwise it will be discarded.
- if
- (
- isset($_SERVER['PATH_INFO']) and !empty($_SERVER['PATH_INFO']) and
- ($_SERVER['REDIRECT_URL'] !== $_SERVER['PATH_INFO']) and
- (substr($_SERVER['REDIRECT_URL'],-strlen($_SERVER['PATH_INFO']))
- == $_SERVER['PATH_INFO'])
- )
- {
- $scr = substr($_SERVER['REDIRECT_URL'], 0,
- strlen($_SERVER['REDIRECT_URL'])-strlen($_SERVER['PATH_INFO']));
- }
- else
- {
- $scr = $_SERVER['REDIRECT_URL'];
- }
- }
- else
- {
- $scr = $_SERVER['SCRIPT_NAME'];
- }
-
- $scr = substr($scr,0,strrpos( $scr,'/'));
-
- // add a trailing '/' if needed
- if ((strlen($scr) == 0) or ($scr{strlen($scr)-1} !== '/'))
- {
- $scr .= '/';
- }
-
- if ( substr(PHPWG_ROOT_PATH,0,3)=='../')
- { // this is maybe a plugin inside pwg directory
- // TODO - what if it is an external script outside PWG ?
- $scr = $scr.PHPWG_ROOT_PATH;
- while (1)
- {
- $new = preg_replace('#[^/]+/\.\.(/|$)#', '', $scr);
- if ($new==$scr)
- {
- break;
- }
- $scr=$new;
- }
- }
- return $scr;
-}
-
-/**
- * persistently stores a variable in pwg cookie
- * @return boolean true on success
- * @see pwg_get_cookie_var
- */
-function pwg_set_cookie_var($var, $value)
-{
- $_COOKIE['pwg_'.$var] = $value;
- return
- setcookie('pwg_'.$var, $value,
- strtotime('+10 years'), cookie_path());
-}
-
-/**
- * retrieves the value of a persistent variable in pwg cookie
- * @return mixed
- * @see pwg_set_cookie_var
- */
-function pwg_get_cookie_var($var, $default = null)
-{
- if (isset($_COOKIE['pwg_'.$var]))
- {
- return $_COOKIE['pwg_'.$var];
- }
- else
- {
- return $default;
- }
-}
-
-?>
diff --git a/BSF/include/functions_filter.inc.php b/BSF/include/functions_filter.inc.php
deleted file mode 100644
index 24efb0994..000000000
--- a/BSF/include/functions_filter.inc.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-
-/**
- * Get a check key for filtered data
- * Check key are composed of elements witch force to compute data
- *
- * @param null
- * @return strinf check_key
- */
-function get_filter_check_key()
-{
- global $user, $filter;
-
- return $user['id'].$filter['recent_period'].date('Ymd');
-}
-
-/**
- * update data of categories with filtered values
- *
- * @param array list of categories
- * @return null
- */
-function update_cats_with_filtered_data(&$cats)
-{
- global $filter;
-
- if ($filter['enabled'])
- {
- $upd_fields = array('date_last', 'max_date_last', 'count_images', 'count_categories', 'nb_images');
-
- foreach ($cats as $cat_id => $category)
- {
- foreach ($upd_fields as $upd_field)
- {
- $cats[$cat_id][$upd_field] = $filter['categories'][$category['id']][$upd_field];
- }
- }
- }
-}
-
-?>
diff --git a/BSF/include/functions_group.inc.php b/BSF/include/functions_group.inc.php
deleted file mode 100644
index a5c07b5b5..000000000
--- a/BSF/include/functions_group.inc.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// with 1.5 preparation, no group dedicated function is used.
-
-?>
diff --git a/BSF/include/functions_html.inc.php b/BSF/include/functions_html.inc.php
deleted file mode 100644
index b51f6f9df..000000000
--- a/BSF/include/functions_html.inc.php
+++ /dev/null
@@ -1,751 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-function get_icon($date, $is_child_date = false)
-{
- global $page, $user;
-
- if (empty($date))
- {
- return '';
- }
-
- if (isset($page['get_icon_cache'][$date]))
- {
- if (! $page['get_icon_cache'][$date] )
- return '';
- return $page['get_icon_cache']['_icons_'][$is_child_date];
- }
-
- if (!isset($page['get_icon_cache']['sql_recent_date']))
- {
- // Use MySql date in order to standardize all recent "actions/queries"
- list($page['get_icon_cache']['sql_recent_date']) =
- mysql_fetch_array(pwg_query('select SUBDATE(
- CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY)'));
- }
-
- $page['get_icon_cache'][$date] = false;
- if ( $date > $page['get_icon_cache']['sql_recent_date'] )
- {
- if ( !isset($page['get_icon_cache']['_icons_'] ) )
- {
- $icons = array(false => 'recent', true => 'recent_by_child' );
- $title = sprintf(
- l10n('elements posted during the last %d days'),
- $user['recent_period']
- );
- foreach ($icons as $key => $icon)
- {
- $icon_url = get_themeconf('icon_dir').'/'.$icon.'.png';
- $size = getimagesize( PHPWG_ROOT_PATH.$icon_url );
- $icon_url = get_root_url().$icon_url;
- $output = '<img title="'.$title.'" src="'.$icon_url.'" class="icon" style="border:0;';
- $output.= 'height:'.$size[1].'px;width:'.$size[0].'px" alt="(!)" />';
- $page['get_icon_cache']['_icons_'][$key] = $output;
- }
- }
- $page['get_icon_cache'][$date] = true;
- }
-
- if (! $page['get_icon_cache'][$date] )
- return '';
- return $page['get_icon_cache']['_icons_'][$is_child_date];
-}
-
-function create_navigation_bar(
- $url, $nb_element, $start, $nb_element_page, $clean_url = false
- )
-{
- global $conf;
-
- $pages_around = $conf['paginate_pages_around'];
- $start_str = $clean_url ? '/start-' :
- ( ( strstr($url, '?')===false ? '?':'&amp;') . 'start=' );
-
- $navbar = '';
-
- // current page detection
- if (!isset($start)
- or !is_numeric($start)
- or (is_numeric($start) and $start < 0))
- {
- $start = 0;
- }
-
- // navigation bar useful only if more than one page to display !
- if ($nb_element > $nb_element_page)
- {
- // current page and last page
- $cur_page = ceil($start / $nb_element_page) + 1;
- $maximum = ceil($nb_element / $nb_element_page);
-
- // link to first page ?
- if ($cur_page != 1)
- {
- $navbar.=
- '<a href="'.$url.'" rel="first">'
- .l10n('first_page')
- .'</a>';
- }
- else
- {
- $navbar.= l10n('first_page');
- }
- $navbar.= ' | ';
- // link on previous page ?
- if ($start != 0)
- {
- $previous = $start - $nb_element_page;
-
- $navbar.=
- '<a href="'
- .$url.($previous > 0 ? $start_str.$previous : '')
- .'" rel="prev">'
- .l10n('previous_page')
- .'</a>';
- }
- else
- {
- $navbar.= l10n('previous_page');
- }
- $navbar.= ' |';
-
- if ($cur_page > $pages_around + 1)
- {
- $navbar.= '&nbsp;<a href="'.$url.'">1</a>';
-
- if ($cur_page > $pages_around + 2)
- {
- $navbar.= ' ...';
- }
- }
-
- // inspired from punbb source code
- for ($i = $cur_page - $pages_around, $stop = $cur_page + $pages_around + 1;
- $i < $stop;
- $i++)
- {
- if ($i < 1 or $i > $maximum)
- {
- continue;
- }
- else if ($i != $cur_page)
- {
- $temp_start = ($i - 1) * $nb_element_page;
-
- $navbar.=
- '&nbsp;'
- .'<a href="'.$url
- .($temp_start > 0 ? $start_str.$temp_start : '')
- .'">'
- .$i
- .'</a>';
- }
- else
- {
- $navbar.=
- '&nbsp;'
- .'<span class="pageNumberSelected">'
- .$i
- .'</span>';
- }
- }
-
- if ($cur_page < ($maximum - $pages_around))
- {
- $temp_start = ($maximum - 1) * $nb_element_page;
-
- if ($cur_page < ($maximum - $pages_around - 1))
- {
- $navbar.= ' ...';
- }
-
- $navbar.= ' <a href="'.$url.$start_str.$temp_start.'">'.$maximum.'</a>';
- }
-
- $navbar.= ' | ';
- // link on next page ?
- if ($nb_element > $nb_element_page
- and $start + $nb_element_page < $nb_element)
- {
- $next = $start + $nb_element_page;
-
- $navbar.=
- '<a href="'.$url.$start_str.$next.'" rel="next">'
- .l10n('next_page')
- .'</a>';
- }
- else
- {
- $navbar.= l10n('next_page');
- }
-
- $navbar.= ' | ';
- // link to last page ?
- if ($cur_page != $maximum)
- {
- $temp_start = ($maximum - 1) * $nb_element_page;
-
- $navbar.=
- '<a href="'.$url.$start_str.$temp_start.'" rel="last">'
- .l10n('last_page')
- .'</a>';
- }
- else
- {
- $navbar.= l10n('last_page');
- }
- }
- return $navbar;
-}
-
-/**
- * returns the list of categories as a HTML string
- *
- * categories string returned contains categories as given in the input
- * array $cat_informations. $cat_informations array must be an array
- * of array( id=>?, name=>?, permalink=>?). If url input parameter is null,
- * returns only the categories name without links.
- *
- * @param array cat_informations
- * @param string url
- * @param boolean replace_space
- * @return string
- */
-function get_cat_display_name($cat_informations,
- $url = '',
- $replace_space = true)
-{
- global $conf;
-
- $output = '';
- $is_first = true;
- foreach ($cat_informations as $cat)
- {
- is_array($cat) or trigger_error(
- 'get_cat_display_name wrong type for category ', E_USER_WARNING
- );
- if ($is_first)
- {
- $is_first = false;
- }
- else
- {
- $output.= $conf['level_separator'];
- }
-
- if ( !isset($url) )
- {
- $output.= $cat['name'];
- }
- elseif ($url == '')
- {
- $output.= '<a href="'
- .make_index_url(
- array(
- 'category' => $cat,
- )
- )
- .'">';
- $output.= $cat['name'].'</a>';
- }
- else
- {
- $output.= '<a href="'.PHPWG_ROOT_PATH.$url.$cat['id'].'">';
- $output.= $cat['name'].'</a>';
- }
- }
- if ($replace_space)
- {
- return replace_space($output);
- }
- else
- {
- return $output;
- }
-}
-
-/**
- * returns the list of categories as a HTML string, with cache of names
- *
- * categories string returned contains categories as given in the input
- * array $cat_informations. $uppercats is the list of category ids to
- * display in the right order. If url input parameter is empty, returns only
- * the categories name without links.
- *
- * @param string uppercats
- * @param string url
- * @param boolean replace_space
- * @return string
- */
-function get_cat_display_name_cache($uppercats,
- $url = '',
- $replace_space = true)
-{
- global $cache, $conf;
-
- if (!isset($cache['cat_names']))
- {
- $query = '
-SELECT id, name, permalink
- FROM '.CATEGORIES_TABLE.'
-;';
- $cache['cat_names'] = hash_from_query($query, 'id');
- }
-
- $output = '';
- $is_first = true;
- foreach (explode(',', $uppercats) as $category_id)
- {
- $cat = $cache['cat_names'][$category_id];
-
- if ($is_first)
- {
- $is_first = false;
- }
- else
- {
- $output.= $conf['level_separator'];
- }
-
- if ( !isset($url) )
- {
- $output.= $cat['name'];
- }
- elseif ($url == '')
- {
- $output.= '
-<a href="'
- .make_index_url(
- array(
- 'category' => $cat,
- )
- )
- .'">'.$cat['name'].'</a>';
- }
- else
- {
- $output.= '
-<a href="'.PHPWG_ROOT_PATH.$url.$category_id.'">'.$cat['name'].'</a>';
- }
- }
- if ($replace_space)
- {
- return replace_space($output);
- }
- else
- {
- return $output;
- }
-}
-
-/**
- * returns the HTML code for a category item in the menu (for the main page)
- *
- * HTML code generated uses logical list tags ul and each category is an
- * item li. The paramter given is the category informations as an array,
- * used keys are : id, name, nb_images, max_date_last, date_last
- * count_images, count_categories
- *
- * @param array categories
- * @return string
- */
-function get_html_menu_category($categories, $selected_category)
-{
- $ref_level = 0;
- $level = 0;
-
- $menu = trigger_event('get_html_menu_category', '',
- $categories, $selected_category);
- if (strlen($menu))
- {
- return $menu;
- }
-
- foreach ($categories as $category)
- {
- $level = substr_count($category['global_rank'], '.') + 1;
- if ($level > $ref_level)
- {
- $menu.= "\n<ul>";
- }
- else if ($level == $ref_level)
- {
- $menu.= "\n</li>";
- }
- else if ($level < $ref_level)
- {
- // we may have to close more than one level at the same time...
- $menu.= "\n</li>";
- $menu.= str_repeat("\n</ul></li>",($ref_level-$level));
- }
- $ref_level = $level;
-
- $menu.= "\n\n".'<li';
- if ($category['id'] == @$selected_category['id'])
- {
- $menu.= ' class="selected"';
- }
- $menu.= '>';
-
- $url = make_index_url(
- array(
- 'category' => $category
- )
- );
-
- $title = get_display_images_count
- (
- $category['nb_images'],
- $category['count_images'],
- $category['count_categories'],
- false,
- ' / '
- );
-
- $menu.= '<a href="'.$url.'"';
- if ($selected_category!=null
- and $category['id'] == $selected_category['id_uppercat'])
- {
- $menu.= ' rel="up"';
- }
- $menu.= ' title="'.$title.'">'.$category['name'].'</a>';
-
- if ( $category['count_images']>0 )
- {// at least one direct or indirect image
- $menu.= "\n".'<span class="';
- // at least one image in this category -> class menuInfoCat
- $menu.= ($category['nb_images'] > 0 ? "menuInfoCat"
- : "menuInfoCatByChild").'"';
- $menu.= ' title=" '.$title.'">';
- // show total number of images
- $menu.= '['.$category['count_images'].']';
- $menu.= '</span>';
- }
- $child_date_last = @$category['max_date_last']> @$category['date_last'];
- $menu.= get_icon($category['max_date_last'], $child_date_last);
- }
-
- $menu.= str_repeat("\n</li></ul>",($level));
-
- return $menu;
-}
-
-/**
- * returns HTMLized comment contents retrieved from database
- *
- * newlines becomes br tags, _word_ becomes underline, /word/ becomes
- * italic, *word* becomes bolded
- *
- * @param string content
- * @return string
- */
-function parse_comment_content($content)
-{
- $pattern = '/(https?:\/\/\S*)/';
- $replacement = '<a href="$1" rel="nofollow">$1</a>';
- $content = preg_replace($pattern, $replacement, $content);
-
- $content = nl2br($content);
-
- // replace _word_ by an underlined word
- $pattern = '/\b_(\S*)_\b/';
- $replacement = '<span style="text-decoration:underline;">$1</span>';
- $content = preg_replace($pattern, $replacement, $content);
-
- // replace *word* by a bolded word
- $pattern = '/\b\*(\S*)\*\b/';
- $replacement = '<span style="font-weight:bold;">$1</span>';
- $content = preg_replace($pattern, $replacement, $content);
-
- // replace /word/ by an italic word
- $pattern = "/\/(\S*)\/(\s)/";
- $replacement = '<span style="font-style:italic;">$1$2</span>';
- $content = preg_replace($pattern, $replacement, $content);
-
- $content = '<div>'.$content.'</div>';
- return $content;
-}
-
-function get_cat_display_name_from_id($cat_id,
- $url = '',
- $replace_space = true)
-{
- $cat_info = get_cat_info($cat_id);
- return get_cat_display_name($cat_info['upper_names'], $url, $replace_space);
-}
-
-/**
- * Returns an HTML list of tags. It can be a multi select field or a list of
- * checkboxes.
- *
- * @param string HTML field name
- * @param array selected tag ids
- * @return array
- */
-function get_html_tag_selection(
- $tags,
- $fieldname,
- $selecteds = array(),
- $forbidden_categories = null
- )
-{
- global $conf;
-
- if (count ($tags) == 0 )
- {
- return '';
- }
- $output = '<ul class="tagSelection">';
- foreach ($tags as $tag)
- {
- $output.=
- '<li>'
- .'<label>'
- .'<input type="checkbox" name="'.$fieldname.'[]"'
- .' value="'.$tag['id'].'"'
- ;
-
- if (in_array($tag['id'], $selecteds))
- {
- $output.= ' checked="checked"';
- }
-
- $output.=
- ' />'
- .' '. $tag['name']
- .'</label>'
- .'</li>'
- ."\n"
- ;
- }
- $output.= '</ul>';
-
- return $output;
-}
-
-function name_compare($a, $b)
-{
- return strcmp(strtolower($a['name']), strtolower($b['name']));
-}
-
-/**
- * exits the current script (either exit or redirect)
- */
-function access_denied()
-{
- global $user;
-
- $login_url =
- get_root_url().'identification.php?redirect='
- .urlencode(urlencode($_SERVER['REQUEST_URI']));
-
- if ( isset($user) and !is_a_guest() )
- {
- echo '<div style="text-align:center;">'.l10n('access_forbiden').'<br />';
- echo '<a href="'.get_root_url().'identification.php">'.l10n('identification').'</a>&nbsp;';
- echo '<a href="'.make_index_url().'">'.l10n('home').'</a></div>';
- exit();
- }
- else
- {
- set_status_header(401);
- redirect_html($login_url);
- }
-}
-
-/**
- * exits the current script with 403 code
- * @param string msg a message to display
- * @param string alternate_url redirect to this url
- */
-function page_forbidden($msg, $alternate_url=null)
-{
- set_status_header(403);
- if ($alternate_url==null)
- $alternate_url = make_index_url();
- redirect_html( $alternate_url,
- '<div style="text-align:left; margin-left:5em;margin-bottom:5em;">
-<h1 style="text-align:left; font-size:36px;">Forbidden</h1><br/>'
-.$msg.'</div>',
- 5 );
-}
-
-/**
- * exits the current script with 400 code
- * @param string msg a message to display
- * @param string alternate_url redirect to this url
- */
-function bad_request($msg, $alternate_url=null)
-{
- set_status_header(400);
- if ($alternate_url==null)
- $alternate_url = make_index_url();
- redirect_html( $alternate_url,
- '<div style="text-align:left; margin-left:5em;margin-bottom:5em;">
-<h1 style="text-align:left; font-size:36px;">Bad request</h1><br/>'
-.$msg.'</div>',
- 5 );
-}
-
-/**
- * exits the current script with 404 code when a page cannot be found
- * @param string msg a message to display
- * @param string alternate_url redirect to this url
- */
-function page_not_found($msg, $alternate_url=null)
-{
- set_status_header(404);
- if ($alternate_url==null)
- $alternate_url = make_index_url();
- redirect_html( $alternate_url,
- '<div style="text-align:left; margin-left:5em;margin-bottom:5em;">
-<h1 style="text-align:left; font-size:36px;">Page not found</h1><br/>'
-.$msg.'</div>',
- 5 );
-}
-
-/* returns the title to be displayed above thumbnails on tag page
- */
-function get_tags_content_title()
-{
- global $page;
- $title = count($page['tags']) > 1 ? l10n('Tags') : l10n('Tag');
- $title.= ' ';
-
- for ($i=0; $i<count($page['tags']); $i++)
- {
- $title.= $i>0 ? ' + ' : '';
-
- $title.=
- '<a href="'
- .make_index_url(
- array(
- 'tags' => array( $page['tags'][$i] )
- )
- )
- .'" title="'
- .l10n('See elements linked to this tag only')
- .'">'
- .$page['tags'][$i]['name']
- .'</a>';
-
- if ( count($page['tags'])>2 )
- {
- $other_tags = $page['tags'];
- unset ( $other_tags[$i] );
- $title.=
- '<a href="'
- .make_index_url(
- array(
- 'tags' => $other_tags
- )
- )
- .'" style="border:none;" title="'
- .l10n('remove this tag')
- .'"><img src="'
- .get_root_url().get_themeconf('icon_dir').'/remove_s.png'
- .'" alt="x" style="vertical-align:bottom;" class="button"/>'
- .'</a>';
- }
-
- }
- return $title;
-}
-
-/**
- Sets the http status header (200,401,...)
- */
-function set_status_header($code, $text='')
-{
- if (empty($text))
- {
- switch ($code)
- {
- case 200: $text='OK';break;
- case 301: $text='Moved permanently';break;
- case 302: $text='Moved temporarily';break;
- case 304: $text='Not modified';break;
- case 400: $text='Bad request';break;
- case 401: $text='Authorization required';break;
- case 403: $text='Forbidden';break;
- case 404: $text='Not found';break;
- case 500: $text='Server error';break;
- case 503: $text='Service unavailable';break;
- }
- }
- $protocol = $_SERVER["SERVER_PROTOCOL"];
- if ( ('HTTP/1.1' != $protocol) && ('HTTP/1.0' != $protocol) )
- $protocol = 'HTTP/1.0';
-
- if ( version_compare( phpversion(), '4.3.0', '>=' ) )
- {
- header( "$protocol $code $text", true, $code );
- }
- else
- {
- header( "$protocol $code $text" );
- }
- trigger_action('set_status_header', $code, $text);
-}
-
-/** returns the category comment for rendering in html.
- * this is an event handler. don't call directly
- */
-function render_category_description($desc)
-{
- global $conf;
- if ( !( $conf['allow_html_descriptions'] and
- preg_match('/<(div|br|img|script).*>/i', $desc) ) )
- {
- $desc = nl2br($desc);
- }
- return $desc;
-}
-
-/** returns the category comment for rendering in html textual mode (subcatify)
- * this is an event handler. don't call directly
- */
-function render_category_literal_description($desc)
-{
- return strip_tags($desc, '<span><p><a><br><b><i><small><big><strong><em>');
-}
-
-/** returns the argument_ids array with new sequenced keys based on related
- * names. Sequence is not case sensitive.
- * Warning: By definition, this function breaks original keys
- */
-function order_by_name($element_ids,$name)
-{
- $ordered_element_ids = array();
- foreach ($element_ids as $k_id => $element_id)
- {
- $key = strtolower($name[$element_id]) .'-'. $name[$element_id] .'-'. $k_id;
- $ordered_element_ids[$key] = $element_id;
- }
- ksort($ordered_element_ids);
- return $ordered_element_ids;
-}
-
-?>
diff --git a/BSF/include/functions_mail.inc.php b/BSF/include/functions_mail.inc.php
deleted file mode 100644
index 9e7f9024d..000000000
--- a/BSF/include/functions_mail.inc.php
+++ /dev/null
@@ -1,822 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// +-----------------------------------------------------------------------+
-// | functions |
-// +-----------------------------------------------------------------------+
-
-
-/**
- * Encodes a string using Q form if required (RFC2045)
- * mail headers MUST contain only US-ASCII characters
- */
-function encode_mime_header($str)
-{
- $x = preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches);
- if ($x==0)
- {
- return $str;
- }
- // Replace every high ascii, control =, ? and _ characters
- $str = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e',
- "'='.sprintf('%02X', ord('\\1'))", $str);
-
- // Replace every spaces to _ (more readable than =20)
- $str = str_replace(" ", "_", $str);
-
- global $lang_info;
- return '=?'.get_pwg_charset().'?Q?'.$str.'?=';
-}
-
-/*
- * Returns the name of the mail sender :
- *
- * @return string
- */
-function get_mail_sender_name()
-{
- global $conf;
-
- return (empty($conf['mail_sender_name']) ? $conf['gallery_title'] : $conf['mail_sender_name']);
-}
-
-/*
- * Returns an array of mail configuration parameters :
- *
- * - mail_options: see $conf['mail_options']
- * - send_bcc_mail_webmaster: see $conf['send_bcc_mail_webmaster']
- * - email_webmaster: mail corresponding to $conf['webmaster_id']
- * - formated_email_webmaster: the name of webmaster is $conf['gallery_title']
- * - text_footer: Piwigo and version
- *
- * @return array
- */
-function get_mail_configuration()
-{
- global $conf;
-
- $conf_mail = array(
- 'mail_options' => $conf['mail_options'],
- 'send_bcc_mail_webmaster' => $conf['send_bcc_mail_webmaster'],
- 'default_email_format' => $conf['default_email_format'],
- 'use_smtp' => !empty($conf['smtp_host']),
- 'smtp_host' => $conf['smtp_host'],
- 'smtp_user' => $conf['smtp_user'],
- 'smtp_password' => $conf['smtp_password']
- );
-
- // we have webmaster id among user list, what's his email address ?
- $conf_mail['email_webmaster'] = get_webmaster_mail_address();
-
- // name of the webmaster is the title of the gallery
- $conf_mail['formated_email_webmaster'] =
- format_email(get_mail_sender_name(), $conf_mail['email_webmaster']);
-
- $conf_mail['boundary_key'] = generate_key(32);
-
- return $conf_mail;
-}
-
-/**
- * Returns an email address with an associated real name
- *
- * @param string name
- * @param string email
- */
-function format_email($name, $email)
-{
- // Spring cleaning
- $cvt_email = trim(preg_replace('#[\n\r]+#s', '', $email));
- $cvt_name = trim(preg_replace('#[\n\r]+#s', '', $name));
-
- if ($cvt_name!="")
- {
- $cvt_name = encode_mime_header(
- '"'
- .addcslashes($cvt_name,'"')
- .'"');
- $cvt_name .= ' ';
- }
-
- if (strpos($cvt_email, '<') === false)
- {
- return $cvt_name.'<'.$cvt_email.'>';
- }
- else
- {
- return $cvt_name.$cvt_email;
- }
-}
-
-/**
- * Returns an email address list with minimal email string
- *
- * @param string with email list (email separated by comma)
- */
-function get_strict_email_list($email_list)
-{
- $result = array();
- $list = explode(',', $email_list);
- foreach ($list as $email)
- {
- if (strpos($email, '<') !== false)
- {
- $email = preg_replace('/.*<(.*)>.*/i', '$1', $email);
- }
- $result[] = trim($email);
- }
-
- return implode(',', $result);
-}
-
-/**
- * Returns an completed array template/theme
- * completed with get_default_template()
- *
- * @params:
- * - args: incompleted array of template/theme
- * o template: template to use [default get_default_template()]
- * o theme: template to use [default get_default_template()]
- */
-function get_array_template_theme($args = array())
-{
- global $conf;
-
- $res = array();
-
- if (empty($args['template']) or empty($args['theme']))
- {
- list($res['template'], $res['theme']) = explode('/', get_default_template());
- }
-
- if (!empty($args['template']))
- {
- $res['template'] = $args['template'];
- }
-
- if (!empty($args['theme']))
- {
- $res['theme'] = $args['theme'];
- }
-
- return $res;
-}
-
-/**
- * Return an new mail template
- *
- * @params:
- * - email_format: mail format
- * - args: function params of mail function:
- * o template: template to use [default get_default_template()]
- * o theme: template to use [default get_default_template()]
- */
-function & get_mail_template($email_format, $args = array())
-{
- $args = get_array_template_theme($args);
-
- $mail_template = new Template(PHPWG_ROOT_PATH.'template/'.$args['template'], $args['theme']);
- $mail_template->set_template_dir(PHPWG_ROOT_PATH.'template/'.$args['template'].'/mail/'.$email_format);
- return $mail_template;
-}
-
-/**
- * Return string email format (html or not)
- *
- * @param string format
- */
-function get_str_email_format($is_html)
-{
- return ($is_html ? 'text/html' : 'text/plain');
-}
-
-/*
- * Switch language to param language
- * All entries are push on language stack
- *
- * @param string language
- */
-function switch_lang_to($language)
-{
- global $switch_lang, $user, $lang, $lang_info;
-
- if (count($switch_lang['stack']) == 0)
- {
- $prev_language = $user['language'];
- }
- else
- {
- $prev_language = end($switch_lang['stack']);
- }
-
- $switch_lang['stack'][] = $language;
-
- if ($prev_language != $language)
- {
- if (!isset($switch_lang['language'][$prev_language]))
- {
- $switch_lang[$prev_language]['lang_info'] = $lang_info;
- $switch_lang[$prev_language]['lang'] = $lang;
- }
-
- if (!isset($switch_lang['language'][$language]))
- {
- // Re-Init language arrays
- $lang_info = array();
- $lang = array();
-
- // language files
- load_language('common.lang', '', $language);
- // No test admin because script is checked admin (user selected no)
- // Translations are in admin file too
- load_language('admin.lang', '', $language);
- trigger_action('loading_lang');
- load_language('local.lang', '', $language);
-
- $switch_lang[$language]['lang_info'] = $lang_info;
- $switch_lang[$language]['lang'] = $lang;
- }
- else
- {
- $lang_info = $switch_lang[$language]['lang_info'];
- $lang = $switch_lang[$language]['lang'];
- }
-
- $user['language'] = $language;
- }
-}
-
-/*
- * Switch back language pushed with switch_lang_to function
- *
- * @param: none
- */
-function switch_lang_back()
-{
- global $switch_lang, $user, $lang, $lang_info;
-
- $last_language = array_pop($switch_lang['stack']);
-
- if (count($switch_lang['stack']) > 0)
- {
- $language = end($switch_lang['stack']);
- }
- else
- {
- $language = $user['language'];
- }
-
- if ($last_language != $language)
- {
- if (!isset($switch_lang['language'][$language]))
- {
- $lang_info = $switch_lang[$language]['lang_info'];
- $lang = $switch_lang[$language]['lang'];
- }
- $user['language'] = $language;
- }
-}
-
-/**
- * Returns email of all administrator
- *
- * @return string
- */
-/*
- * send en notification email to all administrators
- * if a administrator is doing action,
- * he's be removed to email list
- *
- * @param:
- * - keyargs_subject: mail subject on l10n_args format
- * - keyargs_content: mail content on l10n_args format
- *
- * @return boolean (Ok or not)
- */
-function pwg_mail_notification_admins($keyargs_subject, $keyargs_content)
-{
- // Check arguments
- if
- (
- empty($keyargs_subject) or
- empty($keyargs_content)
- )
- {
- return false;
- }
-
- global $conf, $user;
- $return = true;
-
- $admins = array();
-
- $query = '
-select
- U.'.$conf['user_fields']['username'].' as username,
- U.'.$conf['user_fields']['email'].' as mail_address
-from
- '.USERS_TABLE.' as U,
- '.USER_INFOS_TABLE.' as I
-where
- I.user_id = U.'.$conf['user_fields']['id'].' and
- I.status in (\'webmaster\', \'admin\') and
- I.adviser = \'false\' and
- '.$conf['user_fields']['email'].' is not null and
- I.user_id <> '.$user['id'].'
-order by
- username
-';
-
- $datas = pwg_query($query);
- if (!empty($datas))
- {
- while ($admin = mysql_fetch_array($datas))
- {
- if (!empty($admin['mail_address']))
- {
- array_push($admins, format_email($admin['username'], $admin['mail_address']));
- }
- }
- }
-
- if (count($admins) > 0)
- {
- $keyargs_content_admin_info = array
- (
- get_l10n_args('Connected user: %s', $user['username']),
- get_l10n_args('IP: %s', $_SERVER['REMOTE_ADDR']),
- get_l10n_args('Browser: %s', $_SERVER['HTTP_USER_AGENT'])
- );
-
- switch_lang_to(get_default_language());
-
- $return = pwg_mail
- (
- '',
- array
- (
- 'Bcc' => $admins,
- 'subject' => '['.$conf['gallery_title'].'] '.l10n_args($keyargs_subject),
- 'content' =>
- l10n_args($keyargs_content)."\n\n"
- .l10n_args($keyargs_content_admin_info)."\n",
- 'content_format' => 'text/plain'
- )
- ) and $return;
-
- switch_lang_back();
- }
-
- return $return;
-}
-
-/*
- * send en email to user's group
- *
- * @param:
- * - group_id: mail are sent to group with this Id
- * - email_format: mail format
- * - keyargs_subject: mail subject on l10n_args format
- * - dirname: short name of directory including template
- * - tpl_shortname: short template name without extension
- * - assign_vars: array used to assign_vars to mail template
- * - language_selected: send mail only to user with this selected language
- *
- * @return boolean (Ok or not)
- */
-function pwg_mail_group(
- $group_id, $email_format, $keyargs_subject,
- $dirname, $tpl_shortname,
- $assign_vars = array(), $language_selected = '')
-{
- // Check arguments
- if
- (
- empty($group_id) or
- empty($email_format) or
- empty($keyargs_subject) or
- empty($tpl_shortname)
- )
- {
- return false;
- }
-
- global $conf;
- $return = true;
-
- $query = '
-SELECT
- distinct language, template
-FROM
- '.USER_GROUP_TABLE.' as ug
- INNER JOIN '.USERS_TABLE.' as u ON '.$conf['user_fields']['id'].' = ug.user_id
- INNER JOIN '.USER_INFOS_TABLE.' as ui ON ui.user_id = ug.user_id
-WHERE
- '.$conf['user_fields']['email'].' IS NOT NULL
- AND group_id = '.$group_id;
-
- if (!empty($language_selected))
- {
- $query .= '
- AND language = \''.$language_selected.'\'';
- }
-
- $query .= '
-;';
-
- $result = pwg_query($query);
-
- if (mysql_num_rows($result) > 0)
- {
- $list = array();
- while ($row = mysql_fetch_array($result))
- {
- $row['template_theme'] = $row['template'];
- list($row['template'], $row['theme']) = explode('/', $row['template_theme']);
- $list[] = $row;
- }
-
- foreach ($list as $elem)
- {
- $query = '
-SELECT
- u.'.$conf['user_fields']['username'].' as username,
- u.'.$conf['user_fields']['email'].' as mail_address
-FROM
- '.USER_GROUP_TABLE.' as ug
- INNER JOIN '.USERS_TABLE.' as u ON '.$conf['user_fields']['id'].' = ug.user_id
- INNER JOIN '.USER_INFOS_TABLE.' as ui ON ui.user_id = ug.user_id
-WHERE
- '.$conf['user_fields']['email'].' IS NOT NULL
- AND group_id = '.$group_id.'
- AND language = \''.$elem['language'].'\'
- AND template = \''.$elem['template_theme'].'\'
-;';
-
- $result = pwg_query($query);
-
- if (mysql_num_rows($result) > 0)
- {
- $Bcc = array();
- while ($row = mysql_fetch_array($result))
- {
- if (!empty($row['mail_address']))
- {
- array_push($Bcc, format_email($row['username'], $row['mail_address']));
- }
- }
-
- if (count($Bcc) > 0)
- {
- switch_lang_to($elem['language']);
-
- $mail_template = get_mail_template($email_format, $elem);
- $mail_template->set_filename($tpl_shortname,
- (empty($dirname) ? '' : $dirname.'/').$tpl_shortname.'.tpl');
-
- $mail_template->assign(
- trigger_event('mail_group_assign_vars', $assign_vars));
-
- $return = pwg_mail
- (
- '',
- array
- (
- 'Bcc' => $Bcc,
- 'subject' => l10n_args($keyargs_subject),
- 'email_format' => $email_format,
- 'content' => $mail_template->parse($tpl_shortname, true),
- 'content_format' => $email_format,
- 'template' => $elem['template'],
- 'theme' => $elem['theme']
- )
- ) and $return;
-
- switch_lang_back();
- }
- }
- }
- }
-
- return $return;
-}
-
-/*
- * sends an email, using Piwigo specific informations
- *
- * @param:
- * - to: receiver(s) of the mail (list separated by comma).
- * - args: function params of mail function:
- * o from: sender [default value webmaster email]
- * o Cc: array of carbon copy receivers of the mail. [default value empty]
- * o Bcc: array of blind carbon copy receivers of the mail. [default value empty]
- * o subject [default value 'Piwigo']
- * o content: content of mail [default value '']
- * o content_format: format of mail content [default value 'text/plain']
- * o email_format: global mail format [default value $conf_mail['default_email_format']]
- * o template: template to use [default get_default_template()]
- * o theme: template to use [default get_default_template()]
- *
- * @return boolean (Ok or not)
- */
-function pwg_mail($to, $args = array())
-{
- global $conf, $conf_mail, $lang_info, $page;
-
- if (empty($to) and empty($args['Cc']) and empty($args['Bcc']))
- {
- return true;
- }
-
- if (!isset($conf_mail))
- {
- $conf_mail = get_mail_configuration();
- }
-
- if (empty($args['email_format']))
- {
- $args['email_format'] = $conf_mail['default_email_format'];
- }
-
- // Compute root_path in order have complete path
- if ($args['email_format'] == 'text/html')
- {
- set_make_full_url();
- }
-
- if (empty($args['from']))
- {
- $args['from'] = $conf_mail['formated_email_webmaster'];
- }
- else
- {
- $args['from'] = format_email('', $args['from']);
- }
-
- if (empty($args['subject']))
- {
- $args['subject'] = 'Piwigo';
- }
- // Spring cleaning
- $cvt_subject = trim(preg_replace('#[\n\r]+#s', '', $args['subject']));
- // Ascii convertion
- $cvt_subject = encode_mime_header($cvt_subject);
-
- if (!isset($args['content']))
- {
- $args['content'] = '';
- }
-
- if (empty($args['content_format']))
- {
- $args['content_format'] = 'text/plain';
- }
-
- if ($conf_mail['send_bcc_mail_webmaster'])
- {
- $args['Bcc'][] = $conf_mail['formated_email_webmaster'];
- }
-
- if (($args['content_format'] == 'text/html') and ($args['email_format'] == 'text/plain'))
- {
- // Todo find function to convert html text to plain text
- return false;
- }
-
- $args = array_merge($args, get_array_template_theme($args));
-
- $headers = 'From: '.$args['from']."\n";
- $headers.= 'Reply-To: '.$args['from']."\n";
- if (empty($to))
- {
- $headers.= 'To: undisclosed-recipients: ;'."\n";
- }
- else
- {
- $headers.= 'To: '.$to."\n";
- }
-
- if (!empty($args['Cc']))
- {
- $headers.= 'Cc: '.implode(',', $args['Cc'])."\n";
- }
-
- if (!empty($args['Bcc']))
- {
- $headers.= 'Bcc: '.implode(',', $args['Bcc'])."\n";
- }
-
- $headers.= 'Content-Type: multipart/alternative;'."\n";
- $headers.= ' boundary="---='.$conf_mail['boundary_key'].'";'."\n";
- $headers.= ' reply-type=original'."\n";
- $headers.= 'MIME-Version: 1.0'."\n";
- $headers.= 'X-Mailer: Piwigo Mailer'."\n";
-
- $content = '';
-
- // key compose of indexes witch allow ti cache mail data
- $cache_key = $args['email_format'].'-'.$lang_info['code'].'-'.$args['template'].'-'.$args['theme'];
-
- if (!isset($conf_mail[$cache_key]))
- {
- if (!isset($mail_template))
- {
- $mail_template = get_mail_template($args['email_format']);
- }
-
- $mail_template->set_filename('mail_header', 'header.tpl');
- $mail_template->set_filename('mail_footer', 'footer.tpl');
-
- $mail_template->assign(
- array(
- //Header
- 'BOUNDARY_KEY' => $conf_mail['boundary_key'],
- 'CONTENT_TYPE' => $args['email_format'],
- 'CONTENT_ENCODING' => get_pwg_charset(),
- 'LANG' => $lang_info['code'],
- 'DIR' => $lang_info['direction'],
-
- // Footer
- 'GALLERY_URL' =>
- isset($page['gallery_url']) ?
- $page['gallery_url'] : $conf['gallery_url'],
- 'GALLERY_TITLE' =>
- isset($page['gallery_title']) ?
- $page['gallery_title'] : $conf['gallery_title'],
- 'VERSION' => $conf['show_version'] ? PHPWG_VERSION : '',
- 'PHPWG_URL' => PHPWG_URL,
-
- 'TITLE_MAIL' => urlencode(l10n('title_send_mail')),
- 'MAIL' => get_webmaster_mail_address()
- ));
-
- if ($args['email_format'] == 'text/html')
- {
- if (is_file($mail_template->get_template_dir().'/global-mail-css.tpl'))
- {
- $mail_template->set_filename('css', 'global-mail-css.tpl');
- $mail_template->assign_var_from_handle('GLOBAL_MAIL_CSS', 'css');
- }
-
- $root_abs_path = dirname(dirname(__FILE__));
-
- $file = $root_abs_path.'/template/'.$args['template'].'/theme/'.$args['theme'].'/mail-css.tpl';
- if (is_file($file))
- {
- $mail_template->set_filename('css', $file);
- $mail_template->assign_var_from_handle('MAIL_CSS', 'css');
- }
-
- $file = $root_abs_path.'/template-common/local-mail-css.tpl';
- if (is_file($file))
- {
- $mail_template->set_filename('css', $file);
- $mail_template->assign_var_from_handle('LOCAL_MAIL_CSS', 'css');
- }
- }
-
- // what are displayed on the header of each mail ?
- $conf_mail[$cache_key]['header'] =
- $mail_template->parse('mail_header', true);
-
- // what are displayed on the footer of each mail ?
- $conf_mail[$cache_key]['footer'] =
- $mail_template->parse('mail_footer', true);
- }
-
- // Header
- $content.= $conf_mail[$cache_key]['header'];
-
- // Content
- if (($args['content_format'] == 'text/plain') and ($args['email_format'] == 'text/html'))
- {
- $content.= '<p>'.
- nl2br(
- preg_replace("/(http:\/\/)([^\s,]*)/i",
- "<a href='$1$2'>$1$2</a>",
- htmlspecialchars($args['content']))).
- '</p>';
- }
- else
- {
- $content.= $args['content'];
- }
-
- // Footer
- $content.= $conf_mail[$cache_key]['footer'];
-
- // Close boundary
- $content.= "\n".'-----='.$conf_mail['boundary_key'].'--'."\n";
-
- // Undo Compute root_path in order have complete path
- if ($args['email_format'] == 'text/html')
- {
- unset_make_full_url();
- }
-
- return
- trigger_event('send_mail',
- false, /* Result */
- trigger_event('send_mail_to', get_strict_email_list($to)),
- trigger_event('send_mail_subject', $cvt_subject),
- trigger_event('send_mail_content', $content),
- trigger_event('send_mail_headers', $headers),
- $args
- );
-}
-
-/*
- * pwg sendmail
- *
- * @param:
- * - result of other sendmail
- * - to: Receiver or receiver(s) of the mail.
- * - subject [default value 'Piwigo']
- * - content: content of mail
- * - headers: headers of mail
- *
- * @return boolean (Ok or not)
- */
-function pwg_send_mail($result, $to, $subject, $content, $headers)
-{
- if (!$result)
- {
- global $conf_mail;
-
- if ($conf_mail['use_smtp'])
- {
- include_once( PHPWG_ROOT_PATH.'include/class_smtp_mail.inc.php' );
- $smtp_mail = new smtp_mail(
- $conf_mail['smtp_host'], $conf_mail['smtp_user'], $conf_mail['smtp_password'],
- $conf_mail['email_webmaster']);
- return $smtp_mail->mail($to, $subject, $content, $headers);
- }
- else
- {
- if ($conf_mail['mail_options'])
- {
- $options = '-f '.$conf_mail['email_webmaster'];
- return mail($to, $subject, $content, $headers, $options);
- }
- else
- {
- return mail($to, $subject, $content, $headers);
- }
- }
- }
- else
- {
- return $result;
- }
-}
-
-/*Testing block*/
-/*function pwg_send_mail_test($result, $to, $subject, $content, $headers, $args)
-{
- global $conf, $user, $lang_info;
- $dir = $conf['local_data_dir'].'/tmp';
- @mkdir( $dir );
- $filename = $dir.'/mail.'.$user['username'].'.'.$lang_info['code'].'.'.$args['template'].'.'.$args['theme'];
- if ($args['content_format'] == 'text/plain')
- {
- $filename .= '.txt';
- }
- else
- {
- $filename .= '.html';
- }
- $file = fopen($filename, 'w+');
- fwrite($file, $to ."\n");
- fwrite($file, $subject ."\n");
- fwrite($file, $headers);
- fwrite($file, $content);
- fclose($file);
- return $result;
-}
-add_event_handler('send_mail', 'pwg_send_mail_test', EVENT_HANDLER_PRIORITY_NEUTRAL+10, 6);*/
-
-
-add_event_handler('send_mail', 'pwg_send_mail', EVENT_HANDLER_PRIORITY_NEUTRAL, 5);
-trigger_action('functions_mail_included');
-
-?>
diff --git a/BSF/include/functions_metadata.inc.php b/BSF/include/functions_metadata.inc.php
deleted file mode 100644
index df89eea9c..000000000
--- a/BSF/include/functions_metadata.inc.php
+++ /dev/null
@@ -1,142 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * returns informations from IPTC metadata, mapping is done at the beginning
- * of the function
- *
- * @param string $filename
- * @return array
- */
-function get_iptc_data($filename, $map)
-{
- $result = array();
-
- $imginfo = array();
- if (false == @getimagesize($filename, $imginfo) )
- {
- return $result;
- }
-
- if (isset($imginfo['APP13']))
- {
- $iptc = iptcparse($imginfo['APP13']);
- if (is_array($iptc))
- {
- $rmap = array_flip($map);
- foreach (array_keys($rmap) as $iptc_key)
- {
- if (isset($iptc[$iptc_key][0]))
- {
- if ($iptc_key == '2#025')
- {
- $value = implode(',',
- array_map('clean_iptc_value',$iptc[$iptc_key]));
- }
- else
- {
- $value = clean_iptc_value($iptc[$iptc_key][0]);
- }
-
- foreach (array_keys($map, $iptc_key) as $pwg_key)
- {
- $result[$pwg_key] = $value;
- }
- }
- }
- }
- }
- return $result;
-}
-
-/**
- * return a cleaned IPTC value
- *
- * @param string value
- * @return string
- */
-function clean_iptc_value($value)
-{
- // strip leading zeros (weird Kodak Scanner software)
- while ( isset($value[0]) and $value[0] == chr(0))
- {
- $value = substr($value, 1);
- }
- // remove binary nulls
- $value = str_replace(chr(0x00), ' ', $value);
-
- if ( preg_match('/[\x80-\xff]/', $value) )
- {
- // apparently mac uses some MacRoman crap encoding. I don't know
- // how to detect it so a plugin should do the trick.
- $value = trigger_event('clean_iptc_value', $value);
- $is_utf8 = seems_utf8($value);
- $value = convert_charset( $value,
- $is_utf8 ? 'utf-8' : 'iso-8859-1',
- get_pwg_charset() );
- }
- return $value;
-}
-
-/**
- * returns informations from EXIF metadata, mapping is done at the beginning
- * of the function
- *
- * @param string $filename
- * @return array
- */
-function get_exif_data($filename, $map)
-{
- $result = array();
-
- if (!function_exists('read_exif_data'))
- {
- die('Exif extension not available, admin should disable exif use');
- }
-
- // Read EXIF data
- if ($exif = @read_exif_data($filename))
- {
- foreach ($map as $key => $field)
- {
- if (strpos($field, ';') === false)
- {
- if (isset($exif[$field]))
- {
- $result[$key] = $exif[$field];
- }
- }
- else
- {
- $tokens = explode(';', $field);
- if (isset($exif[$tokens[0]][$tokens[1]]))
- {
- $result[$key] = $exif[$tokens[0]][$tokens[1]];
- }
- }
- }
- }
-
- return $result;
-}
-?> \ No newline at end of file
diff --git a/BSF/include/functions_notification.inc.php b/BSF/include/functions_notification.inc.php
deleted file mode 100644
index 259a34613..000000000
--- a/BSF/include/functions_notification.inc.php
+++ /dev/null
@@ -1,608 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// +-----------------------------------------------------------------------+
-// | functions |
-// +-----------------------------------------------------------------------+
-
-/*
- * get standard sql where in order to
- * restict an filter caregories and images
- *
- * IMAGE_CATEGORY_TABLE muste named ic in the query
- *
- * @param none
- *
- * @return string sql where
- */
-function get_std_sql_where_restrict_filter($prefix_condition, $force_one_condition = false)
-{
- return get_sql_condition_FandF
- (
- array
- (
- 'forbidden_categories' => 'ic.category_id',
- 'visible_categories' => 'ic.category_id',
- 'visible_images' => 'ic.image_id'
- ),
- $prefix_condition,
- $force_one_condition
- );
-}
-
-/*
- * Execute custom notification query
- *
- * @param string action ('count' or 'info')
- * @param string type of query ('new_comments', 'unvalidated_comments', 'new_elements', 'updated_categories', 'new_users', 'waiting_elements')
- * @param string start (mysql datetime format)
- * @param string end (mysql datetime format)
- *
- * @return integer for action count
- * array for info
- */
-function custom_notification_query($action, $type, $start, $end)
-{
- global $user;
-
- switch($type)
- {
- case 'new_comments':
- $query = '
- FROM '.COMMENTS_TABLE.' AS c
- , '.IMAGE_CATEGORY_TABLE.' AS ic
- WHERE c.image_id = ic.image_id
- AND c.validation_date > \''.$start.'\'
- AND c.validation_date <= \''.$end.'\'
- '.get_std_sql_where_restrict_filter('AND').'
-;';
- break;
- case 'unvalidated_comments':
- $query = '
- FROM '.COMMENTS_TABLE.'
- WHERE date> \''.$start.'\' AND date <= \''.$end.'\'
- AND validated = \'false\'
-;';
- break;
- case 'new_elements':
- $query = '
- FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON image_id = id
- WHERE date_available > \''.$start.'\'
- AND date_available <= \''.$end.'\'
- '.get_std_sql_where_restrict_filter('AND').'
-;';
- break;
- case 'updated_categories':
- $query = '
- FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON image_id = id
- WHERE date_available > \''.$start.'\'
- AND date_available <= \''.$end.'\'
- '.get_std_sql_where_restrict_filter('AND').'
-;';
- break;
- case 'new_users':
- $query = '
- FROM '.USER_INFOS_TABLE.'
- WHERE registration_date > \''.$start.'\'
- AND registration_date <= \''.$end.'\'
-;';
- break;
- case 'waiting_elements':
- $query = '
- FROM '.WAITING_TABLE.'
- WHERE validated = \'false\'
-;';
- break;
- default:
- // stop this function and return nothing
- return;
- break;
- }
-
- switch($action)
- {
- case 'count':
- switch($type)
- {
- case 'new_comments':
- $field_id = 'c.id';
- break;
- case 'unvalidated_comments':
- $field_id = 'id';
- break;
- case 'new_elements':
- $field_id = 'image_id';
- break;
- case 'updated_categories':
- $field_id = 'category_id';
- break;
- case 'new_users':
- $field_id = 'user_id';
- break;
- case 'waiting_elements':
- $field_id = 'id';
- break;
- }
- $query = 'SELECT count(distinct '.$field_id.') as CountId
-'.$query;
- list($count) = mysql_fetch_array(pwg_query($query));
- return $count;
-
- break;
- case 'info':
- switch($type)
- {
- case 'new_comments':
- $fields = array('c.id');
- break;
- case 'unvalidated_comments':
- $fields = array('id');
- break;
- case 'new_elements':
- $fields = array('image_id');
- break;
- case 'updated_categories':
- $fields = array('category_id');
- break;
- case 'new_users':
- $fields = array('user_id');
- break;
- case 'waiting_elements':
- $fields = array('id');
- break;
- }
-
- $query = 'SELECT distinct '.implode(', ', $fields).'
-'.$query;
- $result = pwg_query($query);
-
- $infos = array();
-
- while ($row = mysql_fetch_array($result))
- {
- array_push($infos, $row);
- }
-
- return $infos;
-
- break;
- }
-
- //return is done on previous switch($action)
-}
-
-/**
- * new comments between two dates, according to authorized categories
- *
- * @param string start (mysql datetime format)
- * @param string end (mysql datetime format)
- * @param string forbidden categories (comma separated)
- * @return count comment ids
- */
-function nb_new_comments($start, $end)
-{
- return custom_notification_query('count', 'new_comments', $start, $end);
-}
-
-/**
- * new comments between two dates, according to authorized categories
- *
- * @param string start (mysql datetime format)
- * @param string end (mysql datetime format)
- * @param string forbidden categories (comma separated)
- * @return array comment ids
- */
-function new_comments($start, $end)
-{
- return custom_notification_query('info', 'new_comments', $start, $end);
-}
-
-/**
- * unvalidated at a precise date
- *
- * Comments that are registered and not validated yet on a precise date
- *
- * @param string start (mysql datetime format)
- * @param string end (mysql datetime format)
- * @return count comment ids
- */
-function nb_unvalidated_comments($start, $end)
-{
- return custom_notification_query('count', 'unvalidated_comments', $start, $end);
-}
-
-
-/**
- * new elements between two dates, according to authorized categories
- *
- * @param string start (mysql datetime format)
- * @param string end (mysql datetime format)
- * @param string forbidden categories (comma separated)
- * @return count element ids
- */
-function nb_new_elements($start, $end)
-{
- return custom_notification_query('count', 'new_elements', $start, $end);
-}
-
-/**
- * new elements between two dates, according to authorized categories
- *
- * @param string start (mysql datetime format)
- * @param string end (mysql datetime format)
- * @param string forbidden categories (comma separated)
- * @return array element ids
- */
-function new_elements($start, $end)
-{
- return custom_notification_query('info', 'new_elements', $start, $end);
-}
-
-/**
- * updated categories between two dates, according to authorized categories
- *
- * @param string start (mysql datetime format)
- * @param string end (mysql datetime format)
- * @param string forbidden categories (comma separated)
- * @return count element ids
- */
-function nb_updated_categories($start, $end)
-{
- return custom_notification_query('count', 'updated_categories', $start, $end);
-}
-
-/**
- * updated categories between two dates, according to authorized categories
- *
- * @param string start (mysql datetime format)
- * @param string end (mysql datetime format)
- * @param string forbidden categories (comma separated)
- * @return array element ids
- */
-function updated_categories($start, $end)
-{
- return custom_notification_query('info', 'updated_categories', $start, $end);
-}
-
-/**
- * new registered users between two dates
- *
- * @param string start (mysql datetime format)
- * @param string end (mysql datetime format)
- * @return count user ids
- */
-function nb_new_users($start, $end)
-{
- return custom_notification_query('count', 'new_users', $start, $end);
-}
-
-/**
- * new registered users between two dates
- *
- * @param string start (mysql datetime format)
- * @param string end (mysql datetime format)
- * @return array user ids
- */
-function new_users($start, $end)
-{
- return custom_notification_query('info', 'new_users', $start, $end);
-}
-
-/**
- * currently waiting pictures
- *
- * @return count waiting ids
- */
-function nb_waiting_elements()
-{
- return custom_notification_query('count', 'waiting_elements', '', '');
-}
-
-/**
- * currently waiting pictures
- *
- * @return array waiting ids
- */
-function waiting_elements()
-{
- return custom_notification_query('info', 'waiting_elements', $start, $end);
-}
-
-/**
- * There are new between two dates ?
- *
- * Informations : number of new comments, number of new elements, number of
- * updated categories. Administrators are also informed about : number of
- * unvalidated comments, number of new users (TODO : number of unvalidated
- * elements)
- *
- * @param string start date (mysql datetime format)
- * @param string end date (mysql datetime format)
- *
- * @return boolean : true if exist news else false
- */
-function news_exists($start, $end)
-{
- return (
- (nb_new_comments($start, $end) > 0) or
- (nb_new_elements($start, $end) > 0) or
- (nb_updated_categories($start, $end) > 0) or
- ((is_admin()) and (nb_unvalidated_comments($start, $end) > 0)) or
- ((is_admin()) and (nb_new_users($start, $end) > 0)) or
- ((is_admin()) and (nb_waiting_elements() > 0))
- );
-}
-
-/**
- * Formats a news line and adds it to the array (e.g. '5 new elements')
- */
-function add_news_line(&$news, $count, $singular_fmt_key, $plural_fmt_key, $url='', $add_url=false)
-{
- if ($count > 0)
- {
- $line = l10n_dec($singular_fmt_key, $plural_fmt_key, $count);
- if ($add_url and !empty($url) )
- {
- $line = '<a href="'.$url.'">'.$line.'</a>';
- }
- array_push($news, $line);
- }
-}
-
-/**
- * What's new between two dates ?
- *
- * Informations : number of new comments, number of new elements, number of
- * updated categories. Administrators are also informed about : number of
- * unvalidated comments, number of new users (TODO : number of unvalidated
- * elements)
- *
- * @param string start date (mysql datetime format)
- * @param string end date (mysql datetime format)
- * @param bool exclude_img_cats if true, no info about new images/categories
- * @param bool add_url add html A link around news
- *
- * @return array of news
- */
-function news($start, $end, $exclude_img_cats=false, $add_url=false)
-{
- $news = array();
-
- if (!$exclude_img_cats)
- {
- add_news_line( $news,
- nb_new_elements($start, $end), '%d new element', '%d new elements',
- make_index_url(array('section'=>'recent_pics')), $add_url );
- }
-
- if (!$exclude_img_cats)
- {
- add_news_line( $news,
- nb_updated_categories($start, $end), '%d category updated', '%d categories updated',
- make_index_url(array('section'=>'recent_cats')), $add_url );
- }
-
- add_news_line( $news,
- nb_new_comments($start, $end), '%d new comment', '%d new comments',
- get_root_url().'comments.php', $add_url );
-
- if (is_admin())
- {
- add_news_line( $news,
- nb_unvalidated_comments($start, $end), '%d comment to validate', '%d comments to validate',
- get_root_url().'admin.php?page=comments', $add_url );
-
- add_news_line( $news,
- nb_new_users($start, $end), '%d new user', '%d new users',
- get_root_url().'admin.php?page=user_list', $add_url );
-
- add_news_line( $news,
- nb_waiting_elements(), '%d waiting element', '%d waiting elements',
- get_root_url().'admin.php?page=upload', $add_url );
- }
-
- return $news;
-}
-
-/**
- * returns information about recently published elements grouped by post date
- * @param int max_dates maximum returned number of recent dates
- * @param int max_elements maximum returned number of elements per date
- * @param int max_cats maximum returned number of categories per date
- */
-function get_recent_post_dates($max_dates, $max_elements, $max_cats)
-{
- global $conf, $user;
-
- $where_sql = get_std_sql_where_restrict_filter('WHERE', true);
-
- $query = '
-SELECT date_available,
- COUNT(DISTINCT id) nb_elements,
- COUNT(DISTINCT category_id) nb_cats
- FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id=image_id
- '.$where_sql.'
- GROUP BY date_available
- ORDER BY date_available DESC
- LIMIT 0,'.$max_dates.'
-;';
- $result = pwg_query($query);
- $dates = array();
- while ($row = mysql_fetch_assoc($result))
- {
- array_push($dates, $row);
- }
-
- for ($i=0; $i<count($dates); $i++)
- {
- if ($max_elements>0)
- { // get some thumbnails ...
- $query = '
-SELECT DISTINCT id, path, name, tn_ext, file
- FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id=image_id
- '.$where_sql.'
- AND date_available="'.$dates[$i]['date_available'].'"
- AND tn_ext IS NOT NULL
- ORDER BY RAND(NOW())
- LIMIT 0,'.$max_elements.'
-;';
- $dates[$i]['elements'] = array();
- $result = pwg_query($query);
- while ($row = mysql_fetch_assoc($result))
- {
- array_push($dates[$i]['elements'], $row);
- }
- }
-
- if ($max_cats>0)
- {// get some categories ...
- $query = '
-SELECT DISTINCT c.uppercats, COUNT(DISTINCT i.id) img_count
- FROM '.IMAGES_TABLE.' i INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON i.id=image_id
- INNER JOIN '.CATEGORIES_TABLE.' c ON c.id=category_id
- '.$where_sql.'
- AND date_available="'.$dates[$i]['date_available'].'"
- GROUP BY category_id
- ORDER BY img_count DESC
- LIMIT 0,'.$max_cats.'
-;';
- $dates[$i]['categories'] = array();
- $result = pwg_query($query);
- while ($row = mysql_fetch_assoc($result))
- {
- array_push($dates[$i]['categories'], $row);
- }
- }
- }
- return $dates;
-}
-
-/*
- Call function get_recent_post_dates but
- the parameters to be passed to the function, as an indexed array.
-
-*/
-function get_recent_post_dates_array($args)
-{
- return
- get_recent_post_dates
- (
- (empty($args['max_dates']) ? 3 : $args['max_dates']),
- (empty($args['max_elements']) ? 3 : $args['max_elements']),
- (empty($args['max_cats']) ? 3 : $args['max_cats'])
- );
-}
-
-
-/**
- * returns html description about recently published elements grouped by post date
- * @param $date_detail: selected date computed by get_recent_post_dates function
- */
-function get_html_description_recent_post_date($date_detail)
-{
- global $conf;
-
- $description = '';
-
- $description .=
- '<li>'
- .l10n_dec('%d new element', '%d new elements', $date_detail['nb_elements'])
- .' ('
- .'<a href="'.make_index_url(array('section'=>'recent_pics')).'">'
- .l10n('recent_pics_cat').'</a>'
- .')'
- .'</li><br/>';
-
- foreach($date_detail['elements'] as $element)
- {
- $tn_src = get_thumbnail_url($element);
- $description .= '<a href="'.
- make_picture_url(array(
- 'image_id' => $element['id'],
- 'image_file' => $element['file'],
- ))
- .'"><img src="'.$tn_src.'"/></a>';
- }
- $description .= '...<br/>';
-
- $description .=
- '<li>'
- .l10n_dec('%d category updated', '%d categories updated',
- $date_detail['nb_cats'])
- .'</li>';
-
- $description .= '<ul>';
- foreach($date_detail['categories'] as $cat)
- {
- $description .=
- '<li>'
- .get_cat_display_name_cache($cat['uppercats'])
- .' ('.
- l10n_dec('%d new element',
- '%d new elements', $cat['img_count']).')'
- .'</li>';
- }
- $description .= '</ul>';
-
- return $description;
-}
-
-/**
- * explodes a MySQL datetime format (2005-07-14 23:01:37) in fields "year",
- * "month", "day", "hour", "minute", "second".
- *
- * @param string mysql datetime format
- * @return array
- */
-function explode_mysqldt($mysqldt)
-{
- $date = array();
- list($date['year'],
- $date['month'],
- $date['day'],
- $date['hour'],
- $date['minute'],
- $date['second'])
- = preg_split('/[-: ]/', $mysqldt);
-
- return $date;
-}
-
-/**
- * returns title about recently published elements grouped by post date
- * @param $date_detail: selected date computed by get_recent_post_dates function
- */
-function get_title_recent_post_date($date_detail)
-{
- global $lang;
-
- $date = $date_detail['date_available'];
- $exploded_date = explode_mysqldt($date);
-
- $title = l10n_dec('%d new element', '%d new elements', $date_detail['nb_elements']);
- $title .= ' ('.$lang['month'][(int)$exploded_date['month']].' '.$exploded_date['day'].')';
-
- return $title;
-}
-
-?> \ No newline at end of file
diff --git a/BSF/include/functions_picture.inc.php b/BSF/include/functions_picture.inc.php
deleted file mode 100644
index 1b6403ff3..000000000
--- a/BSF/include/functions_picture.inc.php
+++ /dev/null
@@ -1,330 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * @param element_info array containing element information from db;
- * at least 'id', 'path' should be present
- */
-function get_element_path($element_info)
-{
- $path = get_element_location($element_info);
- if ( !url_is_remote($path) )
- {
- $path = PHPWG_ROOT_PATH.$path;
- }
- return $path;
-}
-
-/*
- * @param element_info array containing element information from db;
- * at least 'id', 'path' should be present
- */
-function get_element_url($element_info)
-{
- $url = get_element_location($element_info);
- if ( !url_is_remote($url) )
- {
- $url = embellish_url(get_root_url().$url);
- }
- // plugins want another url ?
- return trigger_event('get_element_url', $url, $element_info);
-}
-
-/**
- * Returns the relative path of the element with regards to to the root
- * of PWG (not the current page). This function is not intended to be
- * called directly from code.
- * @param element_info array containing element information from db;
- * at least 'id', 'path' should be present
- */
-function get_element_location($element_info)
-{
- // maybe a cached watermark ?
- return trigger_event('get_element_location',
- $element_info['path'], $element_info);
-}
-
-
-/**
- * Returns the PATH to the image to be displayed in the picture page. If the
- * element is not a picture, then the representative image or the default
- * mime image. The path can be used in the php script, but not sent to the
- * browser.
- * @param element_info array containing element information from db;
- * at least 'id', 'path', 'representative_ext' should be present
- */
-function get_image_path($element_info)
-{
- global $conf;
- $ext = get_extension($element_info['path']);
- if (in_array($ext, $conf['picture_ext']))
- {
- if (isset($element_info['element_path']) )
- {
- return $element_info['element_path'];
- }
- return get_element_path($element_info);
- }
-
- $path = get_image_location($element_info);
- if ( !url_is_remote($path) )
- {
- $path = PHPWG_ROOT_PATH.$path;
- }
- return $path;
-}
-
-/**
- * Returns the URL of the image to be displayed in the picture page. If the
- * element is not a picture, then the representative image or the default
- * mime image. The URL can't be used in the php script, but can be sent to the
- * browser.
- * @param element_info array containing element information from db;
- * at least 'id', 'path', 'representative_ext' should be present
- */
-function get_image_url($element_info)
-{
- global $conf;
- $ext = get_extension($element_info['path']);
- if (in_array($ext, $conf['picture_ext']))
- {
- if (isset($element_info['element_url']) )
- {
- return $element_info['element_url'];
- }
- return get_element_url($element_info);
- }
-
- $url = get_image_location($element_info);
- if ( !url_is_remote($url) )
- {
- $url = embellish_url(get_root_url().$url);
- }
- return $url;
-}
-
-/**
- * Returns the relative path of the image (element/representative/mimetype)
- * with regards to the root of PWG (not the current page). This function
- * is not intended to be called directly from code.
- * @param element_info array containing element information from db;
- * at least 'id', 'path', 'representative_ext' should be present
- */
-function get_image_location($element_info)
-{
- if (isset($element_info['representative_ext'])
- and $element_info['representative_ext'] != '')
- {
- $pi = pathinfo($element_info['path']);
- $file_wo_ext = get_filename_wo_extension($pi['basename']);
- $path =
- $pi['dirname'].'/pwg_representative/'
- .$file_wo_ext.'.'.$element_info['representative_ext'];
- }
- else
- {
- $ext = get_extension($element_info['path']);
- $path = get_themeconf('mime_icon_dir');
- $path.= strtolower($ext).'.png';
- if ( !file_exists(PHPWG_ROOT_PATH.$path)
- and !empty($element_info['tn_ext']) )
- {
- $path = get_thumbnail_location($element_info);
- }
- }
-
- // plugins want another location ?
- return trigger_event( 'get_image_location', $path, $element_info);
-}
-
-
-/*
- * @param element_info array containing element information from db;
- * at least 'id', 'path', 'has_high' should be present
- */
-function get_high_path($element_info)
-{
- $path = get_high_location($element_info);
- if (!empty($path) and !url_is_remote($path) )
- {
- $path = PHPWG_ROOT_PATH.$path;
- }
- return $path;
-}
-
-/**
- * @param element_info array containing element information from db;
- * at least 'id', 'path', 'has_high' should be present
- */
-function get_high_url($element_info)
-{
- $url = get_high_location($element_info);
- if (!empty($url) and !url_is_remote($url) )
- {
- $url = embellish_url(get_root_url().$url);
- }
- // plugins want another url ?
- return trigger_event('get_high_url', $url, $element_info);
-}
-
-/**
- * @param element_info array containing element information from db;
- * at least 'id', 'path', 'has_high' should be present
- */
-function get_high_location($element_info)
-{
- $location = '';
- if ($element_info['has_high'] == 'true')
- {
- $pi = pathinfo($element_info['path']);
- $location=$pi['dirname'].'/pwg_high/'.$pi['basename'];
- }
- return trigger_event( 'get_high_location', $location, $element_info);
-}
-
-
-/**
- * @param what_part string one of 't' (thumbnail), 'e' (element), 'i' (image),
- * 'h' (high resolution image)
- * @param element_info array containing element information from db;
- * at least 'id', 'path' should be present
- */
-function get_download_url($what_part, $element_info)
-{
- $url = get_root_url().'action.php';
- $url = add_url_params($url,
- array(
- 'id' => $element_info['id'],
- 'part' => $what_part,
- )
- );
- return trigger_event( 'get_download_url', $url, $element_info);
-}
-
-/*
- * get slideshow default params into array
- *
- * @param void
- *
- * @return slideshow default values into array
- */
-function get_default_slideshow_params()
-{
- global $conf;
-
- return array(
- 'period' => $conf['slideshow_period'],
- 'repeat' => $conf['slideshow_repeat'],
- 'play' => true,
- );
-}
-
-/*
- * check and correct slideshow params from array
- *
- * @param array of params
- *
- * @return slideshow corrected values into array
- */
-function correct_slideshow_params($params = array())
-{
- global $conf;
-
- if ($params['period'] < $conf['slideshow_period_min'])
- {
- $params['period'] = $conf['slideshow_period_min'];
- }
- else if ($params['period'] > $conf['slideshow_period_max'])
- {
- $params['period'] = $conf['slideshow_period_max'];
- }
-
- return $params;
-}
-
-/*
- * Decode slideshow string params into array
- *
- * @param string params like ""
- *
- * @return slideshow values into array
- */
-function decode_slideshow_params($encode_params = null)
-{
- global $conf;
-
- $result = get_default_slideshow_params();
-
- if (is_numeric($encode_params))
- {
- $result['period'] = $encode_params;
- }
- else
- {
- $matches = array();
- if (preg_match_all('/([a-z]+)-(\d+)/', $encode_params, $matches))
- {
- $matchcount = count($matches[1]);
- for ($i = 0; $i < $matchcount; $i++)
- {
- $result[$matches[1][$i]] = $matches[2][$i];
- }
- }
-
- if (preg_match_all('/([a-z]+)-(true|false)/', $encode_params, $matches))
- {
- $matchcount = count($matches[1]);
- for ($i = 0; $i < $matchcount; $i++)
- {
- $result[$matches[1][$i]] = get_boolean($matches[2][$i]);
- }
- }
- }
-
- return correct_slideshow_params($result);
-}
-
-/*
- * Encode slideshow array params into array
- *
- * @param array params
- *
- * @return slideshow values into string
- */
-function encode_slideshow_params($decode_params = array())
-{
- global $conf;
-
- $params = array_diff_assoc(correct_slideshow_params($decode_params), get_default_slideshow_params());
- $result = '';
-
- foreach ($params as $name => $value)
- {
- // boolean_to_string return $value, if it's not a bool
- $result .= '+'.$name.'-'.boolean_to_string($value);
- }
-
- return $result;
-}
-
-?>
diff --git a/BSF/include/functions_plugins.inc.php b/BSF/include/functions_plugins.inc.php
deleted file mode 100644
index e2beb18ac..000000000
--- a/BSF/include/functions_plugins.inc.php
+++ /dev/null
@@ -1,284 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/*
-Events and event handlers are the core of Piwigo plugin management.
-Plugins are addons that are found in plugins subdirectory. If activated, PWG
-will include the index.php of each plugin.
-Events are triggered by PWG core code. Plugins (or even PWG itself) can
-register their functions to handle these events. An event is identified by a
-string.
-*/
-
-define('PHPWG_PLUGINS_PATH', PHPWG_ROOT_PATH.'plugins/');
-
-define('EVENT_HANDLER_PRIORITY_NEUTRAL', 50);
-
-/* Register a event handler.
- * @param string $event the name of the event to listen to
- * @param mixed $func the function that will handle the event
- * @param int $priority optional priority (greater priority will
- * be executed at last)
-*/
-function add_event_handler($event, $func,
- $priority=EVENT_HANDLER_PRIORITY_NEUTRAL, $accepted_args=1)
-{
- global $pwg_event_handlers;
-
- if ( isset($pwg_event_handlers[$event][$priority]) )
- {
- foreach($pwg_event_handlers[$event][$priority] as $handler)
- {
- if ( $handler['function'] == $func )
- {
- return false;
- }
- }
- }
-
- $pwg_event_handlers[$event][$priority][] =
- array(
- 'function'=>$func,
- 'accepted_args'=>$accepted_args);
- ksort( $pwg_event_handlers[$event] );
- return true;
-}
-
-/* Register a event handler.
- * @param string $event the name of the event to listen to
- * @param mixed $func the function that needs removal
- * @param int $priority optional priority (greater priority will
- * be executed at last)
-*/
-function remove_event_handler($event, $func,
- $priority=EVENT_HANDLER_PRIORITY_NEUTRAL)
-{
- global $pwg_event_handlers;
-
- if (!isset( $pwg_event_handlers[$event][$priority] ) )
- {
- return false;
- }
- for ($i=0; $i<count($pwg_event_handlers[$event][$priority]); $i++)
- {
- if ($pwg_event_handlers[$event][$priority][$i]['function']==$func)
- {
- unset($pwg_event_handlers[$event][$priority][$i]);
- $pwg_event_handlers[$event][$priority] =
- array_values($pwg_event_handlers[$event][$priority]);
-
- if ( empty($pwg_event_handlers[$event][$priority]) )
- {
- unset( $pwg_event_handlers[$event][$priority] );
- if (empty( $pwg_event_handlers[$event] ) )
- {
- unset( $pwg_event_handlers[$event] );
- }
- }
- return true;
- }
- }
- return false;
-}
-
-/* Triggers an event and calls all registered event handlers
- * @param string $event name of the event
- * @param mixed $data data to pass to handlers
-*/
-function trigger_event($event, $data=null)
-{
- global $pwg_event_handlers;
-
- // just for debugging
- trigger_action('pre_trigger_event',
- array('event'=>$event, 'data'=>$data) );
-
- if ( !isset($pwg_event_handlers[$event]) )
- {
- trigger_action('post_trigger_event',
- array('event'=>$event, 'data'=>$data) );
- return $data;
- }
- $args = array_slice(func_get_args(), 2);
-
- foreach ($pwg_event_handlers[$event] as $priority => $handlers)
- {
- if ( !is_null($handlers) )
- {
- foreach($handlers as $handler)
- {
- $all_args = array_merge( array($data), $args);
- $function_name = $handler['function'];
- $accepted_args = $handler['accepted_args'];
-
- if ( $accepted_args == 1 )
- $the_args = array($data);
- elseif ( $accepted_args > 1 )
- $the_args = array_slice($all_args, 0, $accepted_args);
- elseif ( $accepted_args == 0 )
- $the_args = NULL;
- else
- $the_args = $all_args;
-
- $data = call_user_func_array($function_name, $the_args);
- }
- }
- }
- trigger_action('post_trigger_event',
- array('event'=>$event, 'data'=>$data) );
- return $data;
-}
-
-function trigger_action($event, $data=null)
-{
- global $pwg_event_handlers;
- if ($event!='pre_trigger_event'
- and $event!='post_trigger_event'
- and $event!='trigger_action')
- {// special case for debugging - avoid recursive calls
- trigger_action('trigger_action',
- array('event'=>$event, 'data'=>$data) );
- }
-
- if ( !isset($pwg_event_handlers[$event]) )
- {
- return;
- }
- $args = array_slice(func_get_args(), 2);
-
- foreach ($pwg_event_handlers[$event] as $priority => $handlers)
- {
- if ( !is_null($handlers) )
- {
- foreach($handlers as $handler)
- {
- $all_args = array_merge( array($data), $args);
- $function_name = $handler['function'];
- $accepted_args = $handler['accepted_args'];
-
- if ( $accepted_args == 1 )
- $the_args = array($data);
- elseif ( $accepted_args > 1 )
- $the_args = array_slice($all_args, 0, $accepted_args);
- elseif ( $accepted_args == 0 )
- $the_args = NULL;
- else
- $the_args = $all_args;
-
- call_user_func_array($function_name, $the_args);
- }
- }
- }
-}
-
-/** Saves some data with the associated plugim id. It can be retrieved later (
- * during this script lifetime) using get_plugin_data
- * @param string plugin_id
- * @param mixed data
- * returns true on success, false otherwise
- */
-function set_plugin_data($plugin_id, &$data)
-{
- global $pwg_loaded_plugins;
- if ( isset($pwg_loaded_plugins[$plugin_id]) )
- {
- $pwg_loaded_plugins[$plugin_id]['plugin_data'] = &$data;
- return true;
- }
- return false;
-}
-
-/** Retrieves plugin data saved previously with set_plugin_data
- * @param string plugin_id
- */
-function &get_plugin_data($plugin_id)
-{
- global $pwg_loaded_plugins;
- if ( isset($pwg_loaded_plugins[$plugin_id]) )
- {
- return $pwg_loaded_plugins[$plugin_id]['plugin_data'];
- }
- return null;
-}
-
-/* Returns an array of plugins defined in the database
- * @param string $state optional filter on this state
- * @param string $id optional returns only data about given plugin
-*/
-function get_db_plugins($state='', $id='')
-{
- $query = '
-SELECT * FROM '.PLUGINS_TABLE;
- if (!empty($state) or !empty($id) )
- {
- $query .= '
-WHERE 1=1';
- if (!empty($state))
- {
- $query .= '
- AND state="'.$state.'"';
- }
- if (!empty($id))
- {
- $query .= '
- AND id="'.$id.'"';
- }
- }
-
- $result = pwg_query($query);
- $plugins = array();
- while ($row = mysql_fetch_array($result))
- {
- array_push($plugins, $row);
- }
- return $plugins;
-}
-
-
-function load_plugin($plugin)
-{
- $file_name = PHPWG_PLUGINS_PATH.$plugin['id'].'/main.inc.php';
- if ( file_exists($file_name) )
- {
- global $pwg_loaded_plugins;
- $pwg_loaded_plugins[ $plugin['id'] ] = $plugin;
- include_once( $file_name );
- }
-}
-
-/*loads all the plugins on startup*/
-function load_plugins()
-{
- global $conf, $pwg_loaded_plugins;
- $pwg_loaded_plugins = array();
- if ($conf['enable_plugins'])
- {
- $plugins = get_db_plugins('active');
- foreach( $plugins as $plugin)
- {// include main from a function to avoid using same function context
- load_plugin($plugin);
- }
- trigger_action('plugins_loaded');
- }
-}
-?> \ No newline at end of file
diff --git a/BSF/include/functions_rate.inc.php b/BSF/include/functions_rate.inc.php
deleted file mode 100644
index ad3de1b2f..000000000
--- a/BSF/include/functions_rate.inc.php
+++ /dev/null
@@ -1,134 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * rate a picture by a user
- *
- * @param int image identifier
- * @param int rate
- * @return void
- */
-function rate_picture($image_id, $rate)
-{
- global $conf, $user;
-
- if (!isset($rate)
- or !$conf['rate']
- or !in_array($rate, $conf['rate_items']))
- {
- return;
- }
-
- $user_anonymous = is_autorize_status(ACCESS_CLASSIC) ? false : true;
-
- if ($user_anonymous and !$conf['rate_anonymous'])
- {
- return;
- }
-
- $ip_components = explode('.', $_SERVER["REMOTE_ADDR"]);
- if (count($ip_components) > 3)
- {
- array_pop($ip_components);
- }
- $anonymous_id = implode ('.', $ip_components);
-
- if ($user_anonymous)
- {
- $save_anonymous_id = pwg_get_cookie_var('anonymous_rater', $anonymous_id);
-
- if ($anonymous_id != $save_anonymous_id)
- { // client has changed his IP adress or he's trying to fool us
- $query = '
-SELECT element_id
- FROM '.RATE_TABLE.'
- WHERE user_id = '.$user['id'].'
- AND anonymous_id = \''.$anonymous_id.'\'
-;';
- $already_there = array_from_query($query, 'element_id');
-
- if (count($already_there) > 0)
- {
- $query = '
-DELETE
- FROM '.RATE_TABLE.'
- WHERE user_id = '.$user['id'].'
- AND anonymous_id = \''.$save_anonymous_id.'\'
- AND element_id IN ('.implode(',', $already_there).')
-;';
- pwg_query($query);
- }
-
- $query = '
-UPDATE '.RATE_TABLE.'
- SET anonymous_id = \'' .$anonymous_id.'\'
- WHERE user_id = '.$user['id'].'
- AND anonymous_id = \'' . $save_anonymous_id.'\'
-;';
- pwg_query($query);
- } // end client changed ip
-
- pwg_set_cookie_var('anonymous_rater', $anonymous_id);
- } // end anonymous user
-
- $query = '
-DELETE
- FROM '.RATE_TABLE.'
- WHERE element_id = '.$image_id.'
- AND user_id = '.$user['id'].'
-';
- if (isset($user_anonymous))
- {
- $query.= ' AND anonymous_id = \''.$anonymous_id.'\'';
- }
- pwg_query($query);
- $query = '
-INSERT
- INTO '.RATE_TABLE.'
- (user_id,anonymous_id,element_id,rate,date)
- VALUES
- ('
- .$user['id'].','
- .'\''.$anonymous_id.'\','
- .$image_id.','
- .$rate
- .',NOW())
-;';
- pwg_query($query);
-
- // update of images.average_rate field
- $query = '
-SELECT ROUND(AVG(rate),2) AS average_rate
- FROM '.RATE_TABLE.'
- WHERE element_id = '.$image_id.'
-;';
- $row = mysql_fetch_array(pwg_query($query));
- $query = '
-UPDATE '.IMAGES_TABLE.'
- SET average_rate = '.$row['average_rate'].'
- WHERE id = '.$image_id.'
-;';
- pwg_query($query);
-}
-
-?> \ No newline at end of file
diff --git a/BSF/include/functions_search.inc.php b/BSF/include/functions_search.inc.php
deleted file mode 100644
index 7069bd5c9..000000000
--- a/BSF/include/functions_search.inc.php
+++ /dev/null
@@ -1,560 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-
-/**
- * returns search rules stored into a serialized array in "search"
- * table. Each search rules set is numericaly identified.
- *
- * @param int search_id
- * @return array
- */
-function get_search_array($search_id)
-{
- if (!is_numeric($search_id))
- {
- die('Search id must be an integer');
- }
-
- $query = '
-SELECT rules
- FROM '.SEARCH_TABLE.'
- WHERE id = '.$search_id.'
-;';
- list($serialized_rules) = mysql_fetch_row(pwg_query($query));
-
- return unserialize($serialized_rules);
-}
-
-/**
- * returns the SQL clause from a search identifier
- *
- * Search rules are stored in search table as a serialized array. This array
- * need to be transformed into an SQL clause to be used in queries.
- *
- * @param array search
- * @return string
- */
-function get_sql_search_clause($search)
-{
- // SQL where clauses are stored in $clauses array during query
- // construction
- $clauses = array();
-
- foreach (array('file','name','comment','author') as $textfield)
- {
- if (isset($search['fields'][$textfield]))
- {
- $local_clauses = array();
- foreach ($search['fields'][$textfield]['words'] as $word)
- {
- array_push($local_clauses, $textfield." LIKE '%".$word."%'");
- }
-
- // adds brackets around where clauses
- $local_clauses = prepend_append_array_items($local_clauses, '(', ')');
-
- array_push(
- $clauses,
- implode(
- ' '.$search['fields'][$textfield]['mode'].' ',
- $local_clauses
- )
- );
- }
- }
-
- if (isset($search['fields']['allwords']))
- {
- $fields = array('file', 'name', 'comment', 'author');
- // in the OR mode, request bust be :
- // ((field1 LIKE '%word1%' OR field2 LIKE '%word1%')
- // OR (field1 LIKE '%word2%' OR field2 LIKE '%word2%'))
- //
- // in the AND mode :
- // ((field1 LIKE '%word1%' OR field2 LIKE '%word1%')
- // AND (field1 LIKE '%word2%' OR field2 LIKE '%word2%'))
- $word_clauses = array();
- foreach ($search['fields']['allwords']['words'] as $word)
- {
- $field_clauses = array();
- foreach ($fields as $field)
- {
- array_push($field_clauses, $field." LIKE '%".$word."%'");
- }
- // adds brackets around where clauses
- array_push(
- $word_clauses,
- implode(
- "\n OR ",
- $field_clauses
- )
- );
- }
-
- array_walk(
- $word_clauses,
- create_function('&$s','$s="(".$s.")";')
- );
-
- array_push(
- $clauses,
- "\n ".
- implode(
- "\n ".
- $search['fields']['allwords']['mode'].
- "\n ",
- $word_clauses
- )
- );
- }
-
- foreach (array('date_available', 'date_creation') as $datefield)
- {
- if (isset($search['fields'][$datefield]))
- {
- array_push(
- $clauses,
- $datefield." = '".$search['fields'][$datefield]['date']."'"
- );
- }
-
- foreach (array('after','before') as $suffix)
- {
- $key = $datefield.'-'.$suffix;
-
- if (isset($search['fields'][$key]))
- {
- array_push(
- $clauses,
-
- $datefield.
- ($suffix == 'after' ? ' >' : ' <').
- ($search['fields'][$key]['inc'] ? '=' : '').
- " '".$search['fields'][$key]['date']."'"
-
- );
- }
- }
- }
-
- if (isset($search['fields']['cat']))
- {
- if ($search['fields']['cat']['sub_inc'])
- {
- // searching all the categories id of sub-categories
- $cat_ids = get_subcat_ids($search['fields']['cat']['words']);
- }
- else
- {
- $cat_ids = $search['fields']['cat']['words'];
- }
-
- $local_clause = 'category_id IN ('.implode(',', $cat_ids).')';
- array_push($clauses, $local_clause);
- }
-
- // adds brackets around where clauses
- $clauses = prepend_append_array_items($clauses, '(', ')');
-
- $where_separator =
- implode(
- "\n ".$search['mode'].' ',
- $clauses
- );
-
- $search_clause = $where_separator;
-
- return $search_clause;
-}
-
-/**
- * returns the list of items corresponding to the advanced search array
- *
- * @param array search
- * @return array
- */
-function get_regular_search_results($search)
-{
- $items = array();
-
- $search_clause = get_sql_search_clause($search);
-
- if (!empty($search_clause))
- {
- $query = '
-SELECT DISTINCT(id)
- FROM '.IMAGES_TABLE.'
- INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
- WHERE '.$search_clause.'
-;';
- $items = array_from_query($query, 'id');
- }
-
- if (isset($search['fields']['tags']))
- {
- $tag_items = get_image_ids_for_tags(
- $search['fields']['tags']['words'],
- $search['fields']['tags']['mode']
- );
-
- switch ($search['mode'])
- {
- case 'AND':
- {
- if (empty($search_clause))
- {
- $items = $tag_items;
- }
- else
- {
- $items = array_intersect($items, $tag_items);
- }
- break;
- }
- case 'OR':
- {
- $items = array_unique(
- array_merge(
- $items,
- $tag_items
- )
- );
- break;
- }
- }
- }
-
- return $items;
-}
-
-/**
- * returns the LIKE sql clause corresponding to the quick search query $q
- * and the field $field. example q='john bill', field='file' will return
- * file LIKE '%john%' OR file LIKE '%bill%'. Special characters for MySql full
- * text search (+,<,>,~) are omitted. The query can contain a phrase:
- * 'Pierre "New York"' will return LIKE '%Pierre%' OR LIKE '%New York%'.
- * @param string q
- * @param string field
- * @return string
- */
-function get_qsearch_like_clause($q, $field)
-{
- $q = stripslashes($q);
- $tokens = array();
- $token_modifiers = array();
- $crt_token = "";
- $crt_token_modifier = "";
- $state = 0;
-
- for ($i=0; $i<strlen($q); $i++)
- {
- $ch = $q[$i];
- switch ($state)
- {
- case 0:
- if ($ch=='"')
- {
- if (strlen($crt_token))
- {
- $tokens[] = $crt_token;
- $token_modifiers[] = $crt_token_modifier;
- $crt_token = "";
- $crt_token_modifier = "";
- }
- $state=1;
- }
- elseif ( $ch=='*' )
- { // wild card
- $crt_token .= '%';
- }
- elseif ( strcspn($ch, '+-><~')==0 )
- { //special full text modifier
- if (strlen($crt_token))
- {
- $tokens[] = $crt_token;
- $token_modifiers[] = $crt_token_modifier;
- $crt_token = "";
- $crt_token_modifier = "";
- }
- $crt_token_modifier .= $ch;
- }
- elseif (preg_match('/[\s,.;!\?]+/', $ch))
- { // white space
- if (strlen($crt_token))
- {
- $tokens[] = $crt_token;
- $token_modifiers[] = $crt_token_modifier;
- $crt_token = "";
- $crt_token_modifier = "";
- }
- }
- else
- {
- $crt_token .= $ch;
- }
- break;
- case 1: // qualified with quotes
- switch ($ch)
- {
- case '"':
- $tokens[] = $crt_token;
- $token_modifiers[] = $crt_token_modifier;
- $crt_token = "";
- $crt_token_modifier = "";
- $state=0;
- break;
- default:
- $crt_token .= $ch;
- }
- break;
- }
- }
- if (strlen($crt_token))
- {
- $tokens[] = $crt_token;
- $token_modifiers[] = $crt_token_modifier;
- }
-
- $clauses = array();
- for ($i=0; $i<count($tokens); $i++)
- {
- $tokens[$i] = trim($tokens[$i], '%');
- if (strstr($token_modifiers[$i], '-')!==false)
- continue;
- if ( strlen($tokens[$i])==0)
- continue;
- $clauses[] = $field.' LIKE "%'.addslashes($tokens[$i]).'%"';
- }
-
- return count($clauses) ? '('.implode(' OR ', $clauses).')' : null;
-}
-
-
-/**
- * returns the search results corresponding to a quick/query search.
- * A quick/query search returns many items (search is not strict), but results
- * are sorted by relevance unless $page['super_order_by'] is set. Returns:
- * array (
- * 'items' => array(85,68,79...)
- * 'as_is' => 1 (indicates the caller that items are ordered and permissions checked
- * 'qs' => array(
- * 'matching_tags' => array of matching tags
- * 'matching_cats' => array of matching categories
- * 'matching_cats_no_images' =>array(99) - matching categories without images
- * ))
- *
- * @param string q
- * @param string images_where optional aditional restriction on images table
- * @return array
- */
-function get_quick_search_results($q, $images_where='')
-{
- global $page;
- $search_results =
- array(
- 'items' => array(),
- 'as_is' => 1,
- 'qs' => array('q'=>stripslashes($q)),
- );
- $q = trim($q);
- if (empty($q))
- {
- return $search_results;
- }
- $q_like_field = '@@__db_field__@@'; //something never in a search
- $q_like_clause = get_qsearch_like_clause($q, $q_like_field );
-
-
- // Step 1 - first we find matches in #images table ===========================
- $where_clauses='MATCH(i.name, i.comment) AGAINST( "'.$q.'" IN BOOLEAN MODE)';
- if (!empty($q_like_clause))
- {
- $where_clauses .= '
- OR '. str_replace($q_like_field, 'file', $q_like_clause);
- $where_clauses = '('.$where_clauses.')';
- }
- $where_clauses = array($where_clauses);
- if (!empty($images_where))
- {
- $where_clauses[]='('.$images_where.')';
- }
- $where_clauses[] .= get_sql_condition_FandF
- (
- array( 'visible_images' => 'i.id' ), null, true
- );
- $query = '
-SELECT i.id,
- MATCH(i.name, i.comment) AGAINST( "'.$q.'" IN BOOLEAN MODE) AS weight
- FROM '.IMAGES_TABLE.' i
- WHERE '.implode("\n AND ", $where_clauses);
-
- $by_weights=array();
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- { // weight is important when sorting images by relevance
- if ($row['weight'])
- {
- $by_weights[(int)$row['id']] = 2*$row['weight'];
- }
- else
- {//full text does not match but file name match
- $by_weights[(int)$row['id']] = 2;
- }
- }
-
-
- // Step 2 - search tags corresponding to the query $q ========================
- if (!empty($q_like_clause))
- { // search name and url name (without accents)
- $query = '
-SELECT id, name, url_name
- FROM '.TAGS_TABLE.'
- WHERE ('.str_replace($q_like_field, 'CONVERT(name, CHAR)', $q_like_clause).'
- OR '.str_replace($q_like_field, 'url_name', $q_like_clause).')';
- $tags = hash_from_query($query, 'id');
- if ( !empty($tags) )
- { // we got some tags; get the images
- $search_results['qs']['matching_tags']=$tags;
- $query = '
-SELECT image_id, COUNT(tag_id) AS weight
- FROM '.IMAGE_TAG_TABLE.'
- WHERE tag_id IN ('.implode(',',array_keys($tags)).')
- GROUP BY image_id';
- $result = pwg_query($query);
- while ($row = mysql_fetch_assoc($result))
- { // weight is important when sorting images by relevance
- $image_id=(int)$row['image_id'];
- @$by_weights[$image_id] += $row['weight'];
- }
- }
- }
-
-
- // Step 3 - search categories corresponding to the query $q ==================
- global $user;
- $query = '
-SELECT id, name, permalink, nb_images
- FROM '.CATEGORIES_TABLE.'
- INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' ON id=cat_id
- WHERE user_id='.$user['id'].'
- AND MATCH(name, comment) AGAINST( "'.$q.'" IN BOOLEAN MODE)'.
- get_sql_condition_FandF (
- array( 'visible_categories' => 'cat_id' ), "\n AND"
- );
- $result = pwg_query($query);
- while ($row = mysql_fetch_assoc($result))
- { // weight is important when sorting images by relevance
- if ($row['nb_images']==0)
- {
- $search_results['qs']['matching_cats_no_images'][] = $row;
- }
- else
- {
- $search_results['qs']['matching_cats'][$row['id']] = $row;
- }
- }
-
- if ( empty($by_weights) and empty($search_results['qs']['matching_cats']) )
- {
- return $search_results;
- }
-
- // Step 4 - now we have $by_weights ( array image id => weight ) that need
- // permission checks and/or matching categories to get images from
- $where_clauses = array();
- if ( !empty($by_weights) )
- {
- $where_clauses[]='i.id IN ('
- . implode(',', array_keys($by_weights)) . ')';
- }
- if ( !empty($search_results['qs']['matching_cats']) )
- {
- $where_clauses[]='category_id IN ('.
- implode(',',array_keys($search_results['qs']['matching_cats'])).')';
- }
- $where_clauses = array( '('.implode("\n OR ",$where_clauses).')' );
- if (!empty($images_where))
- {
- $where_clauses[]='('.$images_where.')';
- }
- $where_clauses[] = get_sql_condition_FandF(
- array
- (
- 'forbidden_categories' => 'category_id',
- 'visible_categories' => 'category_id',
- 'visible_images' => 'i.id'
- ),
- null,true
- );
-
- global $conf;
- $query = '
-SELECT DISTINCT(id)
- FROM '.IMAGES_TABLE.' i
- INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
- WHERE '.implode("\n AND ", $where_clauses)."\n".
- $conf['order_by'];
-
- $allowed_images = array_from_query( $query, 'id');
-
- if ( isset($page['super_order_by']) or empty($by_weights) )
- {
- $search_results['items'] = $allowed_images;
- return $search_results;
- }
-
- $allowed_images = array_flip( $allowed_images );
- $divisor = 5.0 * count($allowed_images);
- foreach ($allowed_images as $id=>$rank )
- {
- $weight = isset($by_weights[$id]) ? $by_weights[$id] : 1;
- $weight -= $rank/$divisor;
- $allowed_images[$id] = $weight;
- }
- arsort($allowed_images, SORT_NUMERIC);
- $search_results['items'] = array_keys($allowed_images);
- return $search_results;
-}
-
-/**
- * returns an array of 'items' corresponding to the search id
- *
- * @param int search id
- * @param string images_where optional aditional restriction on images table
- * @return array
- */
-function get_search_results($search_id, $images_where='')
-{
- $search = get_search_array($search_id);
- if ( !isset($search['q']) )
- {
- $result['items'] = get_regular_search_results($search);
- return $result;
- }
- else
- {
- return get_quick_search_results($search['q'], $images_where);
- }
-}
-?> \ No newline at end of file
diff --git a/BSF/include/functions_session.inc.php b/BSF/include/functions_session.inc.php
deleted file mode 100644
index f17f2377a..000000000
--- a/BSF/include/functions_session.inc.php
+++ /dev/null
@@ -1,225 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// The function generate_key creates a string with pseudo random characters.
-// the size of the string depends on the $conf['session_id_size'].
-// Characters used are a-z A-Z and numerical values. Examples :
-// "Er4Tgh6", "Rrp08P", "54gj"
-// input : none (using global variable)
-// output : $key
-function generate_key($size)
-{
- global $conf;
-
- $md5 = md5(substr(microtime(), 2, 6));
- $init = '';
- for ( $i = 0; $i < strlen( $md5 ); $i++ )
- {
- if ( is_numeric( $md5[$i] ) ) $init.= $md5[$i];
- }
- $init = substr( $init, 0, 8 );
- mt_srand( $init );
- $key = '';
- for ( $i = 0; $i < $size; $i++ )
- {
- $c = mt_rand( 0, 2 );
- if ( $c == 0 ) $key .= chr( mt_rand( 65, 90 ) );
- else if ( $c == 1 ) $key .= chr( mt_rand( 97, 122 ) );
- else $key .= mt_rand( 0, 9 );
- }
- return $key;
-}
-
-if (isset($conf['session_save_handler'])
- and ($conf['session_save_handler'] == 'db')
- and defined('PHPWG_INSTALLED'))
-{
- session_set_save_handler('pwg_session_open',
- 'pwg_session_close',
- 'pwg_session_read',
- 'pwg_session_write',
- 'pwg_session_destroy',
- 'pwg_session_gc'
- );
- if ( function_exists('ini_set') )
- {
- ini_set('session.use_cookies', $conf['session_use_cookies']);
- ini_set('session.use_only_cookies', $conf['session_use_only_cookies']);
- ini_set('session.use_trans_sid', intval($conf['session_use_trans_sid']));
- }
- session_name($conf['session_name']);
- session_set_cookie_params(0, cookie_path());
-}
-
-/**
- * returns true; used when the session_start() function is called
- *
- * @params not use but useful for php engine
- */
-function pwg_session_open($path, $name)
-{
- return true;
-}
-
-/**
- * returns true; used when the session is closed (unset($_SESSION))
- *
- */
-function pwg_session_close()
-{
- return true;
-}
-
-/**
- * this function returns
- * a string corresponding to the value of the variable save in the session
- * or an empty string when the variable doesn't exist
- *
- * @param string session id
- */
-function pwg_session_read($session_id)
-{
- $query = '
-SELECT data
- FROM '.SESSIONS_TABLE.'
- WHERE id = \''.$session_id.'\'
-;';
- $result = pwg_query($query);
- if ($result)
- {
- $row = mysql_fetch_assoc($result);
- return $row['data'];
- }
- else
- {
- return '';
- }
-}
-
-/**
- * returns true; writes set a variable in the active session
- *
- * @param string session id
- * @data string value of date to be saved
- */
-function pwg_session_write($session_id, $data)
-{
- $query = '
-UPDATE '.SESSIONS_TABLE.'
- SET expiration = now(),
- data = \''.$data.'\'
- WHERE id = \''.$session_id.'\'
-;';
- pwg_query($query);
- if ( mysql_affected_rows()>0 )
- {
- return true;
- }
- $query = '
-INSERT INTO '.SESSIONS_TABLE.'
- (id,data,expiration)
- VALUES(\''.$session_id.'\',\''.$data.'\',now())
-;';
- mysql_query($query);
- return true;
-}
-
-/**
- * returns true; delete the active session
- *
- * @param string session id
- */
-function pwg_session_destroy($session_id)
-{
- $query = '
-DELETE
- FROM '.SESSIONS_TABLE.'
- WHERE id = \''.$session_id.'\'
-;';
- pwg_query($query);
- return true;
-}
-
-/**
- * returns true; delete expired sessions
- * called each time a session is closed.
- */
-function pwg_session_gc()
-{
- global $conf;
-
- $query = '
-DELETE
- FROM '.SESSIONS_TABLE.'
- WHERE UNIX_TIMESTAMP(NOW()) - UNIX_TIMESTAMP(expiration) > '
- .$conf['session_length'].'
-;';
- pwg_query($query);
- return true;
-}
-
-
-/**
- * persistently stores a variable for the current session
- * currently we use standard php sessions but it might change
- * @return boolean true on success
- * @see pwg_get_session_var, pwg_unset_session_var
- */
-function pwg_set_session_var($var, $value)
-{
- if ( !isset($_SESSION) )
- return false;
- $_SESSION['pwg_'.$var] = $value;
- return true;
-}
-
-/**
- * retrieves the value of a persistent variable for the current session
- * currently we use standard php sessions but it might change
- * @return mixed
- * @see pwg_set_session_var, pwg_unset_session_var
- */
-function pwg_get_session_var($var, $default = null)
-{
- if (isset( $_SESSION['pwg_'.$var] ) )
- {
- return $_SESSION['pwg_'.$var];
- }
- return $default;
-}
-
-/**
- * deletes a persistent variable for the current session
- * currently we use standard php sessions but it might change
- * @return boolean true on success
- * @see pwg_set_session_var, pwg_get_session_var
- */
-function pwg_unset_session_var($var)
-{
- if ( !isset($_SESSION) )
- return false;
- unset( $_SESSION['pwg_'.$var] );
- return true;
-}
-
-?>
diff --git a/BSF/include/functions_tag.inc.php b/BSF/include/functions_tag.inc.php
deleted file mode 100644
index 7bd5d8408..000000000
--- a/BSF/include/functions_tag.inc.php
+++ /dev/null
@@ -1,323 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-
-/**
- * Tags available. Each return tag is represented as an array with its id,
- * its name, its weight (count), its url name. Tags are not sorted.
- *
- * The returned list can be a subset of all existing tags due to
- * permissions, only if a list of forbidden categories is provided
- *
- * @param array forbidden categories
- * @return array
- */
-function get_available_tags()
-{
- // we can find top fatter tags among reachable images
- $query = '
-SELECT tag_id, COUNT(DISTINCT(it.image_id)) counter
- FROM '.IMAGE_CATEGORY_TABLE.' ic
- INNER JOIN '.IMAGE_TAG_TABLE.' it ON ic.image_id=it.image_id'.get_sql_condition_FandF
- (
- array
- (
- 'forbidden_categories' => 'category_id',
- 'visible_categories' => 'category_id',
- 'visible_images' => 'ic.image_id'
- ),
- '
- WHERE'
- ).'
- GROUP BY tag_id
- ORDER BY NULL';
- $tag_counters = simple_hash_from_query($query, 'tag_id', 'counter');
-
- if ( empty($tag_counters) )
- {
- return array();
- }
-
- $query = '
-SELECT id, name, url_name
- FROM '.TAGS_TABLE;
- $result = pwg_query($query);
- $tags = array();
- while ($row = mysql_fetch_assoc($result))
- {
- $counter = @$tag_counters[ $row['id'] ];
- if ( $counter )
- {
- $row['counter'] = $counter;
- array_push($tags, $row);
- }
- }
- return $tags;
-}
-
-/**
- * All tags, even tags associated to no image.
- *
- * @return array
- */
-function get_all_tags()
-{
- $query = '
-SELECT id,
- name,
- url_name
- FROM '.TAGS_TABLE.'
-;';
- $result = pwg_query($query);
- $tags = array();
- while ($row = mysql_fetch_assoc($result))
- {
- array_push($tags, $row);
- }
-
- usort($tags, 'name_compare');
-
- return $tags;
-}
-
-/**
- * Giving a set of tags with a counter for each one, calculate the display
- * level of each tag.
- *
- * The level of each tag depends on the average count of tags. This
- * calcylation method avoid having very different levels for tags having
- * nearly the same count when set are small.
- *
- * @param array tags
- * @return array
- */
-function add_level_to_tags($tags)
-{
- global $conf;
-
- if (count($tags) == 0)
- {
- return $tags;
- }
-
- $total_count = 0;
-
- foreach ($tags as $tag)
- {
- $total_count+= $tag['counter'];
- }
-
- // average count of available tags will determine the level of each tag
- $tag_average_count = $total_count / count($tags);
-
- // tag levels threshold calculation: a tag with an average rate must have
- // the middle level.
- for ($i = 1; $i < $conf['tags_levels']; $i++)
- {
- $threshold_of_level[$i] =
- 2 * $i * $tag_average_count / $conf['tags_levels'];
- }
-
- // display sorted tags
- foreach (array_keys($tags) as $k)
- {
- $tags[$k]['level'] = 1;
-
- // based on threshold, determine current tag level
- for ($i = $conf['tags_levels'] - 1; $i >= 1; $i--)
- {
- if ($tags[$k]['counter'] > $threshold_of_level[$i])
- {
- $tags[$k]['level'] = $i + 1;
- break;
- }
- }
- }
-
- return $tags;
-}
-
-/**
- * return the list of image ids corresponding to given tags. AND & OR mode
- * supported.
- *
- * @param array tag ids
- * @param string mode
- * @return array
- */
-function get_image_ids_for_tags($tag_ids, $mode = 'AND')
-{
- switch ($mode)
- {
- case 'AND':
- {
- // strategy is to list images associated to each tag
- $tag_images = array();
-
- foreach ($tag_ids as $tag_id)
- {
- $query = '
-SELECT image_id
- FROM '.IMAGE_TAG_TABLE.'
- WHERE tag_id = '.$tag_id.'
-;';
- $tag_images[$tag_id] = array_from_query($query, 'image_id');
- }
-
- // then we calculate the intersection, the images that are associated to
- // every tags
- $items = array_shift($tag_images);
- foreach ($tag_images as $images)
- {
- $items = array_intersect($items, $images);
- }
-
- return array_unique($items);
- break;
- }
- case 'OR':
- {
- $query = '
-SELECT DISTINCT image_id
- FROM '.IMAGE_TAG_TABLE.'
- WHERE tag_id IN ('.implode(',', $tag_ids).')
-;';
- return array_from_query($query, 'image_id');
- break;
- }
- default:
- {
- die('get_image_ids_for_tags: unknown mode, only AND & OR are supported');
- }
- }
-}
-
-/**
- * return a list of tags corresponding to given items.
- *
- * @param array items
- * @param array max_tags
- * @param array excluded_tag_ids
- * @return array
- */
-function get_common_tags($items, $max_tags, $excluded_tag_ids=null)
-{
- if (empty($items))
- {
- return array();
- }
- $query = '
-SELECT id, name, url_name, count(*) counter
- FROM '.IMAGE_TAG_TABLE.'
- INNER JOIN '.TAGS_TABLE.' ON tag_id = id
- WHERE image_id IN ('.implode(',', $items).')';
- if (!empty($excluded_tag_ids))
- {
- $query.='
- AND tag_id NOT IN ('.implode(',', $excluded_tag_ids).')';
- }
- $query .='
- GROUP BY tag_id';
- if ($max_tags>0)
- {
- $query .= '
- ORDER BY counter DESC
- LIMIT 0,'.$max_tags;
- }
- else
- {
- $query .= '
- ORDER BY NULL';
- }
-
- $result = pwg_query($query);
- $tags = array();
- while($row = mysql_fetch_assoc($result))
- {
- array_push($tags, $row);
- }
- usort($tags, 'name_compare');
- return $tags;
-}
-
-/**
- * return a list of tags corresponding to any of ids, url_names, names
- *
- * @param array ids
- * @param array url_names
- * @param array names
- * @return array
- */
-function find_tags($ids, $url_names=array(), $names=array() )
-{
- $where_clauses = array();
- if ( !empty($ids) )
- {
- $where_clauses[] = 'id IN ('.implode(',', $ids).')';
- }
- if ( !empty($url_names) )
- {
- $where_clauses[] =
- 'url_name IN ('.
- implode(
- ',',
- array_map(
- create_function('$s', 'return "\'".$s."\'";'),
- $url_names
- )
- )
- .')';
- }
- if ( !empty($names) )
- {
- $where_clauses[] =
- 'name IN ('.
- implode(
- ',',
- array_map(
- create_function('$s', 'return "\'".$s."\'";'),
- $names
- )
- )
- .')';
- }
- if (empty($where_clauses))
- {
- return array();
- }
-
- $query = '
-SELECT id, url_name, name
- FROM '.TAGS_TABLE.'
- WHERE '. implode( '
- OR ', $where_clauses);
-
- $result = pwg_query($query);
- $tags = array();
- while ($row = mysql_fetch_assoc($result))
- {
- array_push($tags, $row);
- }
- return $tags;
-}
-?> \ No newline at end of file
diff --git a/BSF/include/functions_url.inc.php b/BSF/include/functions_url.inc.php
deleted file mode 100644
index fa7114dea..000000000
--- a/BSF/include/functions_url.inc.php
+++ /dev/null
@@ -1,740 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-
-/**
- * returns a prefix for each url link on displayed page
- * and return an empty string for current path
- * @return string
- */
-function get_root_url()
-{
- global $page;
- if ( isset($page['root_path']) )
- {
- $root_url = $page['root_path'];
- }
- else
- {// TODO - add HERE the possibility to call PWG functions from external scripts
- $root_url = PHPWG_ROOT_PATH;
- }
- if ( dirname($root_url)!='.' )
- {
- return $root_url;
- }
- else
- {
- return (string)substr($root_url, 2);
- }
-}
-
-/**
- * returns the absolute url to the root of PWG
- * @param boolean with_scheme if false - does not add http://toto.com
- */
-function get_absolute_root_url($with_scheme=true)
-{
- // TODO - add HERE the possibility to call PWG functions from external scripts
- $url = '';
- if ($with_scheme)
- {
- if (empty($_SERVER['HTTPS']))
- {
- $url .= 'http://';
- }
- else
- {
- $url .= 'https://';
- }
- $url .= $_SERVER['HTTP_HOST'];
- if ($_SERVER['SERVER_PORT'] != 80)
- {
- $url_port = ':'.$_SERVER['SERVER_PORT'];
- if (strrchr($url, ':') != $url_port)
- {
- $url .= $url_port;
- }
- }
- }
- $url .= cookie_path();
- return $url;
-}
-
-/**
- * adds one or more _GET style parameters to an url
- * example: add_url_params('/x', array('a'=>'b')) returns /x?a=b
- * add_url_params('/x?cat_id=10', array('a'=>'b')) returns /x?cat_id=10&amp;a=b
- * @param string url
- * @param array params
- * @return string
- */
-function add_url_params($url, $params)
-{
- if ( !empty($params) )
- {
- assert( is_array($params) );
- $is_first = true;
- foreach($params as $param=>$val)
- {
- if ($is_first)
- {
- $is_first = false;
- $url .= ( strstr($url, '?')===false ) ? '?' :'&amp;';
- }
- else
- {
- $url .= '&amp;';
- }
- $url .= $param;
- if (isset($val))
- {
- $url .= '='.$val;
- }
- }
- }
- return $url;
-}
-
-/**
- * build an index URL for a specific section
- *
- * @param array
- * @return string
- */
-function make_index_url($params = array())
-{
- global $conf;
- $url = get_root_url().'index';
- if ($conf['php_extension_in_urls'])
- {
- $url .= '.php';
- }
- if ($conf['question_mark_in_urls'])
- {
- $url .= '?';
- }
- $url.= make_section_in_url($params);
- $url = add_well_known_params_in_url($url, $params);
- return $url;
-}
-
-/**
- * build an index URL with current page parameters, but with redefinitions
- * and removes.
- *
- * duplicate_index_url( array(
- * 'category' => array('id'=>12, 'name'=>'toto'),
- * array('start')
- * ) will create an index URL on the current section (categories), but on
- * a redefined category and without the start URL parameter.
- *
- * @param array redefined keys
- * @param array removed keys
- * @return string
- */
-function duplicate_index_url($redefined = array(), $removed = array())
-{
- return make_index_url(
- params_for_duplication($redefined, $removed)
- );
-}
-
-/**
- * returns $page global array with key redefined and key removed
- *
- * @param array redefined keys
- * @param array removed keys
- * @return array
- */
-function params_for_duplication($redefined, $removed)
-{
- global $page;
-
- if (count($removed) > 0)
- {
- $params = array();
-
- foreach ($page as $page_item_key => $page_item_value)
- {
- if (!in_array($page_item_key, $removed))
- {
- $params[$page_item_key] = $page_item_value;
- }
- }
- }
- else
- {
- $params = $page;
- }
-
- foreach ($redefined as $redefined_param => $redefined_value)
- {
- $params[$redefined_param] = $redefined_value;
- }
-
- return $params;
-}
-
-/**
- * create a picture URL with current page parameters, but with redefinitions
- * and removes. See duplicate_index_url.
- *
- * @param array redefined keys
- * @param array removed keys
- * @return string
- */
-function duplicate_picture_url($redefined = array(), $removed = array())
-{
- return make_picture_url(
- params_for_duplication($redefined, $removed)
- );
-}
-
-/**
- * create a picture URL on a specific section for a specific picture
- *
- * @param array
- * @return string
- */
-function make_picture_url($params)
-{
- global $conf;
- if (!isset($params['image_id']))
- {
- die('make_picture_url: image_id is a required parameter');
- }
-
- $url = get_root_url().'picture';
- if ($conf['php_extension_in_urls'])
- {
- $url .= '.php';
- }
- if ($conf['question_mark_in_urls'])
- {
- $url .= '?';
- }
- $url.= '/';
- switch ( $conf['picture_url_style'] )
- {
- case 'id-file':
- $url .= $params['image_id'];
- if ( isset($params['image_file']) )
- {
- $url .= '-'.get_filename_wo_extension($params['image_file']);
- }
- break;
- case 'file':
- if ( isset($params['image_file']) )
- {
- $fname_wo_ext = get_filename_wo_extension($params['image_file']);
- if (! preg_match('/^\d+(-|$)/', $fname_wo_ext) )
- {
- $url .= $fname_wo_ext;
- break;
- }
- }
- default:
- $url .= $params['image_id'];
- }
- if ( !isset($params['category'] ) )
- {// make urls shorter ...
- unset( $params['flat'] );
- }
- $url .= make_section_in_url($params);
- $url = add_well_known_params_in_url($url, $params);
- return $url;
-}
-
-/**
- *adds to the url the chronology and start parameters
-*/
-function add_well_known_params_in_url($url, $params)
-{
- if ( isset($params['chronology_field']) )
- {
- $url .= '/'. $params['chronology_field'];
- $url .= '-'. $params['chronology_style'];
- if ( isset($params['chronology_view']) )
- {
- $url .= '-'. $params['chronology_view'];
- }
- if ( !empty($params['chronology_date']) )
- {
- $url .= '-'. implode('-', $params['chronology_date'] );
- }
- }
-
- if (isset($params['flat']))
- {
- $url.= '/flat';
- }
-
- if (isset($params['start']) and $params['start'] > 0)
- {
- $url.= '/start-'.$params['start'];
- }
- return $url;
-}
-
-/**
- * return the section token of an index or picture URL.
- *
- * Depending on section, other parameters are required (see function code
- * for details)
- *
- * @param array
- * @return string
- */
-function make_section_in_url($params)
-{
- global $conf;
- $section_string = '';
-
- $section_of = array(
- 'category' => 'categories',
- 'tags' => 'tags',
- 'list' => 'list',
- 'search' => 'search',
- );
-
- foreach ($section_of as $param => $section)
- {
- if (isset($params[$param]))
- {
- $params['section'] = $section;
- }
- }
-
- if (!isset($params['section']))
- {
- $params['section'] = 'none';
- }
-
- switch($params['section'])
- {
- case 'categories' :
- {
- if (!isset($params['category']))
- {
- $section_string.= '/categories';
- }
- else
- {
- is_array($params['category']) or trigger_error(
- 'make_section_in_url wrong type for category', E_USER_WARNING
- );
- is_numeric($params['category']['id']) or trigger_error(
- 'make_section_in_url category id not numeric', E_USER_WARNING
- );
- isset($params['category']['name']) or trigger_error(
- 'make_section_in_url category name not set', E_USER_WARNING
- );
-
- array_key_exists('permalink', $params['category']) or trigger_error(
- 'make_section_in_url category permalink not set', E_USER_WARNING
- );
-
- $section_string.= '/category/';
- if ( empty($params['category']['permalink']) )
- {
- $section_string.= $params['category']['id'];
- if ( $conf['category_url_style']=='id-name' )
- {
- $section_string.= '-'.str2url($params['category']['name']);
- }
- }
- else
- {
- $section_string.= $params['category']['permalink'];
- }
- }
-
- break;
- }
- case 'tags' :
- {
- if (!isset($params['tags']) or count($params['tags']) == 0)
- {
- die('make_section_in_url: require at least one tag');
- }
-
- $section_string.= '/tags';
-
- foreach ($params['tags'] as $tag)
- {
- switch ( $conf['tag_url_style'] )
- {
- case 'id':
- $section_string.= '/'.$tag['id'];
- break;
- case 'tag':
- if (isset($tag['url_name']) and !is_numeric($tag['url_name']) )
- {
- $section_string.= '/'.$tag['url_name'];
- break;
- }
- default:
- $section_string.= '/'.$tag['id'];
- if (isset($tag['url_name']))
- {
- $section_string.= '-'.$tag['url_name'];
- }
- }
- }
-
- break;
- }
- case 'search' :
- {
- if (!isset($params['search']))
- {
- die('make_section_in_url: require a search identifier');
- }
-
- $section_string.= '/search/'.$params['search'];
-
- break;
- }
- case 'list' :
- {
- if (!isset($params['list']))
- {
- die('make_section_in_url: require a list of items');
- }
-
- $section_string.= '/list/'.implode(',', $params['list']);
-
- break;
- }
- case 'none' :
- {
- break;
- }
- default :
- {
- $section_string.= '/'.$params['section'];
- }
- }
-
- return $section_string;
-}
-
-/**
- * the reverse of make_section_in_url
- * returns the 'section' (categories/tags/...) and the data associated with it
- *
- * Depending on section, other parameters are returned (category/tags/list/...)
- *
- * @param array of url tokens to parse
- * @param int the index in the array of url tokens; in/out
- * @return array
- */
-function parse_section_url( $tokens, &$next_token)
-{
- $page=array();
- if (0 === strpos(@$tokens[$next_token], 'categor'))
- {
- $page['section'] = 'categories';
- $next_token++;
-
- if (isset($tokens[$next_token]) )
- {
- if (preg_match('/^(\d+)(?:-(.+))?$/', $tokens[$next_token], $matches))
- {
- if ( isset($matches[2]) )
- $page['hit_by']['cat_url_name'] = $matches[2];
- $page['category'] = $matches[1];
- $next_token++;
- }
- else
- {// try a permalink
- $maybe_permalinks = array();
- $current_token = $next_token;
- while ( isset($tokens[$current_token])
- and strpos($tokens[$current_token], 'created-')!==0
- and strpos($tokens[$current_token], 'posted-')!==0
- and strpos($tokens[$next_token], 'start-')!==0
- and $tokens[$current_token] != 'flat')
- {
- if (empty($maybe_permalinks))
- {
- array_push($maybe_permalinks, $tokens[$current_token]);
- }
- else
- {
- array_push($maybe_permalinks,
- $maybe_permalinks[count($maybe_permalinks)-1]
- . '/' . $tokens[$current_token]
- );
- }
- $current_token++;
- }
-
- if ( count($maybe_permalinks) )
- {
- $cat_id = get_cat_id_from_permalinks($maybe_permalinks, $perma_index);
- if ( isset($cat_id) )
- {
- $next_token += $perma_index+1;
- $page['category'] = $cat_id;
- $page['hit_by']['cat_permalink'] = $maybe_permalinks[$perma_index];
- }
- else
- {
- page_not_found('Permalink for album not found');
- }
- }
- }
- }
-
- if (isset($page['category']))
- {
- $result = get_cat_info($page['category']);
- if (empty($result))
- {
- page_not_found('Requested category does not exist' );
- }
- $page['category']=$result;
- }
- }
- else if (0 === strpos(@$tokens[$next_token], 'tag'))
- {
- $page['section'] = 'tags';
- $page['tags'] = array();
-
- $next_token++;
- $i = $next_token;
-
- $requested_tag_ids = array();
- $requested_tag_url_names = array();
-
- while (isset($tokens[$i]))
- {
- if ( preg_match('/^(created-|posted-|start-(\d)+)/', $tokens[$i]) )
- break;
-
- if ( preg_match('/^(\d+)(?:-(.*))?/', $tokens[$i], $matches) )
- {
- array_push($requested_tag_ids, $matches[1]);
- }
- else
- {
- array_push($requested_tag_url_names, $tokens[$i]);
- }
- $i++;
- }
- $next_token = $i;
-
- if ( empty($requested_tag_ids) && empty($requested_tag_url_names) )
- {
- bad_request('at least one tag required');
- }
-
- $page['tags'] = find_tags($requested_tag_ids, $requested_tag_url_names);
- if ( empty($page['tags']) )
- {
- page_not_found('Requested tag does not exist', get_root_url().'tags.php' );
- }
- }
- else if (0 === strpos(@$tokens[$next_token], 'fav'))
- {
- $page['section'] = 'favorites';
- $next_token++;
- }
- else if ('most_visited' == @$tokens[$next_token])
- {
- $page['section'] = 'most_visited';
- $next_token++;
- }
- else if ('best_rated' == @$tokens[$next_token])
- {
- $page['section'] = 'best_rated';
- $next_token++;
- }
- else if ('recent_pics' == @$tokens[$next_token])
- {
- $page['section'] = 'recent_pics';
- $next_token++;
- }
- else if ('recent_cats' == @$tokens[$next_token])
- {
- $page['section'] = 'recent_cats';
- $next_token++;
- }
- else if ('search' == @$tokens[$next_token])
- {
- $page['section'] = 'search';
- $next_token++;
-
- preg_match('/(\d+)/', @$tokens[$next_token], $matches);
- if (!isset($matches[1]))
- {
- bad_request('search identifier is missing');
- }
- $page['search'] = $matches[1];
- $next_token++;
- }
- else if ('list' == @$tokens[$next_token])
- {
- $page['section'] = 'list';
- $next_token++;
-
- $page['list'] = array();
-
- // No pictures
- if (empty($tokens[$next_token]))
- {
- // Add dummy element list
- array_push($page['list'], -1);
- }
- // With pictures list
- else
- {
- if (!preg_match('/^\d+(,\d+)*$/', $tokens[$next_token]))
- {
- bad_request('wrong format on list GET parameter');
- }
- foreach (explode(',', $tokens[$next_token]) as $image_id)
- {
- array_push($page['list'], $image_id);
- }
- }
- $next_token++;
- }
- return $page;
-}
-
-/**
- * the reverse of add_well_known_params_in_url
- * parses start, flat and chronology from url tokens
-*/
-function parse_well_known_params_url($tokens, &$i)
-{
- $page = array();
- while (isset($tokens[$i]))
- {
- if (preg_match('/^start-(\d+)/', $tokens[$i], $matches))
- {
- $page['start'] = $matches[1];
- }
-
- if ( 'flat' == $tokens[$i] )
- {
- // indicate a special list of images
- $page['flat'] = true;
- }
-
- if (preg_match('/^(posted|created)/', $tokens[$i] ))
- {
- $chronology_tokens = explode('-', $tokens[$i] );
-
- $page['chronology_field'] = $chronology_tokens[0];
-
- array_shift($chronology_tokens);
- $page['chronology_style'] = $chronology_tokens[0];
-
- array_shift($chronology_tokens);
- if ( count($chronology_tokens)>0 )
- {
- if ('list'==$chronology_tokens[0] or
- 'calendar'==$chronology_tokens[0])
- {
- $page['chronology_view'] = $chronology_tokens[0];
- array_shift($chronology_tokens);
- }
- $page['chronology_date'] = $chronology_tokens;
- }
- }
- $i++;
- }
- return $page;
-}
-
-/**
- * Indicate to build url with full path
- *
- * @param null
- * @return null
- */
-function set_make_full_url()
-{
- global $page;
-
- if (!isset($page['save_root_path']))
- {
- if (isset($page['root_path']))
- {
- $page['save_root_path']['path'] = $page['root_path'];
- }
- $page['save_root_path']['count'] = 1;
- $page['root_path'] = get_absolute_root_url();
- }
- else
- {
- $page['save_root_path']['count'] += 1;
- }
-}
-
-/**
- * Restore old parameter to build url with full path
- *
- * @param null
- * @return null
- */
-function unset_make_full_url()
-{
- global $page;
-
- if (isset($page['save_root_path']))
- {
- if ($page['save_root_path']['count'] == 1)
- {
- if (isset($page['save_root_path']['path']))
- {
- $page['root_path'] = $page['save_root_path']['path'];
- }
- else
- {
- unset($page['root_path']);
- }
- unset($page['save_root_path']);
- }
- else
- {
- $page['save_root_path']['count'] -= 1;
- }
- }
-}
-
-/**
- * Embellish the url argument
- *
- * @param $url
- * @return $url embellished
- */
-function embellish_url($url)
-{
- return str_replace('/./', '/', $url);
-}
-
-?> \ No newline at end of file
diff --git a/BSF/include/functions_user.inc.php b/BSF/include/functions_user.inc.php
deleted file mode 100644
index d2c9530e2..000000000
--- a/BSF/include/functions_user.inc.php
+++ /dev/null
@@ -1,1340 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// validate_mail_address:
-// o verifies whether the given mail address has the
-// right format. ie someone@domain.com "someone" can contain ".", "-" or
-// even "_". Exactly as "domain". The extension doesn't have to be
-// "com". The mail address can also be empty.
-// o check if address could be empty
-// o check if address is not used by a other user
-// If the mail address doesn't correspond, an error message is returned.
-//
-function validate_mail_address($user_id, $mail_address)
-{
- global $conf;
-
- if (empty($mail_address) and
- !($conf['obligatory_user_mail_address'] and
- in_array(script_basename(), array('register', 'profile'))))
- {
- return '';
- }
-
- $regex = '/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)*\.[a-z]+$/';
- if ( !preg_match( $regex, $mail_address ) )
- {
- return l10n('reg_err_mail_address');
- }
-
- if (defined("PHPWG_INSTALLED") and !empty($mail_address))
- {
- $query = '
-select count(*)
-from '.USERS_TABLE.'
-where upper('.$conf['user_fields']['email'].') = upper(\''.$mail_address.'\')
-'.(is_numeric($user_id) ? 'and '.$conf['user_fields']['id'].' != \''.$user_id.'\'' : '').'
-;';
- list($count) = mysql_fetch_array(pwg_query($query));
- if ($count != 0)
- {
- return l10n('reg_err_mail_address_dbl');
- }
- }
-}
-
-function register_user($login, $password, $mail_address,
- $with_notification = true, $errors = array())
-{
- global $conf;
-
- if ($login == '')
- {
- array_push($errors, l10n('reg_err_login1'));
- }
- if (ereg("^.* $", $login))
- {
- array_push($errors, l10n('reg_err_login2'));
- }
- if (ereg("^ .*$", $login))
- {
- array_push($errors, l10n('reg_err_login3'));
- }
- if (get_userid($login))
- {
- array_push($errors, l10n('reg_err_login5'));
- }
- $mail_error = validate_mail_address(null, $mail_address);
- if ('' != $mail_error)
- {
- array_push($errors, $mail_error);
- }
-
- $errors = trigger_event('register_user_check',
- $errors,
- array(
- 'username'=>$login,
- 'password'=>$password,
- 'email'=>$mail_address,
- )
- );
-
- // if no error until here, registration of the user
- if (count($errors) == 0)
- {
- // what will be the inserted id ?
- $query = '
-SELECT MAX('.$conf['user_fields']['id'].') + 1
- FROM '.USERS_TABLE.'
-;';
- list($next_id) = mysql_fetch_array(pwg_query($query));
-
- $insert =
- array(
- $conf['user_fields']['id'] => $next_id,
- $conf['user_fields']['username'] => mysql_escape_string($login),
- $conf['user_fields']['password'] => $conf['pass_convert']($password),
- $conf['user_fields']['email'] => $mail_address
- );
-
- include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
- mass_inserts(USERS_TABLE, array_keys($insert), array($insert));
-
- // Assign by default groups
- {
- $query = '
-SELECT id
- FROM '.GROUPS_TABLE.'
- WHERE is_default = \''.boolean_to_string(true).'\'
- ORDER BY id ASC
-;';
- $result = pwg_query($query);
-
- $inserts = array();
- while ($row = mysql_fetch_array($result))
- {
- array_push
- (
- $inserts,
- array
- (
- 'user_id' => $next_id,
- 'group_id' => $row['id']
- )
- );
- }
- }
-
- if (count($inserts) != 0)
- {
- include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
- mass_inserts(USER_GROUP_TABLE, array('user_id', 'group_id'), $inserts);
- }
-
- create_user_infos($next_id);
-
- if ($with_notification and $conf['email_admin_on_new_user'])
- {
- include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
- $admin_url = get_absolute_root_url()
- .'admin.php?page=user_list&username='.$login;
-
- $keyargs_content = array
- (
- get_l10n_args('User: %s', $login),
- get_l10n_args('Email: %s', $_POST['mail_address']),
- get_l10n_args('', ''),
- get_l10n_args('Admin: %s', $admin_url)
- );
-
- pwg_mail_notification_admins
- (
- get_l10n_args('Registration of %s', $login),
- $keyargs_content
- );
- }
-
- trigger_action('register_user',
- array(
- 'id'=>$next_id,
- 'username'=>$login,
- 'email'=>$mail_address,
- )
- );
- }
-
- return $errors;
-}
-
-function build_user( $user_id, $use_cache )
-{
- global $conf;
-
- $user['id'] = $user_id;
- $user = array_merge( $user, getuserdata($user_id, $use_cache) );
-
- if ($user['id'] == $conf['guest_id'] and $user['status'] <> 'guest')
- {
- $user['status'] = 'guest';
- $user['internal_status']['guest_must_be_guest'] = true;
- }
-
- // calculation of the number of picture to display per page
- $user['nb_image_page'] = $user['nb_image_line'] * $user['nb_line_page'];
-
- if (is_admin($user['status']))
- {
- list($user['admin_template'], $user['admin_theme']) =
- explode ('/', $conf['admin_layout']);
- }
-
- list($user['template'], $user['theme']) = explode('/', $user['template']);
-
- return $user;
-}
-
-/**
- * find informations related to the user identifier
- *
- * @param int user identifier
- * @param boolean use_cache
- * @param array
- */
-function getuserdata($user_id, $use_cache)
-{
- global $conf;
-
- $userdata = array();
-
- $query = '
-SELECT ';
- $is_first = true;
- foreach ($conf['user_fields'] as $pwgfield => $dbfield)
- {
- if ($is_first)
- {
- $is_first = false;
- }
- else
- {
- $query.= '
- , ';
- }
- $query.= $dbfield.' AS '.$pwgfield;
- }
- $query.= '
- FROM '.USERS_TABLE.'
- WHERE '.$conf['user_fields']['id'].' = \''.$user_id.'\'
-;';
-
- $row = mysql_fetch_array(pwg_query($query));
-
- while (true)
- {
- $query = '
-SELECT ui.*, uc.*
- FROM '.USER_INFOS_TABLE.' AS ui LEFT JOIN '.USER_CACHE_TABLE.' AS uc
- ON ui.user_id = uc.user_id
- WHERE ui.user_id = \''.$user_id.'\'
-;';
- $result = pwg_query($query);
- if (mysql_num_rows($result) > 0)
- {
- break;
- }
- else
- {
- create_user_infos($user_id);
- }
- }
-
- $row = array_merge($row, mysql_fetch_array($result));
-
- foreach ($row as $key => $value)
- {
- if (!is_numeric($key))
- {
- // If the field is true or false, the variable is transformed into a
- // boolean value.
- if ($value == 'true' or $value == 'false')
- {
- $userdata[$key] = get_boolean($value);
- }
- else
- {
- $userdata[$key] = $value;
- }
- }
- }
-
- if ($use_cache)
- {
- if (!isset($userdata['need_update'])
- or !is_bool($userdata['need_update'])
- or $userdata['need_update'] == true)
- {
- $userdata['forbidden_categories'] =
- calculate_permissions($userdata['id'], $userdata['status']);
-
- /* now we build the list of forbidden images (this list does not contain
- images that are not in at least an authorized category)*/
- $query = '
-SELECT DISTINCT(id)
- FROM '.IMAGES_TABLE.' INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON id=image_id
- WHERE category_id NOT IN ('.$userdata['forbidden_categories'].')
- AND level>'.$userdata['level'];
- $forbidden_ids = array_from_query($query, 'id');
-
- if ( empty($forbidden_ids) )
- {
- array_push( $forbidden_ids, 0 );
- }
- $userdata['image_access_type'] = 'NOT IN'; //TODO maybe later
- $userdata['image_access_list'] = implode(',',$forbidden_ids);
-
- update_user_cache_categories($userdata);
-
- // Set need update are done
- $userdata['need_update'] = false;
-
- // Indicate update done
- $userdata['need_update_done'] = true;
-
- $query = '
-SELECT COUNT(DISTINCT(image_id)) as total
- FROM '.IMAGE_CATEGORY_TABLE.'
- WHERE category_id NOT IN ('.$userdata['forbidden_categories'].')
- AND image_id '.$userdata['image_access_type'].' ('.$userdata['image_access_list'].')
-;';
- list($userdata['nb_total_images']) = mysql_fetch_array(pwg_query($query));
-
- // update user cache
- $query = '
-DELETE FROM '.USER_CACHE_TABLE.'
- WHERE user_id = '.$userdata['id'].'
-;';
- pwg_query($query);
-
- $query = '
-INSERT INTO '.USER_CACHE_TABLE.'
- (user_id, need_update, forbidden_categories, nb_total_images,
- image_access_type, image_access_list)
- VALUES
- ('.$userdata['id'].',\''.boolean_to_string($userdata['need_update']).'\',\''
- .$userdata['forbidden_categories'].'\','.$userdata['nb_total_images'].',"'
- .$userdata['image_access_type'].'","'.$userdata['image_access_list'].'")
-;';
- pwg_query($query);
- }
- else
- {
- // Indicate update not done
- $userdata['need_update_done'] = false;
- }
- }
-
- return $userdata;
-}
-
-/*
- * deletes favorites of the current user if he's not allowed to see them
- *
- * @return void
- */
-function check_user_favorites()
-{
- global $user;
-
- if ($user['forbidden_categories'] == '')
- {
- return;
- }
-
- // $filter['visible_categories'] and $filter['visible_images']
- // must be not used because filter <> restriction
- // retrieving images allowed : belonging to at least one authorized
- // category
- $query = '
-SELECT DISTINCT f.image_id
- FROM '.FAVORITES_TABLE.' AS f INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic
- ON f.image_id = ic.image_id
- WHERE f.user_id = '.$user['id'].'
-'.get_sql_condition_FandF
- (
- array
- (
- 'forbidden_categories' => 'ic.category_id',
- ),
- 'AND'
- ).'
-;';
- $result = pwg_query($query);
- $authorizeds = array();
- while ($row = mysql_fetch_array($result))
- {
- array_push($authorizeds, $row['image_id']);
- }
-
- $query = '
-SELECT image_id
- FROM '.FAVORITES_TABLE.'
- WHERE user_id = '.$user['id'].'
-;';
- $result = pwg_query($query);
- $favorites = array();
- while ($row = mysql_fetch_array($result))
- {
- array_push($favorites, $row['image_id']);
- }
-
- $to_deletes = array_diff($favorites, $authorizeds);
-
- if (count($to_deletes) > 0)
- {
- $query = '
-DELETE FROM '.FAVORITES_TABLE.'
- WHERE image_id IN ('.implode(',', $to_deletes).')
- AND user_id = '.$user['id'].'
-;';
- pwg_query($query);
- }
-}
-
-/**
- * calculates the list of forbidden categories for a given user
- *
- * Calculation is based on private categories minus categories authorized to
- * the groups the user belongs to minus the categories directly authorized
- * to the user. The list contains at least -1 to be compliant with queries
- * such as "WHERE category_id NOT IN ($forbidden_categories)"
- *
- * @param int user_id
- * @param string user_status
- * @return string forbidden_categories
- */
-function calculate_permissions($user_id, $user_status)
-{
- $private_array = array();
- $authorized_array = array();
-
- $query = '
-SELECT id
- FROM '.CATEGORIES_TABLE.'
- WHERE status = \'private\'
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- array_push($private_array, $row['id']);
- }
-
- // retrieve category ids directly authorized to the user
- $query = '
-SELECT cat_id
- FROM '.USER_ACCESS_TABLE.'
- WHERE user_id = '.$user_id.'
-;';
- $authorized_array = array_from_query($query, 'cat_id');
-
- // retrieve category ids authorized to the groups the user belongs to
- $query = '
-SELECT cat_id
- FROM '.USER_GROUP_TABLE.' AS ug INNER JOIN '.GROUP_ACCESS_TABLE.' AS ga
- ON ug.group_id = ga.group_id
- WHERE ug.user_id = '.$user_id.'
-;';
- $authorized_array =
- array_merge(
- $authorized_array,
- array_from_query($query, 'cat_id')
- );
-
- // uniquify ids : some private categories might be authorized for the
- // groups and for the user
- $authorized_array = array_unique($authorized_array);
-
- // only unauthorized private categories are forbidden
- $forbidden_array = array_diff($private_array, $authorized_array);
-
- // if user is not an admin, locked categories are forbidden
- if (!is_admin($user_status))
- {
- $query = '
-SELECT id
- FROM '.CATEGORIES_TABLE.'
- WHERE visible = \'false\'
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- array_push($forbidden_array, $row['id']);
- }
- $forbidden_array = array_unique($forbidden_array);
- }
-
- if ( empty($forbidden_array) )
- {// at least, the list contains 0 value. This category does not exists so
- // where clauses such as "WHERE category_id NOT IN(0)" will always be
- // true.
- array_push($forbidden_array, 0);
- }
-
- return implode(',', $forbidden_array);
-}
-
-/**
- * compute data of categories branches (one branch only)
- */
-function compute_branch_cat_data(&$cats, &$list_cat_id, &$level, &$ref_level)
-{
- $date = '';
- $count_images = 0;
- $count_categories = 0;
- do
- {
- $cat_id = array_pop($list_cat_id);
- if (!is_null($cat_id))
- {
- // Count images and categories
- $cats[$cat_id]['count_images'] += $count_images;
- $cats[$cat_id]['count_categories'] += $count_categories;
- $count_images = $cats[$cat_id]['count_images'];
- $count_categories = $cats[$cat_id]['count_categories'] + 1;
-
- if ((empty($cats[$cat_id]['max_date_last'])) or ($cats[$cat_id]['max_date_last'] < $date))
- {
- $cats[$cat_id]['max_date_last'] = $date;
- }
- else
- {
- $date = $cats[$cat_id]['max_date_last'];
- }
- $ref_level = substr_count($cats[$cat_id]['global_rank'], '.') + 1;
- }
- else
- {
- $ref_level = 0;
- }
- } while ($level <= $ref_level);
-
- // Last cat updating must be added to list for next branch
- if ($ref_level <> 0)
- {
- array_push($list_cat_id, $cat_id);
- }
-}
-
-/**
- * compute data of categories branches
- */
-function compute_categories_data(&$cats)
-{
- $ref_level = 0;
- $level = 0;
- $list_cat_id = array();
-
- foreach ($cats as $id => $category)
- {
- // Compute
- $level = substr_count($category['global_rank'], '.') + 1;
- if ($level > $ref_level)
- {
- array_push($list_cat_id, $id);
- }
- else
- {
- compute_branch_cat_data($cats, $list_cat_id, $level, $ref_level);
- array_push($list_cat_id, $id);
- }
- $ref_level = $level;
- }
-
- $level = 1;
- compute_branch_cat_data($cats, $list_cat_id, $level, $ref_level);
-}
-
-/**
- * get computed array of categories
- *
- * @param array userdata
- * @param int filter_days number of recent days to filter on or null
- * @return array
- */
-function get_computed_categories($userdata, $filter_days=null)
-{
- $query = 'SELECT c.id cat_id, global_rank';
- // Count by date_available to avoid count null
- $query .= ',
- MAX(date_available) date_last, COUNT(date_available) nb_images
-FROM '.CATEGORIES_TABLE.' as c
- LEFT JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON ic.category_id = c.id
- LEFT JOIN '.IMAGES_TABLE.' AS i
- ON ic.image_id = i.id
- AND i.level<='.$userdata['level'];
-
- if ( isset($filter_days) )
- {
- $query .= ' AND i.date_available > SUBDATE(CURRENT_DATE,INTERVAL '.$filter_days.' DAY)';
- }
-
- if ( !empty($userdata['forbidden_categories']) )
- {
- $query.= '
- WHERE c.id NOT IN ('.$userdata['forbidden_categories'].')';
- }
-
- $query.= '
- GROUP BY c.id';
-
- $result = pwg_query($query);
-
- $cats = array();
- while ($row = mysql_fetch_assoc($result))
- {
- $row['user_id'] = $userdata['id'];
- $row['count_categories'] = 0;
- $row['count_images'] = (int)$row['nb_images'];
- $row['max_date_last'] = $row['date_last'];
-
- $cats += array($row['cat_id'] => $row);
- }
- usort($cats, 'global_rank_compare');
-
- compute_categories_data($cats);
-
- if ( isset($filter_days) )
- {
- $cat_tmp = $cats;
- $cats = array();
-
- foreach ($cat_tmp as $category)
- {
- if (!empty($category['max_date_last']))
- {
- // Re-init counters
- $category['count_categories'] = 0;
- $category['count_images'] = (int)$category['nb_images'];
- // Keep category
- $cats[$category['cat_id']] = $category;
- }
- }
- // Compute a second time
- compute_categories_data($cats);
- }
- return $cats;
-}
-
-/**
- * update data of user_cache_categories
- *
- * @param array userdata
- * @return null
- */
-function update_user_cache_categories($userdata)
-{
- // delete user cache
- $query = '
-DELETE FROM '.USER_CACHE_CATEGORIES_TABLE.'
- WHERE user_id = '.$userdata['id'].'
-;';
- pwg_query($query);
-
- $cats = get_computed_categories($userdata, null);
-
- include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
- mass_inserts
- (
- USER_CACHE_CATEGORIES_TABLE,
- array
- (
- 'user_id', 'cat_id',
- 'date_last', 'max_date_last', 'nb_images', 'count_images', 'count_categories'
- ),
- $cats
- );
-}
-
-/**
- * returns the username corresponding to the given user identifier if exists
- *
- * @param int user_id
- * @return mixed
- */
-function get_username($user_id)
-{
- global $conf;
-
- $query = '
-SELECT '.$conf['user_fields']['username'].'
- FROM '.USERS_TABLE.'
- WHERE '.$conf['user_fields']['id'].' = '.intval($user_id).'
-;';
- $result = pwg_query($query);
- if (mysql_num_rows($result) > 0)
- {
- list($username) = mysql_fetch_row($result);
- }
- else
- {
- return false;
- }
-
- return $username;
-}
-
-/**
- * returns user identifier thanks to his name, false if not found
- *
- * @param string username
- * @param int user identifier
- */
-function get_userid($username)
-{
- global $conf;
-
- $username = mysql_escape_string($username);
-
- $query = '
-SELECT '.$conf['user_fields']['id'].'
- FROM '.USERS_TABLE.'
- WHERE '.$conf['user_fields']['username'].' = \''.$username.'\'
-;';
- $result = pwg_query($query);
-
- if (mysql_num_rows($result) == 0)
- {
- return false;
- }
- else
- {
- list($user_id) = mysql_fetch_row($result);
- return $user_id;
- }
-}
-
-/**
- * search an available feed_id
- *
- * @return string feed identifier
- */
-function find_available_feed_id()
-{
- while (true)
- {
- $key = generate_key(50);
- $query = '
-SELECT COUNT(*)
- FROM '.USER_FEED_TABLE.'
- WHERE id = \''.$key.'\'
-;';
- list($count) = mysql_fetch_row(pwg_query($query));
- if (0 == $count)
- {
- return $key;
- }
- }
-}
-
-/*
- * Returns a array with default user value
- *
- * @param convert_str allows to convert string value if necessary
- */
-function get_default_user_info($convert_str = true)
-{
- global $page, $conf;
-
- if (!isset($page['cache_default_user']))
- {
- $query = 'select * from '.USER_INFOS_TABLE.
- ' where user_id = '.$conf['default_user_id'].';';
-
- $result = pwg_query($query);
- $page['cache_default_user'] = mysql_fetch_assoc($result);
-
- if ($page['cache_default_user'] !== false)
- {
- unset($page['cache_default_user']['user_id']);
- unset($page['cache_default_user']['status']);
- unset($page['cache_default_user']['registration_date']);
- }
- }
-
- if (is_array($page['cache_default_user']) and $convert_str)
- {
- $default_user = array();
- foreach ($page['cache_default_user'] as $name => $value)
- {
- // If the field is true or false, the variable is transformed into a
- // boolean value.
- if ($value == 'true' or $value == 'false')
- {
- $default_user[$name] = get_boolean($value);
- }
- else
- {
- $default_user[$name] = $value;
- }
- }
- return $default_user;
- }
- else
- {
- return $page['cache_default_user'];
- }
-}
-
-/*
- * Returns a default user value
- *
- * @param value_name: name of value
- * @param sos_value: value used if don't exist value
- */
-function get_default_user_value($value_name, $sos_value)
-{
- $default_user = get_default_user_info(true);
- if ($default_user === false or !isset($default_user[$value_name]))
- {
- return $sos_value;
- }
- else
- {
- return $default_user[$value_name];
- }
-}
-
-/*
- * Returns the default template value
- *
- */
-function get_default_template()
-{
- return get_default_user_value('template', PHPWG_DEFAULT_TEMPLATE);
-}
-
-/*
- * Returns the default language value
- *
- */
-function get_default_language()
-{
- return get_default_user_value('language', PHPWG_DEFAULT_LANGUAGE);
-}
-
-/**
- * add user informations based on default values
- *
- * @param int user_id / array of user_if
- * @param array of values used to override default user values
- */
-function create_user_infos($arg_id, $override_values = null)
-{
- global $conf;
-
- if (is_array($arg_id))
- {
- $user_ids = $arg_id;
- }
- else
- {
- $user_ids = array();
- if (is_numeric($arg_id))
- {
- $user_ids[] = $arg_id;
- }
- }
-
- if (!empty($user_ids))
- {
- $inserts = array();
- list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
-
- $default_user = get_default_user_info(false);
- if ($default_user === false)
- {
- // Default on structure are used
- $default_user = array();
- }
-
- if (!is_null($override_values))
- {
- $default_user = array_merge($default_user, $override_values);
- }
-
- foreach ($user_ids as $user_id)
- {
- $level= isset($default_user['level']) ? $default_user['level'] : 0;
- if ($user_id == $conf['webmaster_id'])
- {
- $status = 'webmaster';
- $level = max( $conf['available_permission_levels'] );
- }
- else if (($user_id == $conf['guest_id']) or
- ($user_id == $conf['default_user_id']))
- {
- $status = 'guest';
- }
- else
- {
- $status = 'normal';
- }
-
- $insert = array_merge(
- $default_user,
- array(
- 'user_id' => $user_id,
- 'status' => $status,
- 'registration_date' => $dbnow,
- 'level' => $level
- ));
-
- array_push($inserts, $insert);
- }
-
- include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
- mass_inserts(USER_INFOS_TABLE, array_keys($inserts[0]), $inserts);
-
- }
-}
-
-/**
- * returns the groupname corresponding to the given group identifier if
- * exists
- *
- * @param int group_id
- * @return mixed
- */
-function get_groupname($group_id)
-{
- $query = '
-SELECT name
- FROM '.GROUPS_TABLE.'
- WHERE id = '.intval($group_id).'
-;';
- $result = pwg_query($query);
- if (mysql_num_rows($result) > 0)
- {
- list($groupname) = mysql_fetch_row($result);
- }
- else
- {
- return false;
- }
-
- return $groupname;
-}
-
-
-/**
- * returns the auto login key or false on error
- * @param int user_id
- * @param string [out] username
-*/
-function calculate_auto_login_key($user_id, &$username)
-{
- global $conf;
- $query = '
-SELECT '.$conf['user_fields']['username'].' AS username
- , '.$conf['user_fields']['password'].' AS password
-FROM '.USERS_TABLE.'
-WHERE '.$conf['user_fields']['id'].' = '.$user_id;
- $result = pwg_query($query);
- if (mysql_num_rows($result) > 0)
- {
- $row = mysql_fetch_assoc($result);
- $username = $row['username'];
- $data = $row['username'].$row['password'];
- $key = base64_encode(
- pack('H*', sha1($data))
- .hash_hmac('md5', $data, $conf['secret_key'],true)
- );
- return $key;
- }
- return false;
-}
-
-/*
- * Performs all required actions for user login
- * @param int user_id
- * @param bool remember_me
- * @return void
-*/
-function log_user($user_id, $remember_me)
-{
- global $conf, $user;
-
- if ($remember_me and $conf['authorize_remembering'])
- {
- $key = calculate_auto_login_key($user_id, $username);
- if ($key!==false)
- {
- $cookie = array('id' => (int)$user_id, 'key' => $key);
- setcookie($conf['remember_me_name'],
- serialize($cookie),
- time()+$conf['remember_me_length'],
- cookie_path()
- );
- }
- }
- else
- { // make sure we clean any remember me ...
- setcookie($conf['remember_me_name'], '', 0, cookie_path());
- }
- if ( session_id()!="" )
- { // we regenerate the session for security reasons
- // see http://www.acros.si/papers/session_fixation.pdf
- session_regenerate_id();
- }
- else
- {
- session_start();
- }
- $_SESSION['pwg_uid'] = (int)$user_id;
-
- $user['id'] = $_SESSION['pwg_uid'];
-}
-
-/*
- * Performs auto-connexion when cookie remember_me exists
- * @return true/false
-*/
-function auto_login() {
- global $conf;
-
- if ( isset( $_COOKIE[$conf['remember_me_name']] ) )
- {
- $cookie = unserialize(stripslashes($_COOKIE[$conf['remember_me_name']]));
- if ($cookie!==false and is_numeric(@$cookie['id']) )
- {
- $key = calculate_auto_login_key( $cookie['id'], $username );
- if ($key!==false and $key===$cookie['key'])
- {
- log_user($cookie['id'], true);
- trigger_action('login_success', $username);
- return true;
- }
- }
- setcookie($conf['remember_me_name'], '', 0, cookie_path());
- }
- return false;
-}
-
-/**
- * Tries to login a user given username and password (must be MySql escaped)
- * return true on success
- */
-function try_log_user($username, $password, $remember_me)
-{
- global $conf;
- // retrieving the encrypted password of the login submitted
- $query = '
-SELECT '.$conf['user_fields']['id'].' AS id,
- '.$conf['user_fields']['password'].' AS password
- FROM '.USERS_TABLE.'
- WHERE '.$conf['user_fields']['username'].' = \''.$username.'\'
-;';
- $row = mysql_fetch_assoc(pwg_query($query));
- if ($row['password'] == $conf['pass_convert']($password))
- {
- log_user($row['id'], $remember_me);
- trigger_action('login_success', $username);
- return true;
- }
- trigger_action('login_failure', $username);
- return false;
-}
-
-/*
- * Return user status used in this library
- * @return string
-*/
-function get_user_status($user_status)
-{
- global $user;
-
- if (empty($user_status))
- {
- if (isset($user['status']))
- {
- $user_status = $user['status'];
- }
- else
- {
- // swicth to default value
- $user_status = '';
- }
- }
- return $user_status;
-}
-
-/*
- * Return access_type definition of user
- * Test does with user status
- * @return bool
-*/
-function get_access_type_status($user_status='')
-{
- global $conf;
-
- switch (get_user_status($user_status))
- {
- case 'guest':
- {
- $access_type_status =
- ($conf['guest_access'] ? ACCESS_GUEST : ACCESS_FREE);
- break;
- }
- case 'generic':
- {
- $access_type_status = ACCESS_GUEST;
- break;
- }
- case 'normal':
- {
- $access_type_status = ACCESS_CLASSIC;
- break;
- }
- case 'admin':
- {
- $access_type_status = ACCESS_ADMINISTRATOR;
- break;
- }
- case 'webmaster':
- {
- $access_type_status = ACCESS_WEBMASTER;
- break;
- }
- default:
- {
- $access_type_status = ACCESS_FREE;
- break;
- }
- }
-
- return $access_type_status;
-}
-
-/*
- * Return if user have access to access_type definition
- * Test does with user status
- * @return bool
-*/
-function is_autorize_status($access_type, $user_status = '')
-{
- return (get_access_type_status($user_status) >= $access_type);
-}
-
-/*
- * Check if user have access to access_type definition
- * Stop action if there are not access
- * Test does with user status
- * @return none
-*/
-function check_status($access_type, $user_status = '')
-{
- if (!is_autorize_status($access_type, $user_status))
- {
- access_denied();
- }
-}
-
-/*
- * Return if user is generic
- * @return bool
-*/
- function is_generic($user_status = '')
-{
- return get_user_status($user_status) == 'generic';
-}
-
-/*
- * Return if user is only a guest
- * @return bool
-*/
- function is_a_guest($user_status = '')
-{
- return get_user_status($user_status) == 'guest';
-}
-
-/*
- * Return if user is, at least, a classic user
- * @return bool
-*/
- function is_classic_user($user_status = '')
-{
- return is_autorize_status(ACCESS_CLASSIC, $user_status);
-}
-
-/*
- * Return if user is, at least, an administrator
- * @return bool
-*/
- function is_admin($user_status = '')
-{
- return is_autorize_status(ACCESS_ADMINISTRATOR, $user_status);
-}
-
-/*
- * Return if current user is an adviser
- * @return bool
-*/
-function is_adviser()
-{
- global $user;
-
- return ($user['adviser'] == 'true');
-}
-
-/*
- * Return mail address as display text
- * @return string
-*/
-function get_email_address_as_display_text($email_address)
-{
- global $conf;
-
- if (!isset($email_address) or (trim($email_address) == ''))
- {
- return '';
- }
- else
- {
- if (defined('IN_ADMIN') and is_adviser())
- {
- return 'adviser.mode@'.$_SERVER['SERVER_NAME'];
- }
- else
- {
- return $email_address;
- }
- }
-}
-
-/*
- * Compute sql where condition with restrict and filter data. "FandF" means
- * Forbidden and Filters.
- *
- * @param array condition_fields: read function body
- * @param string prefix_condition: prefixes sql if condition is not empty
- * @param boolean force_one_condition: use at least "1 = 1"
- *
- * @return string sql where/conditions
- */
-function get_sql_condition_FandF(
- $condition_fields,
- $prefix_condition = null,
- $force_one_condition = false
- )
-{
- global $user, $filter;
-
- $sql_list = array();
-
- foreach ($condition_fields as $condition => $field_name)
- {
- switch($condition)
- {
- case 'forbidden_categories':
- {
- if (!empty($user['forbidden_categories']))
- {
- $sql_list[] =
- $field_name.' NOT IN ('.$user['forbidden_categories'].')';
- }
- break;
- }
- case 'visible_categories':
- {
- if (!empty($filter['visible_categories']))
- {
- $sql_list[] =
- $field_name.' IN ('.$filter['visible_categories'].')';
- }
- break;
- }
- case 'visible_images':
- if (!empty($filter['visible_images']))
- {
- $sql_list[] =
- $field_name.' IN ('.$filter['visible_images'].')';
- }
- // note there is no break - visible include forbidden
- case 'forbidden_images':
- if (
- !empty($user['image_access_list'])
- or $user['image_access_type']!='NOT IN'
- )
- {
- $table_prefix=null;
- if ($field_name=='id')
- {
- $table_prefix = '';
- }
- elseif ($field_name=='i.id')
- {
- $table_prefix = 'i.';
- }
- if ( isset($table_prefix) )
- {
- $sql_list[]=$table_prefix.'level<='.$user['level'];
- }
- else
- {
- $sql_list[]=$field_name.' '.$user['image_access_type']
- .' ('.$user['image_access_list'].')';
- }
- }
- break;
- default:
- {
- die('Unknow condition');
- break;
- }
- }
- }
-
- if (count($sql_list) > 0)
- {
- $sql = '('.implode(' AND ', $sql_list).')';
- }
- else
- {
- if ($force_one_condition)
- {
- $sql = '1 = 1';
- }
- else
- {
- $sql = '';
- }
- }
-
- if (isset($prefix_condition) and !empty($sql))
- {
- $sql = $prefix_condition.' '.$sql;
- }
-
- return $sql;
-}
-
-?> \ No newline at end of file
diff --git a/BSF/include/functions_xml.inc.php b/BSF/include/functions_xml.inc.php
deleted file mode 100644
index 1a849d434..000000000
--- a/BSF/include/functions_xml.inc.php
+++ /dev/null
@@ -1,141 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-define( 'ATT_REG', '\w+' );
-define( 'VAL_REG', '[^"]*' );
-
-//------------------------------------------------------------------- functions
-// getContent returns the content of a tag
-//
-// example : getContent( "<name>Joe</name>" ) returns "Joe"
-//
-// It also works with strings containing themself sub-tags :
-// <perso><name>Jean</name><firstname>Billie</fisrtname></perso> ->
-// <name>Jean</name><firstname>Billie</firstname>
-function getContent( $element )
-{
- // deleting start of the tag
- $content = preg_replace( '/^<[^>]+>/', '', $element );
- // deleting end of the tag
- $content = preg_replace( '/<\/[^>]+>$/', '', $content );
- // replacing multiple instance of space character
- $content = preg_replace( '/\s+/', ' ', $content );
-
- return $content;
-}
-
-// The function get Attribute returns the value corresponding to the
-// attribute $attribute for the tag $element.
-function getAttribute( $element, $attribute )
-{
-// echo htmlentities($element).'<br /><br />';
- $regex = '/^<\w+[^>]*\b'.$attribute.'\s*=\s*"('.VAL_REG.')"/i';
- if ( preg_match( $regex, $element, $out ) )
- {
- return html_entity_decode($out[1], ENT_QUOTES);
- }
- else return '';
-}
-
-// The function encode Attribute returns the xml attribute $attribute="$value"
-function encodeAttribute( $attribute, $value )
-{
- return $attribute.'="'.htmlspecialchars($value, ENT_QUOTES).'" ';
-}
-
-// The function getChild returns the first child
-// exemple : getChild( "<table><tr>XXX</tr><tr>YYY</tr></table>", "tr" )
-// returns "<tr>XXX</tr>"
-function getChild( $document, $node )
-{
- $regex = '/<'.$node.'(\s+'.ATT_REG.'="'.VAL_REG.'")*';
- $regex.= '(\s*\/>|>.*<\/'.$node.'>)/U';
-
- if
- (
- preg_match( $regex, $document, $out )
- or
- preg_last_error() == PREG_NO_ERROR
- )
- {
- return $out[0];
- }
- else
- {
- die('getChild: error ['.preg_last_error().'] with preg_match function');
- }
-}
-
-// getChildren returns a list of the children identified by the $node
-// example :
-// getChild( "<table><tr>XXX</tr><tr>YYY</tr></table>", "tr" )
-// returns an array with :
-// $array[0] equals "<tr>XXX</tr>"
-// $array[1] equals "<tr>YYY</tr>"
-function getChildren( $document, $node )
-{
- $regex = '/<'.$node.'(\s+'.ATT_REG.'="'.VAL_REG.'")*';
- $regex.= '(\s*\/>|>.*<\/'.$node.'>)/U';
-
- if
- (
- preg_match_all( $regex, $document, $out )
- or
- preg_last_error() == PREG_NO_ERROR
- )
- {
- return $out[0];
- }
- else
- {
- die('getChild: error ['.preg_last_error().'] with preg_match_all function');
- }
-}
-
-// get_CodeXML places the content of a text file in a PHP variable and
-// return it. If the file can't be opened, returns false.
-function getXmlCode( $filename )
-{
- if (function_exists('ini_set'))
- {
- // limit must be growed with php5 and "big" listing file
- ini_set("pcre.backtrack_limit", pow(2, 32));
- }
-
- $file = fopen( $filename, 'r' );
- if ( !$file )
- {
- return false;
- }
-
- $xml_content = '';
- while ( !feof( $file ) )
- {
- $xml_content .= fgets( $file, 1024 );
- }
- fclose( $file );
- $xml_content = str_replace( "\n", '', $xml_content );
- $xml_content = str_replace( "\t", '', $xml_content );
-
- return $xml_content;
-}
-?>
diff --git a/BSF/include/index.php b/BSF/include/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/include/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/include/menubar.inc.php b/BSF/include/menubar.inc.php
deleted file mode 100644
index 03e941226..000000000
--- a/BSF/include/menubar.inc.php
+++ /dev/null
@@ -1,311 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * This file is included by the main page to show the menu bar
- *
- */
-$template->set_filenames(
- array(
- 'menubar' => 'menubar.tpl',
- )
- );
-
-trigger_action('loc_begin_menubar');
-
-$template->assign(
- array(
- 'NB_PICTURE' => $user['nb_total_images'],
- 'MENU_CATEGORIES_CONTENT' => get_categories_menu(),
- 'U_CATEGORIES' => make_index_url(array('section' => 'categories')),
- 'U_LOST_PASSWORD' => get_root_url().'password.php',
- 'U_UPLOAD' => get_upload_menu_link()
- )
- );
-
-//-------------------------------------------------------------- external links
-foreach ($conf['links'] as $url => $url_data)
-{
- if (!is_array($url_data))
- {
- $url_data = array('label' => $url_data);
- }
-
- if
- (
- (!isset($url_data['eval_visible']))
- or
- (eval($url_data['eval_visible']))
- )
- {
- $tpl_var = array(
- 'URL' => $url,
- 'LABEL' => $url_data['label']
- );
-
- if (!isset($url_data['new_window']) or $url_data['new_window'])
- {
- $tpl_var['new_window'] =
- array(
- 'NAME' => (isset($url_data['nw_name']) ? $url_data['nw_name'] : ''),
- 'FEATURES' => (isset($url_data['nw_features']) ? $url_data['nw_features'] : '')
- );
- }
- $template->append('links', $tpl_var);
- }
-}
-
-//------------------------------------------------------------------------ filter
-if (!empty($conf['filter_pages']) and get_filter_page_value('used'))
-{
- if ($filter['enabled'])
- {
- $template->assign(
- 'U_STOP_FILTER',
- add_url_params(make_index_url(array()), array('filter' => 'stop'))
- );
- }
- else
- {
- $template->assign(
- 'U_START_FILTER',
- add_url_params(make_index_url(array()), array('filter' => 'start-recent-'.$user['recent_period']))
- );
- }
-}
-
-//------------------------------------------------------------------------ tags
-if ('tags' == @$page['section'])
-{
- // display tags associated to currently tagged items, less current tags
- $tags = array();
- if ( !empty($page['items']) )
- {
- $tags = get_common_tags($page['items'],
- $conf['menubar_tag_cloud_items_number'], $page['tag_ids']);
- }
-
- $tags = add_level_to_tags($tags);
-
- foreach ($tags as $tag)
- {
- $template->append(
- 'related_tags',
- array(
- 'U_TAG' => make_index_url(
- array(
- 'tags' => array($tag)
- )
- ),
-
- 'NAME' => $tag['name'],
-
- 'CLASS' => 'tagLevel'.$tag['level'],
-
- 'add' => array(
-
- 'URL' => make_index_url(
- array(
- 'tags' => array_merge(
- $page['tags'],
- array($tag)
- )
- )
- ),
- 'COUNTER' => $tag['counter'],
- )
- )
- );
- }
-}
-//---------------------------------------------------------- special categories
-// favorites categories
-if ( !is_a_guest() )
-{
- $template->append(
- 'special_categories',
- array(
- 'URL' => make_index_url(array('section' => 'favorites')),
- 'TITLE' => l10n('favorite_cat_hint'),
- 'NAME' => l10n('favorite_cat')
- ));
-}
-// most visited
-$template->append(
- 'special_categories',
- array(
- 'URL' => make_index_url(array('section' => 'most_visited')),
- 'TITLE' => l10n('most_visited_cat_hint'),
- 'NAME' => l10n('most_visited_cat')
- ));
-// best rated
-if ($conf['rate'])
-{
- $template->append(
- 'special_categories',
- array(
- 'URL' => make_index_url(array('section' => 'best_rated')),
- 'TITLE' => l10n('best_rated_cat_hint'),
- 'NAME' => l10n('best_rated_cat')
- )
- );
-}
-// random
-$template->append(
- 'special_categories',
- array(
- 'URL' => get_root_url().'random.php',
- 'TITLE' => l10n('random_cat_hint'),
- 'NAME' => l10n('random_cat'),
- 'REL'=> 'rel="nofollow"'
- ));
-
-// recent pics
-$template->append(
- 'special_categories',
- array(
- 'URL' => make_index_url(array('section' => 'recent_pics')),
- 'TITLE' => l10n('recent_pics_cat_hint'),
- 'NAME' => l10n('recent_pics_cat'),
- ));
-// recent cats
-$template->append(
- 'special_categories',
- array(
- 'URL' => make_index_url(array('section' => 'recent_cats')),
- 'TITLE' => l10n('recent_cats_cat_hint'),
- 'NAME' => l10n('recent_cats_cat'),
- ));
-
-// calendar
-$template->append(
- 'special_categories',
- array(
- 'URL' =>
- make_index_url(
- array(
- 'chronology_field' => ($conf['calendar_datefield']=='date_available'
- ? 'posted' : 'created'),
- 'chronology_style'=> 'monthly',
- 'chronology_view' => 'calendar'
- )
- ),
- 'TITLE' => l10n('calendar_hint'),
- 'NAME' => l10n('calendar'),
- 'REL'=> 'rel="nofollow"'
- )
- );
-//--------------------------------------------------------------------- summary
-
-if (is_a_guest())
-{
- $template->assign(
- array(
- 'U_IDENTIFY' => get_root_url().'identification.php',
- 'AUTHORIZE_REMEMBERING' => $conf['authorize_remembering']
- )
- );
-
- if ($conf['allow_user_registration'])
- {
- $template->assign( 'U_REGISTER', get_root_url().'register.php');
- }
-}
-else
-{
- $template->assign('USERNAME', $user['username']);
-
- if (is_autorize_status(ACCESS_CLASSIC))
- {
- $template->assign('U_PROFILE', get_root_url().'profile.php');
- }
-
- // the logout link has no meaning with Apache authentication : it is not
- // possible to logout with this kind of authentication.
- if (!$conf['apache_authentication'])
- {
- $template->assign('U_LOGOUT', get_root_url().'?act=logout');
- }
-
- if (is_admin())
- {
- $template->assign('U_ADMIN', get_root_url().'admin.php');
- }
-}
-
-// tags link
-$template->append(
- 'summaries',
- array(
- 'TITLE' => l10n('See available tags'),
- 'NAME' => l10n('Tags'),
- 'U_SUMMARY'=> get_root_url().'tags.php',
- )
- );
-
-// search link
-$template->append(
- 'summaries',
- array(
- 'TITLE'=>l10n('hint_search'),
- 'NAME'=>l10n('Search'),
- 'U_SUMMARY'=> get_root_url().'search.php',
- 'REL'=> 'rel="search"'
- )
- );
-
-// comments link
-$template->append(
- 'summaries',
- array(
- 'TITLE'=>l10n('hint_comments'),
- 'NAME'=>l10n('comments'),
- 'U_SUMMARY'=> get_root_url().'comments.php',
- )
- );
-
-// about link
-$template->append(
- 'summaries',
- array(
- 'TITLE' => l10n('about_page_title'),
- 'NAME' => l10n('About'),
- 'U_SUMMARY' => get_root_url().'about.php',
- )
- );
-
-// notification
-$template->append(
- 'summaries',
- array(
- 'TITLE'=>l10n('RSS feed'),
- 'NAME'=>l10n('Notification'),
- 'U_SUMMARY'=> get_root_url().'notification.php',
- 'REL'=> 'rel="nofollow"'
- )
- );
-
-trigger_action('loc_end_menubar');
-$template->assign_var_from_handle('MENUBAR', 'menubar');
-
-?>
diff --git a/BSF/include/page_header.php b/BSF/include/page_header.php
deleted file mode 100644
index 102e2bdd8..000000000
--- a/BSF/include/page_header.php
+++ /dev/null
@@ -1,90 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-//
-// Start output of page
-//
-$template->set_filenames(array('header'=>'header.tpl'));
-
-trigger_action('loc_begin_page_header');
-
-$template->assign(
- array(
- 'GALLERY_TITLE' =>
- isset($page['gallery_title']) ?
- $page['gallery_title'] : $conf['gallery_title'],
-
- 'PAGE_BANNER' =>
- trigger_event('render_page_banner',
- isset($page['page_banner']) ?
- $page['page_banner'] : $conf['page_banner']),
-
- 'BODY_ID' =>
- isset($page['body_id']) ?
- $page['body_id'] : '',
-
- 'CONTENT_ENCODING' => get_pwg_charset(),
- 'PAGE_TITLE' => strip_tags($title),
- 'LANG'=>$lang_info['code'],
- 'DIR'=>$lang_info['direction'],
-
- 'U_HOME' => make_index_url(),
- ));
-
-
-// Header notes
-if ( !empty($header_notes) )
-{
- $template->assign('header_notes',$header_notes);
-}
-
-if ( !empty($page['meta_robots']) )
-{
- $template->append('head_elements',
- '<meta name="robots" content="'
- .implode(',', array_keys($page['meta_robots']))
- .'">'
- );
-}
-
-// refresh
-if ( isset( $refresh ) and intval($refresh) >= 0
- and isset( $url_link ) and isset( $redirect_msg ) )
-{
- $template->assign(
- array(
- 'REDIRECT_MSG' => $redirect_msg,
- 'page_refresh' => array(
- 'TIME' => $refresh,
- 'U_REFRESH' => $url_link
- )
- ));
-}
-
-trigger_action('loc_end_page_header');
-
-header('Content-Type: text/html; charset='.get_pwg_charset());
-$template->parse('header');
-
-trigger_action('loc_after_page_header');
-?> \ No newline at end of file
diff --git a/BSF/include/page_tail.php b/BSF/include/page_tail.php
deleted file mode 100644
index 670d23a2e..000000000
--- a/BSF/include/page_tail.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-$template->set_filenames(array('tail'=>'footer.tpl'));
-
-trigger_action('loc_begin_page_tail');
-
-$template->assign(
- array(
- 'VERSION' => $conf['show_version'] ? PHPWG_VERSION : '',
- 'PHPWG_URL' => PHPWG_URL,
- ));
-
-//--------------------------------------------------------------------- contact
-
-if (!is_a_guest())
-{
- $template->assign(
- 'CONTACT_MAIL', get_webmaster_mail_address()
- );
-}
-
-//------------------------------------------------------------- generation time
-$debug_vars = array();
-
-if ($conf['show_queries'])
-{
- $debug_vars = array_merge($debug_vars, array('QUERIES_LIST' => $debug) );
-}
-
-if ($conf['show_gt'])
-{
- if (!isset($page['count_queries']))
- {
- $page['count_queries'] = 0;
- $page['queries_time'] = 0;
- }
- $time = get_elapsed_time($t2, get_moment());
-
- $debug_vars = array_merge($debug_vars,
- array('TIME' => $time,
- 'NB_QUERIES' => $page['count_queries'],
- 'SQL_TIME' => number_format($page['queries_time'],3,'.',' ').' s')
- );
-}
-
-$template->assign('debug', $debug_vars );
-
-trigger_action('loc_end_page_tail');
-//
-// Generate the page
-//
-$template->parse('tail');
-$template->p();
-?> \ No newline at end of file
diff --git a/BSF/include/php_compat/array_intersect_key.php b/BSF/include/php_compat/array_intersect_key.php
deleted file mode 100644
index 748b8f6f1..000000000
--- a/BSF/include/php_compat/array_intersect_key.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-// http://www.php.net/manual/en/function.array-intersect-key.php
-// PHP 5 >= 5.1.0RC1
-function array_intersect_key()
-{
- $args = func_get_args();
- if (count($args) < 2) {
- trigger_error('Wrong parameter count for array_intersect_key()', E_USER_WARNING);
- return;
- }
-
- // Check arrays
- $array_count = count($args);
- for ($i = 0; $i !== $array_count; $i++) {
- if (!is_array($args[$i])) {
- trigger_error('array_intersect_key() Argument #' . ($i + 1) . ' is not an array', E_USER_WARNING);
- return;
- }
- }
-
- // Compare entries
- $result = array();
- foreach ($args[0] as $key1 => $value1) {
- for ($i = 1; $i !== $array_count; $i++) {
- foreach ($args[$i] as $key2 => $value2) {
- if ((string) $key1 === (string) $key2) {
- $result[$key1] = $value1;
- }
- }
- }
- }
-
- return $result;
-}
-?> \ No newline at end of file
diff --git a/BSF/include/php_compat/file_put_contents.php b/BSF/include/php_compat/file_put_contents.php
deleted file mode 100644
index 679d9c984..000000000
--- a/BSF/include/php_compat/file_put_contents.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-//php 5
-function file_put_contents($filename, $data)
-{
- $fp = fopen($filename, 'w');
- if ($fp)
- {
- $ret = fwrite($fp, $data);
- fclose($fp);
- return $ret;
- }
- return false;
-}
-?> \ No newline at end of file
diff --git a/BSF/include/php_compat/hash_hmac.php b/BSF/include/php_compat/hash_hmac.php
deleted file mode 100644
index 5f05e370c..000000000
--- a/BSF/include/php_compat/hash_hmac.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-//(hash) - enabled by default as of PHP 5.1.2
-function hash_hmac($algo, $data, $key, $raw_output=false)
-{
- /* md5 and sha1 only */
- $algo=strtolower($algo);
- $p=array('md5'=>'H32','sha1'=>'H40');
- if ( !isset($p[$algo]) or !function_exists($algo) )
- {
- $algo = 'md5';
- }
- if(strlen($key)>64) $key=pack($p[$algo],$algo($key));
- if(strlen($key)<64) $key=str_pad($key,64,chr(0));
-
- $ipad=substr($key,0,64) ^ str_repeat(chr(0x36),64);
- $opad=substr($key,0,64) ^ str_repeat(chr(0x5C),64);
-
- $ret = $algo($opad.pack($p[$algo],$algo($ipad.$data)));
- if ($raw_output)
- {
- $ret = pack('H*', $ret);
- }
- return $ret;
-}
-?> \ No newline at end of file
diff --git a/BSF/include/php_compat/index.php b/BSF/include/php_compat/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/include/php_compat/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/include/php_compat/preg_last_error.php b/BSF/include/php_compat/preg_last_error.php
deleted file mode 100644
index c564aeba9..000000000
--- a/BSF/include/php_compat/preg_last_error.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// http://www.php.net/manual/fr/function.preg-last-error.php
-// PHP 5 >= 5.2.0
-if (!defined('PREG_NO_ERROR'))
- define('PREG_NO_ERROR', 0);
-if (!defined('PREG_INTERNAL_ERROR'))
- define('PREG_INTERNAL_ERROR', 1);
-if (!defined('PREG_BACKTRACK_LIMIT_ERROR'))
- define('PREG_BACKTRACK_LIMIT_ERROR', 2);
-if (!defined('PREG_RECURSION_LIMIT_ERROR'))
- define('PREG_RECURSION_LIMIT_ERROR', 3);
-if (!defined('PREG_BAD_UTF8_ERROR'))
- define('PREG_BAD_UTF8_ERROR', 4);
-
-function preg_last_error()
-{
- return PREG_NO_ERROR;
-}
-?> \ No newline at end of file
diff --git a/BSF/include/picture_comment.inc.php b/BSF/include/picture_comment.inc.php
deleted file mode 100644
index ad0438d96..000000000
--- a/BSF/include/picture_comment.inc.php
+++ /dev/null
@@ -1,183 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * This file is included by the picture page to manage user comments
- *
- */
-
-// the picture is commentable if it belongs at least to one category which
-// is commentable
-$page['show_comments'] = false;
-foreach ($related_categories as $category)
-{
- if ($category['commentable'] == 'true')
- {
- $page['show_comments'] = true;
- break;
- }
-}
-
-if ( $page['show_comments'] and isset( $_POST['content'] ) )
-{
- if ( is_a_guest() and !$conf['comments_forall'] )
- {
- die ('Session expired');
- }
-
- $comm = array(
- 'author' => trim( stripslashes(@$_POST['author']) ),
- 'content' => trim( stripslashes($_POST['content']) ),
- 'image_id' => $page['image_id'],
- );
-
- include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php');
-
- $comment_action = insert_user_comment($comm, @$_POST['key'], $infos );
-
- switch ($comment_action)
- {
- case 'moderate':
- array_push( $infos, l10n('comment_to_validate') );
- case 'validate':
- array_push( $infos, l10n('comment_added'));
- break;
- case 'reject':
- set_status_header(403);
- array_push($infos, l10n('comment_not_added') );
- break;
- default:
- trigger_error('Invalid comment action '.$comment_action, E_USER_WARNING);
- }
-
- $template->assign(
- ($comment_action=='reject') ? 'errors' : 'infos',
- $infos
- );
-
- // allow plugins to notify what's going on
- trigger_action( 'user_comment_insertion',
- array_merge($comm, array('action'=>$comment_action) )
- );
-}
-elseif ( isset($_POST['content']) )
-{
- set_status_header(403);
- die('ugly spammer');
-}
-
-if ($page['show_comments'])
-{
- // number of comment for this picture
- $query = 'SELECT COUNT(*) AS nb_comments';
- $query.= ' FROM '.COMMENTS_TABLE.' WHERE image_id = '.$page['image_id'];
- $query.= " AND validated = 'true'";
- $query.= ';';
- $row = mysql_fetch_array( pwg_query( $query ) );
-
- // navigation bar creation
- if (!isset($page['start']))
- {
- $page['start'] = 0;
- }
-
- $navigation_bar = create_navigation_bar(
- duplicate_picture_url(array(), array('start')),
- $row['nb_comments'],
- $page['start'],
- $conf['nb_comment_page'],
- true // We want a clean URL
- );
-
- $template->assign(
- array(
- 'COMMENT_COUNT' => $row['nb_comments'],
- 'COMMENT_NAV_BAR' => $navigation_bar,
- )
- );
-
- if ($row['nb_comments'] > 0)
- {
- $query = '
-SELECT id,author,date,image_id,content
- FROM '.COMMENTS_TABLE.'
- WHERE image_id = '.$page['image_id'].'
- AND validated = \'true\'
- ORDER BY date ASC
- LIMIT '.$page['start'].', '.$conf['nb_comment_page'].'
-;';
- $result = pwg_query( $query );
-
- while ($row = mysql_fetch_array($result))
- {
- $tpl_comment =
- array(
- 'AUTHOR' => trigger_event('render_comment_author',
- empty($row['author'])
- ? l10n('guest')
- : $row['author']),
-
- 'DATE' => format_date(
- $row['date'],
- 'mysql_datetime',
- true),
-
- 'CONTENT' => trigger_event('render_comment_content',$row['content']),
- );
-
- if (is_admin())
- {
- $tpl_comment['U_DELETE'] =
- add_url_params(
- $url_self,
- array(
- 'action'=>'delete_comment',
- 'comment_to_delete'=>$row['id']
- )
- );
- }
- $template->append('comments', $tpl_comment);
- }
- }
-
- if (!is_a_guest()
- or (is_a_guest() and $conf['comments_forall']))
- {
- include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php');
- $key = get_comment_post_key($page['image_id']);
- $content = '';
- if ('reject'===@$comment_action)
- {
- $content = htmlspecialchars($comm['content']);
- }
- $template->assign('comment_add',
- array(
- 'F_ACTION' => $url_self,
- 'KEY' => $key,
- 'CONTENT' => $content,
- 'SHOW_AUTHOR' => !is_classic_user()
- ));
- }
-}
-
-?> \ No newline at end of file
diff --git a/BSF/include/picture_metadata.inc.php b/BSF/include/picture_metadata.inc.php
deleted file mode 100644
index bc6410897..000000000
--- a/BSF/include/picture_metadata.inc.php
+++ /dev/null
@@ -1,99 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * This file is included by the picture page to manage picture metadata
- *
- */
-
-include_once(PHPWG_ROOT_PATH.'/include/functions_metadata.inc.php');
-if (($conf['show_exif']) and (function_exists('read_exif_data')))
-{
- if ($exif = @read_exif_data($picture['current']['image_path']))
- {
- $exif = trigger_event('format_exif_data', $exif, $picture['current'] );
-
- $tpl_meta = array(
- 'TITLE' => 'EXIF Metadata',
- 'lines' => array(),
- );
-
- foreach ($conf['show_exif_fields'] as $field)
- {
- if (strpos($field, ';') === false)
- {
- if (isset($exif[$field]))
- {
- $key = $field;
- if (isset($lang['exif_field_'.$field]))
- {
- $key = $lang['exif_field_'.$field];
- }
- $tpl_meta['lines'][$key] = $exif[$field];
- }
- }
- else
- {
- $tokens = explode(';', $field);
- if (isset($exif[$tokens[0]][$tokens[1]]))
- {
- $key = $tokens[1];
- if (isset($lang['exif_field_'.$tokens[1]]))
- {
- $key = $lang['exif_field_'.$tokens[1]];
- }
- $tpl_meta['lines'][$key] = $exif[$tokens[0]][$tokens[1]];
- }
- }
- }
- $template->append('metadata', $tpl_meta);
- }
-}
-
-if ($conf['show_iptc'])
-{
- $iptc = get_iptc_data($picture['current']['image_path'],
- $conf['show_iptc_mapping']);
-
- if (count($iptc) > 0)
- {
- $tpl_meta = array(
- 'TITLE' => 'IPTC Metadata',
- 'lines' => array(),
- );
-
- foreach ($iptc as $field => $value)
- {
- $key = $field;
- if (isset($lang[$field]))
- {
- $key = $lang[$field];
- }
- $tpl_meta['lines'][$key] = $value;
- }
- $template->append('metadata', $tpl_meta);
- }
-}
-
-
-?>
diff --git a/BSF/include/picture_rate.inc.php b/BSF/include/picture_rate.inc.php
deleted file mode 100644
index aa1071452..000000000
--- a/BSF/include/picture_rate.inc.php
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * This file is included by the picture page to manage rates
- *
- */
-
-if ($conf['rate'])
-{
- if ( NULL != $picture['current']['average_rate'] )
- {
- $query = '
-SELECT COUNT(rate) AS count
- , ROUND(AVG(rate),2) AS average
- , ROUND(STD(rate),2) AS std
- FROM '.RATE_TABLE.'
- WHERE element_id = '.$picture['current']['id'].'
-;';
- $row = mysql_fetch_array(pwg_query($query));
- }
- else
- { // avg rate null -> no rate -> no need to query db
- $row = array( 'count'=>0, 'average'=>NULL, 'std'=>NULL );
- }
- $template->assign('rate_summary', $row);
-
- $user_rate = null;
- if ($conf['rate_anonymous'] or is_autorize_status(ACCESS_CLASSIC) )
- {
- if ($row['count']>0)
- {
- $query = 'SELECT rate
- FROM '.RATE_TABLE.'
- WHERE element_id = '.$page['image_id'] . '
- AND user_id = '.$user['id'] ;
-
- if ( !is_autorize_status(ACCESS_CLASSIC) )
- {
- $ip_components = explode('.', $_SERVER['REMOTE_ADDR']);
- if ( count($ip_components)>3 )
- {
- array_pop($ip_components);
- }
- $anonymous_id = implode ('.', $ip_components);
- $query .= ' AND anonymous_id = \''.$anonymous_id . '\'';
- }
-
- $result = pwg_query($query);
- if (mysql_num_rows($result) > 0)
- {
- $row = mysql_fetch_array($result);
- $user_rate = $row['rate'];
- }
- }
-
- $template->assign(
- 'rating',
- array(
- 'F_ACTION' => add_url_params(
- $url_self,
- array('action'=>'rate')
- ),
- 'USER_RATE'=> $user_rate,
- 'marks' => $conf['rate_items']
- )
- );
- }
-}
-
-?> \ No newline at end of file
diff --git a/BSF/include/section_init.inc.php b/BSF/include/section_init.inc.php
deleted file mode 100644
index ffd6cac1a..000000000
--- a/BSF/include/section_init.inc.php
+++ /dev/null
@@ -1,620 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * This included page checks section related parameter and provides
- * following informations:
- *
- * - $page['title']
- *
- * - $page['items']: ordered list of items to display
- *
- */
-
-// "index.php?/category/12-foo/start-24" or
-// "index.php/category/12-foo/start-24"
-// must return :
-//
-// array(
-// 'section' => 'categories',
-// 'category' => array('id'=>12, ...),
-// 'start' => 24
-// );
-
-$page['items'] = array();
-
-// some ISPs set PATH_INFO to empty string or to SCRIPT_FILENAME while in the
-// default apache implementation it is not set
-if ( $conf['question_mark_in_urls']==false and
- isset($_SERVER["PATH_INFO"]) and !empty($_SERVER["PATH_INFO"]) )
-{
- $rewritten = $_SERVER["PATH_INFO"];
- $rewritten = str_replace('//', '/', $rewritten);
- $path_count = count( explode('/', $rewritten) );
- $page['root_path'] = PHPWG_ROOT_PATH.str_repeat('../', $path_count-1);
-}
-else
-{
- $rewritten = '';
- foreach (array_keys($_GET) as $keynum => $key)
- {
- $rewritten = $key;
- break;
- }
- $page['root_path'] = PHPWG_ROOT_PATH;
-}
-
-// deleting first "/" if displayed
-$tokens = explode(
- '/',
- preg_replace('#^/#', '', $rewritten)
- );
-// $tokens = array(
-// 0 => category,
-// 1 => 12-foo,
-// 2 => start-24
-// );
-
-$next_token = 0;
-if (script_basename() == 'picture') // basename without file extention
-{ // the first token must be the identifier for the picture
- if ( isset($_GET['image_id'])
- and isset($_GET['cat']) and is_numeric($_GET['cat']) )
- {// url compatibility with versions below 1.6
- $url = make_picture_url( array(
- 'section' => 'categories',
- 'category' => get_cat_info($_GET['cat']),
- 'image_id' => $_GET['image_id']
- ) );
- redirect($url);
- }
- $token = $tokens[$next_token];
- $next_token++;
- if ( is_numeric($token) )
- {
- $page['image_id'] = $token;
- }
- else
- {
- preg_match('/^(\d+-)?(.*)?$/', $token, $matches);
- if (isset($matches[1]) and is_numeric($matches[1]=rtrim($matches[1],'-')) )
- {
- $page['image_id'] = $matches[1];
- if ( !empty($matches[2]) )
- {
- $page['image_file'] = $matches[2];
- }
- }
- else
- {
- if ( !empty($matches[2]) )
- {
- $page['image_file'] = $matches[2];
- }
- else
- {
- bad_request('picture identifier is missing');
- }
- }
- }
-}
-
-$page = array_merge( $page, parse_section_url( $tokens, $next_token) );
-if ( !isset($page['section']) )
-{
- $page['section'] = 'categories';
-
- switch (script_basename())
- {
- case 'picture':
- break;
- case 'index':
- {
- // No section defined, go to selected url
- if (!empty($conf['random_index_redirect']) and empty($tokens[$next_token]) )
- {
- $random_index_redirect = array();
- foreach ($conf['random_index_redirect'] as $random_url => $random_url_condition)
- {
- if (empty($random_url_condition) or eval($random_url_condition))
- {
- $random_index_redirect[] = $random_url;
- }
- }
- if (!empty($random_index_redirect))
- {
- redirect($random_index_redirect[mt_rand(0, count($random_index_redirect)-1)]);
- }
- }
- break;
- }
- default:
- trigger_error('script_basename "'.script_basename().'" unknown',
- E_USER_WARNING);
- }
-}
-
-
-$page = array_merge( $page, parse_well_known_params_url( $tokens, $next_token) );
-
-
-if ( script_basename()=='picture' and 'categories'==$page['section'] and
- !isset($page['category']) and !isset($page['chronology_field']) )
-{ //access a picture only by id, file or id-file without given section
- $page['flat']=true;
-}
-
-// $page['nb_image_page'] is the number of picture to display on this page
-// By default, it is the same as the $user['nb_image_page']
-$page['nb_image_page'] = $user['nb_image_page'];
-
-if (pwg_get_session_var('image_order',0) > 0)
-{
- $orders = get_category_preferred_image_orders();
-
- $conf['order_by'] = str_replace(
- 'ORDER BY ',
- 'ORDER BY '.$orders[ pwg_get_session_var('image_order',0) ][1].',',
- $conf['order_by']
- );
- $page['super_order_by'] = true;
-}
-
-$forbidden = get_sql_condition_FandF(
- array
- (
- 'forbidden_categories' => 'category_id',
- 'visible_categories' => 'category_id',
- 'visible_images' => 'id'
- ),
- 'AND'
- );
-
-// +-----------------------------------------------------------------------+
-// | category |
-// +-----------------------------------------------------------------------+
-if ('categories' == $page['section'])
-{
- if (isset($page['category']))
- {
- $page = array_merge(
- $page,
- array(
- 'comment' =>
- trigger_event(
- 'render_category_description',
- $page['category']['comment'],
- 'main_page_category_description'
- ),
- 'title' =>
- get_cat_display_name($page['category']['upper_names'], '', false),
- )
- );
- }
- else
- {
- $page['title'] = l10n('no_category');
- }
-
- if
- (
- (!isset($page['chronology_field'])) and
- (
- (isset($page['category'])) or
- (isset($page['flat']))
- )
- )
- {
- if ( !empty($page['category']['image_order']) and !isset($page['super_order_by']) )
- {
- $conf[ 'order_by' ] = ' ORDER BY '.$page['category']['image_order'];
- }
-
- if (isset($page['flat']))
- {// flat categories mode
- if ( isset($page['category']) )
- { // get all allowed sub-categories
- $query = '
-SELECT id
- FROM '.CATEGORIES_TABLE.'
- WHERE
- uppercats LIKE "'.$page['category']['uppercats'].',%" '
- .get_sql_condition_FandF(
- array
- (
- 'forbidden_categories' => 'id',
- 'visible_categories' => 'id',
- ),
- "\n AND"
- );
- $subcat_ids = array_from_query($query, 'id');
- $subcat_ids[] = $page['category']['id'];
- $where_sql = 'category_id IN ('.implode(',',$subcat_ids).')';
- // remove categories from forbidden because just checked above
- $forbidden = get_sql_condition_FandF(
- array( 'visible_images' => 'id' ),
- 'AND'
- );
- }
- else
- {
- $where_sql = '1=1';
- }
- }
- else
- {// Normal mode
- $where_sql = 'category_id = '.$page['category']['id'];
- }
-
- // Main query
- $query = '
-SELECT DISTINCT(image_id)
- FROM '.IMAGE_CATEGORY_TABLE.'
- INNER JOIN '.IMAGES_TABLE.' ON id = image_id
- WHERE
- '.$where_sql.'
-'.$forbidden.'
- '.$conf['order_by'].'
-;';
-
- $page['items'] = array_from_query($query, 'image_id');
- } //otherwise the calendar will requery all subitems
-}
-// special sections
-else
-{
-// +-----------------------------------------------------------------------+
-// | tags section |
-// +-----------------------------------------------------------------------+
- if ($page['section'] == 'tags')
- {
- $page['tag_ids'] = array();
- foreach ($page['tags'] as $tag)
- {
- array_push($page['tag_ids'], $tag['id']);
- }
-
- $items = get_image_ids_for_tags($page['tag_ids']);
-
- // permissions depends on category, so to only keep images that are
- // reachable to the connected user, we need to check category
- // associations
- if (!empty($items) )
- {
- $query = '
-SELECT DISTINCT image_id
- FROM '.IMAGE_CATEGORY_TABLE.' INNER JOIN '.IMAGES_TABLE.' ON image_id=id
- WHERE image_id IN ('.implode(',', $items).')
- '.$forbidden.
- $conf['order_by'].'
-;';
- $items = array_from_query($query, 'image_id');
- }
-
- $title = get_tags_content_title();
-
- $page = array_merge(
- $page,
- array(
- 'title' => $title,
- 'items' => $items,
- )
- );
- }
-// +-----------------------------------------------------------------------+
-// | search section |
-// +-----------------------------------------------------------------------+
- if ($page['section'] == 'search')
- {
- include_once( PHPWG_ROOT_PATH .'include/functions_search.inc.php' );
-
- $search_result = get_search_results($page['search']);
- if ( !empty($search_result['items']) and !isset($search_result['as_is']) )
- {
- $query = '
-SELECT DISTINCT(id)
- FROM '.IMAGES_TABLE.'
- INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
- WHERE id IN ('.implode(',', $search_result['items']).')
- '.$forbidden.'
- '.$conf['order_by'].'
-;';
- $page['items'] = array_from_query($query, 'id');
- }
- else
- {
- $page['items'] = $search_result['items'];
- if ( isset($search_result['qs']) )
- {//save the details of the query search
- $page['qsearch_details'] = $search_result['qs'];
- }
- }
-
- $page = array_merge(
- $page,
- array(
- 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">'
- .l10n('search_result').'</a>',
- )
- );
- }
-// +-----------------------------------------------------------------------+
-// | favorite section |
-// +-----------------------------------------------------------------------+
- else if ($page['section'] == 'favorites')
- {
- check_user_favorites();
-
- $query = '
-SELECT image_id
- FROM '.FAVORITES_TABLE.'
- INNER JOIN '.IMAGES_TABLE.' ON image_id = id
- WHERE user_id = '.$user['id'].'
-'.get_sql_condition_FandF
- (
- array
- (
- 'visible_images' => 'image_id'
- ),
- 'AND'
- ).'
- '.$conf['order_by'].'
-;';
-
- $page = array_merge(
- $page,
- array(
- 'title' => l10n('favorites'),
- 'items' => array_from_query($query, 'image_id'),
- )
- );
- }
-// +-----------------------------------------------------------------------+
-// | recent pictures section |
-// +-----------------------------------------------------------------------+
- else if ($page['section'] == 'recent_pics')
- {
- $query = '
-SELECT DISTINCT(id)
- FROM '.IMAGES_TABLE.'
- INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
- WHERE
- date_available >= SUBDATE(
- CURRENT_DATE,INTERVAL '.$user['recent_period'].' DAY)
- '.$forbidden.'
- '.$conf['order_by'].'
-;';
-
- $page = array_merge(
- $page,
- array(
- 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">'
- .l10n('recent_pics_cat').'</a>',
- 'items' => array_from_query($query, 'id'),
- )
- );
- }
-// +-----------------------------------------------------------------------+
-// | recently updated categories section |
-// +-----------------------------------------------------------------------+
- else if ($page['section'] == 'recent_cats')
- {
- $page = array_merge(
- $page,
- array(
- 'title' => l10n('recent_cats_cat'),
- )
- );
- }
-// +-----------------------------------------------------------------------+
-// | most visited section |
-// +-----------------------------------------------------------------------+
- else if ($page['section'] == 'most_visited')
- {
- $page['super_order_by'] = true;
- $conf['order_by'] = ' ORDER BY hit DESC, file ASC';
- $query = '
-SELECT DISTINCT(id)
- FROM '.IMAGES_TABLE.'
- INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
- WHERE hit > 0
- '.$forbidden.'
- '.$conf['order_by'].'
- LIMIT 0, '.$conf['top_number'].'
-;';
-
- $page = array_merge(
- $page,
- array(
- 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">'
- .$conf['top_number'].' '.l10n('most_visited_cat').'</a>',
- 'items' => array_from_query($query, 'id'),
- )
- );
- }
-// +-----------------------------------------------------------------------+
-// | best rated section |
-// +-----------------------------------------------------------------------+
- else if ($page['section'] == 'best_rated')
- {
- $page['super_order_by'] = true;
- $conf['order_by'] = ' ORDER BY average_rate DESC, id ASC';
-
- $query ='
-SELECT DISTINCT(id)
- FROM '.IMAGES_TABLE.'
- INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
- WHERE average_rate IS NOT NULL
- '.$forbidden.'
- '.$conf['order_by'].'
- LIMIT 0, '.$conf['top_number'].'
-;';
- $page = array_merge(
- $page,
- array(
- 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">'
- .$conf['top_number'].' '.l10n('best_rated_cat').'</a>',
- 'items' => array_from_query($query, 'id'),
- )
- );
- }
-// +-----------------------------------------------------------------------+
-// | list section |
-// +-----------------------------------------------------------------------+
- else if ($page['section'] == 'list')
- {
- $query ='
-SELECT DISTINCT(id)
- FROM '.IMAGES_TABLE.'
- INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
- WHERE image_id IN ('.implode(',', $page['list']).')
- '.$forbidden.'
- '.$conf['order_by'].'
-;';
-
- $page = array_merge(
- $page,
- array(
- 'title' => '<a href="'.duplicate_index_url(array('start'=>0)).'">'
- .l10n('random_cat').'</a>',
- 'items' => array_from_query($query, 'id'),
- )
- );
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | chronology |
-// +-----------------------------------------------------------------------+
-
-if (isset($page['chronology_field']))
-{
- include_once( PHPWG_ROOT_PATH.'include/functions_calendar.inc.php' );
- initialize_calendar();
-}
-
-if (script_basename() == 'picture'
- and !isset($page['image_id']) )
-{
- if ( !empty($page['items']) )
- {
- $query = '
-SELECT id,file
- FROM '.IMAGES_TABLE .'
- WHERE file LIKE "' . $page['image_file'] . '.%" ESCAPE "|"';
- if ( count($page['items']) < 500)
- {// for very large item sets do not add IN - because slow
- $query .= '
- AND id IN ('.implode(',',$page['items']).')
- LIMIT 0,1';
- }
- $result = pwg_query($query);
- switch (mysql_num_rows($result))
- {
- case 0: break;
- case 1:
- list($page['image_id'], $page['image_file']) = mysql_fetch_row($result);
- break;
- default: // more than 1 file name match
- while ($row = mysql_fetch_row($result) )
- {
- if ( in_array($row[0], $page['items']) )
- {
- list($page['image_id'], $page['image_file']) = $row;
- break;
- }
- }
- }
- }
- if ( !isset($page['image_id']) )
- {
- $page['image_id'] = -1; // will fail in picture.php
- }
-}
-
-// add meta robots noindex, nofollow to avoid unnecesary robot crawls
-$page['meta_robots']=array();
-if ( isset($page['chronology_field'])
- or ( isset($page['flat']) and isset($page['category']) )
- or 'list'==$page['section'] or 'recent_pics'==$page['section'] )
-{
- $page['meta_robots']=array('noindex'=>1, 'nofollow'=>1);
-}
-elseif ('tags' == $page['section'])
-{
- if ( count($page['tag_ids'])>1 )
- {
- $page['meta_robots']=array('noindex'=>1, 'nofollow'=>1);
- }
-}
-elseif ('recent_cats'==$page['section'])
-{
- $page['meta_robots']['noindex']=1;
-}
-elseif ('search'==$page['section'])
-{
- $page['meta_robots']['nofollow']=1;
-}
-if ( $filter['enabled'] )
-{
- $page['meta_robots']['noindex']=1;
-}
-
-// see if we need a redirect because of a permalink
-if ( 'categories'==$page['section'] and isset($page['category']) )
-{
- $need_redirect=false;
- if ( empty($page['category']['permalink']) )
- {
- if ( $conf['category_url_style'] == 'id-name' and
- @$page['hit_by']['cat_url_name'] !== str2url($page['category']['name']) )
- {
- $need_redirect=true;
- }
- }
- else
- {
- if ( $page['category']['permalink'] !== @$page['hit_by']['cat_permalink'] )
- {
- $need_redirect=true;
- }
- }
-
- if ($need_redirect)
- {
- $redirect_url = ( script_basename()=='picture'
- ? duplicate_picture_url()
- : duplicate_index_url()
- );
- if (!headers_sent())
- { // this is a permanent redirection
- set_status_header(301);
- redirect_http( $redirect_url );
- }
- redirect( $redirect_url );
- }
- unset( $need_redirect, $page['hit_by'] );
-}
-
-trigger_action('loc_end_section_init');
-?> \ No newline at end of file
diff --git a/BSF/include/smarty/COPYING.lib b/BSF/include/smarty/COPYING.lib
deleted file mode 100644
index 3b204400c..000000000
--- a/BSF/include/smarty/COPYING.lib
+++ /dev/null
@@ -1,458 +0,0 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL. It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it. You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations below.
-
- When we speak of free software, we are referring to freedom of use,
-not price. Our General Public Licenses are designed to make sure that
-you have the freedom to distribute copies of free software (and charge
-for this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
- To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights. These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
- To protect each distributor, we want to make it very clear that
-there is no warranty for the free library. Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-
- Finally, software patents pose a constant threat to the existence of
-any free program. We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder. Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
- Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License. This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License. We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
- When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library. The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom. The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
- We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License. It also provides other free software developers Less
-of an advantage over competing non-free programs. These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries. However, the Lesser license provides advantages in certain
-special circumstances.
-
- For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it becomes
-a de-facto standard. To achieve this, non-free programs must be
-allowed to use the library. A more frequent case is that a free
-library does the same job as widely used non-free libraries. In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
- In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software. For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
- Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
- The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-
- GNU LESSER GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
- stating that you changed the files and the date of any change.
-
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (1) uses at run time a
- copy of the library already present on the user's computer system,
- rather than copying library functions into the executable, and (2)
- will operate properly with a modified version of the library, if
- the user installs one, as long as the modified version is
- interface-compatible with the version that the work was made with.
-
- c) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- d) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- e) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
- NO WARRANTY
-
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
- END OF TERMS AND CONDITIONS
diff --git a/BSF/include/smarty/NEWS b/BSF/include/smarty/NEWS
deleted file mode 100644
index fa550ff18..000000000
--- a/BSF/include/smarty/NEWS
+++ /dev/null
@@ -1,1024 +0,0 @@
-Version 2.6.19 (Feb 11th, 2008)
--------------------------------
-
-- fix regex_replace allowing \0 in the search string (c960657,
- monte)
-- add append feature to {capture} (jablko, monte)
-- fix when (un)registering filters with the same method name but different class
- name (danilo)
-- fix calling registered objects' methods with an empty argument list
- (marcello, messju)
-
-Version 2.6.18 (Mar 7th, 2007)
-------------------------------
-
-- fix html_select_date separator when parts are missing (hayk,
- monte)
-- fix broken detection of non-cached blocks introduced in 2.6.17
- (messju)
-
-Version 2.6.17 (Mar 5th, 2007)
-------------------------------
-
-- fix php handling (monte, boots, danilo)
-- fix handling of plugin tags directly followed by an else tag (Fahr, danilo)
-- fix handling of $etc in the truncate modifier when $etc is longer
- than $length (Sylvinus, messju)
-- fix handling of %I with mysql timestamps in the date_format modifier
- (danilo, boots)
-- update smarty_core_write_file() and smarty_modifier_date_format() to better
- recognize Windows (boots, danilo)
-- emulate %h, %n, %r, %R, %t in the date_format modifier on Windows
- (danilo, boots)
-
-Version 2.6.16 (Dec 1st, 2006)
-------------------------------
-
-- fixed replacement bug in trimwhitespace output filter that was introduced
- in the last release (Spuerhund, boots)
-
-Version 2.6.15 (Nov 30th, 2006)
--------------------------------
-
-- change file writing semantics in smarty_core_write_file() to unlink() only
- when rename() fails or a Windows system is detected (c960657, boots)
-- update debug.tpl to xhtml 1.1 compliance, fix javascript escaping in debug
- output and apply a Smarty based color scheme (cybot, boots)
-- enhance reporting precision of debug_print_var modifier (cybot, boots)
-- make html_select_date work consistently with 0000-00-00 00:00:00 and
- 0000-00-00 inputs (cybot, boots)
-- fix wrong handling of insert's name attribute. (messju)
-- fix false replacement of "$t" inside double quotes (checat, messju)
-- added support for column headings and caption element to html_table and
- updated the output to use thead/tbody elements (boots)
-- fixed ordering of replacements in trimwhitespace output filter (Getty, boots)
-- update mailto function plugin to work around a firefox/thunderbird
- escaping bug (elijahlofgren, boots)
-- emulate %l in the date_format modifier on windows (boots)
-- fix handling of apostrophes in capitalize modifier (Alec Smecher, boots)
-
-Version 2.6.14 (May 28th, 2006)
--------------------------------
-
-- fix compiler bug allowing php tags in secure templates
- (boots,monte)
-- un-hide hidden xml open tags (boots)
-- fix handling of block-methods of registered objects (El Hombre Gris,
- messju)
-
-Version 2.6.13 (March 9th, 2006)
---------------------------------
-
- - update regex_replace, removing possible use of "e" modifier
-
-Version 2.6.12 (Jan 18th, 2006)
--------------------------------
-
- - fix improper use of references in the compiler handling cached
- attributes and in compiled code handling block plugins (messju)
- - make Smarty::_read_file() work on latest php (messju)
- - fixed improper tokenization of certain inline math expressions (boots)
-
-Version 2.6.11 (Dec 14, 2005)
------------------------------
-
- - fixed code generation of non-cacheable blocks to play well with php's
- "Alternative syntax for control structures" (kihara, messju)
- - fix handling of multiple identical inserts in one display()-call (messju)
- - replace {} string access with equivalent substr() to avoid E_STRICT
- warnings in PHP 5.1 (boots)
- - return valid reference in get_config_vars() when given var is
- non-existant (Thomas Schulz, boots)
- - plugin html_image: fix incorrect secure_dir error when
- file doesn't exist (monte)
- - plugin html_image: add path_prefix param (monte)
- - add char_set parameter to escape modifier (Loading, monte)
- - fix notice in debug security check (Drakla, monte)
- - return valid reference in get_template_vars() when given var is
- non-existant (monte)
- - add escape type "urlpathinfo" to escape modifier (monte)
-
-Version 2.6.10 (Aug 5, 2005)
-----------------------------
-
- - allow secure_dir to be a filename, not just
- a directory name (monte)
- - set debug.tpl as a secure_dir, not the entire
- SMARTY_DIR (monte)
- - fix proper escaping for literal strings in
- Smarty_Compiler::_parse_var_props() (boots, messju)
- - remove ambiguity for numeric values passed to smarty_make_timestamp()
- (and thus the date_format modifier). numeric values are treated as
- timestamps now. (andreas, messju)
- - add passthru attribute feature to html_select_date (Sedgar,
- monte)
- - add "middle" parameter to truncate (monte)
- - make form input label ids optional (monte)
- - add error message for empty if/elseif statements (eykanal,
- monte)
- - cast selected value to string for comparison in html_radios
- (Exeption, monte)
- - updated html_select_date's year_as_text-feature to be xhtml compliant
- (Mark West, messju)
- - fix handling of selected month html_select_date (Yuri Weseman, messju)
-
-Version 2.6.9 (Mar 31, 2005)
-----------------------------
-
- - disallow variable function calls in {if} statements (messju, monte)
- - disallow variable function calls in {math} equations (messju, monte)
-
-Version 2.6.8 (Mar 21, 2005)
-----------------------------
-
- - remove e-modifier from regex_replace modifier (messju)
- - remove cast of object to array in foreach's from-attribute (messju)
- - add "null" as a valid token for {if} when security is enabled (messju)
- - add javascript_charcode encoding option to mailto function
- (monte)
- - add ids to html_radios labels (monte, menulis)
- - fix handling of strip-tags with non-default delimiters (Mark West, messju)
-
-Version 2.6.7 (Feb 3, 2005)
----------------------------
-
- - fix handling of hashed opening php-tags inside strip-blocks (messju)
- - removed border tag from html_image function (monte)
- - change escape:url use rawurlencode() instead of urlencode() (messju)
- - make $smarty.const.FOO compile to "FOO", and not to "constant('foo')".
- this is less code and a little faster execution. note that undefined
- constants are now displayed as the constant's name. (messju)
- - make block functions and registered objects' block methods use a
- local variable for block_content instead of a property of $smarty (messju)
- - fix escaping in the generated code that calls smarty_core_load_plugins
- (jes5199, messju)
- - fix invalid HTML issue with popup (Stefanos Harhalakis,
- Monte)
- - fixed {popup} to properly handle inarray and function parameters and added
- support for mouseoff and followmouse options (boots)
-
-Version 2.6.6 (Oct 13, 2004)
-----------------------------
-
- - fixed nocache-handling with nested includes (Lars Jankowfsky, messju)
- - moved /libs/core to /libs/internals (boots)
- - fixed more parsing problems (messju)
-
-Version 2.6.5 (Sept 13, 2004)
------------------------------
-
- - fixed some parsing problems with object calls introduced
- in 2.6.4 (Monte)
- - add $smarty->security_settings['ALLOW_CONSTANTS']. note: this
- defaults to false which means you have to allow them explicitly
- in your secured templates from now on! (messju)
-
-Version 2.6.4 (Sept 7, 2004)
-----------------------------
-
- - add $smarty.ldelim and $smarty.rdelim to smarty special var (Monte)
- - fall back to old uniqid()-behaviour when tempnam() fails in
- core.write_file.php (messju)
- - fix capitalize modifier, don't rely on buggy ucwords (Monte)
- - make html_select_date work with negative timestamps, also
- force year range to include given date unless explicitly
- set (Garo, Monte)
- - fix bug with {fetch}, passing user/pass in url did not work
- (Monte)
- - fix occasional wrong error messages on mismatched tags when
- {else}, {elseif}, {foreachelse} or {sectionelse} is involved (messju)
- - fix handling of methods arguments (messju, Manfred Wischin)
- - remove touch() call that made the compiled-template's timestamp the
- same as the source-template's one. (messju)
- - add assign attribute to html_checkboxes and html_radios
- (pcg, Monte)
- - remove non-xhtml conformant tag from mailto function
- (tacker, Monte)
- - handle date_format codes %e, %T and %D for windows (tip,
- Monte)
- - fix unnecessary call to smarty_core_get_include_path() inside
- Smarty::_get_auto_filename() (c960657, messju)
- - add error-messages when anything else than an identifier is passed
- to foreach's key- or item-attribute (messju)
- - fix handling of digits inside tagnames (messju)
- - fix escaping of backslashes in Smarty_Compiler::_quote_replace() (messju)
-
-Version 2.6.3 (June 16, 2004)
------------------------------
-
- - added escapement of '</' to '<\/' in escape:javascript
- modifier (c960657, Monte)
- - added obfuscation of protocol-string in {mailto} when using hex-
- encoding (bharat, messju)
- - enhanced auto-generated filenames for templates_c and cache (messju)
- - add 'nonstd' to escape modifier for escaping non-std chars,
- such as ms doc quote (Monte)
- - adjusted textformat to not output wrap chars after last para
- (Monte)
- - use tempnam() instead of unqid() to create better temporary files in
- smarty_core_write_file() (xces, messju)
- - add 'mail' to escape modifier for safe display of e-mail
- addresses (Monte)
- - add cycle function attribute "reset" to english docs (Monte)
- - enhanced support of numeric constants as variable-expressions (messju)
- - add case decentity to smarty_modifier_escape() (Konstantin A. Pelepelin,
- messju)
- - make smarty_core_write_compiled_include() php5-aware (messju)
- - removed unused functionality to load a subset of lines from a file (messju)
- - fix is_secure() should only check if a file is_readable, not if
- the directory where it is in is readable (sagi, messju)
- - fix problem displaying debug console when $default_resource_type
- is not "file:" (c960657, Monte)
- - fix permission handling with security and config_load (messju)
- - removed '.' from the list of default template locations in
- _parse_resource_name() (messju)
- - fix avoid warning with template_exists() on an absolute paths (messju)
- - fix parameters passed to resource's secure()-function (messju)
- - fix handling of integer values like width and delay im
- smarty_function_popup() (messju)
-
-Version 2.6.2 (Feb 17, 2004)
-----------------------------
-
- - fix allow empty years, months and days in html_select_date's
- time-attribute (messju)
- - fix YES and NO should not be booleanized inside triple-quotes in a
- config-file (messju)
- - fix accidently slurped line following a triple-quoted value in a
- config-file (messju)
- - change default for use_sub_dirs to false (messju)
- - fix quoting of values in smarty_function_popup() (messju)
- - fix handling of hidden sections in Config_File (messju)
- - add handling of resources for {config_load} (messju)
- - fix bug when using arrays with tr_attr and td_attr in {html_table} (messju)
- - add unit testing to cvs core (Monte)
-
-Version 2.6.1 (Jan 16, 2004)
-----------------------------
-
- - rename $smarty->tpl_error_reporting to $smarty->error_reporting
- (messju)
- - fix interpretation of $smarty->security in {html_image} (messju)
- - add caching of requested paths to _assemble_plugin_filepath() (messju)
- - fix handling of comments inside {php}- and {literal}-blocks (messju)
- - fix bug handling triple-quotes in config-files (BRDude, messju)
- - change default of request_use_auto_globals to true - $_SERVER is
- now preferred over $HTTP_SERVER_VARS (messju)
- - re-add support for $SCRIPT_NAME (messju)
- - reactivate $smarty->default_modifiers (messju)
- - add cookie persistance to debug console (Monte)
- - allow single-digit days and months without smarty_make_timestamp()
- in html_select_date (messju)
- - fix headers sent erroneously with cache_modified_check and fetch()
- (wphilips, messju)
- - fix config_file path bug (Marc Cabadas, Monte)
- - fix 'is even by' and 'is odd by' logic (Monte)
- - add day_empty, month_empty, year_empty and all_empty attributes to
- html_select_date (messju)
- - add table of explanation for {if} qualifiers in docs (boots)
- - fix bug when comparing array-keys to "selected" in html_options
- and html_checkboxes (messju)
- - add better checks for correctly nested tags when compiling (messju)
- - remove {$SCRIPT_NAME}. use {$smarty.server.SCRIPT_NAME} instead (messju)
- - remove $global_assign. assign global variables explicitly instead (messju)
- - fix example for count_characters in docs (boots)
- - add section new basic syntax section "Escaping Smarty Parsing" in docs (boots)
- - fix error handler call in config_load (boots)
- - remove warning in debug_print_var on php-resources (messju)
- - move function.assign.php to compiler.assign.php (messju)
- - add property $tpl_error_reporting (messju)
- - remove property $undefined. "null" is used literally instead (messju)
-
-Version 2.6.0 (Nov 19, 2003)
-----------------------------
-
- - move Smarty::quote_replace() to Smarty_Compiler::_quote_replace() (messju)
- - remove import of of attributes of {include_php} to php's namespace.
- use $params[name] instead (messju)
-
-Version 2.6.0-RC3 (Nov 13, 2003)
---------------------------------
-
- - fix handling of $var.key inside [] (messju)
- - fix handling of assign inside {insert}-tags (messju)
- - fix handling if [...] inside triple-quotes in config-files (messju)
- - fix handling of simple-math-operators inside modifiers (Dominik, messju)
- - fix handling of trailing-slashes in open_basedir in
- smarty_core_create_dir_structure() (packman, messju)
-
-Version 2.6.0-RC2 (Oct 8, 2003)
--------------------------------
-
- - apply modifiers only once to section-loop and foreach-from attrs (messju)
- - remove use of _smarty_cached_paths-files (messju)
- - remove Smarty::_plugin_implementation_exists() - use is_callable() (messju)
- - ignore {strip}/{/strip) inside {strip}-blocks (messju)
- - fixed removal of leading/trailing newlines in {strip}-blocks (messju)
- - fixed proper escaping of " and ' with escape:javascript (messju)
- - fixed bug in traversal of $smarty->plugins_dir-array. now the
- first matching plugin is taken (messju)
- - moved {strip} back into the compiler (messju)
- - fixed config_load: handling of section-attribute and use of
- multiple config-files in one template (atu, messju)
-
-Version 2.6.0-RC1 (August 11, 2003)
------------------------------------
-
- - fixed status-header for cache_modified_check under cgi-sapi (messju)
- - added optional parameter $cache_attrs to register_function() and
- register_block(). $cache_attrs is an array containing attribute-
- names that should be cached on calls to functions that have
- $cacheable set to false. (messju)
- - enabled registration of class-methods as callbacks for the register_*-
- functions (use: array('classname', 'method_name')) as callback) (messju)
- - added filepath caching (Monte)
- - added optional assign-attribute to {capture}-tag (messju)
- - added $cacheable-parameter to register_compiler_function() (messju)
- - added $cacheable-parameter with default=true to register_function()
- and register_block() (messju)
- - add math speedup to core (Dominik, Monte)
- - fix newlines for tags without template output (Monte)
- - added config-option "request_use_auto_globals" to make auto-globals be
- used as request vars instead of HTTP_*_VARS (messju)
- - speed up config_load, simplify compiling (Monte)
- - added block-methods for registered objects (Bharat Mediratta, messju)
- - ignore one char resource names like c:foo.tpl (Monte)
- - added default_resource_type feature (Monte)
- - fix bug where config file starts with hidden section (boots, Monte)
- - add discrete error checking pertaining to $cache_dir
- and $compile_dir, their existance and writability (Monte)
- - fixed behaviour of start=... for {counter} (messju)
- - fixed assign for {counter} (messju)
- - added params vdir, hdir and inner to html_table to allow looping
- over the data in various directions (messju)
- - allow spaces in literal tags (Paul Lockaby, Monte)
- - speed up compiled templates, hardcode plugin filepaths
- instead of dynamically calculate at runtime. (Monte)
- - abstract many core components from Smarty.class.php,
- speeding up core class instantiation (Monte)
- - fixed bug in _create_dir_structure() when used with open_basedir-
- restriction and relative paths (messju)
- - use DIRECTORY_SEPARATOR exclusively, keep DIR_SEP for BC (Monte)
- - changed "link" to "href" in html_image. "link" is still working
- but deprecated (messju)
- - html_image always renders an alt-tag now (default alt="") (messju)
- - fixed assign attribute for multiple counters (messju)
- - added simple math operators to variables (Monte)
- - enabled array(&$obj. 'source', 'timestamp', 'secure', 'trusted')
- as callback for register_resource() (messju);
- - enabled array(&$obj, 'method') as callback for
- $default_template_handler_func (messju)
- - remove unnecessary close/open tags from compiled templates
- (Monte)
- - fixed errornous creation of '//' in image_path in html_image (messju)
- - fix escapement of special chars for key vals in debug
- console (Monte)
- - fixed debug timing logic for config_load (Tom Sommer, Monte)
- - all in-code doc comments converted to phpDocumentor format (Greg)
- - moved strip from smarty core to plugin (Monte)
- - moved config_load from smarty core to plugin (Monte)
- - added &$repeat-parameter to block-functions (messju)
- - enabled hex-constants in function.math.php (messju)
- - enabled hex-constants (0x...) as function-attributes, inside if-statements
- and as modifier-parameters (messju)
- - fixed bug with passing $smarty as reference in Smarty.compiler.class
- (messju)
- - corrected output with {strip} and PHP tag newlines (Monte)
- - added possibility to register function-callbacks as "array(&$obj, 'method)"
- this affects register_function(), -block, -compiler_function, -modifier,
- -prefilter, -postfilter, -outputfilter-functions() and $cache_handler_func
- (messju)
- - added <labels> to html_checkboxes and html_radios (Philippe, messju)
- - added "labels"-options to turn off labels in html_checkboxes and _radios
- (messju)
-
-Version 2.5.0 (April 11, 2003)
-------------------------------
-
- - fixed bug with default modifier when passing integer 0
- (Monte)
- - change backtic syntax from $`foo` to `$foo` (Monte)
- - recognize $foo[][] syntax inside embedded quotes without
- backtics (Monte)
- - name=123 is passed as an integer (not a string) to plugins now (messju)
- - $length is now propagated to sub-values in debug_print_var (messju)
-
-Version 2.5.0-RC2 (March 26, 2003)
-----------------------------------
-
- - made clear_cache() ignore compile_id, when clearing cache-groups (this
- is when no $tpl_file is supplied) (messju)
- - made onmouseout XHTML-compliant in function.popup.php (messju)
- - applied local-var-naming-scheme to fetch() (messju)
- - renamed $localvars to $_localvars in cache-file-handling-functions,
- added _get_auto_id()-function (messju)
- - swapped compile_id and cache_id in read_cache_file and write_cache_file
- (messju)
- - reverted patch for cache-file-handling (messju)
- - made html_radios and html_checkboxes accept "selected" instead
- of "checked" optionally. (messju)
- - made compile_id ignored in clear_cache, made order of
- auto_file_name $cache_id.$compile_id again, applied the the new
- variable-naming-scheme for cache_file_handing functions (messju)
- - removed notice of undefined var in _rm_auto() (messju)
- - added warning message when an array is passed as
- the "checked" value of html_radios (Monte)
- - fixed errormessage in _compile_smarty_ref() (messju)
- - updated docs for html_image "name" -> "file" (messju)
- - fixed bug with html_options-optgroups (Nichlas Löfdahl, messju)
- - cleaned up calls to readdir() (messju)
- - fixed bug with passing multiple modifiers to a parameter
- (Monte)
- - updated docs for html_checkboxes, html_options and html_radios (messju)
- - fixed wrong default "name" attribute for html_options (messju)
- - html_checkboxes now expect the options as attribute "options" instead
- of "checkboxes. html_radios expect "options" instead of "radios".
- cleaned up indentiation (messju)
- - fixed too greedy str_replace in trimwhitespace outputfilter (messju)
- - html_checkboxes and html_radios passthru all unknown paramters now
- additionally their output is now XHTML compliant (messju)
- - html_options passthru all unknown paramters now (messju)
- - fix link functionality of html_image, also make
- output XHTML compatible (Hinrich Donner, Monte)
- - append "@" to default modifier vars/args
- supress possible warnings (Monte)
- - fix problem with escaped double quotes (Monte)
- - fix html_radios to not return an array (Monte)
- - fixed length in modifier.truncate.php (messju)
- - fixed handling of '$'-signs in trimwhitespace outputfilter (messju)
- - fix bug that makes config files recompile every time
- (Nagger, Monte)
- - add dpi functionality to html_image, change "name"
- parameter to "file" (Thomas Shulz, Monte)
- - fix height/width parameter index in html_image (Gerard,
- Monte)
- - get rid of unsetting name and script attributes
- to insert tag (Thomas Schulz, Monte)
- - changed argument order of string_format modifier back,
- was right in the first place (Monte)
-
-Version 2.5.0-RC1 (March 5, 2003)
----------------------------------
-
- - fixed notice in popup function (Nagger, Monte)
- - fix "once" var compiling for include_php (Monte)
- - added nl2br modifier to distribution (Monte)
- - added html_image to distribution (Monte)
- - added cat modifier to distribution (Monte)
- - added html_table to distribution (Monte)
- - added << >> <> support to if statments (SMK, Monte)
- - fix _assign_smarty_interface to not overwrite keys
- other than 'request' (Jerome Poudevigne, Monte)
- - added html_checkboxes to distribution (Christopher Kvarme, Monte)
- - added html_radios to distribution (Christopher Kvarme, Monte)
- - fixed string_format modifier args (wrong order) (Paul
- Lockaby, Monte)
- - use tmp file for file writes, avoid file lock race (Monte)
- - support syntax "$`smarty.config.foo`.tpl" for embedded
- vars in quotes, and allow full dollar var syntax (Monte)
- - add $smarty.config.varname variable for accessing config vars (Paul
- Lockaby, Monte)
- - silence PHP warnings in function.fetch.php (Eduardo,
- Monte)
- - added get_config_vars(), same basic functionality as
- get_template_vars() (Monte)
- - update get_template_vars() to be able to get
- individual vars (Monte)
- - fix minor logic in _fetch_template_info (Dennis Gearon,
- Monte)
- - fix cache groups with compile_id set (Monte)
- - add support for merging appended vars (messju, Monte)
- - allow null as function attribute value
- (André Rabold, Monte)
- - support $foo->bar[index] syntax (Monte)
- - add get_registered_object function (messju, Monte)
- - treat unrecognized param attribute syntax as string (Monte)
- - support $smarty.const.$foo syntax (messju, Monte)
- - remove E_NOTICE warnings from debug.tpl,
- escape modifier (Kanstantin, Monte)
- - don't count non-ascii chars in count_words modifier
- (Kanstantin, Monte)
- - clean up param calls to _parse_var and _parse_attrs (Monte)
- - define $template_source var, elude possible warning
- (Monte)
- - fix syntax problem with evaluating PHP constants (Monte)
- - add @ and === as valid if statement tokens (Monte)
- - enable error messages for config_load errors,
- use $this->config_class for loading class name (Monte)
- - fix html_options to not escape already escaped entities (Monte)
- - send Last-Modified header on cache creation (Monte)
- - check strict syntax of function attributes (Monte)
- - dropped support for modifers on object parameters,
- added support for objects as modifier parameters (Monte)
- - fixed bug with decimal numbers in if statements (Monte)
-
-Version 2.4.2 (Feb 11, 2003)
-----------------------------
- - support embedded variables in objects (Monte)
- - fix bug with objects with no properties (M Mohr, Monte)
- - support full dollar var syntax in quoted text (Monte)
- - fixed bug in $smarty.const.FOO introduced in 2.4.1 (M
- Mohr, Monte)
-
-Version 2.4.1 (Feb 6, 2003)
----------------------------
-
- - ignore case in IF statements (Rainer Collet, Monte)
- - treat undefined constants as null (Ferdinand Beyer, Monte)
- - fix problem with inserts and nested fetches
- (Rainer Collet, Monte)
- - added support for passing params to include_php
- (Tim Riley, Monte)
- - added support for math operators in if statements (Monte)
- - added support for $foo->bar[$x].blah syntax (Monte)
-
-Version 2.4.0 (Feb 2, 2003)
----------------------------
-
- - fix known problems with php tag handling in templates
- (recursion, echoing xml tags) (Monte)
- - add support for object registration (Monte)
- - add debug template to secure_dir, add template_dir
- to secure_dir by default (Ferdinand Beyer, Monte)
- - added support for assigned object access (Monte)
- - fixed bug with directories named '0' (Frank Bauer, Monte)
- - add javascript parameter to escape modifier (Monte)
- - added calling function line numbers to syntax error
- messages in compiler (Monte)
- - added support for modifiers to function calls (Monte)
- - support return value for custom functions
- instead of echoing (but echo still works) (Monte)
- - added direct access to constants
- via $smarty.const.FOO (Monte)
- - added support for passing modifiers
- to static values (Monte)
- - fix up regex code in compiler, more accurate and
- maintainable (Monte)
- - added day_value_format to html_select_date (Marcus
- Bointon, Monte)
- - assigned variables are no longer in global
- namespace, saving extract() calls and speeding
- up fetch() and display() linearly with no. of
- assigned variables (Monte)
- - added trimwhitespace output filter to dist. (Monte)
- - fix popup function to allow newlines in text (Monte)
- - escape html entities in html_options (Monte)
- - fixed bug with label for html_options (Monte)
- - added config_load API function (Monte)
- - added caching to config file loading (Monte)
- - added "extra" parameter to mailto function (Monte,
- Massimiliano Perantoni)
- - added mailto plugin to dist. (Monte)
-
-Version 2.3.1 (Nov 19, 2002)
-----------------------------
-
- - added optgroup support to html_options (Monte, Robert
- Amos)
- - set mtime on compile files so they match source
- files (Monte, Peter Bowen)
- - added proper support for open_basedir setting
- (Monte, Alessandro Astarita)
- - added strip variable modifier, updated docs (Monte)
- - fixed access to $smarty.x variables as arrays. (Andrei)
- - fixed errors with example setup docs (Monte, Matthew
- Hagerty)
- - added textformat block function (Monte)
-
-Version 2.3.0 (Aug 7, 2002)
----------------------------
-
- - added assign_by_ref() and append_by_ref() functions
- (Bob Silva, Monte)
- - changed default warning type for plugin errors from
- E_USER_WARNING to E_USER_ERROR (Monte)
- - added $all_extra, $hour_extra, $minute_extra,
- $second_extra and $meridian_extra parameters to
- html_select_time function (Rainer Collet, Monte)
- - update debug console to print objects (Simon Willison,
- Monte)
- - fix Config_File class to not error when there are no
- sections (Peter Kmet, Monte)
- - add default modifier logic (Monte)
- - updated popup_init to be xhtml compliant (Tom Oram, Monte)
- - fix filename bug with windows (Gary Loescher, Monte)
- - add ability to supply expire time in seconds when clearing
- cache or compile files (Monte)
- - add {debug} plugin to distribution (Monte)
- - fixed bug with insert tags, loading from "script" attribute
- when caching is enabled (Monte)
- - fix bug with debug_tpl file path with Windows (.SMK., Monte)
- - fix append() function with string/array problem (Monte)
-
-Version 2.2.0 (July 11, 2002)
------------------------------
-
- - make debug.tpl work with any delimiter (Monte)
- - change logic in assign() and append() to test var names
- against != '' instead of empty() (Monte)
- - fix PHP notice in append() function (Monte)
- - allow $plugins_dir to be an array of directories
- (Andreas Kossmeier, Monte)
- - move debug.tpl to SMARTY_DIR, add to constructor (Monte)
- - fixed warning message in function.assign_debug_info (Monte)
- - fixed $template_dir, $compile_dir, $cache_dir, $config_dir,
- $plugin_dir to respect include_path (Monte)
- - fixed warning message with output filter array (Monte)
- - add optional 2nd parameter to date_format, used as
- the default date if the passed date is empty (Monte)
- - gave $reset a default value in cycle plugin (Monte)
- - fixed warnings with html_select_date and timestamp
- functions (Monte)
- - added support for sub directory exlusion format (Monte)
- - added support for grouping by cache_id, compile_id
- and segments thereof (Monte)
- - changed cache and compile files to human readable
- format (Monte)
- - remove overlib.js file from distribution (Monte)
- - fixed bug with 304 Not Modified response sending
- content (Monte)
- - fixed cycle function to respect delimiter after
- initial setting (Monte)
- - update $GLOBALS references to work properly with
- track_globals settings (Michal Prinke, Monte)
- - fixed bug in math function with call to assign
- (Grigory V. Kareev, Monte)
- - optimized for loops with count() function calls (Monte)
- - add month_value_format attribute to html_select_date
- plugin (Gary Loescher, Monte)
- - made it possible to use simple variables inside [] for
- indexing. (Andrei)
- - added "once" attribute to {include_php}. (Monte)
-
-Version 2.1.1
--------------
- - added cycle function. (Monte)
- - fixed bug with resource testing, and include_path. (Monte)
- - fixed a bug with register_outputfilter function. (Monte)
-
-Version 2.1.0
--------------
-
- - introduced output filters. (Andrei)
- - changed the way filters are loaded, added load_filter()
- API function and $autoload_filters variable. (Andrei)
- - added caching logic for expire times per cache file
- (Norbert Rocher, Monte)
- - fixed html_select_date when field separator is "/"
- (Roberto Berto, Monte)
- - added YYYY-MM-DD format support to html_select_date
- (Jan Rosier, Monte)
- - fixed cache_lifetime logic bug, also made -1 = never
- expire (Monte)
- - fixed directory separator issue for Windows. (Andrei)
- - added ability to use simple variables as array indices or
- object properties. (Andrei)
- - added ability to unregister pre/postfilters plugins at
- runtime. (Andrei)
- - added 'htmlall' attribute to escape modifier. (Monte)
- - added template_exists() API function. (Andrei)
- - fixed a problem with using dynamic values for 'file'
- attribute of {include_php} tag. (Andrei)
- - added $smarty.template variable. (Andrei)
- - fixed several plugins that would not work if the plugin
- directory was not the default one. (Andrei)
- - implemented support for block functions. (Andrei)
- - made it possible to assign variables in pre/postfilter
- plugins. (Andrei)
-
-Version 2.0.1
--------------
- - rename plugin .make_timestamp.php to shared.make_timestamp.php.
- (Monte)
- - changed crc32() generated values, replace '-' with 'N'. (Monte)
- - added support for +/- N syntax in html_select_date year values.
- (Monte)
- - fixed behavior of inserts with script attribute. (Andrei)
- - fixed bug with $smarty.cookies and $smarty.server. (Andrei)
- - wordwrap and indent are missing from 2.0 release, now fixed.
- (Monte)
- - removed show_info_header and show_info_include variables. (Monte)
-
-Version 2.0.0
--------------
- - added "eval" function plugin for evaluating variables as
- templates. (Monte)
- - removed $tpl_file_ext class variable, no longer used. (Monte)
- - added "hex" and "hexentity" escape types to escape modifier.
- (Monte)
- - removed dependency on PEAR. (Andrei)
- - update popup_init to accept src attribute. (Monte, Duncan Forrest)
- - implemented several optimizations, speeding up Smarty
- significantly in most cases. (Andrei,Monte)
- - implemented plugin architecture. (Andrei)
- - added wordwrap and indent modifiers. (Monte)
- - added support for 'If-Modified-Since' headers for cached content.
- (Monte)
- - removed insert_tag_check class variable, no longer needed. (Monte)
- - optimized cache fetches by scanning for insert tags only if they
- exist. (Monte)
- - fixed bugs in overlib. (Monte, Duncan Forrest)
- - fixed a problem with compile_id usage. (Andrei)
- - fixed problem with using assigned vars with {include_php ...}
- filepath. (Monte)
-
-Version 1.5.2
--------------
- - added Smarty object as fifth argument for template resource functions.
- (Monte)
- - fixed a bug with incorrectly combined cache and compile id in
- clear_cache(). (Andrei)
- - fixed bug in smarty_make_timestamp introduced in PHP 4.1.0. (Monte)
- - fixed bug with cached insert debug timing. (Monte)
- - added 'script' attribute to {insert..} which specifies the script that
- the insert function can be found in. (Andrei)
- - added default template function handler. (Monte)
-
-Version 1.5.1
--------------
- - removed error message from the generic _read_file() method, the caller
- should take care of that. (Andrei)
- - fixed a bug with incorrectly combined cache and compile id. (Andrei)
-
-Version 1.5.0
--------------
- - added include_php built-in function, documented. (Monte)
- - added trusted_dir functionality, documented. (Monte)
- - consolidated secure_dir tests to one function. (Monte)
- - prepended _smarty_ to variable names in fetch() class function to avoid
- namespace conflicts. (Monte)
- - introduced $compile_id class variable that can be used to set persistent
- compile identifier across multiple display calls, documented. (Andrei)
- - fixed bug with concatenated null cache and compile identifiers. (Andrei)
- - added $smarty.section.* syntax for accessing section properties,
- documented. (Andrei)
- - added custom cache handling function ability, documented. (Monte)
- - added assign attribute to include, include_php, insert, fetch, math, and
- counter functions, documented. (Monte)
- - fixed bug with fetch testing for local file when http address. (Monte)
- - fixed bug with counter and skipval setting. (Monte)
- - made {config_load ...} merge globals from each config file only once per
- scope, thus avoiding several problems. (Andrei)
- - added {foreach ...} tag that can be used to iterate through
- non-sequential and associative arrays, documented. (Andrei)
- - speeded up section property access a bit. (Andrei)
- - removed $smarty variable from storage used by normal template variables,
- to prevent any problems. (Andrei)
- - fixed a bug that could cause parse error with quotes inside literal
- blocks. (Andrei, Alexander Belonosov)
- - added 'field_array' attribute to html_select_time function, documented.
- (Andrei, Michael Caplan)
- - documented {section} "max" attribute. (Monte)
- - fixed notice message in Smarty_Compiler.class.php. (Monte)
- - fixed bug with clear_cache introduced in 1.4.6, third parameter should
- default to null. (Monte)
- - updated Config_File class to support '\' path separator in OS/2. (Monte,
- Francesco Cipriani)
- - removed secure_ext setting (not used). (Monte)
- - made cache reading process more efficient. (Monte)
- - fixed bug, is_cached() now supports new 1.4.6 caching behavior. (Monte)
- - update FAQ with mailing list Reply-To header FAQ. (Monte)
- - supress error messages for fopen(), fix cache to regenerate if cache
- file is not available (i.e. cluster race condition). (Monte)
- - added index key example to QUICKSTART guide. (Monte)
-
-Version 1.4.6
--------------
- - fixed bug with {assign ...} when passing an empty value. (Monte)
- - add more warning message fixes. (Monte, Tara Johnson)
- - documentation updates. (Monte)
- - update fetch function to give proper warning when fetching a non-readable
- or non-existant file. (Monte)
- - fixed problem with newline at the end of included templates (Monte, Andrei)
- - added feature to regenerate cache if compile_check is enabled and an
- involved template or config file gets modified. (Monte)
- - added DEBUG execution times to included files: REQUIRES updated debug.tpl
- file! (Monte)
- - added support for hidden config variables that cannot be read by
- templates. (Andrei)
- - added execution time to DEBUG console, total and inserts. (Monte)
- - fixed bug where DEBUG console would not appear with cached content. (Monte)
- - added support for postfilter functions that are applied to compiled
- template right after compilation. (Andrei)
- - fixed the name of clear_compile_tpl() API function to clear_compiled_tpl.
- (Andrei)
- - added fix for removing comments so that the line numbers are reported
- correctly in case of errors. (patch from Anders Janson)
- - made html_options output xhtml compatible code. (Monte, Arnaud Limbourg)
-
-Version 1.4.5
--------------
- - update FAQ with index of questions at the top
- - update overlib to 3.50, adjust addon code so that the overlib.js
- file isn't modified, and not using the mini one. (Monte)
- - added many more options to html_select_date. (Alexander Skwar, Andrei)
- - added support for generating different compiled templates from the same
- source template. (Hans-Peter Oeri, Andrei)
- - modified Smarty to pass itself to insert functions as the second
- parameter. (Andrei)
- - modified Smarty to pass itself to prefilter functions as the second
- parameter. (Andrei)
- - fixed syntax error when including a non-existant template with security
- enabled. (Monte)
- - fixed comments handling to allow commenting out template blocks. (Andrei)
- - implemented named capture buffers, with results accessible via
- $smarty.capture.<name>. (Andrei)
- - added ability to index arrays directly by numbers. (Andrei)
- - fixed bug with SMARTY_DIR not prepended to Config_File include. (Monte)
-
-Version 1.4.4
--------------
- - fixed problem with including insecure templates with security enabled.
- (Monte)
- - numerous documentation updates. (Monte)
- - added ENT_QUOTES to escapement of html. (Monte, Sam Beckwith)
- - implemented access to request variables via auto-assigned $smarty
- template variable. (Andrei)
- - fixed a bug with parsing function arguments inside {if} tags if a comma
- was present. (Andrei)
- - updated debug console with config file vars. (Monte)
- - added SMARTY_DIR constant as an alternative to relying on include_path.
- (Monte)
- - added popup_init and popup functions (requires overlib.js). (Monte)
- - updated debug console with config file vars. (Monte)
- - added debugging url control. (Monte)
- - added 'quotes' type to escape modifier. (Monte, Mike Krus)
- - added 'total' and 'iteration' section properties. (Andrei)
- - added 'start', 'max', and 'step' section attributes/properties. (Andrei)
- - fixed a bug with security checking of functions inside {if} tags.
- (Andrei)
- - fixed a bug in Config_File that would incorrectly booleanize values that
- weren't really booleans. (Andrei)
-
-Version 1.4.3
--------------
- - added regex_replace modifier, documented. (Monte)
- - added debugging console feature and custom function assign_debug_info,
- documented. (Monte)
- - added 'scope' attribute for {config_load}, 'global' is now deprecated but
- is still supported. (Andrei)
- - reduced template symbol table pollution by moving config array into the
- class itself. (Andrei)
- - fixed a bug with passing quoted arguments to modifiers inside {if}
- statements. (Andrei, Sam Beckwith)
- - added security features for third party template editing, documented
- (Monte)
- - added assign custom function, documented. (Monte)
- - fixed bug with template header using version instead of _version. (Monte)
- - fixed a problem with putting $ followed by numbers inside {strip} and
- {/strip} tags. (Andrei)
- - fixed Config_File class to allow empty config paths (defaults to current
- directory). (Andrei)
-
-Version 1.4.2
--------------
- - move $version to internal variable, remove from docs. (Monte)
- - cleaned up compiled templates global scope by moving some variables into
- the class itself. (Andrei)
- - fixed a bug that would not allow referring to a section in the including
- file from the included file. (Andrei)
- - configs directory missing from 1.4.1 release, added back in. (Monte)
- - added windows include_path setup instructions to FAQ & QUICKSTART.
- (Monte)
-
-Version 1.4.1
--------------
- - fix LOCK_EX logic for all windows platforms (Monte)
- - fixed indexing by section properties with the new syntax. (Andrei)
- - updated Smarty to use absolute paths when requiring/including Smarty
- components. (Andrei, John Lim)
-
-Version 1.4.0
--------------
- - added {capture}{/capture} function, documented (Monte)
- - added {counter} function, documented (Monte)
-
-Version 1.4.0b2
----------------
- - fixed issue in Config_File.class with referencing blank sections (Andrei)
- - fixed problem with passing variables to included files (Andrei)
- - fixed resource path recognition for windows (Monte)
-
-Version 1.4.0b1
----------------
- - added "componentized templates" tip into documentation (Monte)
- - added {php}{/php} tags for embedding php code into templates (Monte)
- - changed default value of $show_info_header to false (Monte)
- - implemented '->' syntax for accessing properties of objects passed to the
- template. (Andrei)
- - allowed custom functions to receive Smarty object as the second
- parameter; this can be used to dynamically change template variables, for
- example. (Andrei)
- - added custom compiler functions support, register_compiler_function() and
- unregister_compiler_function() API functions. (Andrei, Ivo Jansch).
- - updated GLOBAL_ASSIGN to take SCRIPT_NAME from HTTP_SERVER_VARS
- instead of global variable. You can also assign several variables
- in one shot with an array. (Monte, Roman Neuhauser)
- - added template prefilters, register_prefilter() and
- unregister_prefilter() API functions. (Monte)
- - added RELEASE_NOTES file to distribution. (Monte)
- - moved CREDITS out of manual into its own file. (Monte)
- - added register_resource() and unregister_resource() API functions. (Monte)
- - changed the syntax of indexing template variables, thus supporting
- structures of arbitrary complexity; supplied fix_vars.php script to fix
- old syntax. (Andrei)
- - added $insert_tag_check to speed up cached pages if {insert ...} is not
- used. (Monte)
- - added $compiler_class variable to allow specifying a different compiler
- class. (Andrei)
- - changed Smarty to compile templates at runtime, allowing for arbitrary
- template resources. (Monte)
- - added fix for LOCK_EX under Windows and changed a couple of file
- permissions for security. (Monte, Fernando Nunes)
- - allow arbitrary date strings to date_format, html_select_date and
- html_select_time (Monte)
-
-Version 1.3.2
--------------
- - fixed a bug that caused some nested includes to loop infinitely. (Andrei)
- - added optional HTML header to output. (Monte)
- - significantly improved config_load performance. (Andrei)
- - added format attribute to math function. (Monte)
- - added html_select_time custom function. (Andrei)
- - fixed minor PHP warning when attempting to unset an unset variable
- (Monte)
- - added count_characters, count_words, count_sentences, count_paragraphs
- modifiers (Monte)
-
-Version 1.3.1pl1
---------------
- - bug fix, recovered missing _syntax_error function (Monte)
-
-Version 1.3.1
--------------
- - document first, last, index_prev, index_next (Monte)
- - added 'first' and 'last' section properties. (Andrei)
- - split out compiling code to separate class for faster template execution
- time (Monte)
- - fixed a couple of minor PHP warnings (Monte)
- - added and documented unregister_modifier() and unregister_function() API
- calls. (Monte)
- - added and documented 'fetch' and 'math' functions. (Monte)
- - added ability to index looped variables by section properties, e.g.
- $foo.index_prev/bar. (Andrei)
- - added index_prev and index_next section properties. (Andrei)
- - fixed issue with php executing in literal blocks. (Monte)
-
-Version 1.3.0
--------------
- - moved license from GPL to LGPL (Monte)
- - implemented workaround for PHP "feature" that eats carriage returns
- if the PHP tag is at the end of the line. (Andrei)
- - removed $allow_php, added $php_handling logic (Monte)
- - added file locking to prevent reader/writer problem. (Andrei)
- - made Smarty catch unimplemented modifiers and custom functions and output
- error messages during compilation instead of failing during run time.
- (Andrei)
- - removed short-tags at the top of the smarty scripts (Monte)
- - added register_function() and register_modifier() API calls to make
- registering stuff easier. (Andrei)
- - added template results caching capability. (Monte, Andrei)
- - added optional 'options' attribute to html_options custom function
- that allows passing associative arrays for values/output. (Andrei)
- - modifier arguments can now contain '|' and ':' characters inside quoted
- strings. (Andrei)
-
-Version 1.2.2
--------------
- - fixed bug that would not respect nested template directories and would
- put all compiled files into top-level one. (Andrei)
- - fixed bug using $PHP_VERSION instead of environment var PHP_VERSION.
- (Monte)
- - a couple small warning fixes. (Monte)
-
-Version 1.2.1
--------------
- - added $compile_dir, removed $compile_dir_ext, simplified usage. (Monte)
- - added tips & tricks chapter to documentation. (Monte)
- - misc documentation updates. (Monte)
-
-Version 1.2.0
--------------
- - updated documentation (Monte)
- - added file and line number information to syntax error messages. (Andrei)
- - added ability to index template vars by a key. (Andrei)
-
-Version 1.1.0
--------------
- - misc documentation changes, official stable release
-
-Version 1.0b
-------------
- - fixed the bug that prevented using non-array values for 'loop' attribute.
- (Andrei)
- - many misc documentation changes & additions (Monte)
-
-Version 1.0a
-------------
- - fixed bug that caused templates to recompile every time (Monte)
-
-Version 1.0
-------------
- - initial release
-
-/* vim: set et tw=64 ft=changelog: */
diff --git a/BSF/include/smarty/README b/BSF/include/smarty/README
deleted file mode 100644
index 6e7c93c56..000000000
--- a/BSF/include/smarty/README
+++ /dev/null
@@ -1,85 +0,0 @@
-NAME:
-
- Smarty - the PHP compiling template engine
-
-VERSION: 2.6.19
-
-AUTHORS:
-
- Monte Ohrt <monte at ohrt dot com>
- Andrei Zmievski <andrei@php.net>
-
-MAILING LISTS:
-
- We have a few mailing lists. "discussion" for you to share your ideas or ask
- questions, "developers" for those interested in the development efforts of Smarty,
- and "svn" for those that would like to track the updates made in the svn
- repository.
-
- send a blank e-mail message to:
- smarty-discussion-subscribe@googlecode.com(subscribe to the general discussion list)
- smarty-discussion-unsubscribe@googlecode.com (unsubscribe from the general discussion list)
- smarty-discussion-digest-subscribe@googlecode.com (subscribe to digest)
- smarty-discussion-digest-unsubscribe@googlecode.com (unsubscribe from digest)
- smarty-developers-subscribe@googlecode.com (subscribe to the dev list)
- smarty-developers-unsubscribe@googlecode.com (unsubscribe from the dev list)
- smarty-svn-subscribe@googlecode.com (subscribe to the svn list)
- smarty-svn-unsubscribe@googlecode.com (unsubscribe from the svn list)
-
- You can also browse the mailing list archives at
- http://groups.google.com/group/smarty-discussion
- http://groups.google.com/group/smarty-developers
-
- and the OLD list archives at
- http://marc.theaimsgroup.com/?l=smarty&r=1&w=2
-
-SYNOPSIS:
-
- require("Smarty.class.php");
-
- $smarty = new Smarty;
-
- $smarty->assign("Title","My Homepage");
- $smarty->assign("Names",array("John","Gary","Gregg","James"));
-
- $smarty->display("index.tpl");
-
-
-DESCRIPTION:
-
- What is Smarty?
-
- Smarty is a template engine for PHP. Many other template engines for PHP
- provide basic variable substitution and dynamic block functionality.
- Smarty takes a step further to be a "smart" template engine, adding
- features such as configuration files, template functions, and variable
- modifiers, and making all of this functionality as easy as possible to
- use for both programmers and template designers. Smarty also converts
- the templates into PHP scripts, eliminating the need to parse the
- templates on every invocation. This makes Smarty extremely scalable and
- manageable for large application needs.
-
- Some of Smarty's features:
-
- * it is extremely fast
- * no template parsing overhead, only compiles once.
- * it is smart about recompiling only the template files that have
- changed.
- * the template language is remarkably extensible via the plugin
- architecture.
- * configurable template delimiter tag syntax, so you can use
- {}, {{}}, <!--{}-->, or whatever you like.
- * built-in caching of template output.
- * arbitrary template sources (filesystem, databases, etc.)
- * template if/elseif/else/endif constructs are passed to the PHP parser,
- so the if syntax can be as simple or as complex as you like.
- * unlimited nesting of sections, conditionals, etc. allowed
- * it is possible to embed PHP code right in your template files,
- although not recommended and doubtfully needed since the engine
- is so customizable.
- * and many more.
-
-COPYRIGHT:
- Copyright (c) 2001-2005 New Digital Group, Inc. All rights reserved.
- This software is released under the GNU Lesser General Public License.
- Please read the disclaimer at the top of the Smarty.class.php file.
diff --git a/BSF/include/smarty/libs/Config_File.class.php b/BSF/include/smarty/libs/Config_File.class.php
deleted file mode 100644
index 89ba41c45..000000000
--- a/BSF/include/smarty/libs/Config_File.class.php
+++ /dev/null
@@ -1,389 +0,0 @@
-<?php
-
-/**
- * Config_File class.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * @link http://smarty.php.net/
- * @version 2.6.19
- * @copyright Copyright: 2001-2005 New Digital Group, Inc.
- * @author Andrei Zmievski <andrei@php.net>
- * @access public
- * @package Smarty
- */
-
-/* $Id$ */
-
-/**
- * Config file reading class
- * @package Smarty
- */
-class Config_File {
- /**#@+
- * Options
- * @var boolean
- */
- /**
- * Controls whether variables with the same name overwrite each other.
- */
- var $overwrite = true;
-
- /**
- * Controls whether config values of on/true/yes and off/false/no get
- * converted to boolean values automatically.
- */
- var $booleanize = true;
-
- /**
- * Controls whether hidden config sections/vars are read from the file.
- */
- var $read_hidden = true;
-
- /**
- * Controls whether or not to fix mac or dos formatted newlines.
- * If set to true, \r or \r\n will be changed to \n.
- */
- var $fix_newlines = true;
- /**#@-*/
-
- /** @access private */
- var $_config_path = "";
- var $_config_data = array();
- /**#@-*/
-
- /**
- * Constructs a new config file class.
- *
- * @param string $config_path (optional) path to the config files
- */
- function Config_File($config_path = NULL)
- {
- if (isset($config_path))
- $this->set_path($config_path);
- }
-
-
- /**
- * Set the path where configuration files can be found.
- *
- * @param string $config_path path to the config files
- */
- function set_path($config_path)
- {
- if (!empty($config_path)) {
- if (!is_string($config_path) || !file_exists($config_path) || !is_dir($config_path)) {
- $this->_trigger_error_msg("Bad config file path '$config_path'");
- return;
- }
- if(substr($config_path, -1) != DIRECTORY_SEPARATOR) {
- $config_path .= DIRECTORY_SEPARATOR;
- }
-
- $this->_config_path = $config_path;
- }
- }
-
-
- /**
- * Retrieves config info based on the file, section, and variable name.
- *
- * @param string $file_name config file to get info for
- * @param string $section_name (optional) section to get info for
- * @param string $var_name (optional) variable to get info for
- * @return string|array a value or array of values
- */
- function get($file_name, $section_name = NULL, $var_name = NULL)
- {
- if (empty($file_name)) {
- $this->_trigger_error_msg('Empty config file name');
- return;
- } else {
- $file_name = $this->_config_path . $file_name;
- if (!isset($this->_config_data[$file_name]))
- $this->load_file($file_name, false);
- }
-
- if (!empty($var_name)) {
- if (empty($section_name)) {
- return $this->_config_data[$file_name]["vars"][$var_name];
- } else {
- if(isset($this->_config_data[$file_name]["sections"][$section_name]["vars"][$var_name]))
- return $this->_config_data[$file_name]["sections"][$section_name]["vars"][$var_name];
- else
- return array();
- }
- } else {
- if (empty($section_name)) {
- return (array)$this->_config_data[$file_name]["vars"];
- } else {
- if(isset($this->_config_data[$file_name]["sections"][$section_name]["vars"]))
- return (array)$this->_config_data[$file_name]["sections"][$section_name]["vars"];
- else
- return array();
- }
- }
- }
-
-
- /**
- * Retrieves config info based on the key.
- *
- * @param $file_name string config key (filename/section/var)
- * @return string|array same as get()
- * @uses get() retrieves information from config file and returns it
- */
- function &get_key($config_key)
- {
- list($file_name, $section_name, $var_name) = explode('/', $config_key, 3);
- $result = &$this->get($file_name, $section_name, $var_name);
- return $result;
- }
-
- /**
- * Get all loaded config file names.
- *
- * @return array an array of loaded config file names
- */
- function get_file_names()
- {
- return array_keys($this->_config_data);
- }
-
-
- /**
- * Get all section names from a loaded file.
- *
- * @param string $file_name config file to get section names from
- * @return array an array of section names from the specified file
- */
- function get_section_names($file_name)
- {
- $file_name = $this->_config_path . $file_name;
- if (!isset($this->_config_data[$file_name])) {
- $this->_trigger_error_msg("Unknown config file '$file_name'");
- return;
- }
-
- return array_keys($this->_config_data[$file_name]["sections"]);
- }
-
-
- /**
- * Get all global or section variable names.
- *
- * @param string $file_name config file to get info for
- * @param string $section_name (optional) section to get info for
- * @return array an array of variables names from the specified file/section
- */
- function get_var_names($file_name, $section = NULL)
- {
- if (empty($file_name)) {
- $this->_trigger_error_msg('Empty config file name');
- return;
- } else if (!isset($this->_config_data[$file_name])) {
- $this->_trigger_error_msg("Unknown config file '$file_name'");
- return;
- }
-
- if (empty($section))
- return array_keys($this->_config_data[$file_name]["vars"]);
- else
- return array_keys($this->_config_data[$file_name]["sections"][$section]["vars"]);
- }
-
-
- /**
- * Clear loaded config data for a certain file or all files.
- *
- * @param string $file_name file to clear config data for
- */
- function clear($file_name = NULL)
- {
- if ($file_name === NULL)
- $this->_config_data = array();
- else if (isset($this->_config_data[$file_name]))
- $this->_config_data[$file_name] = array();
- }
-
-
- /**
- * Load a configuration file manually.
- *
- * @param string $file_name file name to load
- * @param boolean $prepend_path whether current config path should be
- * prepended to the filename
- */
- function load_file($file_name, $prepend_path = true)
- {
- if ($prepend_path && $this->_config_path != "")
- $config_file = $this->_config_path . $file_name;
- else
- $config_file = $file_name;
-
- ini_set('track_errors', true);
- $fp = @fopen($config_file, "r");
- if (!is_resource($fp)) {
- $this->_trigger_error_msg("Could not open config file '$config_file'");
- return false;
- }
-
- $contents = ($size = filesize($config_file)) ? fread($fp, $size) : '';
- fclose($fp);
-
- $this->_config_data[$config_file] = $this->parse_contents($contents);
- return true;
- }
-
- /**
- * Store the contents of a file manually.
- *
- * @param string $config_file file name of the related contents
- * @param string $contents the file-contents to parse
- */
- function set_file_contents($config_file, $contents)
- {
- $this->_config_data[$config_file] = $this->parse_contents($contents);
- return true;
- }
-
- /**
- * parse the source of a configuration file manually.
- *
- * @param string $contents the file-contents to parse
- */
- function parse_contents($contents)
- {
- if($this->fix_newlines) {
- // fix mac/dos formatted newlines
- $contents = preg_replace('!\r\n?!', "\n", $contents);
- }
-
- $config_data = array();
- $config_data['sections'] = array();
- $config_data['vars'] = array();
-
- /* reference to fill with data */
- $vars =& $config_data['vars'];
-
- /* parse file line by line */
- preg_match_all('!^.*\r?\n?!m', $contents, $match);
- $lines = $match[0];
- for ($i=0, $count=count($lines); $i<$count; $i++) {
- $line = $lines[$i];
- if (empty($line)) continue;
-
- if ( substr($line, 0, 1) == '[' && preg_match('!^\[(.*?)\]!', $line, $match) ) {
- /* section found */
- if (substr($match[1], 0, 1) == '.') {
- /* hidden section */
- if ($this->read_hidden) {
- $section_name = substr($match[1], 1);
- } else {
- /* break reference to $vars to ignore hidden section */
- unset($vars);
- $vars = array();
- continue;
- }
- } else {
- $section_name = $match[1];
- }
- if (!isset($config_data['sections'][$section_name]))
- $config_data['sections'][$section_name] = array('vars' => array());
- $vars =& $config_data['sections'][$section_name]['vars'];
- continue;
- }
-
- if (preg_match('/^\s*(\.?\w+)\s*=\s*(.*)/s', $line, $match)) {
- /* variable found */
- $var_name = rtrim($match[1]);
- if (strpos($match[2], '"""') === 0) {
- /* handle multiline-value */
- $lines[$i] = substr($match[2], 3);
- $var_value = '';
- while ($i<$count) {
- if (($pos = strpos($lines[$i], '"""')) === false) {
- $var_value .= $lines[$i++];
- } else {
- /* end of multiline-value */
- $var_value .= substr($lines[$i], 0, $pos);
- break;
- }
- }
- $booleanize = false;
-
- } else {
- /* handle simple value */
- $var_value = preg_replace('/^([\'"])(.*)\1$/', '\2', rtrim($match[2]));
- $booleanize = $this->booleanize;
-
- }
- $this->_set_config_var($vars, $var_name, $var_value, $booleanize);
- }
- /* else unparsable line / means it is a comment / means ignore it */
- }
- return $config_data;
- }
-
- /**#@+ @access private */
- /**
- * @param array &$container
- * @param string $var_name
- * @param mixed $var_value
- * @param boolean $booleanize determines whether $var_value is converted to
- * to true/false
- */
- function _set_config_var(&$container, $var_name, $var_value, $booleanize)
- {
- if (substr($var_name, 0, 1) == '.') {
- if (!$this->read_hidden)
- return;
- else
- $var_name = substr($var_name, 1);
- }
-
- if (!preg_match("/^[a-zA-Z_]\w*$/", $var_name)) {
- $this->_trigger_error_msg("Bad variable name '$var_name'");
- return;
- }
-
- if ($booleanize) {
- if (preg_match("/^(on|true|yes)$/i", $var_value))
- $var_value = true;
- else if (preg_match("/^(off|false|no)$/i", $var_value))
- $var_value = false;
- }
-
- if (!isset($container[$var_name]) || $this->overwrite)
- $container[$var_name] = $var_value;
- else {
- settype($container[$var_name], 'array');
- $container[$var_name][] = $var_value;
- }
- }
-
- /**
- * @uses trigger_error() creates a PHP warning/error
- * @param string $error_msg
- * @param integer $error_type one of
- */
- function _trigger_error_msg($error_msg, $error_type = E_USER_WARNING)
- {
- trigger_error("Config_File error: $error_msg", $error_type);
- }
- /**#@-*/
-}
-
-?>
diff --git a/BSF/include/smarty/libs/Smarty.class.php b/BSF/include/smarty/libs/Smarty.class.php
deleted file mode 100644
index 6b893dec8..000000000
--- a/BSF/include/smarty/libs/Smarty.class.php
+++ /dev/null
@@ -1,1968 +0,0 @@
-<?php
-
-/**
- * Project: Smarty: the PHP compiling template engine
- * File: Smarty.class.php
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * For questions, help, comments, discussion, etc., please join the
- * Smarty mailing list. Send a blank e-mail to
- * smarty-general-subscribe@lists.php.net
- *
- * @link http://smarty.php.net/
- * @copyright 2001-2005 New Digital Group, Inc.
- * @author Monte Ohrt <monte at ohrt dot com>
- * @author Andrei Zmievski <andrei@php.net>
- * @package Smarty
- * @version 2.6.19
- */
-
-/* $Id$ */
-
-/**
- * DIR_SEP isn't used anymore, but third party apps might
- */
-if(!defined('DIR_SEP')) {
- define('DIR_SEP', DIRECTORY_SEPARATOR);
-}
-
-/**
- * set SMARTY_DIR to absolute path to Smarty library files.
- * if not defined, include_path will be used. Sets SMARTY_DIR only if user
- * application has not already defined it.
- */
-
-if (!defined('SMARTY_DIR')) {
- define('SMARTY_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR);
-}
-
-if (!defined('SMARTY_CORE_DIR')) {
- define('SMARTY_CORE_DIR', SMARTY_DIR . 'internals' . DIRECTORY_SEPARATOR);
-}
-
-define('SMARTY_PHP_PASSTHRU', 0);
-define('SMARTY_PHP_QUOTE', 1);
-define('SMARTY_PHP_REMOVE', 2);
-define('SMARTY_PHP_ALLOW', 3);
-
-/**
- * @package Smarty
- */
-class Smarty
-{
- /**#@+
- * Smarty Configuration Section
- */
-
- /**
- * The name of the directory where templates are located.
- *
- * @var string
- */
- var $template_dir = 'templates';
-
- /**
- * The directory where compiled templates are located.
- *
- * @var string
- */
- var $compile_dir = 'templates_c';
-
- /**
- * The directory where config files are located.
- *
- * @var string
- */
- var $config_dir = 'configs';
-
- /**
- * An array of directories searched for plugins.
- *
- * @var array
- */
- var $plugins_dir = array('plugins');
-
- /**
- * If debugging is enabled, a debug console window will display
- * when the page loads (make sure your browser allows unrequested
- * popup windows)
- *
- * @var boolean
- */
- var $debugging = false;
-
- /**
- * When set, smarty does uses this value as error_reporting-level.
- *
- * @var boolean
- */
- var $error_reporting = null;
-
- /**
- * This is the path to the debug console template. If not set,
- * the default one will be used.
- *
- * @var string
- */
- var $debug_tpl = '';
-
- /**
- * This determines if debugging is enable-able from the browser.
- * <ul>
- * <li>NONE => no debugging control allowed</li>
- * <li>URL => enable debugging when SMARTY_DEBUG is found in the URL.</li>
- * </ul>
- * @link http://www.foo.dom/index.php?SMARTY_DEBUG
- * @var string
- */
- var $debugging_ctrl = 'NONE';
-
- /**
- * This tells Smarty whether to check for recompiling or not. Recompiling
- * does not need to happen unless a template or config file is changed.
- * Typically you enable this during development, and disable for
- * production.
- *
- * @var boolean
- */
- var $compile_check = true;
-
- /**
- * This forces templates to compile every time. Useful for development
- * or debugging.
- *
- * @var boolean
- */
- var $force_compile = false;
-
- /**
- * This enables template caching.
- * <ul>
- * <li>0 = no caching</li>
- * <li>1 = use class cache_lifetime value</li>
- * <li>2 = use cache_lifetime in cache file</li>
- * </ul>
- * @var integer
- */
- var $caching = 0;
-
- /**
- * The name of the directory for cache files.
- *
- * @var string
- */
- var $cache_dir = 'cache';
-
- /**
- * This is the number of seconds cached content will persist.
- * <ul>
- * <li>0 = always regenerate cache</li>
- * <li>-1 = never expires</li>
- * </ul>
- *
- * @var integer
- */
- var $cache_lifetime = 3600;
-
- /**
- * Only used when $caching is enabled. If true, then If-Modified-Since headers
- * are respected with cached content, and appropriate HTTP headers are sent.
- * This way repeated hits to a cached page do not send the entire page to the
- * client every time.
- *
- * @var boolean
- */
- var $cache_modified_check = false;
-
- /**
- * This determines how Smarty handles "<?php ... ?>" tags in templates.
- * possible values:
- * <ul>
- * <li>SMARTY_PHP_PASSTHRU -> print tags as plain text</li>
- * <li>SMARTY_PHP_QUOTE -> escape tags as entities</li>
- * <li>SMARTY_PHP_REMOVE -> remove php tags</li>
- * <li>SMARTY_PHP_ALLOW -> execute php tags</li>
- * </ul>
- *
- * @var integer
- */
- var $php_handling = SMARTY_PHP_PASSTHRU;
-
- /**
- * This enables template security. When enabled, many things are restricted
- * in the templates that normally would go unchecked. This is useful when
- * untrusted parties are editing templates and you want a reasonable level
- * of security. (no direct execution of PHP in templates for example)
- *
- * @var boolean
- */
- var $security = false;
-
- /**
- * This is the list of template directories that are considered secure. This
- * is used only if {@link $security} is enabled. One directory per array
- * element. {@link $template_dir} is in this list implicitly.
- *
- * @var array
- */
- var $secure_dir = array();
-
- /**
- * These are the security settings for Smarty. They are used only when
- * {@link $security} is enabled.
- *
- * @var array
- */
- var $security_settings = array(
- 'PHP_HANDLING' => false,
- 'IF_FUNCS' => array('array', 'list',
- 'isset', 'empty',
- 'count', 'sizeof',
- 'in_array', 'is_array',
- 'true', 'false', 'null'),
- 'INCLUDE_ANY' => false,
- 'PHP_TAGS' => false,
- 'MODIFIER_FUNCS' => array('count'),
- 'ALLOW_CONSTANTS' => false
- );
-
- /**
- * This is an array of directories where trusted php scripts reside.
- * {@link $security} is disabled during their inclusion/execution.
- *
- * @var array
- */
- var $trusted_dir = array();
-
- /**
- * The left delimiter used for the template tags.
- *
- * @var string
- */
- var $left_delimiter = '{';
-
- /**
- * The right delimiter used for the template tags.
- *
- * @var string
- */
- var $right_delimiter = '}';
-
- /**
- * The order in which request variables are registered, similar to
- * variables_order in php.ini E = Environment, G = GET, P = POST,
- * C = Cookies, S = Server
- *
- * @var string
- */
- var $request_vars_order = 'EGPCS';
-
- /**
- * Indicates wether $HTTP_*_VARS[] (request_use_auto_globals=false)
- * are uses as request-vars or $_*[]-vars. note: if
- * request_use_auto_globals is true, then $request_vars_order has
- * no effect, but the php-ini-value "gpc_order"
- *
- * @var boolean
- */
- var $request_use_auto_globals = true;
-
- /**
- * Set this if you want different sets of compiled files for the same
- * templates. This is useful for things like different languages.
- * Instead of creating separate sets of templates per language, you
- * set different compile_ids like 'en' and 'de'.
- *
- * @var string
- */
- var $compile_id = null;
-
- /**
- * This tells Smarty whether or not to use sub dirs in the cache/ and
- * templates_c/ directories. sub directories better organized, but
- * may not work well with PHP safe mode enabled.
- *
- * @var boolean
- *
- */
- var $use_sub_dirs = false;
-
- /**
- * This is a list of the modifiers to apply to all template variables.
- * Put each modifier in a separate array element in the order you want
- * them applied. example: <code>array('escape:"htmlall"');</code>
- *
- * @var array
- */
- var $default_modifiers = array();
-
- /**
- * This is the resource type to be used when not specified
- * at the beginning of the resource path. examples:
- * $smarty->display('file:index.tpl');
- * $smarty->display('db:index.tpl');
- * $smarty->display('index.tpl'); // will use default resource type
- * {include file="file:index.tpl"}
- * {include file="db:index.tpl"}
- * {include file="index.tpl"} {* will use default resource type *}
- *
- * @var array
- */
- var $default_resource_type = 'file';
-
- /**
- * The function used for cache file handling. If not set, built-in caching is used.
- *
- * @var null|string function name
- */
- var $cache_handler_func = null;
-
- /**
- * This indicates which filters are automatically loaded into Smarty.
- *
- * @var array array of filter names
- */
- var $autoload_filters = array();
-
- /**#@+
- * @var boolean
- */
- /**
- * This tells if config file vars of the same name overwrite each other or not.
- * if disabled, same name variables are accumulated in an array.
- */
- var $config_overwrite = true;
-
- /**
- * This tells whether or not to automatically booleanize config file variables.
- * If enabled, then the strings "on", "true", and "yes" are treated as boolean
- * true, and "off", "false" and "no" are treated as boolean false.
- */
- var $config_booleanize = true;
-
- /**
- * This tells whether hidden sections [.foobar] are readable from the
- * tempalates or not. Normally you would never allow this since that is
- * the point behind hidden sections: the application can access them, but
- * the templates cannot.
- */
- var $config_read_hidden = false;
-
- /**
- * This tells whether or not automatically fix newlines in config files.
- * It basically converts \r (mac) or \r\n (dos) to \n
- */
- var $config_fix_newlines = true;
- /**#@-*/
-
- /**
- * If a template cannot be found, this PHP function will be executed.
- * Useful for creating templates on-the-fly or other special action.
- *
- * @var string function name
- */
- var $default_template_handler_func = '';
-
- /**
- * The file that contains the compiler class. This can a full
- * pathname, or relative to the php_include path.
- *
- * @var string
- */
- var $compiler_file = 'Smarty_Compiler.class.php';
-
- /**
- * The class used for compiling templates.
- *
- * @var string
- */
- var $compiler_class = 'Smarty_Compiler';
-
- /**
- * The class used to load config vars.
- *
- * @var string
- */
- var $config_class = 'Config_File';
-
-/**#@+
- * END Smarty Configuration Section
- * There should be no need to touch anything below this line.
- * @access private
- */
- /**
- * where assigned template vars are kept
- *
- * @var array
- */
- var $_tpl_vars = array();
-
- /**
- * stores run-time $smarty.* vars
- *
- * @var null|array
- */
- var $_smarty_vars = null;
-
- /**
- * keeps track of sections
- *
- * @var array
- */
- var $_sections = array();
-
- /**
- * keeps track of foreach blocks
- *
- * @var array
- */
- var $_foreach = array();
-
- /**
- * keeps track of tag hierarchy
- *
- * @var array
- */
- var $_tag_stack = array();
-
- /**
- * configuration object
- *
- * @var Config_file
- */
- var $_conf_obj = null;
-
- /**
- * loaded configuration settings
- *
- * @var array
- */
- var $_config = array(array('vars' => array(), 'files' => array()));
-
- /**
- * md5 checksum of the string 'Smarty'
- *
- * @var string
- */
- var $_smarty_md5 = 'f8d698aea36fcbead2b9d5359ffca76f';
-
- /**
- * Smarty version number
- *
- * @var string
- */
- var $_version = '2.6.19';
-
- /**
- * current template inclusion depth
- *
- * @var integer
- */
- var $_inclusion_depth = 0;
-
- /**
- * for different compiled templates
- *
- * @var string
- */
- var $_compile_id = null;
-
- /**
- * text in URL to enable debug mode
- *
- * @var string
- */
- var $_smarty_debug_id = 'SMARTY_DEBUG';
-
- /**
- * debugging information for debug console
- *
- * @var array
- */
- var $_smarty_debug_info = array();
-
- /**
- * info that makes up a cache file
- *
- * @var array
- */
- var $_cache_info = array();
-
- /**
- * default file permissions
- *
- * @var integer
- */
- var $_file_perms = 0644;
-
- /**
- * default dir permissions
- *
- * @var integer
- */
- var $_dir_perms = 0771;
-
- /**
- * registered objects
- *
- * @var array
- */
- var $_reg_objects = array();
-
- /**
- * table keeping track of plugins
- *
- * @var array
- */
- var $_plugins = array(
- 'modifier' => array(),
- 'function' => array(),
- 'block' => array(),
- 'compiler' => array(),
- 'prefilter' => array(),
- 'postfilter' => array(),
- 'outputfilter' => array(),
- 'resource' => array(),
- 'insert' => array());
-
-
- /**
- * cache serials
- *
- * @var array
- */
- var $_cache_serials = array();
-
- /**
- * name of optional cache include file
- *
- * @var string
- */
- var $_cache_include = null;
-
- /**
- * indicate if the current code is used in a compiled
- * include
- *
- * @var string
- */
- var $_cache_including = false;
-
- /**#@-*/
- /**
- * The class constructor.
- */
- function Smarty()
- {
- $this->assign('SCRIPT_NAME', isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME']
- : @$GLOBALS['HTTP_SERVER_VARS']['SCRIPT_NAME']);
- }
-
- /**
- * assigns values to template variables
- *
- * @param array|string $tpl_var the template variable name(s)
- * @param mixed $value the value to assign
- */
- function assign($tpl_var, $value = null)
- {
- if (is_array($tpl_var)){
- foreach ($tpl_var as $key => $val) {
- if ($key != '') {
- $this->_tpl_vars[$key] = $val;
- }
- }
- } else {
- if ($tpl_var != '')
- $this->_tpl_vars[$tpl_var] = $value;
- }
- }
-
- /**
- * assigns values to template variables by reference
- *
- * @param string $tpl_var the template variable name
- * @param mixed $value the referenced value to assign
- */
- function assign_by_ref($tpl_var, &$value)
- {
- if ($tpl_var != '')
- $this->_tpl_vars[$tpl_var] = &$value;
- }
-
- /**
- * appends values to template variables
- *
- * @param array|string $tpl_var the template variable name(s)
- * @param mixed $value the value to append
- */
- function append($tpl_var, $value=null, $merge=false)
- {
- if (is_array($tpl_var)) {
- // $tpl_var is an array, ignore $value
- foreach ($tpl_var as $_key => $_val) {
- if ($_key != '') {
- if(!@is_array($this->_tpl_vars[$_key])) {
- settype($this->_tpl_vars[$_key],'array');
- }
- if($merge && is_array($_val)) {
- foreach($_val as $_mkey => $_mval) {
- $this->_tpl_vars[$_key][$_mkey] = $_mval;
- }
- } else {
- $this->_tpl_vars[$_key][] = $_val;
- }
- }
- }
- } else {
- if ($tpl_var != '' && isset($value)) {
- if(!@is_array($this->_tpl_vars[$tpl_var])) {
- settype($this->_tpl_vars[$tpl_var],'array');
- }
- if($merge && is_array($value)) {
- foreach($value as $_mkey => $_mval) {
- $this->_tpl_vars[$tpl_var][$_mkey] = $_mval;
- }
- } else {
- $this->_tpl_vars[$tpl_var][] = $value;
- }
- }
- }
- }
-
- /**
- * appends values to template variables by reference
- *
- * @param string $tpl_var the template variable name
- * @param mixed $value the referenced value to append
- */
- function append_by_ref($tpl_var, &$value, $merge=false)
- {
- if ($tpl_var != '' && isset($value)) {
- if(!@is_array($this->_tpl_vars[$tpl_var])) {
- settype($this->_tpl_vars[$tpl_var],'array');
- }
- if ($merge && is_array($value)) {
- foreach($value as $_key => $_val) {
- $this->_tpl_vars[$tpl_var][$_key] = &$value[$_key];
- }
- } else {
- $this->_tpl_vars[$tpl_var][] = &$value;
- }
- }
- }
-
-
- /**
- * clear the given assigned template variable.
- *
- * @param string $tpl_var the template variable to clear
- */
- function clear_assign($tpl_var)
- {
- if (is_array($tpl_var))
- foreach ($tpl_var as $curr_var)
- unset($this->_tpl_vars[$curr_var]);
- else
- unset($this->_tpl_vars[$tpl_var]);
- }
-
-
- /**
- * Registers custom function to be used in templates
- *
- * @param string $function the name of the template function
- * @param string $function_impl the name of the PHP function to register
- */
- function register_function($function, $function_impl, $cacheable=true, $cache_attrs=null)
- {
- $this->_plugins['function'][$function] =
- array($function_impl, null, null, false, $cacheable, $cache_attrs);
-
- }
-
- /**
- * Unregisters custom function
- *
- * @param string $function name of template function
- */
- function unregister_function($function)
- {
- unset($this->_plugins['function'][$function]);
- }
-
- /**
- * Registers object to be used in templates
- *
- * @param string $object name of template object
- * @param object &$object_impl the referenced PHP object to register
- * @param null|array $allowed list of allowed methods (empty = all)
- * @param boolean $smarty_args smarty argument format, else traditional
- * @param null|array $block_functs list of methods that are block format
- */
- function register_object($object, &$object_impl, $allowed = array(), $smarty_args = true, $block_methods = array())
- {
- settype($allowed, 'array');
- settype($smarty_args, 'boolean');
- $this->_reg_objects[$object] =
- array(&$object_impl, $allowed, $smarty_args, $block_methods);
- }
-
- /**
- * Unregisters object
- *
- * @param string $object name of template object
- */
- function unregister_object($object)
- {
- unset($this->_reg_objects[$object]);
- }
-
-
- /**
- * Registers block function to be used in templates
- *
- * @param string $block name of template block
- * @param string $block_impl PHP function to register
- */
- function register_block($block, $block_impl, $cacheable=true, $cache_attrs=null)
- {
- $this->_plugins['block'][$block] =
- array($block_impl, null, null, false, $cacheable, $cache_attrs);
- }
-
- /**
- * Unregisters block function
- *
- * @param string $block name of template function
- */
- function unregister_block($block)
- {
- unset($this->_plugins['block'][$block]);
- }
-
- /**
- * Registers compiler function
- *
- * @param string $function name of template function
- * @param string $function_impl name of PHP function to register
- */
- function register_compiler_function($function, $function_impl, $cacheable=true)
- {
- $this->_plugins['compiler'][$function] =
- array($function_impl, null, null, false, $cacheable);
- }
-
- /**
- * Unregisters compiler function
- *
- * @param string $function name of template function
- */
- function unregister_compiler_function($function)
- {
- unset($this->_plugins['compiler'][$function]);
- }
-
- /**
- * Registers modifier to be used in templates
- *
- * @param string $modifier name of template modifier
- * @param string $modifier_impl name of PHP function to register
- */
- function register_modifier($modifier, $modifier_impl)
- {
- $this->_plugins['modifier'][$modifier] =
- array($modifier_impl, null, null, false);
- }
-
- /**
- * Unregisters modifier
- *
- * @param string $modifier name of template modifier
- */
- function unregister_modifier($modifier)
- {
- unset($this->_plugins['modifier'][$modifier]);
- }
-
- /**
- * Registers a resource to fetch a template
- *
- * @param string $type name of resource
- * @param array $functions array of functions to handle resource
- */
- function register_resource($type, $functions)
- {
- if (count($functions)==4) {
- $this->_plugins['resource'][$type] =
- array($functions, false);
-
- } elseif (count($functions)==5) {
- $this->_plugins['resource'][$type] =
- array(array(array(&$functions[0], $functions[1])
- ,array(&$functions[0], $functions[2])
- ,array(&$functions[0], $functions[3])
- ,array(&$functions[0], $functions[4]))
- ,false);
-
- } else {
- $this->trigger_error("malformed function-list for '$type' in register_resource");
-
- }
- }
-
- /**
- * Unregisters a resource
- *
- * @param string $type name of resource
- */
- function unregister_resource($type)
- {
- unset($this->_plugins['resource'][$type]);
- }
-
- /**
- * Registers a prefilter function to apply
- * to a template before compiling
- *
- * @param callback $function
- */
- function register_prefilter($function)
- {
- $this->_plugins['prefilter'][$this->_get_filter_name($function)]
- = array($function, null, null, false);
- }
-
- /**
- * Unregisters a prefilter function
- *
- * @param callback $function
- */
- function unregister_prefilter($function)
- {
- unset($this->_plugins['prefilter'][$this->_get_filter_name($function)]);
- }
-
- /**
- * Registers a postfilter function to apply
- * to a compiled template after compilation
- *
- * @param callback $function
- */
- function register_postfilter($function)
- {
- $this->_plugins['postfilter'][$this->_get_filter_name($function)]
- = array($function, null, null, false);
- }
-
- /**
- * Unregisters a postfilter function
- *
- * @param callback $function
- */
- function unregister_postfilter($function)
- {
- unset($this->_plugins['postfilter'][$this->_get_filter_name($function)]);
- }
-
- /**
- * Registers an output filter function to apply
- * to a template output
- *
- * @param callback $function
- */
- function register_outputfilter($function)
- {
- $this->_plugins['outputfilter'][$this->_get_filter_name($function)]
- = array($function, null, null, false);
- }
-
- /**
- * Unregisters an outputfilter function
- *
- * @param callback $function
- */
- function unregister_outputfilter($function)
- {
- unset($this->_plugins['outputfilter'][$this->_get_filter_name($function)]);
- }
-
- /**
- * load a filter of specified type and name
- *
- * @param string $type filter type
- * @param string $name filter name
- */
- function load_filter($type, $name)
- {
- switch ($type) {
- case 'output':
- $_params = array('plugins' => array(array($type . 'filter', $name, null, null, false)));
- require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
- smarty_core_load_plugins($_params, $this);
- break;
-
- case 'pre':
- case 'post':
- if (!isset($this->_plugins[$type . 'filter'][$name]))
- $this->_plugins[$type . 'filter'][$name] = false;
- break;
- }
- }
-
- /**
- * clear cached content for the given template and cache id
- *
- * @param string $tpl_file name of template file
- * @param string $cache_id name of cache_id
- * @param string $compile_id name of compile_id
- * @param string $exp_time expiration time
- * @return boolean
- */
- function clear_cache($tpl_file = null, $cache_id = null, $compile_id = null, $exp_time = null)
- {
-
- if (!isset($compile_id))
- $compile_id = $this->compile_id;
-
- if (!isset($tpl_file))
- $compile_id = null;
-
- $_auto_id = $this->_get_auto_id($cache_id, $compile_id);
-
- if (!empty($this->cache_handler_func)) {
- return call_user_func_array($this->cache_handler_func,
- array('clear', &$this, &$dummy, $tpl_file, $cache_id, $compile_id, $exp_time));
- } else {
- $_params = array('auto_base' => $this->cache_dir,
- 'auto_source' => $tpl_file,
- 'auto_id' => $_auto_id,
- 'exp_time' => $exp_time);
- require_once(SMARTY_CORE_DIR . 'core.rm_auto.php');
- return smarty_core_rm_auto($_params, $this);
- }
-
- }
-
-
- /**
- * clear the entire contents of cache (all templates)
- *
- * @param string $exp_time expire time
- * @return boolean results of {@link smarty_core_rm_auto()}
- */
- function clear_all_cache($exp_time = null)
- {
- return $this->clear_cache(null, null, null, $exp_time);
- }
-
-
- /**
- * test to see if valid cache exists for this template
- *
- * @param string $tpl_file name of template file
- * @param string $cache_id
- * @param string $compile_id
- * @return string|false results of {@link _read_cache_file()}
- */
- function is_cached($tpl_file, $cache_id = null, $compile_id = null)
- {
- if (!$this->caching)
- return false;
-
- if (!isset($compile_id))
- $compile_id = $this->compile_id;
-
- $_params = array(
- 'tpl_file' => $tpl_file,
- 'cache_id' => $cache_id,
- 'compile_id' => $compile_id
- );
- require_once(SMARTY_CORE_DIR . 'core.read_cache_file.php');
- return smarty_core_read_cache_file($_params, $this);
- }
-
-
- /**
- * clear all the assigned template variables.
- *
- */
- function clear_all_assign()
- {
- $this->_tpl_vars = array();
- }
-
- /**
- * clears compiled version of specified template resource,
- * or all compiled template files if one is not specified.
- * This function is for advanced use only, not normally needed.
- *
- * @param string $tpl_file
- * @param string $compile_id
- * @param string $exp_time
- * @return boolean results of {@link smarty_core_rm_auto()}
- */
- function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null)
- {
- if (!isset($compile_id)) {
- $compile_id = $this->compile_id;
- }
- $_params = array('auto_base' => $this->compile_dir,
- 'auto_source' => $tpl_file,
- 'auto_id' => $compile_id,
- 'exp_time' => $exp_time,
- 'extensions' => array('.inc', '.php'));
- require_once(SMARTY_CORE_DIR . 'core.rm_auto.php');
- return smarty_core_rm_auto($_params, $this);
- }
-
- /**
- * Checks whether requested template exists.
- *
- * @param string $tpl_file
- * @return boolean
- */
- function template_exists($tpl_file)
- {
- $_params = array('resource_name' => $tpl_file, 'quiet'=>true, 'get_source'=>false);
- return $this->_fetch_resource_info($_params);
- }
-
- /**
- * Returns an array containing template variables
- *
- * @param string $name
- * @param string $type
- * @return array
- */
- function &get_template_vars($name=null)
- {
- if(!isset($name)) {
- return $this->_tpl_vars;
- } elseif(isset($this->_tpl_vars[$name])) {
- return $this->_tpl_vars[$name];
- } else {
- // var non-existant, return valid reference
- $_tmp = null;
- return $_tmp;
- }
- }
-
- /**
- * Returns an array containing config variables
- *
- * @param string $name
- * @param string $type
- * @return array
- */
- function &get_config_vars($name=null)
- {
- if(!isset($name) && is_array($this->_config[0])) {
- return $this->_config[0]['vars'];
- } else if(isset($this->_config[0]['vars'][$name])) {
- return $this->_config[0]['vars'][$name];
- } else {
- // var non-existant, return valid reference
- $_tmp = null;
- return $_tmp;
- }
- }
-
- /**
- * trigger Smarty error
- *
- * @param string $error_msg
- * @param integer $error_type
- */
- function trigger_error($error_msg, $error_type = E_USER_WARNING)
- {
- trigger_error("Smarty error: $error_msg", $error_type);
- }
-
-
- /**
- * executes & displays the template results
- *
- * @param string $resource_name
- * @param string $cache_id
- * @param string $compile_id
- */
- function display($resource_name, $cache_id = null, $compile_id = null)
- {
- $this->fetch($resource_name, $cache_id, $compile_id, true);
- }
-
- /**
- * executes & returns or displays the template results
- *
- * @param string $resource_name
- * @param string $cache_id
- * @param string $compile_id
- * @param boolean $display
- */
- function fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)
- {
- static $_cache_info = array();
-
- $_smarty_old_error_level = $this->debugging ? error_reporting() : error_reporting(isset($this->error_reporting)
- ? $this->error_reporting : error_reporting() & ~E_NOTICE);
-
- if (!$this->debugging && $this->debugging_ctrl == 'URL') {
- $_query_string = $this->request_use_auto_globals ? $_SERVER['QUERY_STRING'] : $GLOBALS['HTTP_SERVER_VARS']['QUERY_STRING'];
- if (@strstr($_query_string, $this->_smarty_debug_id)) {
- if (@strstr($_query_string, $this->_smarty_debug_id . '=on')) {
- // enable debugging for this browser session
- @setcookie('SMARTY_DEBUG', true);
- $this->debugging = true;
- } elseif (@strstr($_query_string, $this->_smarty_debug_id . '=off')) {
- // disable debugging for this browser session
- @setcookie('SMARTY_DEBUG', false);
- $this->debugging = false;
- } else {
- // enable debugging for this page
- $this->debugging = true;
- }
- } else {
- $this->debugging = (bool)($this->request_use_auto_globals ? @$_COOKIE['SMARTY_DEBUG'] : @$GLOBALS['HTTP_COOKIE_VARS']['SMARTY_DEBUG']);
- }
- }
-
- if ($this->debugging) {
- // capture time for debugging info
- $_params = array();
- require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
- $_debug_start_time = smarty_core_get_microtime($_params, $this);
- $this->_smarty_debug_info[] = array('type' => 'template',
- 'filename' => $resource_name,
- 'depth' => 0);
- $_included_tpls_idx = count($this->_smarty_debug_info) - 1;
- }
-
- if (!isset($compile_id)) {
- $compile_id = $this->compile_id;
- }
-
- $this->_compile_id = $compile_id;
- $this->_inclusion_depth = 0;
-
- if ($this->caching) {
- // save old cache_info, initialize cache_info
- array_push($_cache_info, $this->_cache_info);
- $this->_cache_info = array();
- $_params = array(
- 'tpl_file' => $resource_name,
- 'cache_id' => $cache_id,
- 'compile_id' => $compile_id,
- 'results' => null
- );
- require_once(SMARTY_CORE_DIR . 'core.read_cache_file.php');
- if (smarty_core_read_cache_file($_params, $this)) {
- $_smarty_results = $_params['results'];
- if (!empty($this->_cache_info['insert_tags'])) {
- $_params = array('plugins' => $this->_cache_info['insert_tags']);
- require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
- smarty_core_load_plugins($_params, $this);
- $_params = array('results' => $_smarty_results);
- require_once(SMARTY_CORE_DIR . 'core.process_cached_inserts.php');
- $_smarty_results = smarty_core_process_cached_inserts($_params, $this);
- }
- if (!empty($this->_cache_info['cache_serials'])) {
- $_params = array('results' => $_smarty_results);
- require_once(SMARTY_CORE_DIR . 'core.process_compiled_include.php');
- $_smarty_results = smarty_core_process_compiled_include($_params, $this);
- }
-
-
- if ($display) {
- if ($this->debugging)
- {
- // capture time for debugging info
- $_params = array();
- require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
- $this->_smarty_debug_info[$_included_tpls_idx]['exec_time'] = smarty_core_get_microtime($_params, $this) - $_debug_start_time;
- require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');
- $_smarty_results .= smarty_core_display_debug_console($_params, $this);
- }
- if ($this->cache_modified_check) {
- $_server_vars = ($this->request_use_auto_globals) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS'];
- $_last_modified_date = @substr($_server_vars['HTTP_IF_MODIFIED_SINCE'], 0, strpos($_server_vars['HTTP_IF_MODIFIED_SINCE'], 'GMT') + 3);
- $_gmt_mtime = gmdate('D, d M Y H:i:s', $this->_cache_info['timestamp']).' GMT';
- if (@count($this->_cache_info['insert_tags']) == 0
- && !$this->_cache_serials
- && $_gmt_mtime == $_last_modified_date) {
- if (php_sapi_name()=='cgi')
- header('Status: 304 Not Modified');
- else
- header('HTTP/1.1 304 Not Modified');
-
- } else {
- header('Last-Modified: '.$_gmt_mtime);
- echo $_smarty_results;
- }
- } else {
- echo $_smarty_results;
- }
- error_reporting($_smarty_old_error_level);
- // restore initial cache_info
- $this->_cache_info = array_pop($_cache_info);
- return true;
- } else {
- error_reporting($_smarty_old_error_level);
- // restore initial cache_info
- $this->_cache_info = array_pop($_cache_info);
- return $_smarty_results;
- }
- } else {
- $this->_cache_info['template'][$resource_name] = true;
- if ($this->cache_modified_check && $display) {
- header('Last-Modified: '.gmdate('D, d M Y H:i:s', time()).' GMT');
- }
- }
- }
-
- // load filters that are marked as autoload
- if (count($this->autoload_filters)) {
- foreach ($this->autoload_filters as $_filter_type => $_filters) {
- foreach ($_filters as $_filter) {
- $this->load_filter($_filter_type, $_filter);
- }
- }
- }
-
- $_smarty_compile_path = $this->_get_compile_path($resource_name);
-
- // if we just need to display the results, don't perform output
- // buffering - for speed
- $_cache_including = $this->_cache_including;
- $this->_cache_including = false;
- if ($display && !$this->caching && count($this->_plugins['outputfilter']) == 0) {
- if ($this->_is_compiled($resource_name, $_smarty_compile_path)
- || $this->_compile_resource($resource_name, $_smarty_compile_path))
- {
- include($_smarty_compile_path);
- }
- } else {
- ob_start();
- if ($this->_is_compiled($resource_name, $_smarty_compile_path)
- || $this->_compile_resource($resource_name, $_smarty_compile_path))
- {
- include($_smarty_compile_path);
- }
- $_smarty_results = ob_get_contents();
- ob_end_clean();
-
- foreach ((array)$this->_plugins['outputfilter'] as $_output_filter) {
- $_smarty_results = call_user_func_array($_output_filter[0], array($_smarty_results, &$this));
- }
- }
-
- if ($this->caching) {
- $_params = array('tpl_file' => $resource_name,
- 'cache_id' => $cache_id,
- 'compile_id' => $compile_id,
- 'results' => $_smarty_results);
- require_once(SMARTY_CORE_DIR . 'core.write_cache_file.php');
- smarty_core_write_cache_file($_params, $this);
- require_once(SMARTY_CORE_DIR . 'core.process_cached_inserts.php');
- $_smarty_results = smarty_core_process_cached_inserts($_params, $this);
-
- if ($this->_cache_serials) {
- // strip nocache-tags from output
- $_smarty_results = preg_replace('!(\{/?nocache\:[0-9a-f]{32}#\d+\})!s'
- ,''
- ,$_smarty_results);
- }
- // restore initial cache_info
- $this->_cache_info = array_pop($_cache_info);
- }
- $this->_cache_including = $_cache_including;
-
- if ($display) {
- if (isset($_smarty_results)) { echo $_smarty_results; }
- }
-
- if ($this->debugging) {
- // capture time for debugging info
- $_params = array();
- require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
- $this->_smarty_debug_info[$_included_tpls_idx]['exec_time'] = (smarty_core_get_microtime($_params, $this) - $_debug_start_time);
- }
-
- if ($display) {
- if ($this->debugging) {
- // capture time for debugging info
- $_params = array();
- require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');
- echo smarty_core_display_debug_console($_params, $this);
- }
- error_reporting($_smarty_old_error_level);
- return;
- } else {
- error_reporting($_smarty_old_error_level);
- if (isset($_smarty_results)) { return $_smarty_results; }
- }
- }
-
- /**
- * load configuration values
- *
- * @param string $file
- * @param string $section
- * @param string $scope
- */
- function config_load($file, $section = null, $scope = 'global')
- {
- require_once($this->_get_plugin_filepath('function', 'config_load'));
- smarty_function_config_load(array('file' => $file, 'section' => $section, 'scope' => $scope), $this);
- }
-
- /**
- * return a reference to a registered object
- *
- * @param string $name
- * @return object
- */
- function &get_registered_object($name) {
- if (!isset($this->_reg_objects[$name]))
- $this->_trigger_fatal_error("'$name' is not a registered object");
-
- if (!is_object($this->_reg_objects[$name][0]))
- $this->_trigger_fatal_error("registered '$name' is not an object");
-
- return $this->_reg_objects[$name][0];
- }
-
- /**
- * clear configuration values
- *
- * @param string $var
- */
- function clear_config($var = null)
- {
- if(!isset($var)) {
- // clear all values
- $this->_config = array(array('vars' => array(),
- 'files' => array()));
- } else {
- unset($this->_config[0]['vars'][$var]);
- }
- }
-
- /**
- * get filepath of requested plugin
- *
- * @param string $type
- * @param string $name
- * @return string|false
- */
- function _get_plugin_filepath($type, $name)
- {
- $_params = array('type' => $type, 'name' => $name);
- require_once(SMARTY_CORE_DIR . 'core.assemble_plugin_filepath.php');
- return smarty_core_assemble_plugin_filepath($_params, $this);
- }
-
- /**
- * test if resource needs compiling
- *
- * @param string $resource_name
- * @param string $compile_path
- * @return boolean
- */
- function _is_compiled($resource_name, $compile_path)
- {
- if (!$this->force_compile && file_exists($compile_path)) {
- if (!$this->compile_check) {
- // no need to check compiled file
- return true;
- } else {
- // get file source and timestamp
- $_params = array('resource_name' => $resource_name, 'get_source'=>false);
- if (!$this->_fetch_resource_info($_params)) {
- return false;
- }
- if ($_params['resource_timestamp'] <= filemtime($compile_path)) {
- // template not expired, no recompile
- return true;
- } else {
- // compile template
- return false;
- }
- }
- } else {
- // compiled template does not exist, or forced compile
- return false;
- }
- }
-
- /**
- * compile the template
- *
- * @param string $resource_name
- * @param string $compile_path
- * @return boolean
- */
- function _compile_resource($resource_name, $compile_path)
- {
-
- $_params = array('resource_name' => $resource_name);
- if (!$this->_fetch_resource_info($_params)) {
- return false;
- }
-
- $_source_content = $_params['source_content'];
- $_cache_include = substr($compile_path, 0, -4).'.inc';
-
- if ($this->_compile_source($resource_name, $_source_content, $_compiled_content, $_cache_include)) {
- // if a _cache_serial was set, we also have to write an include-file:
- if ($this->_cache_include_info) {
- require_once(SMARTY_CORE_DIR . 'core.write_compiled_include.php');
- smarty_core_write_compiled_include(array_merge($this->_cache_include_info, array('compiled_content'=>$_compiled_content, 'resource_name'=>$resource_name)), $this);
- }
-
- $_params = array('compile_path'=>$compile_path, 'compiled_content' => $_compiled_content);
- require_once(SMARTY_CORE_DIR . 'core.write_compiled_resource.php');
- smarty_core_write_compiled_resource($_params, $this);
-
- return true;
- } else {
- return false;
- }
-
- }
-
- /**
- * compile the given source
- *
- * @param string $resource_name
- * @param string $source_content
- * @param string $compiled_content
- * @return boolean
- */
- function _compile_source($resource_name, &$source_content, &$compiled_content, $cache_include_path=null)
- {
- if (file_exists(SMARTY_DIR . $this->compiler_file)) {
- require_once(SMARTY_DIR . $this->compiler_file);
- } else {
- // use include_path
- require_once($this->compiler_file);
- }
-
-
- $smarty_compiler = new $this->compiler_class;
-
- $smarty_compiler->template_dir = $this->template_dir;
- $smarty_compiler->compile_dir = $this->compile_dir;
- $smarty_compiler->plugins_dir = $this->plugins_dir;
- $smarty_compiler->config_dir = $this->config_dir;
- $smarty_compiler->force_compile = $this->force_compile;
- $smarty_compiler->caching = $this->caching;
- $smarty_compiler->php_handling = $this->php_handling;
- $smarty_compiler->left_delimiter = $this->left_delimiter;
- $smarty_compiler->right_delimiter = $this->right_delimiter;
- $smarty_compiler->_version = $this->_version;
- $smarty_compiler->security = $this->security;
- $smarty_compiler->secure_dir = $this->secure_dir;
- $smarty_compiler->security_settings = $this->security_settings;
- $smarty_compiler->trusted_dir = $this->trusted_dir;
- $smarty_compiler->use_sub_dirs = $this->use_sub_dirs;
- $smarty_compiler->_reg_objects = &$this->_reg_objects;
- $smarty_compiler->_plugins = &$this->_plugins;
- $smarty_compiler->_tpl_vars = &$this->_tpl_vars;
- $smarty_compiler->default_modifiers = $this->default_modifiers;
- $smarty_compiler->compile_id = $this->_compile_id;
- $smarty_compiler->_config = $this->_config;
- $smarty_compiler->request_use_auto_globals = $this->request_use_auto_globals;
-
- if (isset($cache_include_path) && isset($this->_cache_serials[$cache_include_path])) {
- $smarty_compiler->_cache_serial = $this->_cache_serials[$cache_include_path];
- }
- $smarty_compiler->_cache_include = $cache_include_path;
-
-
- $_results = $smarty_compiler->_compile_file($resource_name, $source_content, $compiled_content);
-
- if ($smarty_compiler->_cache_serial) {
- $this->_cache_include_info = array(
- 'cache_serial'=>$smarty_compiler->_cache_serial
- ,'plugins_code'=>$smarty_compiler->_plugins_code
- ,'include_file_path' => $cache_include_path);
-
- } else {
- $this->_cache_include_info = null;
-
- }
-
- return $_results;
- }
-
- /**
- * Get the compile path for this resource
- *
- * @param string $resource_name
- * @return string results of {@link _get_auto_filename()}
- */
- function _get_compile_path($resource_name)
- {
- return $this->_get_auto_filename($this->compile_dir, $resource_name,
- $this->_compile_id) . '.php';
- }
-
- /**
- * fetch the template info. Gets timestamp, and source
- * if get_source is true
- *
- * sets $source_content to the source of the template, and
- * $resource_timestamp to its time stamp
- * @param string $resource_name
- * @param string $source_content
- * @param integer $resource_timestamp
- * @param boolean $get_source
- * @param boolean $quiet
- * @return boolean
- */
-
- function _fetch_resource_info(&$params)
- {
- if(!isset($params['get_source'])) { $params['get_source'] = true; }
- if(!isset($params['quiet'])) { $params['quiet'] = false; }
-
- $_return = false;
- $_params = array('resource_name' => $params['resource_name']) ;
- if (isset($params['resource_base_path']))
- $_params['resource_base_path'] = $params['resource_base_path'];
- else
- $_params['resource_base_path'] = $this->template_dir;
-
- if ($this->_parse_resource_name($_params)) {
- $_resource_type = $_params['resource_type'];
- $_resource_name = $_params['resource_name'];
- switch ($_resource_type) {
- case 'file':
- if ($params['get_source']) {
- $params['source_content'] = $this->_read_file($_resource_name);
- }
- $params['resource_timestamp'] = filemtime($_resource_name);
- $_return = is_file($_resource_name);
- break;
-
- default:
- // call resource functions to fetch the template source and timestamp
- if ($params['get_source']) {
- $_source_return = isset($this->_plugins['resource'][$_resource_type]) &&
- call_user_func_array($this->_plugins['resource'][$_resource_type][0][0],
- array($_resource_name, &$params['source_content'], &$this));
- } else {
- $_source_return = true;
- }
-
- $_timestamp_return = isset($this->_plugins['resource'][$_resource_type]) &&
- call_user_func_array($this->_plugins['resource'][$_resource_type][0][1],
- array($_resource_name, &$params['resource_timestamp'], &$this));
-
- $_return = $_source_return && $_timestamp_return;
- break;
- }
- }
-
- if (!$_return) {
- // see if we can get a template with the default template handler
- if (!empty($this->default_template_handler_func)) {
- if (!is_callable($this->default_template_handler_func)) {
- $this->trigger_error("default template handler function \"$this->default_template_handler_func\" doesn't exist.");
- } else {
- $_return = call_user_func_array(
- $this->default_template_handler_func,
- array($_params['resource_type'], $_params['resource_name'], &$params['source_content'], &$params['resource_timestamp'], &$this));
- }
- }
- }
-
- if (!$_return) {
- if (!$params['quiet']) {
- $this->trigger_error('unable to read resource: "' . $params['resource_name'] . '"');
- }
- } else if ($_return && $this->security) {
- require_once(SMARTY_CORE_DIR . 'core.is_secure.php');
- if (!smarty_core_is_secure($_params, $this)) {
- if (!$params['quiet'])
- $this->trigger_error('(secure mode) accessing "' . $params['resource_name'] . '" is not allowed');
- $params['source_content'] = null;
- $params['resource_timestamp'] = null;
- return false;
- }
- }
- return $_return;
- }
-
-
- /**
- * parse out the type and name from the resource
- *
- * @param string $resource_base_path
- * @param string $resource_name
- * @param string $resource_type
- * @param string $resource_name
- * @return boolean
- */
-
- function _parse_resource_name(&$params)
- {
-
- // split tpl_path by the first colon
- $_resource_name_parts = explode(':', $params['resource_name'], 2);
-
- if (count($_resource_name_parts) == 1) {
- // no resource type given
- $params['resource_type'] = $this->default_resource_type;
- $params['resource_name'] = $_resource_name_parts[0];
- } else {
- if(strlen($_resource_name_parts[0]) == 1) {
- // 1 char is not resource type, but part of filepath
- $params['resource_type'] = $this->default_resource_type;
- $params['resource_name'] = $params['resource_name'];
- } else {
- $params['resource_type'] = $_resource_name_parts[0];
- $params['resource_name'] = $_resource_name_parts[1];
- }
- }
-
- if ($params['resource_type'] == 'file') {
- if (!preg_match('/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/', $params['resource_name'])) {
- // relative pathname to $params['resource_base_path']
- // use the first directory where the file is found
- foreach ((array)$params['resource_base_path'] as $_curr_path) {
- $_fullpath = $_curr_path . DIRECTORY_SEPARATOR . $params['resource_name'];
- if (file_exists($_fullpath) && is_file($_fullpath)) {
- $params['resource_name'] = $_fullpath;
- return true;
- }
- // didn't find the file, try include_path
- $_params = array('file_path' => $_fullpath);
- require_once(SMARTY_CORE_DIR . 'core.get_include_path.php');
- if(smarty_core_get_include_path($_params, $this)) {
- $params['resource_name'] = $_params['new_file_path'];
- return true;
- }
- }
- return false;
- } else {
- /* absolute path */
- return file_exists($params['resource_name']);
- }
- } elseif (empty($this->_plugins['resource'][$params['resource_type']])) {
- $_params = array('type' => $params['resource_type']);
- require_once(SMARTY_CORE_DIR . 'core.load_resource_plugin.php');
- smarty_core_load_resource_plugin($_params, $this);
- }
-
- return true;
- }
-
-
- /**
- * Handle modifiers
- *
- * @param string|null $modifier_name
- * @param array|null $map_array
- * @return string result of modifiers
- */
- function _run_mod_handler()
- {
- $_args = func_get_args();
- list($_modifier_name, $_map_array) = array_splice($_args, 0, 2);
- list($_func_name, $_tpl_file, $_tpl_line) =
- $this->_plugins['modifier'][$_modifier_name];
-
- $_var = $_args[0];
- foreach ($_var as $_key => $_val) {
- $_args[0] = $_val;
- $_var[$_key] = call_user_func_array($_func_name, $_args);
- }
- return $_var;
- }
-
- /**
- * Remove starting and ending quotes from the string
- *
- * @param string $string
- * @return string
- */
- function _dequote($string)
- {
- if ((substr($string, 0, 1) == "'" || substr($string, 0, 1) == '"') &&
- substr($string, -1) == substr($string, 0, 1))
- return substr($string, 1, -1);
- else
- return $string;
- }
-
-
- /**
- * read in a file
- *
- * @param string $filename
- * @return string
- */
- function _read_file($filename)
- {
- if ( file_exists($filename) && ($fd = @fopen($filename, 'rb')) ) {
- $contents = '';
- while (!feof($fd)) {
- $contents .= fread($fd, 8192);
- }
- fclose($fd);
- return $contents;
- } else {
- return false;
- }
- }
-
- /**
- * get a concrete filename for automagically created content
- *
- * @param string $auto_base
- * @param string $auto_source
- * @param string $auto_id
- * @return string
- * @staticvar string|null
- * @staticvar string|null
- */
- function _get_auto_filename($auto_base, $auto_source = null, $auto_id = null)
- {
- $_compile_dir_sep = $this->use_sub_dirs ? DIRECTORY_SEPARATOR : '^';
- $_return = $auto_base . DIRECTORY_SEPARATOR;
-
- if(isset($auto_id)) {
- // make auto_id safe for directory names
- $auto_id = str_replace('%7C',$_compile_dir_sep,(urlencode($auto_id)));
- // split into separate directories
- $_return .= $auto_id . $_compile_dir_sep;
- }
-
- if(isset($auto_source)) {
- // make source name safe for filename
- $_filename = urlencode(basename($auto_source));
- $_crc32 = sprintf('%08X', crc32($auto_source));
- // prepend %% to avoid name conflicts with
- // with $params['auto_id'] names
- $_crc32 = substr($_crc32, 0, 2) . $_compile_dir_sep .
- substr($_crc32, 0, 3) . $_compile_dir_sep . $_crc32;
- $_return .= '%%' . $_crc32 . '%%' . $_filename;
- }
-
- return $_return;
- }
-
- /**
- * unlink a file, possibly using expiration time
- *
- * @param string $resource
- * @param integer $exp_time
- */
- function _unlink($resource, $exp_time = null)
- {
- if(isset($exp_time)) {
- if(time() - @filemtime($resource) >= $exp_time) {
- return @unlink($resource);
- }
- } else {
- return @unlink($resource);
- }
- }
-
- /**
- * returns an auto_id for auto-file-functions
- *
- * @param string $cache_id
- * @param string $compile_id
- * @return string|null
- */
- function _get_auto_id($cache_id=null, $compile_id=null) {
- if (isset($cache_id))
- return (isset($compile_id)) ? $cache_id . '|' . $compile_id : $cache_id;
- elseif(isset($compile_id))
- return $compile_id;
- else
- return null;
- }
-
- /**
- * trigger Smarty plugin error
- *
- * @param string $error_msg
- * @param string $tpl_file
- * @param integer $tpl_line
- * @param string $file
- * @param integer $line
- * @param integer $error_type
- */
- function _trigger_fatal_error($error_msg, $tpl_file = null, $tpl_line = null,
- $file = null, $line = null, $error_type = E_USER_ERROR)
- {
- if(isset($file) && isset($line)) {
- $info = ' ('.basename($file).", line $line)";
- } else {
- $info = '';
- }
- if (isset($tpl_line) && isset($tpl_file)) {
- $this->trigger_error('[in ' . $tpl_file . ' line ' . $tpl_line . "]: $error_msg$info", $error_type);
- } else {
- $this->trigger_error($error_msg . $info, $error_type);
- }
- }
-
-
- /**
- * callback function for preg_replace, to call a non-cacheable block
- * @return string
- */
- function _process_compiled_include_callback($match) {
- $_func = '_smarty_tplfunc_'.$match[2].'_'.$match[3];
- ob_start();
- $_func($this);
- $_ret = ob_get_contents();
- ob_end_clean();
- return $_ret;
- }
-
-
- /**
- * called for included templates
- *
- * @param string $_smarty_include_tpl_file
- * @param string $_smarty_include_vars
- */
-
- // $_smarty_include_tpl_file, $_smarty_include_vars
-
- function _smarty_include($params)
- {
- if ($this->debugging) {
- $_params = array();
- require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
- $debug_start_time = smarty_core_get_microtime($_params, $this);
- $this->_smarty_debug_info[] = array('type' => 'template',
- 'filename' => $params['smarty_include_tpl_file'],
- 'depth' => ++$this->_inclusion_depth);
- $included_tpls_idx = count($this->_smarty_debug_info) - 1;
- }
-
- $this->_tpl_vars = array_merge($this->_tpl_vars, $params['smarty_include_vars']);
-
- // config vars are treated as local, so push a copy of the
- // current ones onto the front of the stack
- array_unshift($this->_config, $this->_config[0]);
-
- $_smarty_compile_path = $this->_get_compile_path($params['smarty_include_tpl_file']);
-
-
- if ($this->_is_compiled($params['smarty_include_tpl_file'], $_smarty_compile_path)
- || $this->_compile_resource($params['smarty_include_tpl_file'], $_smarty_compile_path))
- {
- include($_smarty_compile_path);
- }
-
- // pop the local vars off the front of the stack
- array_shift($this->_config);
-
- $this->_inclusion_depth--;
-
- if ($this->debugging) {
- // capture time for debugging info
- $_params = array();
- require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
- $this->_smarty_debug_info[$included_tpls_idx]['exec_time'] = smarty_core_get_microtime($_params, $this) - $debug_start_time;
- }
-
- if ($this->caching) {
- $this->_cache_info['template'][$params['smarty_include_tpl_file']] = true;
- }
- }
-
-
- /**
- * get or set an array of cached attributes for function that is
- * not cacheable
- * @return array
- */
- function &_smarty_cache_attrs($cache_serial, $count) {
- $_cache_attrs =& $this->_cache_info['cache_attrs'][$cache_serial][$count];
-
- if ($this->_cache_including) {
- /* return next set of cache_attrs */
- $_return = current($_cache_attrs);
- next($_cache_attrs);
- return $_return;
-
- } else {
- /* add a reference to a new set of cache_attrs */
- $_cache_attrs[] = array();
- return $_cache_attrs[count($_cache_attrs)-1];
-
- }
-
- }
-
-
- /**
- * wrapper for include() retaining $this
- * @return mixed
- */
- function _include($filename, $once=false, $params=null)
- {
- if ($once) {
- return include_once($filename);
- } else {
- return include($filename);
- }
- }
-
-
- /**
- * wrapper for eval() retaining $this
- * @return mixed
- */
- function _eval($code, $params=null)
- {
- return eval($code);
- }
-
- /**
- * Extracts the filter name from the given callback
- *
- * @param callback $function
- * @return string
- */
- function _get_filter_name($function)
- {
- if (is_array($function)) {
- $_class_name = (is_object($function[0]) ?
- get_class($function[0]) : $function[0]);
- return $_class_name . '_' . $function[1];
- }
- else {
- return $function;
- }
- }
-
- /**#@-*/
-
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/Smarty_Compiler.class.php b/BSF/include/smarty/libs/Smarty_Compiler.class.php
deleted file mode 100644
index d5f877f7b..000000000
--- a/BSF/include/smarty/libs/Smarty_Compiler.class.php
+++ /dev/null
@@ -1,2325 +0,0 @@
-<?php
-
-/**
- * Project: Smarty: the PHP compiling template engine
- * File: Smarty_Compiler.class.php
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * @link http://smarty.php.net/
- * @author Monte Ohrt <monte at ohrt dot com>
- * @author Andrei Zmievski <andrei@php.net>
- * @version 2.6.19
- * @copyright 2001-2005 New Digital Group, Inc.
- * @package Smarty
- */
-
-/* $Id$ */
-
-/**
- * Template compiling class
- * @package Smarty
- */
-class Smarty_Compiler extends Smarty {
-
- // internal vars
- /**#@+
- * @access private
- */
- var $_folded_blocks = array(); // keeps folded template blocks
- var $_current_file = null; // the current template being compiled
- var $_current_line_no = 1; // line number for error messages
- var $_capture_stack = array(); // keeps track of nested capture buffers
- var $_plugin_info = array(); // keeps track of plugins to load
- var $_init_smarty_vars = false;
- var $_permitted_tokens = array('true','false','yes','no','on','off','null');
- var $_db_qstr_regexp = null; // regexps are setup in the constructor
- var $_si_qstr_regexp = null;
- var $_qstr_regexp = null;
- var $_func_regexp = null;
- var $_reg_obj_regexp = null;
- var $_var_bracket_regexp = null;
- var $_num_const_regexp = null;
- var $_dvar_guts_regexp = null;
- var $_dvar_regexp = null;
- var $_cvar_regexp = null;
- var $_svar_regexp = null;
- var $_avar_regexp = null;
- var $_mod_regexp = null;
- var $_var_regexp = null;
- var $_parenth_param_regexp = null;
- var $_func_call_regexp = null;
- var $_obj_ext_regexp = null;
- var $_obj_start_regexp = null;
- var $_obj_params_regexp = null;
- var $_obj_call_regexp = null;
- var $_cacheable_state = 0;
- var $_cache_attrs_count = 0;
- var $_nocache_count = 0;
- var $_cache_serial = null;
- var $_cache_include = null;
-
- var $_strip_depth = 0;
- var $_additional_newline = "\n";
-
- /**#@-*/
- /**
- * The class constructor.
- */
- function Smarty_Compiler()
- {
- // matches double quoted strings:
- // "foobar"
- // "foo\"bar"
- $this->_db_qstr_regexp = '"[^"\\\\]*(?:\\\\.[^"\\\\]*)*"';
-
- // matches single quoted strings:
- // 'foobar'
- // 'foo\'bar'
- $this->_si_qstr_regexp = '\'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\'';
-
- // matches single or double quoted strings
- $this->_qstr_regexp = '(?:' . $this->_db_qstr_regexp . '|' . $this->_si_qstr_regexp . ')';
-
- // matches bracket portion of vars
- // [0]
- // [foo]
- // [$bar]
- $this->_var_bracket_regexp = '\[\$?[\w\.]+\]';
-
- // matches numerical constants
- // 30
- // -12
- // 13.22
- $this->_num_const_regexp = '(?:\-?\d+(?:\.\d+)?)';
-
- // matches $ vars (not objects):
- // $foo
- // $foo.bar
- // $foo.bar.foobar
- // $foo[0]
- // $foo[$bar]
- // $foo[5][blah]
- // $foo[5].bar[$foobar][4]
- $this->_dvar_math_regexp = '(?:[\+\*\/\%]|(?:-(?!>)))';
- $this->_dvar_math_var_regexp = '[\$\w\.\+\-\*\/\%\d\>\[\]]';
- $this->_dvar_guts_regexp = '\w+(?:' . $this->_var_bracket_regexp
- . ')*(?:\.\$?\w+(?:' . $this->_var_bracket_regexp . ')*)*(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?';
- $this->_dvar_regexp = '\$' . $this->_dvar_guts_regexp;
-
- // matches config vars:
- // #foo#
- // #foobar123_foo#
- $this->_cvar_regexp = '\#\w+\#';
-
- // matches section vars:
- // %foo.bar%
- $this->_svar_regexp = '\%\w+\.\w+\%';
-
- // matches all valid variables (no quotes, no modifiers)
- $this->_avar_regexp = '(?:' . $this->_dvar_regexp . '|'
- . $this->_cvar_regexp . '|' . $this->_svar_regexp . ')';
-
- // matches valid variable syntax:
- // $foo
- // $foo
- // #foo#
- // #foo#
- // "text"
- // "text"
- $this->_var_regexp = '(?:' . $this->_avar_regexp . '|' . $this->_qstr_regexp . ')';
-
- // matches valid object call (one level of object nesting allowed in parameters):
- // $foo->bar
- // $foo->bar()
- // $foo->bar("text")
- // $foo->bar($foo, $bar, "text")
- // $foo->bar($foo, "foo")
- // $foo->bar->foo()
- // $foo->bar->foo->bar()
- // $foo->bar($foo->bar)
- // $foo->bar($foo->bar())
- // $foo->bar($foo->bar($blah,$foo,44,"foo",$foo[0].bar))
- $this->_obj_ext_regexp = '\->(?:\$?' . $this->_dvar_guts_regexp . ')';
- $this->_obj_restricted_param_regexp = '(?:'
- . '(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . ')(?:' . $this->_obj_ext_regexp . '(?:\((?:(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . ')'
- . '(?:\s*,\s*(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . '))*)?\))?)*)';
- $this->_obj_single_param_regexp = '(?:\w+|' . $this->_obj_restricted_param_regexp . '(?:\s*,\s*(?:(?:\w+|'
- . $this->_var_regexp . $this->_obj_restricted_param_regexp . ')))*)';
- $this->_obj_params_regexp = '\((?:' . $this->_obj_single_param_regexp
- . '(?:\s*,\s*' . $this->_obj_single_param_regexp . ')*)?\)';
- $this->_obj_start_regexp = '(?:' . $this->_dvar_regexp . '(?:' . $this->_obj_ext_regexp . ')+)';
- $this->_obj_call_regexp = '(?:' . $this->_obj_start_regexp . '(?:' . $this->_obj_params_regexp . ')?(?:' . $this->_dvar_math_regexp . '(?:' . $this->_num_const_regexp . '|' . $this->_dvar_math_var_regexp . ')*)?)';
-
- // matches valid modifier syntax:
- // |foo
- // |@foo
- // |foo:"bar"
- // |foo:$bar
- // |foo:"bar":$foobar
- // |foo|bar
- // |foo:$foo->bar
- $this->_mod_regexp = '(?:\|@?\w+(?::(?:\w+|' . $this->_num_const_regexp . '|'
- . $this->_obj_call_regexp . '|' . $this->_avar_regexp . '|' . $this->_qstr_regexp .'))*)';
-
- // matches valid function name:
- // foo123
- // _foo_bar
- $this->_func_regexp = '[a-zA-Z_]\w*';
-
- // matches valid registered object:
- // foo->bar
- $this->_reg_obj_regexp = '[a-zA-Z_]\w*->[a-zA-Z_]\w*';
-
- // matches valid parameter values:
- // true
- // $foo
- // $foo|bar
- // #foo#
- // #foo#|bar
- // "text"
- // "text"|bar
- // $foo->bar
- $this->_param_regexp = '(?:\s*(?:' . $this->_obj_call_regexp . '|'
- . $this->_var_regexp . '|' . $this->_num_const_regexp . '|\w+)(?>' . $this->_mod_regexp . '*)\s*)';
-
- // matches valid parenthesised function parameters:
- //
- // "text"
- // $foo, $bar, "text"
- // $foo|bar, "foo"|bar, $foo->bar($foo)|bar
- $this->_parenth_param_regexp = '(?:\((?:\w+|'
- . $this->_param_regexp . '(?:\s*,\s*(?:(?:\w+|'
- . $this->_param_regexp . ')))*)?\))';
-
- // matches valid function call:
- // foo()
- // foo_bar($foo)
- // _foo_bar($foo,"bar")
- // foo123($foo,$foo->bar(),"foo")
- $this->_func_call_regexp = '(?:' . $this->_func_regexp . '\s*(?:'
- . $this->_parenth_param_regexp . '))';
- }
-
- /**
- * compile a resource
- *
- * sets $compiled_content to the compiled source
- * @param string $resource_name
- * @param string $source_content
- * @param string $compiled_content
- * @return true
- */
- function _compile_file($resource_name, $source_content, &$compiled_content)
- {
-
- if ($this->security) {
- // do not allow php syntax to be executed unless specified
- if ($this->php_handling == SMARTY_PHP_ALLOW &&
- !$this->security_settings['PHP_HANDLING']) {
- $this->php_handling = SMARTY_PHP_PASSTHRU;
- }
- }
-
- $this->_load_filters();
-
- $this->_current_file = $resource_name;
- $this->_current_line_no = 1;
- $ldq = preg_quote($this->left_delimiter, '~');
- $rdq = preg_quote($this->right_delimiter, '~');
-
- // run template source through prefilter functions
- if (count($this->_plugins['prefilter']) > 0) {
- foreach ($this->_plugins['prefilter'] as $filter_name => $prefilter) {
- if ($prefilter === false) continue;
- if ($prefilter[3] || is_callable($prefilter[0])) {
- $source_content = call_user_func_array($prefilter[0],
- array($source_content, &$this));
- $this->_plugins['prefilter'][$filter_name][3] = true;
- } else {
- $this->_trigger_fatal_error("[plugin] prefilter '$filter_name' is not implemented");
- }
- }
- }
-
- /* fetch all special blocks */
- $search = "~{$ldq}\*(.*?)\*{$rdq}|{$ldq}\s*literal\s*{$rdq}(.*?){$ldq}\s*/literal\s*{$rdq}|{$ldq}\s*php\s*{$rdq}(.*?){$ldq}\s*/php\s*{$rdq}~s";
-
- preg_match_all($search, $source_content, $match, PREG_SET_ORDER);
- $this->_folded_blocks = $match;
- reset($this->_folded_blocks);
-
- /* replace special blocks by "{php}" */
- $source_content = preg_replace($search.'e', "'"
- . $this->_quote_replace($this->left_delimiter) . 'php'
- . "' . str_repeat(\"\n\", substr_count('\\0', \"\n\")) .'"
- . $this->_quote_replace($this->right_delimiter)
- . "'"
- , $source_content);
-
- /* Gather all template tags. */
- preg_match_all("~{$ldq}\s*(.*?)\s*{$rdq}~s", $source_content, $_match);
- $template_tags = $_match[1];
- /* Split content by template tags to obtain non-template content. */
- $text_blocks = preg_split("~{$ldq}.*?{$rdq}~s", $source_content);
-
- /* loop through text blocks */
- for ($curr_tb = 0, $for_max = count($text_blocks); $curr_tb < $for_max; $curr_tb++) {
- /* match anything resembling php tags */
- if (preg_match_all('~(<\?(?:\w+|=)?|\?>|language\s*=\s*[\"\']?\s*php\s*[\"\']?)~is', $text_blocks[$curr_tb], $sp_match)) {
- /* replace tags with placeholders to prevent recursive replacements */
- $sp_match[1] = array_unique($sp_match[1]);
- usort($sp_match[1], '_smarty_sort_length');
- for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; $curr_sp++) {
- $text_blocks[$curr_tb] = str_replace($sp_match[1][$curr_sp],'%%%SMARTYSP'.$curr_sp.'%%%',$text_blocks[$curr_tb]);
- }
- /* process each one */
- for ($curr_sp = 0, $for_max2 = count($sp_match[1]); $curr_sp < $for_max2; $curr_sp++) {
- if ($this->php_handling == SMARTY_PHP_PASSTHRU) {
- /* echo php contents */
- $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', '<?php echo \''.str_replace("'", "\'", $sp_match[1][$curr_sp]).'\'; ?>'."\n", $text_blocks[$curr_tb]);
- } else if ($this->php_handling == SMARTY_PHP_QUOTE) {
- /* quote php tags */
- $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', htmlspecialchars($sp_match[1][$curr_sp]), $text_blocks[$curr_tb]);
- } else if ($this->php_handling == SMARTY_PHP_REMOVE) {
- /* remove php tags */
- $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', '', $text_blocks[$curr_tb]);
- } else {
- /* SMARTY_PHP_ALLOW, but echo non php starting tags */
- $sp_match[1][$curr_sp] = preg_replace('~(<\?(?!php|=|$))~i', '<?php echo \'\\1\'?>'."\n", $sp_match[1][$curr_sp]);
- $text_blocks[$curr_tb] = str_replace('%%%SMARTYSP'.$curr_sp.'%%%', $sp_match[1][$curr_sp], $text_blocks[$curr_tb]);
- }
- }
- }
- }
-
- /* Compile the template tags into PHP code. */
- $compiled_tags = array();
- for ($i = 0, $for_max = count($template_tags); $i < $for_max; $i++) {
- $this->_current_line_no += substr_count($text_blocks[$i], "\n");
- $compiled_tags[] = $this->_compile_tag($template_tags[$i]);
- $this->_current_line_no += substr_count($template_tags[$i], "\n");
- }
- if (count($this->_tag_stack)>0) {
- list($_open_tag, $_line_no) = end($this->_tag_stack);
- $this->_syntax_error("unclosed tag \{$_open_tag} (opened line $_line_no).", E_USER_ERROR, __FILE__, __LINE__);
- return;
- }
-
- /* Reformat $text_blocks between 'strip' and '/strip' tags,
- removing spaces, tabs and newlines. */
- $strip = false;
- for ($i = 0, $for_max = count($compiled_tags); $i < $for_max; $i++) {
- if ($compiled_tags[$i] == '{strip}') {
- $compiled_tags[$i] = '';
- $strip = true;
- /* remove leading whitespaces */
- $text_blocks[$i + 1] = ltrim($text_blocks[$i + 1]);
- }
- if ($strip) {
- /* strip all $text_blocks before the next '/strip' */
- for ($j = $i + 1; $j < $for_max; $j++) {
- /* remove leading and trailing whitespaces of each line */
- $text_blocks[$j] = preg_replace('![\t ]*[\r\n]+[\t ]*!', '', $text_blocks[$j]);
- if ($compiled_tags[$j] == '{/strip}') {
- /* remove trailing whitespaces from the last text_block */
- $text_blocks[$j] = rtrim($text_blocks[$j]);
- }
- $text_blocks[$j] = "<?php echo '" . strtr($text_blocks[$j], array("'"=>"\'", "\\"=>"\\\\")) . "'; ?>";
- if ($compiled_tags[$j] == '{/strip}') {
- $compiled_tags[$j] = "\n"; /* slurped by php, but necessary
- if a newline is following the closing strip-tag */
- $strip = false;
- $i = $j;
- break;
- }
- }
- }
- }
- $compiled_content = '';
-
- $tag_guard = '%%%SMARTYOTG' . md5(uniqid(rand(), true)) . '%%%';
-
- /* Interleave the compiled contents and text blocks to get the final result. */
- for ($i = 0, $for_max = count($compiled_tags); $i < $for_max; $i++) {
- if ($compiled_tags[$i] == '') {
- // tag result empty, remove first newline from following text block
- $text_blocks[$i+1] = preg_replace('~^(\r\n|\r|\n)~', '', $text_blocks[$i+1]);
- }
- // replace legit PHP tags with placeholder
- $text_blocks[$i] = str_replace('<?', $tag_guard, $text_blocks[$i]);
- $compiled_tags[$i] = str_replace('<?', $tag_guard, $compiled_tags[$i]);
-
- $compiled_content .= $text_blocks[$i] . $compiled_tags[$i];
- }
- $compiled_content .= str_replace('<?', $tag_guard, $text_blocks[$i]);
-
- // escape php tags created by interleaving
- $compiled_content = str_replace('<?', "<?php echo '<?' ?>\n", $compiled_content);
- $compiled_content = preg_replace("~(?<!')language\s*=\s*[\"\']?\s*php\s*[\"\']?~", "<?php echo 'language=php' ?>\n", $compiled_content);
-
- // recover legit tags
- $compiled_content = str_replace($tag_guard, '<?', $compiled_content);
-
- // remove \n from the end of the file, if any
- if (strlen($compiled_content) && (substr($compiled_content, -1) == "\n") ) {
- $compiled_content = substr($compiled_content, 0, -1);
- }
-
- if (!empty($this->_cache_serial)) {
- $compiled_content = "<?php \$this->_cache_serials['".$this->_cache_include."'] = '".$this->_cache_serial."'; ?>" . $compiled_content;
- }
-
- // run compiled template through postfilter functions
- if (count($this->_plugins['postfilter']) > 0) {
- foreach ($this->_plugins['postfilter'] as $filter_name => $postfilter) {
- if ($postfilter === false) continue;
- if ($postfilter[3] || is_callable($postfilter[0])) {
- $compiled_content = call_user_func_array($postfilter[0],
- array($compiled_content, &$this));
- $this->_plugins['postfilter'][$filter_name][3] = true;
- } else {
- $this->_trigger_fatal_error("Smarty plugin error: postfilter '$filter_name' is not implemented");
- }
- }
- }
-
- // put header at the top of the compiled template
- $template_header = "<?php /* Smarty version ".$this->_version.", created on ".strftime("%Y-%m-%d %H:%M:%S")."\n";
- $template_header .= " compiled from ".strtr(urlencode($resource_name), array('%2F'=>'/', '%3A'=>':'))." */ ?>\n";
-
- /* Emit code to load needed plugins. */
- $this->_plugins_code = '';
- if (count($this->_plugin_info)) {
- $_plugins_params = "array('plugins' => array(";
- foreach ($this->_plugin_info as $plugin_type => $plugins) {
- foreach ($plugins as $plugin_name => $plugin_info) {
- $_plugins_params .= "array('$plugin_type', '$plugin_name', '" . strtr($plugin_info[0], array("'" => "\\'", "\\" => "\\\\")) . "', $plugin_info[1], ";
- $_plugins_params .= $plugin_info[2] ? 'true),' : 'false),';
- }
- }
- $_plugins_params .= '))';
- $plugins_code = "<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');\nsmarty_core_load_plugins($_plugins_params, \$this); ?>\n";
- $template_header .= $plugins_code;
- $this->_plugin_info = array();
- $this->_plugins_code = $plugins_code;
- }
-
- if ($this->_init_smarty_vars) {
- $template_header .= "<?php require_once(SMARTY_CORE_DIR . 'core.assign_smarty_interface.php');\nsmarty_core_assign_smarty_interface(null, \$this); ?>\n";
- $this->_init_smarty_vars = false;
- }
-
- $compiled_content = $template_header . $compiled_content;
- return true;
- }
-
- /**
- * Compile a template tag
- *
- * @param string $template_tag
- * @return string
- */
- function _compile_tag($template_tag)
- {
- /* Matched comment. */
- if (substr($template_tag, 0, 1) == '*' && substr($template_tag, -1) == '*')
- return '';
-
- /* Split tag into two three parts: command, command modifiers and the arguments. */
- if(! preg_match('~^(?:(' . $this->_num_const_regexp . '|' . $this->_obj_call_regexp . '|' . $this->_var_regexp
- . '|\/?' . $this->_reg_obj_regexp . '|\/?' . $this->_func_regexp . ')(' . $this->_mod_regexp . '*))
- (?:\s+(.*))?$
- ~xs', $template_tag, $match)) {
- $this->_syntax_error("unrecognized tag: $template_tag", E_USER_ERROR, __FILE__, __LINE__);
- }
-
- $tag_command = $match[1];
- $tag_modifier = isset($match[2]) ? $match[2] : null;
- $tag_args = isset($match[3]) ? $match[3] : null;
-
- if (preg_match('~^' . $this->_num_const_regexp . '|' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '$~', $tag_command)) {
- /* tag name is a variable or object */
- $_return = $this->_parse_var_props($tag_command . $tag_modifier);
- return "<?php echo $_return; ?>" . $this->_additional_newline;
- }
-
- /* If the tag name is a registered object, we process it. */
- if (preg_match('~^\/?' . $this->_reg_obj_regexp . '$~', $tag_command)) {
- return $this->_compile_registered_object_tag($tag_command, $this->_parse_attrs($tag_args), $tag_modifier);
- }
-
- switch ($tag_command) {
- case 'include':
- return $this->_compile_include_tag($tag_args);
-
- case 'include_php':
- return $this->_compile_include_php_tag($tag_args);
-
- case 'if':
- $this->_push_tag('if');
- return $this->_compile_if_tag($tag_args);
-
- case 'else':
- list($_open_tag) = end($this->_tag_stack);
- if ($_open_tag != 'if' && $_open_tag != 'elseif')
- $this->_syntax_error('unexpected {else}', E_USER_ERROR, __FILE__, __LINE__);
- else
- $this->_push_tag('else');
- return '<?php else: ?>';
-
- case 'elseif':
- list($_open_tag) = end($this->_tag_stack);
- if ($_open_tag != 'if' && $_open_tag != 'elseif')
- $this->_syntax_error('unexpected {elseif}', E_USER_ERROR, __FILE__, __LINE__);
- if ($_open_tag == 'if')
- $this->_push_tag('elseif');
- return $this->_compile_if_tag($tag_args, true);
-
- case '/if':
- $this->_pop_tag('if');
- return '<?php endif; ?>';
-
- case 'capture':
- return $this->_compile_capture_tag(true, $tag_args);
-
- case '/capture':
- return $this->_compile_capture_tag(false);
-
- case 'ldelim':
- return $this->left_delimiter;
-
- case 'rdelim':
- return $this->right_delimiter;
-
- case 'section':
- $this->_push_tag('section');
- return $this->_compile_section_start($tag_args);
-
- case 'sectionelse':
- $this->_push_tag('sectionelse');
- return "<?php endfor; else: ?>";
- break;
-
- case '/section':
- $_open_tag = $this->_pop_tag('section');
- if ($_open_tag == 'sectionelse')
- return "<?php endif; ?>";
- else
- return "<?php endfor; endif; ?>";
-
- case 'foreach':
- $this->_push_tag('foreach');
- return $this->_compile_foreach_start($tag_args);
- break;
-
- case 'foreachelse':
- $this->_push_tag('foreachelse');
- return "<?php endforeach; else: ?>";
-
- case '/foreach':
- $_open_tag = $this->_pop_tag('foreach');
- if ($_open_tag == 'foreachelse')
- return "<?php endif; unset(\$_from); ?>";
- else
- return "<?php endforeach; endif; unset(\$_from); ?>";
- break;
-
- case 'strip':
- case '/strip':
- if (substr($tag_command, 0, 1)=='/') {
- $this->_pop_tag('strip');
- if (--$this->_strip_depth==0) { /* outermost closing {/strip} */
- $this->_additional_newline = "\n";
- return '{' . $tag_command . '}';
- }
- } else {
- $this->_push_tag('strip');
- if ($this->_strip_depth++==0) { /* outermost opening {strip} */
- $this->_additional_newline = "";
- return '{' . $tag_command . '}';
- }
- }
- return '';
-
- case 'php':
- /* handle folded tags replaced by {php} */
- list(, $block) = each($this->_folded_blocks);
- $this->_current_line_no += substr_count($block[0], "\n");
- /* the number of matched elements in the regexp in _compile_file()
- determins the type of folded tag that was found */
- switch (count($block)) {
- case 2: /* comment */
- return '';
-
- case 3: /* literal */
- return "<?php echo '" . strtr($block[2], array("'"=>"\'", "\\"=>"\\\\")) . "'; ?>" . $this->_additional_newline;
-
- case 4: /* php */
- if ($this->security && !$this->security_settings['PHP_TAGS']) {
- $this->_syntax_error("(secure mode) php tags not permitted", E_USER_WARNING, __FILE__, __LINE__);
- return;
- }
- return '<?php ' . $block[3] .' ?>';
- }
- break;
-
- case 'insert':
- return $this->_compile_insert_tag($tag_args);
-
- default:
- if ($this->_compile_compiler_tag($tag_command, $tag_args, $output)) {
- return $output;
- } else if ($this->_compile_block_tag($tag_command, $tag_args, $tag_modifier, $output)) {
- return $output;
- } else if ($this->_compile_custom_tag($tag_command, $tag_args, $tag_modifier, $output)) {
- return $output;
- } else {
- $this->_syntax_error("unrecognized tag '$tag_command'", E_USER_ERROR, __FILE__, __LINE__);
- }
-
- }
- }
-
-
- /**
- * compile the custom compiler tag
- *
- * sets $output to the compiled custom compiler tag
- * @param string $tag_command
- * @param string $tag_args
- * @param string $output
- * @return boolean
- */
- function _compile_compiler_tag($tag_command, $tag_args, &$output)
- {
- $found = false;
- $have_function = true;
-
- /*
- * First we check if the compiler function has already been registered
- * or loaded from a plugin file.
- */
- if (isset($this->_plugins['compiler'][$tag_command])) {
- $found = true;
- $plugin_func = $this->_plugins['compiler'][$tag_command][0];
- if (!is_callable($plugin_func)) {
- $message = "compiler function '$tag_command' is not implemented";
- $have_function = false;
- }
- }
- /*
- * Otherwise we need to load plugin file and look for the function
- * inside it.
- */
- else if ($plugin_file = $this->_get_plugin_filepath('compiler', $tag_command)) {
- $found = true;
-
- include_once $plugin_file;
-
- $plugin_func = 'smarty_compiler_' . $tag_command;
- if (!is_callable($plugin_func)) {
- $message = "plugin function $plugin_func() not found in $plugin_file\n";
- $have_function = false;
- } else {
- $this->_plugins['compiler'][$tag_command] = array($plugin_func, null, null, null, true);
- }
- }
-
- /*
- * True return value means that we either found a plugin or a
- * dynamically registered function. False means that we didn't and the
- * compiler should now emit code to load custom function plugin for this
- * tag.
- */
- if ($found) {
- if ($have_function) {
- $output = call_user_func_array($plugin_func, array($tag_args, &$this));
- if($output != '') {
- $output = '<?php ' . $this->_push_cacheable_state('compiler', $tag_command)
- . $output
- . $this->_pop_cacheable_state('compiler', $tag_command) . ' ?>';
- }
- } else {
- $this->_syntax_error($message, E_USER_WARNING, __FILE__, __LINE__);
- }
- return true;
- } else {
- return false;
- }
- }
-
-
- /**
- * compile block function tag
- *
- * sets $output to compiled block function tag
- * @param string $tag_command
- * @param string $tag_args
- * @param string $tag_modifier
- * @param string $output
- * @return boolean
- */
- function _compile_block_tag($tag_command, $tag_args, $tag_modifier, &$output)
- {
- if (substr($tag_command, 0, 1) == '/') {
- $start_tag = false;
- $tag_command = substr($tag_command, 1);
- } else
- $start_tag = true;
-
- $found = false;
- $have_function = true;
-
- /*
- * First we check if the block function has already been registered
- * or loaded from a plugin file.
- */
- if (isset($this->_plugins['block'][$tag_command])) {
- $found = true;
- $plugin_func = $this->_plugins['block'][$tag_command][0];
- if (!is_callable($plugin_func)) {
- $message = "block function '$tag_command' is not implemented";
- $have_function = false;
- }
- }
- /*
- * Otherwise we need to load plugin file and look for the function
- * inside it.
- */
- else if ($plugin_file = $this->_get_plugin_filepath('block', $tag_command)) {
- $found = true;
-
- include_once $plugin_file;
-
- $plugin_func = 'smarty_block_' . $tag_command;
- if (!function_exists($plugin_func)) {
- $message = "plugin function $plugin_func() not found in $plugin_file\n";
- $have_function = false;
- } else {
- $this->_plugins['block'][$tag_command] = array($plugin_func, null, null, null, true);
-
- }
- }
-
- if (!$found) {
- return false;
- } else if (!$have_function) {
- $this->_syntax_error($message, E_USER_WARNING, __FILE__, __LINE__);
- return true;
- }
-
- /*
- * Even though we've located the plugin function, compilation
- * happens only once, so the plugin will still need to be loaded
- * at runtime for future requests.
- */
- $this->_add_plugin('block', $tag_command);
-
- if ($start_tag)
- $this->_push_tag($tag_command);
- else
- $this->_pop_tag($tag_command);
-
- if ($start_tag) {
- $output = '<?php ' . $this->_push_cacheable_state('block', $tag_command);
- $attrs = $this->_parse_attrs($tag_args);
- $_cache_attrs='';
- $arg_list = $this->_compile_arg_list('block', $tag_command, $attrs, $_cache_attrs);
- $output .= "$_cache_attrs\$this->_tag_stack[] = array('$tag_command', array(".implode(',', $arg_list).')); ';
- $output .= '$_block_repeat=true;' . $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);';
- $output .= 'while ($_block_repeat) { ob_start(); ?>';
- } else {
- $output = '<?php $_block_content = ob_get_contents(); ob_end_clean(); ';
- $_out_tag_text = $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat)';
- if ($tag_modifier != '') {
- $this->_parse_modifiers($_out_tag_text, $tag_modifier);
- }
- $output .= '$_block_repeat=false;echo ' . $_out_tag_text . '; } ';
- $output .= " array_pop(\$this->_tag_stack); " . $this->_pop_cacheable_state('block', $tag_command) . '?>';
- }
-
- return true;
- }
-
-
- /**
- * compile custom function tag
- *
- * @param string $tag_command
- * @param string $tag_args
- * @param string $tag_modifier
- * @return string
- */
- function _compile_custom_tag($tag_command, $tag_args, $tag_modifier, &$output)
- {
- $found = false;
- $have_function = true;
-
- /*
- * First we check if the custom function has already been registered
- * or loaded from a plugin file.
- */
- if (isset($this->_plugins['function'][$tag_command])) {
- $found = true;
- $plugin_func = $this->_plugins['function'][$tag_command][0];
- if (!is_callable($plugin_func)) {
- $message = "custom function '$tag_command' is not implemented";
- $have_function = false;
- }
- }
- /*
- * Otherwise we need to load plugin file and look for the function
- * inside it.
- */
- else if ($plugin_file = $this->_get_plugin_filepath('function', $tag_command)) {
- $found = true;
-
- include_once $plugin_file;
-
- $plugin_func = 'smarty_function_' . $tag_command;
- if (!function_exists($plugin_func)) {
- $message = "plugin function $plugin_func() not found in $plugin_file\n";
- $have_function = false;
- } else {
- $this->_plugins['function'][$tag_command] = array($plugin_func, null, null, null, true);
-
- }
- }
-
- if (!$found) {
- return false;
- } else if (!$have_function) {
- $this->_syntax_error($message, E_USER_WARNING, __FILE__, __LINE__);
- return true;
- }
-
- /* declare plugin to be loaded on display of the template that
- we compile right now */
- $this->_add_plugin('function', $tag_command);
-
- $_cacheable_state = $this->_push_cacheable_state('function', $tag_command);
- $attrs = $this->_parse_attrs($tag_args);
- $_cache_attrs = '';
- $arg_list = $this->_compile_arg_list('function', $tag_command, $attrs, $_cache_attrs);
-
- $output = $this->_compile_plugin_call('function', $tag_command).'(array('.implode(',', $arg_list)."), \$this)";
- if($tag_modifier != '') {
- $this->_parse_modifiers($output, $tag_modifier);
- }
-
- if($output != '') {
- $output = '<?php ' . $_cacheable_state . $_cache_attrs . 'echo ' . $output . ';'
- . $this->_pop_cacheable_state('function', $tag_command) . "?>" . $this->_additional_newline;
- }
-
- return true;
- }
-
- /**
- * compile a registered object tag
- *
- * @param string $tag_command
- * @param array $attrs
- * @param string $tag_modifier
- * @return string
- */
- function _compile_registered_object_tag($tag_command, $attrs, $tag_modifier)
- {
- if (substr($tag_command, 0, 1) == '/') {
- $start_tag = false;
- $tag_command = substr($tag_command, 1);
- } else {
- $start_tag = true;
- }
-
- list($object, $obj_comp) = explode('->', $tag_command);
-
- $arg_list = array();
- if(count($attrs)) {
- $_assign_var = false;
- foreach ($attrs as $arg_name => $arg_value) {
- if($arg_name == 'assign') {
- $_assign_var = $arg_value;
- unset($attrs['assign']);
- continue;
- }
- if (is_bool($arg_value))
- $arg_value = $arg_value ? 'true' : 'false';
- $arg_list[] = "'$arg_name' => $arg_value";
- }
- }
-
- if($this->_reg_objects[$object][2]) {
- // smarty object argument format
- $args = "array(".implode(',', (array)$arg_list)."), \$this";
- } else {
- // traditional argument format
- $args = implode(',', array_values($attrs));
- if (empty($args)) {
- $args = '';
- }
- }
-
- $prefix = '';
- $postfix = '';
- $newline = '';
- if(!is_object($this->_reg_objects[$object][0])) {
- $this->_trigger_fatal_error("registered '$object' is not an object" , $this->_current_file, $this->_current_line_no, __FILE__, __LINE__);
- } elseif(!empty($this->_reg_objects[$object][1]) && !in_array($obj_comp, $this->_reg_objects[$object][1])) {
- $this->_trigger_fatal_error("'$obj_comp' is not a registered component of object '$object'", $this->_current_file, $this->_current_line_no, __FILE__, __LINE__);
- } elseif(method_exists($this->_reg_objects[$object][0], $obj_comp)) {
- // method
- if(in_array($obj_comp, $this->_reg_objects[$object][3])) {
- // block method
- if ($start_tag) {
- $prefix = "\$this->_tag_stack[] = array('$obj_comp', $args); ";
- $prefix .= "\$_block_repeat=true; \$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], null, \$this, \$_block_repeat); ";
- $prefix .= "while (\$_block_repeat) { ob_start();";
- $return = null;
- $postfix = '';
- } else {
- $prefix = "\$_obj_block_content = ob_get_contents(); ob_end_clean(); \$_block_repeat=false;";
- $return = "\$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$_obj_block_content, \$this, \$_block_repeat)";
- $postfix = "} array_pop(\$this->_tag_stack);";
- }
- } else {
- // non-block method
- $return = "\$this->_reg_objects['$object'][0]->$obj_comp($args)";
- }
- } else {
- // property
- $return = "\$this->_reg_objects['$object'][0]->$obj_comp";
- }
-
- if($return != null) {
- if($tag_modifier != '') {
- $this->_parse_modifiers($return, $tag_modifier);
- }
-
- if(!empty($_assign_var)) {
- $output = "\$this->assign('" . $this->_dequote($_assign_var) ."', $return);";
- } else {
- $output = 'echo ' . $return . ';';
- $newline = $this->_additional_newline;
- }
- } else {
- $output = '';
- }
-
- return '<?php ' . $prefix . $output . $postfix . "?>" . $newline;
- }
-
- /**
- * Compile {insert ...} tag
- *
- * @param string $tag_args
- * @return string
- */
- function _compile_insert_tag($tag_args)
- {
- $attrs = $this->_parse_attrs($tag_args);
- $name = $this->_dequote($attrs['name']);
-
- if (empty($name)) {
- return $this->_syntax_error("missing insert name", E_USER_ERROR, __FILE__, __LINE__);
- }
-
- if (!preg_match('~^\w+$~', $name)) {
- return $this->_syntax_error("'insert: 'name' must be an insert function name", E_USER_ERROR, __FILE__, __LINE__);
- }
-
- if (!empty($attrs['script'])) {
- $delayed_loading = true;
- } else {
- $delayed_loading = false;
- }
-
- foreach ($attrs as $arg_name => $arg_value) {
- if (is_bool($arg_value))
- $arg_value = $arg_value ? 'true' : 'false';
- $arg_list[] = "'$arg_name' => $arg_value";
- }
-
- $this->_add_plugin('insert', $name, $delayed_loading);
-
- $_params = "array('args' => array(".implode(', ', (array)$arg_list)."))";
-
- return "<?php require_once(SMARTY_CORE_DIR . 'core.run_insert_handler.php');\necho smarty_core_run_insert_handler($_params, \$this); ?>" . $this->_additional_newline;
- }
-
- /**
- * Compile {include ...} tag
- *
- * @param string $tag_args
- * @return string
- */
- function _compile_include_tag($tag_args)
- {
- $attrs = $this->_parse_attrs($tag_args);
- $arg_list = array();
-
- if (empty($attrs['file'])) {
- $this->_syntax_error("missing 'file' attribute in include tag", E_USER_ERROR, __FILE__, __LINE__);
- }
-
- foreach ($attrs as $arg_name => $arg_value) {
- if ($arg_name == 'file') {
- $include_file = $arg_value;
- continue;
- } else if ($arg_name == 'assign') {
- $assign_var = $arg_value;
- continue;
- }
- if (is_bool($arg_value))
- $arg_value = $arg_value ? 'true' : 'false';
- $arg_list[] = "'$arg_name' => $arg_value";
- }
-
- $output = '<?php ';
-
- if (isset($assign_var)) {
- $output .= "ob_start();\n";
- }
-
- $output .=
- "\$_smarty_tpl_vars = \$this->_tpl_vars;\n";
-
-
- $_params = "array('smarty_include_tpl_file' => " . $include_file . ", 'smarty_include_vars' => array(".implode(',', (array)$arg_list)."))";
- $output .= "\$this->_smarty_include($_params);\n" .
- "\$this->_tpl_vars = \$_smarty_tpl_vars;\n" .
- "unset(\$_smarty_tpl_vars);\n";
-
- if (isset($assign_var)) {
- $output .= "\$this->assign(" . $assign_var . ", ob_get_contents()); ob_end_clean();\n";
- }
-
- $output .= ' ?>';
-
- return $output;
-
- }
-
- /**
- * Compile {include ...} tag
- *
- * @param string $tag_args
- * @return string
- */
- function _compile_include_php_tag($tag_args)
- {
- $attrs = $this->_parse_attrs($tag_args);
-
- if (empty($attrs['file'])) {
- $this->_syntax_error("missing 'file' attribute in include_php tag", E_USER_ERROR, __FILE__, __LINE__);
- }
-
- $assign_var = (empty($attrs['assign'])) ? '' : $this->_dequote($attrs['assign']);
- $once_var = (empty($attrs['once']) || $attrs['once']=='false') ? 'false' : 'true';
-
- $arg_list = array();
- foreach($attrs as $arg_name => $arg_value) {
- if($arg_name != 'file' AND $arg_name != 'once' AND $arg_name != 'assign') {
- if(is_bool($arg_value))
- $arg_value = $arg_value ? 'true' : 'false';
- $arg_list[] = "'$arg_name' => $arg_value";
- }
- }
-
- $_params = "array('smarty_file' => " . $attrs['file'] . ", 'smarty_assign' => '$assign_var', 'smarty_once' => $once_var, 'smarty_include_vars' => array(".implode(',', $arg_list)."))";
-
- return "<?php require_once(SMARTY_CORE_DIR . 'core.smarty_include_php.php');\nsmarty_core_smarty_include_php($_params, \$this); ?>" . $this->_additional_newline;
- }
-
-
- /**
- * Compile {section ...} tag
- *
- * @param string $tag_args
- * @return string
- */
- function _compile_section_start($tag_args)
- {
- $attrs = $this->_parse_attrs($tag_args);
- $arg_list = array();
-
- $output = '<?php ';
- $section_name = $attrs['name'];
- if (empty($section_name)) {
- $this->_syntax_error("missing section name", E_USER_ERROR, __FILE__, __LINE__);
- }
-
- $output .= "unset(\$this->_sections[$section_name]);\n";
- $section_props = "\$this->_sections[$section_name]";
-
- foreach ($attrs as $attr_name => $attr_value) {
- switch ($attr_name) {
- case 'loop':
- $output .= "{$section_props}['loop'] = is_array(\$_loop=$attr_value) ? count(\$_loop) : max(0, (int)\$_loop); unset(\$_loop);\n";
- break;
-
- case 'show':
- if (is_bool($attr_value))
- $show_attr_value = $attr_value ? 'true' : 'false';
- else
- $show_attr_value = "(bool)$attr_value";
- $output .= "{$section_props}['show'] = $show_attr_value;\n";
- break;
-
- case 'name':
- $output .= "{$section_props}['$attr_name'] = $attr_value;\n";
- break;
-
- case 'max':
- case 'start':
- $output .= "{$section_props}['$attr_name'] = (int)$attr_value;\n";
- break;
-
- case 'step':
- $output .= "{$section_props}['$attr_name'] = ((int)$attr_value) == 0 ? 1 : (int)$attr_value;\n";
- break;
-
- default:
- $this->_syntax_error("unknown section attribute - '$attr_name'", E_USER_ERROR, __FILE__, __LINE__);
- break;
- }
- }
-
- if (!isset($attrs['show']))
- $output .= "{$section_props}['show'] = true;\n";
-
- if (!isset($attrs['loop']))
- $output .= "{$section_props}['loop'] = 1;\n";
-
- if (!isset($attrs['max']))
- $output .= "{$section_props}['max'] = {$section_props}['loop'];\n";
- else
- $output .= "if ({$section_props}['max'] < 0)\n" .
- " {$section_props}['max'] = {$section_props}['loop'];\n";
-
- if (!isset($attrs['step']))
- $output .= "{$section_props}['step'] = 1;\n";
-
- if (!isset($attrs['start']))
- $output .= "{$section_props}['start'] = {$section_props}['step'] > 0 ? 0 : {$section_props}['loop']-1;\n";
- else {
- $output .= "if ({$section_props}['start'] < 0)\n" .
- " {$section_props}['start'] = max({$section_props}['step'] > 0 ? 0 : -1, {$section_props}['loop'] + {$section_props}['start']);\n" .
- "else\n" .
- " {$section_props}['start'] = min({$section_props}['start'], {$section_props}['step'] > 0 ? {$section_props}['loop'] : {$section_props}['loop']-1);\n";
- }
-
- $output .= "if ({$section_props}['show']) {\n";
- if (!isset($attrs['start']) && !isset($attrs['step']) && !isset($attrs['max'])) {
- $output .= " {$section_props}['total'] = {$section_props}['loop'];\n";
- } else {
- $output .= " {$section_props}['total'] = min(ceil(({$section_props}['step'] > 0 ? {$section_props}['loop'] - {$section_props}['start'] : {$section_props}['start']+1)/abs({$section_props}['step'])), {$section_props}['max']);\n";
- }
- $output .= " if ({$section_props}['total'] == 0)\n" .
- " {$section_props}['show'] = false;\n" .
- "} else\n" .
- " {$section_props}['total'] = 0;\n";
-
- $output .= "if ({$section_props}['show']):\n";
- $output .= "
- for ({$section_props}['index'] = {$section_props}['start'], {$section_props}['iteration'] = 1;
- {$section_props}['iteration'] <= {$section_props}['total'];
- {$section_props}['index'] += {$section_props}['step'], {$section_props}['iteration']++):\n";
- $output .= "{$section_props}['rownum'] = {$section_props}['iteration'];\n";
- $output .= "{$section_props}['index_prev'] = {$section_props}['index'] - {$section_props}['step'];\n";
- $output .= "{$section_props}['index_next'] = {$section_props}['index'] + {$section_props}['step'];\n";
- $output .= "{$section_props}['first'] = ({$section_props}['iteration'] == 1);\n";
- $output .= "{$section_props}['last'] = ({$section_props}['iteration'] == {$section_props}['total']);\n";
-
- $output .= "?>";
-
- return $output;
- }
-
-
- /**
- * Compile {foreach ...} tag.
- *
- * @param string $tag_args
- * @return string
- */
- function _compile_foreach_start($tag_args)
- {
- $attrs = $this->_parse_attrs($tag_args);
- $arg_list = array();
-
- if (empty($attrs['from'])) {
- return $this->_syntax_error("foreach: missing 'from' attribute", E_USER_ERROR, __FILE__, __LINE__);
- }
- $from = $attrs['from'];
-
- if (empty($attrs['item'])) {
- return $this->_syntax_error("foreach: missing 'item' attribute", E_USER_ERROR, __FILE__, __LINE__);
- }
- $item = $this->_dequote($attrs['item']);
- if (!preg_match('~^\w+$~', $item)) {
- return $this->_syntax_error("foreach: 'item' must be a variable name (literal string)", E_USER_ERROR, __FILE__, __LINE__);
- }
-
- if (isset($attrs['key'])) {
- $key = $this->_dequote($attrs['key']);
- if (!preg_match('~^\w+$~', $key)) {
- return $this->_syntax_error("foreach: 'key' must to be a variable name (literal string)", E_USER_ERROR, __FILE__, __LINE__);
- }
- $key_part = "\$this->_tpl_vars['$key'] => ";
- } else {
- $key = null;
- $key_part = '';
- }
-
- if (isset($attrs['name'])) {
- $name = $attrs['name'];
- } else {
- $name = null;
- }
-
- $output = '<?php ';
- $output .= "\$_from = $from; if (!is_array(\$_from) && !is_object(\$_from)) { settype(\$_from, 'array'); }";
- if (isset($name)) {
- $foreach_props = "\$this->_foreach[$name]";
- $output .= "{$foreach_props} = array('total' => count(\$_from), 'iteration' => 0);\n";
- $output .= "if ({$foreach_props}['total'] > 0):\n";
- $output .= " foreach (\$_from as $key_part\$this->_tpl_vars['$item']):\n";
- $output .= " {$foreach_props}['iteration']++;\n";
- } else {
- $output .= "if (count(\$_from)):\n";
- $output .= " foreach (\$_from as $key_part\$this->_tpl_vars['$item']):\n";
- }
- $output .= '?>';
-
- return $output;
- }
-
-
- /**
- * Compile {capture} .. {/capture} tags
- *
- * @param boolean $start true if this is the {capture} tag
- * @param string $tag_args
- * @return string
- */
-
- function _compile_capture_tag($start, $tag_args = '')
- {
- $attrs = $this->_parse_attrs($tag_args);
-
- if ($start) {
- $buffer = isset($attrs['name']) ? $attrs['name'] : "'default'";
- $assign = isset($attrs['assign']) ? $attrs['assign'] : null;
- $append = isset($attrs['append']) ? $attrs['append'] : null;
-
- $output = "<?php ob_start(); ?>";
- $this->_capture_stack[] = array($buffer, $assign, $append);
- } else {
- list($buffer, $assign, $append) = array_pop($this->_capture_stack);
- $output = "<?php \$this->_smarty_vars['capture'][$buffer] = ob_get_contents(); ";
- if (isset($assign)) {
- $output .= " \$this->assign($assign, ob_get_contents());";
- }
- if (isset($append)) {
- $output .= " \$this->append($append, ob_get_contents());";
- }
- $output .= "ob_end_clean(); ?>";
- }
-
- return $output;
- }
-
- /**
- * Compile {if ...} tag
- *
- * @param string $tag_args
- * @param boolean $elseif if true, uses elseif instead of if
- * @return string
- */
- function _compile_if_tag($tag_args, $elseif = false)
- {
-
- /* Tokenize args for 'if' tag. */
- preg_match_all('~(?>
- ' . $this->_obj_call_regexp . '(?:' . $this->_mod_regexp . '*)? | # valid object call
- ' . $this->_var_regexp . '(?:' . $this->_mod_regexp . '*)? | # var or quoted string
- \-?0[xX][0-9a-fA-F]+|\-?\d+(?:\.\d+)?|\.\d+|!==|===|==|!=|<>|<<|>>|<=|>=|\&\&|\|\||\(|\)|,|\!|\^|=|\&|\~|<|>|\||\%|\+|\-|\/|\*|\@ | # valid non-word token
- \b\w+\b | # valid word token
- \S+ # anything else
- )~x', $tag_args, $match);
-
- $tokens = $match[0];
-
- if(empty($tokens)) {
- $_error_msg = $elseif ? "'elseif'" : "'if'";
- $_error_msg .= ' statement requires arguments';
- $this->_syntax_error($_error_msg, E_USER_ERROR, __FILE__, __LINE__);
- }
-
-
- // make sure we have balanced parenthesis
- $token_count = array_count_values($tokens);
- if(isset($token_count['(']) && $token_count['('] != $token_count[')']) {
- $this->_syntax_error("unbalanced parenthesis in if statement", E_USER_ERROR, __FILE__, __LINE__);
- }
-
- $is_arg_stack = array();
-
- for ($i = 0; $i < count($tokens); $i++) {
-
- $token = &$tokens[$i];
-
- switch (strtolower($token)) {
- case '!':
- case '%':
- case '!==':
- case '==':
- case '===':
- case '>':
- case '<':
- case '!=':
- case '<>':
- case '<<':
- case '>>':
- case '<=':
- case '>=':
- case '&&':
- case '||':
- case '|':
- case '^':
- case '&':
- case '~':
- case ')':
- case ',':
- case '+':
- case '-':
- case '*':
- case '/':
- case '@':
- break;
-
- case 'eq':
- $token = '==';
- break;
-
- case 'ne':
- case 'neq':
- $token = '!=';
- break;
-
- case 'lt':
- $token = '<';
- break;
-
- case 'le':
- case 'lte':
- $token = '<=';
- break;
-
- case 'gt':
- $token = '>';
- break;
-
- case 'ge':
- case 'gte':
- $token = '>=';
- break;
-
- case 'and':
- $token = '&&';
- break;
-
- case 'or':
- $token = '||';
- break;
-
- case 'not':
- $token = '!';
- break;
-
- case 'mod':
- $token = '%';
- break;
-
- case '(':
- array_push($is_arg_stack, $i);
- break;
-
- case 'is':
- /* If last token was a ')', we operate on the parenthesized
- expression. The start of the expression is on the stack.
- Otherwise, we operate on the last encountered token. */
- if ($tokens[$i-1] == ')')
- $is_arg_start = array_pop($is_arg_stack);
- else
- $is_arg_start = $i-1;
- /* Construct the argument for 'is' expression, so it knows
- what to operate on. */
- $is_arg = implode(' ', array_slice($tokens, $is_arg_start, $i - $is_arg_start));
-
- /* Pass all tokens from next one until the end to the
- 'is' expression parsing function. The function will
- return modified tokens, where the first one is the result
- of the 'is' expression and the rest are the tokens it
- didn't touch. */
- $new_tokens = $this->_parse_is_expr($is_arg, array_slice($tokens, $i+1));
-
- /* Replace the old tokens with the new ones. */
- array_splice($tokens, $is_arg_start, count($tokens), $new_tokens);
-
- /* Adjust argument start so that it won't change from the
- current position for the next iteration. */
- $i = $is_arg_start;
- break;
-
- default:
- if(preg_match('~^' . $this->_func_regexp . '$~', $token) ) {
- // function call
- if($this->security &&
- !in_array($token, $this->security_settings['IF_FUNCS'])) {
- $this->_syntax_error("(secure mode) '$token' not allowed in if statement", E_USER_ERROR, __FILE__, __LINE__);
- }
- } elseif(preg_match('~^' . $this->_var_regexp . '$~', $token) && (strpos('+-*/^%&|', substr($token, -1)) === false) && isset($tokens[$i+1]) && $tokens[$i+1] == '(') {
- // variable function call
- $this->_syntax_error("variable function call '$token' not allowed in if statement", E_USER_ERROR, __FILE__, __LINE__);
- } elseif(preg_match('~^' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '(?:' . $this->_mod_regexp . '*)$~', $token)) {
- // object or variable
- $token = $this->_parse_var_props($token);
- } elseif(is_numeric($token)) {
- // number, skip it
- } else {
- $this->_syntax_error("unidentified token '$token'", E_USER_ERROR, __FILE__, __LINE__);
- }
- break;
- }
- }
-
- if ($elseif)
- return '<?php elseif ('.implode(' ', $tokens).'): ?>';
- else
- return '<?php if ('.implode(' ', $tokens).'): ?>';
- }
-
-
- function _compile_arg_list($type, $name, $attrs, &$cache_code) {
- $arg_list = array();
-
- if (isset($type) && isset($name)
- && isset($this->_plugins[$type])
- && isset($this->_plugins[$type][$name])
- && empty($this->_plugins[$type][$name][4])
- && is_array($this->_plugins[$type][$name][5])
- ) {
- /* we have a list of parameters that should be cached */
- $_cache_attrs = $this->_plugins[$type][$name][5];
- $_count = $this->_cache_attrs_count++;
- $cache_code = "\$_cache_attrs =& \$this->_smarty_cache_attrs('$this->_cache_serial','$_count');";
-
- } else {
- /* no parameters are cached */
- $_cache_attrs = null;
- }
-
- foreach ($attrs as $arg_name => $arg_value) {
- if (is_bool($arg_value))
- $arg_value = $arg_value ? 'true' : 'false';
- if (is_null($arg_value))
- $arg_value = 'null';
- if ($_cache_attrs && in_array($arg_name, $_cache_attrs)) {
- $arg_list[] = "'$arg_name' => (\$this->_cache_including) ? \$_cache_attrs['$arg_name'] : (\$_cache_attrs['$arg_name']=$arg_value)";
- } else {
- $arg_list[] = "'$arg_name' => $arg_value";
- }
- }
- return $arg_list;
- }
-
- /**
- * Parse is expression
- *
- * @param string $is_arg
- * @param array $tokens
- * @return array
- */
- function _parse_is_expr($is_arg, $tokens)
- {
- $expr_end = 0;
- $negate_expr = false;
-
- if (($first_token = array_shift($tokens)) == 'not') {
- $negate_expr = true;
- $expr_type = array_shift($tokens);
- } else
- $expr_type = $first_token;
-
- switch ($expr_type) {
- case 'even':
- if (isset($tokens[$expr_end]) && $tokens[$expr_end] == 'by') {
- $expr_end++;
- $expr_arg = $tokens[$expr_end++];
- $expr = "!(1 & ($is_arg / " . $this->_parse_var_props($expr_arg) . "))";
- } else
- $expr = "!(1 & $is_arg)";
- break;
-
- case 'odd':
- if (isset($tokens[$expr_end]) && $tokens[$expr_end] == 'by') {
- $expr_end++;
- $expr_arg = $tokens[$expr_end++];
- $expr = "(1 & ($is_arg / " . $this->_parse_var_props($expr_arg) . "))";
- } else
- $expr = "(1 & $is_arg)";
- break;
-
- case 'div':
- if (@$tokens[$expr_end] == 'by') {
- $expr_end++;
- $expr_arg = $tokens[$expr_end++];
- $expr = "!($is_arg % " . $this->_parse_var_props($expr_arg) . ")";
- } else {
- $this->_syntax_error("expecting 'by' after 'div'", E_USER_ERROR, __FILE__, __LINE__);
- }
- break;
-
- default:
- $this->_syntax_error("unknown 'is' expression - '$expr_type'", E_USER_ERROR, __FILE__, __LINE__);
- break;
- }
-
- if ($negate_expr) {
- $expr = "!($expr)";
- }
-
- array_splice($tokens, 0, $expr_end, $expr);
-
- return $tokens;
- }
-
-
- /**
- * Parse attribute string
- *
- * @param string $tag_args
- * @return array
- */
- function _parse_attrs($tag_args)
- {
-
- /* Tokenize tag attributes. */
- preg_match_all('~(?:' . $this->_obj_call_regexp . '|' . $this->_qstr_regexp . ' | (?>[^"\'=\s]+)
- )+ |
- [=]
- ~x', $tag_args, $match);
- $tokens = $match[0];
-
- $attrs = array();
- /* Parse state:
- 0 - expecting attribute name
- 1 - expecting '='
- 2 - expecting attribute value (not '=') */
- $state = 0;
-
- foreach ($tokens as $token) {
- switch ($state) {
- case 0:
- /* If the token is a valid identifier, we set attribute name
- and go to state 1. */
- if (preg_match('~^\w+$~', $token)) {
- $attr_name = $token;
- $state = 1;
- } else
- $this->_syntax_error("invalid attribute name: '$token'", E_USER_ERROR, __FILE__, __LINE__);
- break;
-
- case 1:
- /* If the token is '=', then we go to state 2. */
- if ($token == '=') {
- $state = 2;
- } else
- $this->_syntax_error("expecting '=' after attribute name '$last_token'", E_USER_ERROR, __FILE__, __LINE__);
- break;
-
- case 2:
- /* If token is not '=', we set the attribute value and go to
- state 0. */
- if ($token != '=') {
- /* We booleanize the token if it's a non-quoted possible
- boolean value. */
- if (preg_match('~^(on|yes|true)$~', $token)) {
- $token = 'true';
- } else if (preg_match('~^(off|no|false)$~', $token)) {
- $token = 'false';
- } else if ($token == 'null') {
- $token = 'null';
- } else if (preg_match('~^' . $this->_num_const_regexp . '|0[xX][0-9a-fA-F]+$~', $token)) {
- /* treat integer literally */
- } else if (!preg_match('~^' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '(?:' . $this->_mod_regexp . ')*$~', $token)) {
- /* treat as a string, double-quote it escaping quotes */
- $token = '"'.addslashes($token).'"';
- }
-
- $attrs[$attr_name] = $token;
- $state = 0;
- } else
- $this->_syntax_error("'=' cannot be an attribute value", E_USER_ERROR, __FILE__, __LINE__);
- break;
- }
- $last_token = $token;
- }
-
- if($state != 0) {
- if($state == 1) {
- $this->_syntax_error("expecting '=' after attribute name '$last_token'", E_USER_ERROR, __FILE__, __LINE__);
- } else {
- $this->_syntax_error("missing attribute value", E_USER_ERROR, __FILE__, __LINE__);
- }
- }
-
- $this->_parse_vars_props($attrs);
-
- return $attrs;
- }
-
- /**
- * compile multiple variables and section properties tokens into
- * PHP code
- *
- * @param array $tokens
- */
- function _parse_vars_props(&$tokens)
- {
- foreach($tokens as $key => $val) {
- $tokens[$key] = $this->_parse_var_props($val);
- }
- }
-
- /**
- * compile single variable and section properties token into
- * PHP code
- *
- * @param string $val
- * @param string $tag_attrs
- * @return string
- */
- function _parse_var_props($val)
- {
- $val = trim($val);
-
- if(preg_match('~^(' . $this->_obj_call_regexp . '|' . $this->_dvar_regexp . ')(' . $this->_mod_regexp . '*)$~', $val, $match)) {
- // $ variable or object
- $return = $this->_parse_var($match[1]);
- $modifiers = $match[2];
- if (!empty($this->default_modifiers) && !preg_match('~(^|\|)smarty:nodefaults($|\|)~',$modifiers)) {
- $_default_mod_string = implode('|',(array)$this->default_modifiers);
- $modifiers = empty($modifiers) ? $_default_mod_string : $_default_mod_string . '|' . $modifiers;
- }
- $this->_parse_modifiers($return, $modifiers);
- return $return;
- } elseif (preg_match('~^' . $this->_db_qstr_regexp . '(?:' . $this->_mod_regexp . '*)$~', $val)) {
- // double quoted text
- preg_match('~^(' . $this->_db_qstr_regexp . ')('. $this->_mod_regexp . '*)$~', $val, $match);
- $return = $this->_expand_quoted_text($match[1]);
- if($match[2] != '') {
- $this->_parse_modifiers($return, $match[2]);
- }
- return $return;
- }
- elseif(preg_match('~^' . $this->_num_const_regexp . '(?:' . $this->_mod_regexp . '*)$~', $val)) {
- // numerical constant
- preg_match('~^(' . $this->_num_const_regexp . ')('. $this->_mod_regexp . '*)$~', $val, $match);
- if($match[2] != '') {
- $this->_parse_modifiers($match[1], $match[2]);
- return $match[1];
- }
- }
- elseif(preg_match('~^' . $this->_si_qstr_regexp . '(?:' . $this->_mod_regexp . '*)$~', $val)) {
- // single quoted text
- preg_match('~^(' . $this->_si_qstr_regexp . ')('. $this->_mod_regexp . '*)$~', $val, $match);
- if($match[2] != '') {
- $this->_parse_modifiers($match[1], $match[2]);
- return $match[1];
- }
- }
- elseif(preg_match('~^' . $this->_cvar_regexp . '(?:' . $this->_mod_regexp . '*)$~', $val)) {
- // config var
- return $this->_parse_conf_var($val);
- }
- elseif(preg_match('~^' . $this->_svar_regexp . '(?:' . $this->_mod_regexp . '*)$~', $val)) {
- // section var
- return $this->_parse_section_prop($val);
- }
- elseif(!in_array($val, $this->_permitted_tokens) && !is_numeric($val)) {
- // literal string
- return $this->_expand_quoted_text('"' . strtr($val, array('\\' => '\\\\', '"' => '\\"')) .'"');
- }
- return $val;
- }
-
- /**
- * expand quoted text with embedded variables
- *
- * @param string $var_expr
- * @return string
- */
- function _expand_quoted_text($var_expr)
- {
- // if contains unescaped $, expand it
- if(preg_match_all('~(?:\`(?<!\\\\)\$' . $this->_dvar_guts_regexp . '(?:' . $this->_obj_ext_regexp . ')*\`)|(?:(?<!\\\\)\$\w+(\[[a-zA-Z0-9]+\])*)~', $var_expr, $_match)) {
- $_match = $_match[0];
- $_replace = array();
- foreach($_match as $_var) {
- $_replace[$_var] = '".(' . $this->_parse_var(str_replace('`','',$_var)) . ')."';
- }
- $var_expr = strtr($var_expr, $_replace);
- $_return = preg_replace('~\.""|(?<!\\\\)""\.~', '', $var_expr);
- } else {
- $_return = $var_expr;
- }
- // replace double quoted literal string with single quotes
- $_return = preg_replace('~^"([\s\w]+)"$~',"'\\1'",$_return);
- return $_return;
- }
-
- /**
- * parse variable expression into PHP code
- *
- * @param string $var_expr
- * @param string $output
- * @return string
- */
- function _parse_var($var_expr)
- {
- $_has_math = false;
- $_math_vars = preg_split('~('.$this->_dvar_math_regexp.'|'.$this->_qstr_regexp.')~', $var_expr, -1, PREG_SPLIT_DELIM_CAPTURE);
-
- if(count($_math_vars) > 1) {
- $_first_var = "";
- $_complete_var = "";
- $_output = "";
- // simple check if there is any math, to stop recursion (due to modifiers with "xx % yy" as parameter)
- foreach($_math_vars as $_k => $_math_var) {
- $_math_var = $_math_vars[$_k];
-
- if(!empty($_math_var) || is_numeric($_math_var)) {
- // hit a math operator, so process the stuff which came before it
- if(preg_match('~^' . $this->_dvar_math_regexp . '$~', $_math_var)) {
- $_has_math = true;
- if(!empty($_complete_var) || is_numeric($_complete_var)) {
- $_output .= $this->_parse_var($_complete_var);
- }
-
- // just output the math operator to php
- $_output .= $_math_var;
-
- if(empty($_first_var))
- $_first_var = $_complete_var;
-
- $_complete_var = "";
- } else {
- $_complete_var .= $_math_var;
- }
- }
- }
- if($_has_math) {
- if(!empty($_complete_var) || is_numeric($_complete_var))
- $_output .= $this->_parse_var($_complete_var);
-
- // get the modifiers working (only the last var from math + modifier is left)
- $var_expr = $_complete_var;
- }
- }
-
- // prevent cutting of first digit in the number (we _definitly_ got a number if the first char is a digit)
- if(is_numeric(substr($var_expr, 0, 1)))
- $_var_ref = $var_expr;
- else
- $_var_ref = substr($var_expr, 1);
-
- if(!$_has_math) {
-
- // get [foo] and .foo and ->foo and (...) pieces
- preg_match_all('~(?:^\w+)|' . $this->_obj_params_regexp . '|(?:' . $this->_var_bracket_regexp . ')|->\$?\w+|\.\$?\w+|\S+~', $_var_ref, $match);
-
- $_indexes = $match[0];
- $_var_name = array_shift($_indexes);
-
- /* Handle $smarty.* variable references as a special case. */
- if ($_var_name == 'smarty') {
- /*
- * If the reference could be compiled, use the compiled output;
- * otherwise, fall back on the $smarty variable generated at
- * run-time.
- */
- if (($smarty_ref = $this->_compile_smarty_ref($_indexes)) !== null) {
- $_output = $smarty_ref;
- } else {
- $_var_name = substr(array_shift($_indexes), 1);
- $_output = "\$this->_smarty_vars['$_var_name']";
- }
- } elseif(is_numeric($_var_name) && is_numeric(substr($var_expr, 0, 1))) {
- // because . is the operator for accessing arrays thru inidizes we need to put it together again for floating point numbers
- if(count($_indexes) > 0)
- {
- $_var_name .= implode("", $_indexes);
- $_indexes = array();
- }
- $_output = $_var_name;
- } else {
- $_output = "\$this->_tpl_vars['$_var_name']";
- }
-
- foreach ($_indexes as $_index) {
- if (substr($_index, 0, 1) == '[') {
- $_index = substr($_index, 1, -1);
- if (is_numeric($_index)) {
- $_output .= "[$_index]";
- } elseif (substr($_index, 0, 1) == '$') {
- if (strpos($_index, '.') !== false) {
- $_output .= '[' . $this->_parse_var($_index) . ']';
- } else {
- $_output .= "[\$this->_tpl_vars['" . substr($_index, 1) . "']]";
- }
- } else {
- $_var_parts = explode('.', $_index);
- $_var_section = $_var_parts[0];
- $_var_section_prop = isset($_var_parts[1]) ? $_var_parts[1] : 'index';
- $_output .= "[\$this->_sections['$_var_section']['$_var_section_prop']]";
- }
- } else if (substr($_index, 0, 1) == '.') {
- if (substr($_index, 1, 1) == '$')
- $_output .= "[\$this->_tpl_vars['" . substr($_index, 2) . "']]";
- else
- $_output .= "['" . substr($_index, 1) . "']";
- } else if (substr($_index,0,2) == '->') {
- if(substr($_index,2,2) == '__') {
- $this->_syntax_error('call to internal object members is not allowed', E_USER_ERROR, __FILE__, __LINE__);
- } elseif($this->security && substr($_index, 2, 1) == '_') {
- $this->_syntax_error('(secure) call to private object member is not allowed', E_USER_ERROR, __FILE__, __LINE__);
- } elseif (substr($_index, 2, 1) == '$') {
- if ($this->security) {
- $this->_syntax_error('(secure) call to dynamic object member is not allowed', E_USER_ERROR, __FILE__, __LINE__);
- } else {
- $_output .= '->{(($_var=$this->_tpl_vars[\''.substr($_index,3).'\']) && substr($_var,0,2)!=\'__\') ? $_var : $this->trigger_error("cannot access property \\"$_var\\"")}';
- }
- } else {
- $_output .= $_index;
- }
- } elseif (substr($_index, 0, 1) == '(') {
- $_index = $this->_parse_parenth_args($_index);
- $_output .= $_index;
- } else {
- $_output .= $_index;
- }
- }
- }
-
- return $_output;
- }
-
- /**
- * parse arguments in function call parenthesis
- *
- * @param string $parenth_args
- * @return string
- */
- function _parse_parenth_args($parenth_args)
- {
- preg_match_all('~' . $this->_param_regexp . '~',$parenth_args, $match);
- $orig_vals = $match = $match[0];
- $this->_parse_vars_props($match);
- $replace = array();
- for ($i = 0, $count = count($match); $i < $count; $i++) {
- $replace[$orig_vals[$i]] = $match[$i];
- }
- return strtr($parenth_args, $replace);
- }
-
- /**
- * parse configuration variable expression into PHP code
- *
- * @param string $conf_var_expr
- */
- function _parse_conf_var($conf_var_expr)
- {
- $parts = explode('|', $conf_var_expr, 2);
- $var_ref = $parts[0];
- $modifiers = isset($parts[1]) ? $parts[1] : '';
-
- $var_name = substr($var_ref, 1, -1);
-
- $output = "\$this->_config[0]['vars']['$var_name']";
-
- $this->_parse_modifiers($output, $modifiers);
-
- return $output;
- }
-
- /**
- * parse section property expression into PHP code
- *
- * @param string $section_prop_expr
- * @return string
- */
- function _parse_section_prop($section_prop_expr)
- {
- $parts = explode('|', $section_prop_expr, 2);
- $var_ref = $parts[0];
- $modifiers = isset($parts[1]) ? $parts[1] : '';
-
- preg_match('!%(\w+)\.(\w+)%!', $var_ref, $match);
- $section_name = $match[1];
- $prop_name = $match[2];
-
- $output = "\$this->_sections['$section_name']['$prop_name']";
-
- $this->_parse_modifiers($output, $modifiers);
-
- return $output;
- }
-
-
- /**
- * parse modifier chain into PHP code
- *
- * sets $output to parsed modified chain
- * @param string $output
- * @param string $modifier_string
- */
- function _parse_modifiers(&$output, $modifier_string)
- {
- preg_match_all('~\|(@?\w+)((?>:(?:'. $this->_qstr_regexp . '|[^|]+))*)~', '|' . $modifier_string, $_match);
- list(, $_modifiers, $modifier_arg_strings) = $_match;
-
- for ($_i = 0, $_for_max = count($_modifiers); $_i < $_for_max; $_i++) {
- $_modifier_name = $_modifiers[$_i];
-
- if($_modifier_name == 'smarty') {
- // skip smarty modifier
- continue;
- }
-
- preg_match_all('~:(' . $this->_qstr_regexp . '|[^:]+)~', $modifier_arg_strings[$_i], $_match);
- $_modifier_args = $_match[1];
-
- if (substr($_modifier_name, 0, 1) == '@') {
- $_map_array = false;
- $_modifier_name = substr($_modifier_name, 1);
- } else {
- $_map_array = true;
- }
-
- if (empty($this->_plugins['modifier'][$_modifier_name])
- && !$this->_get_plugin_filepath('modifier', $_modifier_name)
- && function_exists($_modifier_name)) {
- if ($this->security && !in_array($_modifier_name, $this->security_settings['MODIFIER_FUNCS'])) {
- $this->_trigger_fatal_error("[plugin] (secure mode) modifier '$_modifier_name' is not allowed" , $this->_current_file, $this->_current_line_no, __FILE__, __LINE__);
- } else {
- $this->_plugins['modifier'][$_modifier_name] = array($_modifier_name, null, null, false);
- }
- }
- $this->_add_plugin('modifier', $_modifier_name);
-
- $this->_parse_vars_props($_modifier_args);
-
- if($_modifier_name == 'default') {
- // supress notifications of default modifier vars and args
- if(substr($output, 0, 1) == '$') {
- $output = '@' . $output;
- }
- if(isset($_modifier_args[0]) && substr($_modifier_args[0], 0, 1) == '$') {
- $_modifier_args[0] = '@' . $_modifier_args[0];
- }
- }
- if (count($_modifier_args) > 0)
- $_modifier_args = ', '.implode(', ', $_modifier_args);
- else
- $_modifier_args = '';
-
- if ($_map_array) {
- $output = "((is_array(\$_tmp=$output)) ? \$this->_run_mod_handler('$_modifier_name', true, \$_tmp$_modifier_args) : " . $this->_compile_plugin_call('modifier', $_modifier_name) . "(\$_tmp$_modifier_args))";
-
- } else {
-
- $output = $this->_compile_plugin_call('modifier', $_modifier_name)."($output$_modifier_args)";
-
- }
- }
- }
-
-
- /**
- * add plugin
- *
- * @param string $type
- * @param string $name
- * @param boolean? $delayed_loading
- */
- function _add_plugin($type, $name, $delayed_loading = null)
- {
- if (!isset($this->_plugin_info[$type])) {
- $this->_plugin_info[$type] = array();
- }
- if (!isset($this->_plugin_info[$type][$name])) {
- $this->_plugin_info[$type][$name] = array($this->_current_file,
- $this->_current_line_no,
- $delayed_loading);
- }
- }
-
-
- /**
- * Compiles references of type $smarty.foo
- *
- * @param string $indexes
- * @return string
- */
- function _compile_smarty_ref(&$indexes)
- {
- /* Extract the reference name. */
- $_ref = substr($indexes[0], 1);
- foreach($indexes as $_index_no=>$_index) {
- if (substr($_index, 0, 1) != '.' && $_index_no<2 || !preg_match('~^(\.|\[|->)~', $_index)) {
- $this->_syntax_error('$smarty' . implode('', array_slice($indexes, 0, 2)) . ' is an invalid reference', E_USER_ERROR, __FILE__, __LINE__);
- }
- }
-
- switch ($_ref) {
- case 'now':
- $compiled_ref = 'time()';
- $_max_index = 1;
- break;
-
- case 'foreach':
- array_shift($indexes);
- $_var = $this->_parse_var_props(substr($indexes[0], 1));
- $_propname = substr($indexes[1], 1);
- $_max_index = 1;
- switch ($_propname) {
- case 'index':
- array_shift($indexes);
- $compiled_ref = "(\$this->_foreach[$_var]['iteration']-1)";
- break;
-
- case 'first':
- array_shift($indexes);
- $compiled_ref = "(\$this->_foreach[$_var]['iteration'] <= 1)";
- break;
-
- case 'last':
- array_shift($indexes);
- $compiled_ref = "(\$this->_foreach[$_var]['iteration'] == \$this->_foreach[$_var]['total'])";
- break;
-
- case 'show':
- array_shift($indexes);
- $compiled_ref = "(\$this->_foreach[$_var]['total'] > 0)";
- break;
-
- default:
- unset($_max_index);
- $compiled_ref = "\$this->_foreach[$_var]";
- }
- break;
-
- case 'section':
- array_shift($indexes);
- $_var = $this->_parse_var_props(substr($indexes[0], 1));
- $compiled_ref = "\$this->_sections[$_var]";
- break;
-
- case 'get':
- $compiled_ref = ($this->request_use_auto_globals) ? '$_GET' : "\$GLOBALS['HTTP_GET_VARS']";
- break;
-
- case 'post':
- $compiled_ref = ($this->request_use_auto_globals) ? '$_POST' : "\$GLOBALS['HTTP_POST_VARS']";
- break;
-
- case 'cookies':
- $compiled_ref = ($this->request_use_auto_globals) ? '$_COOKIE' : "\$GLOBALS['HTTP_COOKIE_VARS']";
- break;
-
- case 'env':
- $compiled_ref = ($this->request_use_auto_globals) ? '$_ENV' : "\$GLOBALS['HTTP_ENV_VARS']";
- break;
-
- case 'server':
- $compiled_ref = ($this->request_use_auto_globals) ? '$_SERVER' : "\$GLOBALS['HTTP_SERVER_VARS']";
- break;
-
- case 'session':
- $compiled_ref = ($this->request_use_auto_globals) ? '$_SESSION' : "\$GLOBALS['HTTP_SESSION_VARS']";
- break;
-
- /*
- * These cases are handled either at run-time or elsewhere in the
- * compiler.
- */
- case 'request':
- if ($this->request_use_auto_globals) {
- $compiled_ref = '$_REQUEST';
- break;
- } else {
- $this->_init_smarty_vars = true;
- }
- return null;
-
- case 'capture':
- return null;
-
- case 'template':
- $compiled_ref = "'$this->_current_file'";
- $_max_index = 1;
- break;
-
- case 'version':
- $compiled_ref = "'$this->_version'";
- $_max_index = 1;
- break;
-
- case 'const':
- if ($this->security && !$this->security_settings['ALLOW_CONSTANTS']) {
- $this->_syntax_error("(secure mode) constants not permitted",
- E_USER_WARNING, __FILE__, __LINE__);
- return;
- }
- array_shift($indexes);
- if (preg_match('!^\.\w+$!', $indexes[0])) {
- $compiled_ref = '@' . substr($indexes[0], 1);
- } else {
- $_val = $this->_parse_var_props(substr($indexes[0], 1));
- $compiled_ref = '@constant(' . $_val . ')';
- }
- $_max_index = 1;
- break;
-
- case 'config':
- $compiled_ref = "\$this->_config[0]['vars']";
- $_max_index = 3;
- break;
-
- case 'ldelim':
- $compiled_ref = "'$this->left_delimiter'";
- break;
-
- case 'rdelim':
- $compiled_ref = "'$this->right_delimiter'";
- break;
-
- default:
- $this->_syntax_error('$smarty.' . $_ref . ' is an unknown reference', E_USER_ERROR, __FILE__, __LINE__);
- break;
- }
-
- if (isset($_max_index) && count($indexes) > $_max_index) {
- $this->_syntax_error('$smarty' . implode('', $indexes) .' is an invalid reference', E_USER_ERROR, __FILE__, __LINE__);
- }
-
- array_shift($indexes);
- return $compiled_ref;
- }
-
- /**
- * compiles call to plugin of type $type with name $name
- * returns a string containing the function-name or method call
- * without the paramter-list that would have follow to make the
- * call valid php-syntax
- *
- * @param string $type
- * @param string $name
- * @return string
- */
- function _compile_plugin_call($type, $name) {
- if (isset($this->_plugins[$type][$name])) {
- /* plugin loaded */
- if (is_array($this->_plugins[$type][$name][0])) {
- return ((is_object($this->_plugins[$type][$name][0][0])) ?
- "\$this->_plugins['$type']['$name'][0][0]->" /* method callback */
- : (string)($this->_plugins[$type][$name][0][0]).'::' /* class callback */
- ). $this->_plugins[$type][$name][0][1];
-
- } else {
- /* function callback */
- return $this->_plugins[$type][$name][0];
-
- }
- } else {
- /* plugin not loaded -> auto-loadable-plugin */
- return 'smarty_'.$type.'_'.$name;
-
- }
- }
-
- /**
- * load pre- and post-filters
- */
- function _load_filters()
- {
- if (count($this->_plugins['prefilter']) > 0) {
- foreach ($this->_plugins['prefilter'] as $filter_name => $prefilter) {
- if ($prefilter === false) {
- unset($this->_plugins['prefilter'][$filter_name]);
- $_params = array('plugins' => array(array('prefilter', $filter_name, null, null, false)));
- require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
- smarty_core_load_plugins($_params, $this);
- }
- }
- }
- if (count($this->_plugins['postfilter']) > 0) {
- foreach ($this->_plugins['postfilter'] as $filter_name => $postfilter) {
- if ($postfilter === false) {
- unset($this->_plugins['postfilter'][$filter_name]);
- $_params = array('plugins' => array(array('postfilter', $filter_name, null, null, false)));
- require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
- smarty_core_load_plugins($_params, $this);
- }
- }
- }
- }
-
-
- /**
- * Quote subpattern references
- *
- * @param string $string
- * @return string
- */
- function _quote_replace($string)
- {
- return strtr($string, array('\\' => '\\\\', '$' => '\\$'));
- }
-
- /**
- * display Smarty syntax error
- *
- * @param string $error_msg
- * @param integer $error_type
- * @param string $file
- * @param integer $line
- */
- function _syntax_error($error_msg, $error_type = E_USER_ERROR, $file=null, $line=null)
- {
- $this->_trigger_fatal_error("syntax error: $error_msg", $this->_current_file, $this->_current_line_no, $file, $line, $error_type);
- }
-
-
- /**
- * check if the compilation changes from cacheable to
- * non-cacheable state with the beginning of the current
- * plugin. return php-code to reflect the transition.
- * @return string
- */
- function _push_cacheable_state($type, $name) {
- $_cacheable = !isset($this->_plugins[$type][$name]) || $this->_plugins[$type][$name][4];
- if ($_cacheable
- || 0<$this->_cacheable_state++) return '';
- if (!isset($this->_cache_serial)) $this->_cache_serial = md5(uniqid('Smarty'));
- $_ret = 'if ($this->caching && !$this->_cache_including): echo \'{nocache:'
- . $this->_cache_serial . '#' . $this->_nocache_count
- . '}\'; endif;';
- return $_ret;
- }
-
-
- /**
- * check if the compilation changes from non-cacheable to
- * cacheable state with the end of the current plugin return
- * php-code to reflect the transition.
- * @return string
- */
- function _pop_cacheable_state($type, $name) {
- $_cacheable = !isset($this->_plugins[$type][$name]) || $this->_plugins[$type][$name][4];
- if ($_cacheable
- || --$this->_cacheable_state>0) return '';
- return 'if ($this->caching && !$this->_cache_including): echo \'{/nocache:'
- . $this->_cache_serial . '#' . ($this->_nocache_count++)
- . '}\'; endif;';
- }
-
-
- /**
- * push opening tag-name, file-name and line-number on the tag-stack
- * @param string the opening tag's name
- */
- function _push_tag($open_tag)
- {
- array_push($this->_tag_stack, array($open_tag, $this->_current_line_no));
- }
-
- /**
- * pop closing tag-name
- * raise an error if this stack-top doesn't match with the closing tag
- * @param string the closing tag's name
- * @return string the opening tag's name
- */
- function _pop_tag($close_tag)
- {
- $message = '';
- if (count($this->_tag_stack)>0) {
- list($_open_tag, $_line_no) = array_pop($this->_tag_stack);
- if ($close_tag == $_open_tag) {
- return $_open_tag;
- }
- if ($close_tag == 'if' && ($_open_tag == 'else' || $_open_tag == 'elseif' )) {
- return $this->_pop_tag($close_tag);
- }
- if ($close_tag == 'section' && $_open_tag == 'sectionelse') {
- $this->_pop_tag($close_tag);
- return $_open_tag;
- }
- if ($close_tag == 'foreach' && $_open_tag == 'foreachelse') {
- $this->_pop_tag($close_tag);
- return $_open_tag;
- }
- if ($_open_tag == 'else' || $_open_tag == 'elseif') {
- $_open_tag = 'if';
- } elseif ($_open_tag == 'sectionelse') {
- $_open_tag = 'section';
- } elseif ($_open_tag == 'foreachelse') {
- $_open_tag = 'foreach';
- }
- $message = " expected {/$_open_tag} (opened line $_line_no).";
- }
- $this->_syntax_error("mismatched tag {/$close_tag}.$message",
- E_USER_ERROR, __FILE__, __LINE__);
- }
-
-}
-
-/**
- * compare to values by their string length
- *
- * @access private
- * @param string $a
- * @param string $b
- * @return 0|-1|1
- */
-function _smarty_sort_length($a, $b)
-{
- if($a == $b)
- return 0;
-
- if(strlen($a) == strlen($b))
- return ($a > $b) ? -1 : 1;
-
- return (strlen($a) > strlen($b)) ? -1 : 1;
-}
-
-
-/* vim: set et: */
-
-?>
diff --git a/BSF/include/smarty/libs/debug.tpl b/BSF/include/smarty/libs/debug.tpl
deleted file mode 100644
index c05ef5d0b..000000000
--- a/BSF/include/smarty/libs/debug.tpl
+++ /dev/null
@@ -1,157 +0,0 @@
-{* Smarty *}
-{* debug.tpl, last updated version 2.1.0 *}
-{assign_debug_info}
-{capture assign=debug_output}
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
-<head>
- <title>Smarty Debug Console</title>
-{literal}
-<style type="text/css">
-/* <![CDATA[ */
-body, h1, h2, td, th, p {
- font-family: sans-serif;
- font-weight: normal;
- font-size: 0.9em;
- margin: 1px;
- padding: 0;
-}
-
-h1 {
- margin: 0;
- text-align: left;
- padding: 2px;
- background-color: #f0c040;
- color: black;
- font-weight: bold;
- font-size: 1.2em;
- }
-
-h2 {
- background-color: #9B410E;
- color: white;
- text-align: left;
- font-weight: bold;
- padding: 2px;
- border-top: 1px solid black;
-}
-
-body {
- background: black;
-}
-
-p, table, div {
- background: #f0ead8;
-}
-
-p {
- margin: 0;
- font-style: italic;
- text-align: center;
-}
-
-table {
- width: 100%;
-}
-
-th, td {
- font-family: monospace;
- vertical-align: top;
- text-align: left;
- width: 50%;
-}
-
-td {
- color: green;
-}
-
-.odd {
- background-color: #eeeeee;
-}
-
-.even {
- background-color: #fafafa;
-}
-
-.exectime {
- font-size: 0.8em;
- font-style: italic;
-}
-
-#table_assigned_vars th {
- color: blue;
-}
-
-#table_config_vars th {
- color: maroon;
-}
-/* ]]> */
-</style>
-{/literal}
-</head>
-<body>
-
-<h1>Smarty Debug Console</h1>
-
-<h2>included templates &amp; config files (load time in seconds)</h2>
-
-<div>
-{section name=templates loop=$_debug_tpls}
- {section name=indent loop=$_debug_tpls[templates].depth}&nbsp;&nbsp;&nbsp;{/section}
- <font color={if $_debug_tpls[templates].type eq "template"}brown{elseif $_debug_tpls[templates].type eq "insert"}black{else}green{/if}>
- {$_debug_tpls[templates].filename|escape:html}</font>
- {if isset($_debug_tpls[templates].exec_time)}
- <span class="exectime">
- ({$_debug_tpls[templates].exec_time|string_format:"%.5f"})
- {if %templates.index% eq 0}(total){/if}
- </span>
- {/if}
- <br />
-{sectionelse}
- <p>no templates included</p>
-{/section}
-</div>
-
-<h2>assigned template variables</h2>
-
-<table id="table_assigned_vars">
- {section name=vars loop=$_debug_keys}
- <tr class="{cycle values="odd,even"}">
- <th>{ldelim}${$_debug_keys[vars]|escape:'html'}{rdelim}</th>
- <td>{$_debug_vals[vars]|@debug_print_var}</td></tr>
- {sectionelse}
- <tr><td><p>no template variables assigned</p></td></tr>
- {/section}
-</table>
-
-<h2>assigned config file variables (outer template scope)</h2>
-
-<table id="table_config_vars">
- {section name=config_vars loop=$_debug_config_keys}
- <tr class="{cycle values="odd,even"}">
- <th>{ldelim}#{$_debug_config_keys[config_vars]|escape:'html'}#{rdelim}</th>
- <td>{$_debug_config_vals[config_vars]|@debug_print_var}</td></tr>
- {sectionelse}
- <tr><td><p>no config vars assigned</p></td></tr>
- {/section}
-</table>
-</body>
-</html>
-{/capture}
-{if isset($_smarty_debug_output) and $_smarty_debug_output eq "html"}
- {$debug_output}
-{else}
-<script type="text/javascript">
-// <![CDATA[
- if ( self.name == '' ) {ldelim}
- var title = 'Console';
- {rdelim}
- else {ldelim}
- var title = 'Console_' + self.name;
- {rdelim}
- _smarty_console = window.open("",title.value,"width=680,height=600,resizable,scrollbars=yes");
- _smarty_console.document.write('{$debug_output|escape:'javascript'}');
- _smarty_console.document.close();
-// ]]>
-</script>
-{/if} \ No newline at end of file
diff --git a/BSF/include/smarty/libs/internals/core.assemble_plugin_filepath.php b/BSF/include/smarty/libs/internals/core.assemble_plugin_filepath.php
deleted file mode 100644
index 690d3ddbc..000000000
--- a/BSF/include/smarty/libs/internals/core.assemble_plugin_filepath.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * assemble filepath of requested plugin
- *
- * @param string $type
- * @param string $name
- * @return string|false
- */
-function smarty_core_assemble_plugin_filepath($params, &$smarty)
-{
- static $_filepaths_cache = array();
-
- $_plugin_filename = $params['type'] . '.' . $params['name'] . '.php';
- if (isset($_filepaths_cache[$_plugin_filename])) {
- return $_filepaths_cache[$_plugin_filename];
- }
- $_return = false;
-
- foreach ((array)$smarty->plugins_dir as $_plugin_dir) {
-
- $_plugin_filepath = $_plugin_dir . DIRECTORY_SEPARATOR . $_plugin_filename;
-
- // see if path is relative
- if (!preg_match("/^([\/\\\\]|[a-zA-Z]:[\/\\\\])/", $_plugin_dir)) {
- $_relative_paths[] = $_plugin_dir;
- // relative path, see if it is in the SMARTY_DIR
- if (@is_readable(SMARTY_DIR . $_plugin_filepath)) {
- $_return = SMARTY_DIR . $_plugin_filepath;
- break;
- }
- }
- // try relative to cwd (or absolute)
- if (@is_readable($_plugin_filepath)) {
- $_return = $_plugin_filepath;
- break;
- }
- }
-
- if($_return === false) {
- // still not found, try PHP include_path
- if(isset($_relative_paths)) {
- foreach ((array)$_relative_paths as $_plugin_dir) {
-
- $_plugin_filepath = $_plugin_dir . DIRECTORY_SEPARATOR . $_plugin_filename;
-
- $_params = array('file_path' => $_plugin_filepath);
- require_once(SMARTY_CORE_DIR . 'core.get_include_path.php');
- if(smarty_core_get_include_path($_params, $smarty)) {
- $_return = $_params['new_file_path'];
- break;
- }
- }
- }
- }
- $_filepaths_cache[$_plugin_filename] = $_return;
- return $_return;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.assign_smarty_interface.php b/BSF/include/smarty/libs/internals/core.assign_smarty_interface.php
deleted file mode 100644
index 7e65a73ec..000000000
--- a/BSF/include/smarty/libs/internals/core.assign_smarty_interface.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Smarty assign_smarty_interface core plugin
- *
- * Type: core<br>
- * Name: assign_smarty_interface<br>
- * Purpose: assign the $smarty interface variable
- * @param array Format: null
- * @param Smarty
- */
-function smarty_core_assign_smarty_interface($params, &$smarty)
-{
- if (isset($smarty->_smarty_vars) && isset($smarty->_smarty_vars['request'])) {
- return;
- }
-
- $_globals_map = array('g' => 'HTTP_GET_VARS',
- 'p' => 'HTTP_POST_VARS',
- 'c' => 'HTTP_COOKIE_VARS',
- 's' => 'HTTP_SERVER_VARS',
- 'e' => 'HTTP_ENV_VARS');
-
- $_smarty_vars_request = array();
-
- foreach (preg_split('!!', strtolower($smarty->request_vars_order)) as $_c) {
- if (isset($_globals_map[$_c])) {
- $_smarty_vars_request = array_merge($_smarty_vars_request, $GLOBALS[$_globals_map[$_c]]);
- }
- }
- $_smarty_vars_request = @array_merge($_smarty_vars_request, $GLOBALS['HTTP_SESSION_VARS']);
-
- $smarty->_smarty_vars['request'] = $_smarty_vars_request;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.create_dir_structure.php b/BSF/include/smarty/libs/internals/core.create_dir_structure.php
deleted file mode 100644
index 3eecc4972..000000000
--- a/BSF/include/smarty/libs/internals/core.create_dir_structure.php
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * create full directory structure
- *
- * @param string $dir
- */
-
-// $dir
-
-function smarty_core_create_dir_structure($params, &$smarty)
-{
- if (!file_exists($params['dir'])) {
- $_open_basedir_ini = ini_get('open_basedir');
-
- if (DIRECTORY_SEPARATOR=='/') {
- /* unix-style paths */
- $_dir = $params['dir'];
- $_dir_parts = preg_split('!/+!', $_dir, -1, PREG_SPLIT_NO_EMPTY);
- $_new_dir = (substr($_dir, 0, 1)=='/') ? '/' : getcwd().'/';
- if($_use_open_basedir = !empty($_open_basedir_ini)) {
- $_open_basedirs = explode(':', $_open_basedir_ini);
- }
-
- } else {
- /* other-style paths */
- $_dir = str_replace('\\','/', $params['dir']);
- $_dir_parts = preg_split('!/+!', $_dir, -1, PREG_SPLIT_NO_EMPTY);
- if (preg_match('!^((//)|([a-zA-Z]:/))!', $_dir, $_root_dir)) {
- /* leading "//" for network volume, or "[letter]:/" for full path */
- $_new_dir = $_root_dir[1];
- /* remove drive-letter from _dir_parts */
- if (isset($_root_dir[3])) array_shift($_dir_parts);
-
- } else {
- $_new_dir = str_replace('\\', '/', getcwd()).'/';
-
- }
-
- if($_use_open_basedir = !empty($_open_basedir_ini)) {
- $_open_basedirs = explode(';', str_replace('\\', '/', $_open_basedir_ini));
- }
-
- }
-
- /* all paths use "/" only from here */
- foreach ($_dir_parts as $_dir_part) {
- $_new_dir .= $_dir_part;
-
- if ($_use_open_basedir) {
- // do not attempt to test or make directories outside of open_basedir
- $_make_new_dir = false;
- foreach ($_open_basedirs as $_open_basedir) {
- if (substr($_new_dir, 0, strlen($_open_basedir)) == $_open_basedir) {
- $_make_new_dir = true;
- break;
- }
- }
- } else {
- $_make_new_dir = true;
- }
-
- if ($_make_new_dir && !file_exists($_new_dir) && !@mkdir($_new_dir, $smarty->_dir_perms) && !is_dir($_new_dir)) {
- $smarty->trigger_error("problem creating directory '" . $_new_dir . "'");
- return false;
- }
- $_new_dir .= '/';
- }
- }
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.display_debug_console.php b/BSF/include/smarty/libs/internals/core.display_debug_console.php
deleted file mode 100644
index 1a80f3909..000000000
--- a/BSF/include/smarty/libs/internals/core.display_debug_console.php
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Smarty debug_console function plugin
- *
- * Type: core<br>
- * Name: display_debug_console<br>
- * Purpose: display the javascript debug console window
- * @param array Format: null
- * @param Smarty
- */
-function smarty_core_display_debug_console($params, &$smarty)
-{
- // we must force compile the debug template in case the environment
- // changed between separate applications.
-
- if(empty($smarty->debug_tpl)) {
- // set path to debug template from SMARTY_DIR
- $smarty->debug_tpl = SMARTY_DIR . 'debug.tpl';
- if($smarty->security && is_file($smarty->debug_tpl)) {
- $smarty->secure_dir[] = realpath($smarty->debug_tpl);
- }
- $smarty->debug_tpl = 'file:' . SMARTY_DIR . 'debug.tpl';
- }
-
- $_ldelim_orig = $smarty->left_delimiter;
- $_rdelim_orig = $smarty->right_delimiter;
-
- $smarty->left_delimiter = '{';
- $smarty->right_delimiter = '}';
-
- $_compile_id_orig = $smarty->_compile_id;
- $smarty->_compile_id = null;
-
- $_compile_path = $smarty->_get_compile_path($smarty->debug_tpl);
- if ($smarty->_compile_resource($smarty->debug_tpl, $_compile_path))
- {
- ob_start();
- $smarty->_include($_compile_path);
- $_results = ob_get_contents();
- ob_end_clean();
- } else {
- $_results = '';
- }
-
- $smarty->_compile_id = $_compile_id_orig;
-
- $smarty->left_delimiter = $_ldelim_orig;
- $smarty->right_delimiter = $_rdelim_orig;
-
- return $_results;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.get_include_path.php b/BSF/include/smarty/libs/internals/core.get_include_path.php
deleted file mode 100644
index 43432412b..000000000
--- a/BSF/include/smarty/libs/internals/core.get_include_path.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Get path to file from include_path
- *
- * @param string $file_path
- * @param string $new_file_path
- * @return boolean
- * @staticvar array|null
- */
-
-// $file_path, &$new_file_path
-
-function smarty_core_get_include_path(&$params, &$smarty)
-{
- static $_path_array = null;
-
- if(!isset($_path_array)) {
- $_ini_include_path = ini_get('include_path');
-
- if(strstr($_ini_include_path,';')) {
- // windows pathnames
- $_path_array = explode(';',$_ini_include_path);
- } else {
- $_path_array = explode(':',$_ini_include_path);
- }
- }
- foreach ($_path_array as $_include_path) {
- if (@is_readable($_include_path . DIRECTORY_SEPARATOR . $params['file_path'])) {
- $params['new_file_path'] = $_include_path . DIRECTORY_SEPARATOR . $params['file_path'];
- return true;
- }
- }
- return false;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.get_microtime.php b/BSF/include/smarty/libs/internals/core.get_microtime.php
deleted file mode 100644
index f1a28e042..000000000
--- a/BSF/include/smarty/libs/internals/core.get_microtime.php
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Get seconds and microseconds
- * @return double
- */
-function smarty_core_get_microtime($params, &$smarty)
-{
- $mtime = microtime();
- $mtime = explode(" ", $mtime);
- $mtime = (double)($mtime[1]) + (double)($mtime[0]);
- return ($mtime);
-}
-
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.get_php_resource.php b/BSF/include/smarty/libs/internals/core.get_php_resource.php
deleted file mode 100644
index 786d4e78e..000000000
--- a/BSF/include/smarty/libs/internals/core.get_php_resource.php
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Retrieves PHP script resource
- *
- * sets $php_resource to the returned resource
- * @param string $resource
- * @param string $resource_type
- * @param $php_resource
- * @return boolean
- */
-
-function smarty_core_get_php_resource(&$params, &$smarty)
-{
-
- $params['resource_base_path'] = $smarty->trusted_dir;
- $smarty->_parse_resource_name($params, $smarty);
-
- /*
- * Find out if the resource exists.
- */
-
- if ($params['resource_type'] == 'file') {
- $_readable = false;
- if(file_exists($params['resource_name']) && is_readable($params['resource_name'])) {
- $_readable = true;
- } else {
- // test for file in include_path
- $_params = array('file_path' => $params['resource_name']);
- require_once(SMARTY_CORE_DIR . 'core.get_include_path.php');
- if(smarty_core_get_include_path($_params, $smarty)) {
- $_include_path = $_params['new_file_path'];
- $_readable = true;
- }
- }
- } else if ($params['resource_type'] != 'file') {
- $_template_source = null;
- $_readable = is_callable($smarty->_plugins['resource'][$params['resource_type']][0][0])
- && call_user_func_array($smarty->_plugins['resource'][$params['resource_type']][0][0],
- array($params['resource_name'], &$_template_source, &$smarty));
- }
-
- /*
- * Set the error function, depending on which class calls us.
- */
- if (method_exists($smarty, '_syntax_error')) {
- $_error_funcc = '_syntax_error';
- } else {
- $_error_funcc = 'trigger_error';
- }
-
- if ($_readable) {
- if ($smarty->security) {
- require_once(SMARTY_CORE_DIR . 'core.is_trusted.php');
- if (!smarty_core_is_trusted($params, $smarty)) {
- $smarty->$_error_funcc('(secure mode) ' . $params['resource_type'] . ':' . $params['resource_name'] . ' is not trusted');
- return false;
- }
- }
- } else {
- $smarty->$_error_funcc($params['resource_type'] . ':' . $params['resource_name'] . ' is not readable');
- return false;
- }
-
- if ($params['resource_type'] == 'file') {
- $params['php_resource'] = $params['resource_name'];
- } else {
- $params['php_resource'] = $_template_source;
- }
- return true;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.is_secure.php b/BSF/include/smarty/libs/internals/core.is_secure.php
deleted file mode 100644
index d54abd432..000000000
--- a/BSF/include/smarty/libs/internals/core.is_secure.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * determines if a resource is secure or not.
- *
- * @param string $resource_type
- * @param string $resource_name
- * @return boolean
- */
-
-// $resource_type, $resource_name
-
-function smarty_core_is_secure($params, &$smarty)
-{
- if (!$smarty->security || $smarty->security_settings['INCLUDE_ANY']) {
- return true;
- }
-
- if ($params['resource_type'] == 'file') {
- $_rp = realpath($params['resource_name']);
- if (isset($params['resource_base_path'])) {
- foreach ((array)$params['resource_base_path'] as $curr_dir) {
- if ( ($_cd = realpath($curr_dir)) !== false &&
- strncmp($_rp, $_cd, strlen($_cd)) == 0 &&
- substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR ) {
- return true;
- }
- }
- }
- if (!empty($smarty->secure_dir)) {
- foreach ((array)$smarty->secure_dir as $curr_dir) {
- if ( ($_cd = realpath($curr_dir)) !== false) {
- if($_cd == $_rp) {
- return true;
- } elseif (strncmp($_rp, $_cd, strlen($_cd)) == 0 &&
- substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR) {
- return true;
- }
- }
- }
- }
- } else {
- // resource is not on local file system
- return call_user_func_array(
- $smarty->_plugins['resource'][$params['resource_type']][0][2],
- array($params['resource_name'], &$smarty));
- }
-
- return false;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.is_trusted.php b/BSF/include/smarty/libs/internals/core.is_trusted.php
deleted file mode 100644
index 429973158..000000000
--- a/BSF/include/smarty/libs/internals/core.is_trusted.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * determines if a resource is trusted or not
- *
- * @param string $resource_type
- * @param string $resource_name
- * @return boolean
- */
-
- // $resource_type, $resource_name
-
-function smarty_core_is_trusted($params, &$smarty)
-{
- $_smarty_trusted = false;
- if ($params['resource_type'] == 'file') {
- if (!empty($smarty->trusted_dir)) {
- $_rp = realpath($params['resource_name']);
- foreach ((array)$smarty->trusted_dir as $curr_dir) {
- if (!empty($curr_dir) && is_readable ($curr_dir)) {
- $_cd = realpath($curr_dir);
- if (strncmp($_rp, $_cd, strlen($_cd)) == 0
- && substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR ) {
- $_smarty_trusted = true;
- break;
- }
- }
- }
- }
-
- } else {
- // resource is not on local file system
- $_smarty_trusted = call_user_func_array($smarty->_plugins['resource'][$params['resource_type']][0][3],
- array($params['resource_name'], $smarty));
- }
-
- return $_smarty_trusted;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.load_plugins.php b/BSF/include/smarty/libs/internals/core.load_plugins.php
deleted file mode 100644
index 6db1dc51d..000000000
--- a/BSF/include/smarty/libs/internals/core.load_plugins.php
+++ /dev/null
@@ -1,125 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Load requested plugins
- *
- * @param array $plugins
- */
-
-// $plugins
-
-function smarty_core_load_plugins($params, &$smarty)
-{
-
- foreach ($params['plugins'] as $_plugin_info) {
- list($_type, $_name, $_tpl_file, $_tpl_line, $_delayed_loading) = $_plugin_info;
- $_plugin = &$smarty->_plugins[$_type][$_name];
-
- /*
- * We do not load plugin more than once for each instance of Smarty.
- * The following code checks for that. The plugin can also be
- * registered dynamically at runtime, in which case template file
- * and line number will be unknown, so we fill them in.
- *
- * The final element of the info array is a flag that indicates
- * whether the dynamically registered plugin function has been
- * checked for existence yet or not.
- */
- if (isset($_plugin)) {
- if (empty($_plugin[3])) {
- if (!is_callable($_plugin[0])) {
- $smarty->_trigger_fatal_error("[plugin] $_type '$_name' is not implemented", $_tpl_file, $_tpl_line, __FILE__, __LINE__);
- } else {
- $_plugin[1] = $_tpl_file;
- $_plugin[2] = $_tpl_line;
- $_plugin[3] = true;
- if (!isset($_plugin[4])) $_plugin[4] = true; /* cacheable */
- }
- }
- continue;
- } else if ($_type == 'insert') {
- /*
- * For backwards compatibility, we check for insert functions in
- * the symbol table before trying to load them as a plugin.
- */
- $_plugin_func = 'insert_' . $_name;
- if (function_exists($_plugin_func)) {
- $_plugin = array($_plugin_func, $_tpl_file, $_tpl_line, true, false);
- continue;
- }
- }
-
- $_plugin_file = $smarty->_get_plugin_filepath($_type, $_name);
-
- if (! $_found = ($_plugin_file != false)) {
- $_message = "could not load plugin file '$_type.$_name.php'\n";
- }
-
- /*
- * If plugin file is found, it -must- provide the properly named
- * plugin function. In case it doesn't, simply output the error and
- * do not fall back on any other method.
- */
- if ($_found) {
- include_once $_plugin_file;
-
- $_plugin_func = 'smarty_' . $_type . '_' . $_name;
- if (!function_exists($_plugin_func)) {
- $smarty->_trigger_fatal_error("[plugin] function $_plugin_func() not found in $_plugin_file", $_tpl_file, $_tpl_line, __FILE__, __LINE__);
- continue;
- }
- }
- /*
- * In case of insert plugins, their code may be loaded later via
- * 'script' attribute.
- */
- else if ($_type == 'insert' && $_delayed_loading) {
- $_plugin_func = 'smarty_' . $_type . '_' . $_name;
- $_found = true;
- }
-
- /*
- * Plugin specific processing and error checking.
- */
- if (!$_found) {
- if ($_type == 'modifier') {
- /*
- * In case modifier falls back on using PHP functions
- * directly, we only allow those specified in the security
- * context.
- */
- if ($smarty->security && !in_array($_name, $smarty->security_settings['MODIFIER_FUNCS'])) {
- $_message = "(secure mode) modifier '$_name' is not allowed";
- } else {
- if (!function_exists($_name)) {
- $_message = "modifier '$_name' is not implemented";
- } else {
- $_plugin_func = $_name;
- $_found = true;
- }
- }
- } else if ($_type == 'function') {
- /*
- * This is a catch-all situation.
- */
- $_message = "unknown tag - '$_name'";
- }
- }
-
- if ($_found) {
- $smarty->_plugins[$_type][$_name] = array($_plugin_func, $_tpl_file, $_tpl_line, true, true);
- } else {
- // output error
- $smarty->_trigger_fatal_error('[plugin] ' . $_message, $_tpl_file, $_tpl_line, __FILE__, __LINE__);
- }
- }
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.load_resource_plugin.php b/BSF/include/smarty/libs/internals/core.load_resource_plugin.php
deleted file mode 100644
index a7d37d1af..000000000
--- a/BSF/include/smarty/libs/internals/core.load_resource_plugin.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * load a resource plugin
- *
- * @param string $type
- */
-
-// $type
-
-function smarty_core_load_resource_plugin($params, &$smarty)
-{
- /*
- * Resource plugins are not quite like the other ones, so they are
- * handled differently. The first element of plugin info is the array of
- * functions provided by the plugin, the second one indicates whether
- * all of them exist or not.
- */
-
- $_plugin = &$smarty->_plugins['resource'][$params['type']];
- if (isset($_plugin)) {
- if (!$_plugin[1] && count($_plugin[0])) {
- $_plugin[1] = true;
- foreach ($_plugin[0] as $_plugin_func) {
- if (!is_callable($_plugin_func)) {
- $_plugin[1] = false;
- break;
- }
- }
- }
-
- if (!$_plugin[1]) {
- $smarty->_trigger_fatal_error("[plugin] resource '" . $params['type'] . "' is not implemented", null, null, __FILE__, __LINE__);
- }
-
- return;
- }
-
- $_plugin_file = $smarty->_get_plugin_filepath('resource', $params['type']);
- $_found = ($_plugin_file != false);
-
- if ($_found) { /*
- * If the plugin file is found, it -must- provide the properly named
- * plugin functions.
- */
- include_once($_plugin_file);
-
- /*
- * Locate functions that we require the plugin to provide.
- */
- $_resource_ops = array('source', 'timestamp', 'secure', 'trusted');
- $_resource_funcs = array();
- foreach ($_resource_ops as $_op) {
- $_plugin_func = 'smarty_resource_' . $params['type'] . '_' . $_op;
- if (!function_exists($_plugin_func)) {
- $smarty->_trigger_fatal_error("[plugin] function $_plugin_func() not found in $_plugin_file", null, null, __FILE__, __LINE__);
- return;
- } else {
- $_resource_funcs[] = $_plugin_func;
- }
- }
-
- $smarty->_plugins['resource'][$params['type']] = array($_resource_funcs, true);
- }
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.process_cached_inserts.php b/BSF/include/smarty/libs/internals/core.process_cached_inserts.php
deleted file mode 100644
index 1d78edd93..000000000
--- a/BSF/include/smarty/libs/internals/core.process_cached_inserts.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Replace cached inserts with the actual results
- *
- * @param string $results
- * @return string
- */
-function smarty_core_process_cached_inserts($params, &$smarty)
-{
- preg_match_all('!'.$smarty->_smarty_md5.'{insert_cache (.*)}'.$smarty->_smarty_md5.'!Uis',
- $params['results'], $match);
- list($cached_inserts, $insert_args) = $match;
-
- for ($i = 0, $for_max = count($cached_inserts); $i < $for_max; $i++) {
- if ($smarty->debugging) {
- $_params = array();
- require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
- $debug_start_time = smarty_core_get_microtime($_params, $smarty);
- }
-
- $args = unserialize($insert_args[$i]);
- $name = $args['name'];
-
- if (isset($args['script'])) {
- $_params = array('resource_name' => $smarty->_dequote($args['script']));
- require_once(SMARTY_CORE_DIR . 'core.get_php_resource.php');
- if(!smarty_core_get_php_resource($_params, $smarty)) {
- return false;
- }
- $resource_type = $_params['resource_type'];
- $php_resource = $_params['php_resource'];
-
-
- if ($resource_type == 'file') {
- $smarty->_include($php_resource, true);
- } else {
- $smarty->_eval($php_resource);
- }
- }
-
- $function_name = $smarty->_plugins['insert'][$name][0];
- if (empty($args['assign'])) {
- $replace = $function_name($args, $smarty);
- } else {
- $smarty->assign($args['assign'], $function_name($args, $smarty));
- $replace = '';
- }
-
- $params['results'] = substr_replace($params['results'], $replace, strpos($params['results'], $cached_inserts[$i]), strlen($cached_inserts[$i]));
- if ($smarty->debugging) {
- $_params = array();
- require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
- $smarty->_smarty_debug_info[] = array('type' => 'insert',
- 'filename' => 'insert_'.$name,
- 'depth' => $smarty->_inclusion_depth,
- 'exec_time' => smarty_core_get_microtime($_params, $smarty) - $debug_start_time);
- }
- }
-
- return $params['results'];
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.process_compiled_include.php b/BSF/include/smarty/libs/internals/core.process_compiled_include.php
deleted file mode 100644
index d539423bf..000000000
--- a/BSF/include/smarty/libs/internals/core.process_compiled_include.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Replace nocache-tags by results of the corresponding non-cacheable
- * functions and return it
- *
- * @param string $compiled_tpl
- * @param string $cached_source
- * @return string
- */
-
-function smarty_core_process_compiled_include($params, &$smarty)
-{
- $_cache_including = $smarty->_cache_including;
- $smarty->_cache_including = true;
-
- $_return = $params['results'];
-
- foreach ($smarty->_cache_info['cache_serials'] as $_include_file_path=>$_cache_serial) {
- $smarty->_include($_include_file_path, true);
- }
-
- foreach ($smarty->_cache_serials as $_include_file_path=>$_cache_serial) {
- $_return = preg_replace_callback('!(\{nocache\:('.$_cache_serial.')#(\d+)\})!s',
- array(&$smarty, '_process_compiled_include_callback'),
- $_return);
- }
- $smarty->_cache_including = $_cache_including;
- return $_return;
-}
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.read_cache_file.php b/BSF/include/smarty/libs/internals/core.read_cache_file.php
deleted file mode 100644
index c60e113a7..000000000
--- a/BSF/include/smarty/libs/internals/core.read_cache_file.php
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * read a cache file, determine if it needs to be
- * regenerated or not
- *
- * @param string $tpl_file
- * @param string $cache_id
- * @param string $compile_id
- * @param string $results
- * @return boolean
- */
-
-// $tpl_file, $cache_id, $compile_id, &$results
-
-function smarty_core_read_cache_file(&$params, &$smarty)
-{
- static $content_cache = array();
-
- if ($smarty->force_compile) {
- // force compile enabled, always regenerate
- return false;
- }
-
- if (isset($content_cache[$params['tpl_file'].','.$params['cache_id'].','.$params['compile_id']])) {
- list($params['results'], $smarty->_cache_info) = $content_cache[$params['tpl_file'].','.$params['cache_id'].','.$params['compile_id']];
- return true;
- }
-
- if (!empty($smarty->cache_handler_func)) {
- // use cache_handler function
- call_user_func_array($smarty->cache_handler_func,
- array('read', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'], null));
- } else {
- // use local cache file
- $_auto_id = $smarty->_get_auto_id($params['cache_id'], $params['compile_id']);
- $_cache_file = $smarty->_get_auto_filename($smarty->cache_dir, $params['tpl_file'], $_auto_id);
- $params['results'] = $smarty->_read_file($_cache_file);
- }
-
- if (empty($params['results'])) {
- // nothing to parse (error?), regenerate cache
- return false;
- }
-
- $_contents = $params['results'];
- $_info_start = strpos($_contents, "\n") + 1;
- $_info_len = (int)substr($_contents, 0, $_info_start - 1);
- $_cache_info = unserialize(substr($_contents, $_info_start, $_info_len));
- $params['results'] = substr($_contents, $_info_start + $_info_len);
-
- if ($smarty->caching == 2 && isset ($_cache_info['expires'])){
- // caching by expiration time
- if ($_cache_info['expires'] > -1 && (time() > $_cache_info['expires'])) {
- // cache expired, regenerate
- return false;
- }
- } else {
- // caching by lifetime
- if ($smarty->cache_lifetime > -1 && (time() - $_cache_info['timestamp'] > $smarty->cache_lifetime)) {
- // cache expired, regenerate
- return false;
- }
- }
-
- if ($smarty->compile_check) {
- $_params = array('get_source' => false, 'quiet'=>true);
- foreach (array_keys($_cache_info['template']) as $_template_dep) {
- $_params['resource_name'] = $_template_dep;
- if (!$smarty->_fetch_resource_info($_params) || $_cache_info['timestamp'] < $_params['resource_timestamp']) {
- // template file has changed, regenerate cache
- return false;
- }
- }
-
- if (isset($_cache_info['config'])) {
- $_params = array('resource_base_path' => $smarty->config_dir, 'get_source' => false, 'quiet'=>true);
- foreach (array_keys($_cache_info['config']) as $_config_dep) {
- $_params['resource_name'] = $_config_dep;
- if (!$smarty->_fetch_resource_info($_params) || $_cache_info['timestamp'] < $_params['resource_timestamp']) {
- // config file has changed, regenerate cache
- return false;
- }
- }
- }
- }
-
- $content_cache[$params['tpl_file'].','.$params['cache_id'].','.$params['compile_id']] = array($params['results'], $_cache_info);
-
- $smarty->_cache_info = $_cache_info;
- return true;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.rm_auto.php b/BSF/include/smarty/libs/internals/core.rm_auto.php
deleted file mode 100644
index b251f6491..000000000
--- a/BSF/include/smarty/libs/internals/core.rm_auto.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * delete an automagically created file by name and id
- *
- * @param string $auto_base
- * @param string $auto_source
- * @param string $auto_id
- * @param integer $exp_time
- * @return boolean
- */
-
-// $auto_base, $auto_source = null, $auto_id = null, $exp_time = null
-
-function smarty_core_rm_auto($params, &$smarty)
-{
- if (!@is_dir($params['auto_base']))
- return false;
-
- if(!isset($params['auto_id']) && !isset($params['auto_source'])) {
- $_params = array(
- 'dirname' => $params['auto_base'],
- 'level' => 0,
- 'exp_time' => $params['exp_time']
- );
- require_once(SMARTY_CORE_DIR . 'core.rmdir.php');
- $_res = smarty_core_rmdir($_params, $smarty);
- } else {
- $_tname = $smarty->_get_auto_filename($params['auto_base'], $params['auto_source'], $params['auto_id']);
-
- if(isset($params['auto_source'])) {
- if (isset($params['extensions'])) {
- $_res = false;
- foreach ((array)$params['extensions'] as $_extension)
- $_res |= $smarty->_unlink($_tname.$_extension, $params['exp_time']);
- } else {
- $_res = $smarty->_unlink($_tname, $params['exp_time']);
- }
- } elseif ($smarty->use_sub_dirs) {
- $_params = array(
- 'dirname' => $_tname,
- 'level' => 1,
- 'exp_time' => $params['exp_time']
- );
- require_once(SMARTY_CORE_DIR . 'core.rmdir.php');
- $_res = smarty_core_rmdir($_params, $smarty);
- } else {
- // remove matching file names
- $_handle = opendir($params['auto_base']);
- $_res = true;
- while (false !== ($_filename = readdir($_handle))) {
- if($_filename == '.' || $_filename == '..') {
- continue;
- } elseif (substr($params['auto_base'] . DIRECTORY_SEPARATOR . $_filename, 0, strlen($_tname)) == $_tname) {
- $_res &= (bool)$smarty->_unlink($params['auto_base'] . DIRECTORY_SEPARATOR . $_filename, $params['exp_time']);
- }
- }
- }
- }
-
- return $_res;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.rmdir.php b/BSF/include/smarty/libs/internals/core.rmdir.php
deleted file mode 100644
index 2166c44d2..000000000
--- a/BSF/include/smarty/libs/internals/core.rmdir.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * delete a dir recursively (level=0 -> keep root)
- * WARNING: no tests, it will try to remove what you tell it!
- *
- * @param string $dirname
- * @param integer $level
- * @param integer $exp_time
- * @return boolean
- */
-
-// $dirname, $level = 1, $exp_time = null
-
-function smarty_core_rmdir($params, &$smarty)
-{
- if(!isset($params['level'])) { $params['level'] = 1; }
- if(!isset($params['exp_time'])) { $params['exp_time'] = null; }
-
- if($_handle = @opendir($params['dirname'])) {
-
- while (false !== ($_entry = readdir($_handle))) {
- if ($_entry != '.' && $_entry != '..') {
- if (@is_dir($params['dirname'] . DIRECTORY_SEPARATOR . $_entry)) {
- $_params = array(
- 'dirname' => $params['dirname'] . DIRECTORY_SEPARATOR . $_entry,
- 'level' => $params['level'] + 1,
- 'exp_time' => $params['exp_time']
- );
- smarty_core_rmdir($_params, $smarty);
- }
- else {
- $smarty->_unlink($params['dirname'] . DIRECTORY_SEPARATOR . $_entry, $params['exp_time']);
- }
- }
- }
- closedir($_handle);
- }
-
- if ($params['level']) {
- return @rmdir($params['dirname']);
- }
- return (bool)$_handle;
-
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.run_insert_handler.php b/BSF/include/smarty/libs/internals/core.run_insert_handler.php
deleted file mode 100644
index 71c384508..000000000
--- a/BSF/include/smarty/libs/internals/core.run_insert_handler.php
+++ /dev/null
@@ -1,71 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Handle insert tags
- *
- * @param array $args
- * @return string
- */
-function smarty_core_run_insert_handler($params, &$smarty)
-{
-
- require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
- if ($smarty->debugging) {
- $_params = array();
- $_debug_start_time = smarty_core_get_microtime($_params, $smarty);
- }
-
- if ($smarty->caching) {
- $_arg_string = serialize($params['args']);
- $_name = $params['args']['name'];
- if (!isset($smarty->_cache_info['insert_tags'][$_name])) {
- $smarty->_cache_info['insert_tags'][$_name] = array('insert',
- $_name,
- $smarty->_plugins['insert'][$_name][1],
- $smarty->_plugins['insert'][$_name][2],
- !empty($params['args']['script']) ? true : false);
- }
- return $smarty->_smarty_md5."{insert_cache $_arg_string}".$smarty->_smarty_md5;
- } else {
- if (isset($params['args']['script'])) {
- $_params = array('resource_name' => $smarty->_dequote($params['args']['script']));
- require_once(SMARTY_CORE_DIR . 'core.get_php_resource.php');
- if(!smarty_core_get_php_resource($_params, $smarty)) {
- return false;
- }
-
- if ($_params['resource_type'] == 'file') {
- $smarty->_include($_params['php_resource'], true);
- } else {
- $smarty->_eval($_params['php_resource']);
- }
- unset($params['args']['script']);
- }
-
- $_funcname = $smarty->_plugins['insert'][$params['args']['name']][0];
- $_content = $_funcname($params['args'], $smarty);
- if ($smarty->debugging) {
- $_params = array();
- require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
- $smarty->_smarty_debug_info[] = array('type' => 'insert',
- 'filename' => 'insert_'.$params['args']['name'],
- 'depth' => $smarty->_inclusion_depth,
- 'exec_time' => smarty_core_get_microtime($_params, $smarty) - $_debug_start_time);
- }
-
- if (!empty($params['args']["assign"])) {
- $smarty->assign($params['args']["assign"], $_content);
- } else {
- return $_content;
- }
- }
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.smarty_include_php.php b/BSF/include/smarty/libs/internals/core.smarty_include_php.php
deleted file mode 100644
index 30c6e7654..000000000
--- a/BSF/include/smarty/libs/internals/core.smarty_include_php.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * called for included php files within templates
- *
- * @param string $smarty_file
- * @param string $smarty_assign variable to assign the included template's
- * output into
- * @param boolean $smarty_once uses include_once if this is true
- * @param array $smarty_include_vars associative array of vars from
- * {include file="blah" var=$var}
- */
-
-// $file, $assign, $once, $_smarty_include_vars
-
-function smarty_core_smarty_include_php($params, &$smarty)
-{
- $_params = array('resource_name' => $params['smarty_file']);
- require_once(SMARTY_CORE_DIR . 'core.get_php_resource.php');
- smarty_core_get_php_resource($_params, $smarty);
- $_smarty_resource_type = $_params['resource_type'];
- $_smarty_php_resource = $_params['php_resource'];
-
- if (!empty($params['smarty_assign'])) {
- ob_start();
- if ($_smarty_resource_type == 'file') {
- $smarty->_include($_smarty_php_resource, $params['smarty_once'], $params['smarty_include_vars']);
- } else {
- $smarty->_eval($_smarty_php_resource, $params['smarty_include_vars']);
- }
- $smarty->assign($params['smarty_assign'], ob_get_contents());
- ob_end_clean();
- } else {
- if ($_smarty_resource_type == 'file') {
- $smarty->_include($_smarty_php_resource, $params['smarty_once'], $params['smarty_include_vars']);
- } else {
- $smarty->_eval($_smarty_php_resource, $params['smarty_include_vars']);
- }
- }
-}
-
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.write_cache_file.php b/BSF/include/smarty/libs/internals/core.write_cache_file.php
deleted file mode 100644
index 72f785b74..000000000
--- a/BSF/include/smarty/libs/internals/core.write_cache_file.php
+++ /dev/null
@@ -1,96 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Prepend the cache information to the cache file
- * and write it
- *
- * @param string $tpl_file
- * @param string $cache_id
- * @param string $compile_id
- * @param string $results
- * @return true|null
- */
-
- // $tpl_file, $cache_id, $compile_id, $results
-
-function smarty_core_write_cache_file($params, &$smarty)
-{
-
- // put timestamp in cache header
- $smarty->_cache_info['timestamp'] = time();
- if ($smarty->cache_lifetime > -1){
- // expiration set
- $smarty->_cache_info['expires'] = $smarty->_cache_info['timestamp'] + $smarty->cache_lifetime;
- } else {
- // cache will never expire
- $smarty->_cache_info['expires'] = -1;
- }
-
- // collapse nocache.../nocache-tags
- if (preg_match_all('!\{(/?)nocache\:[0-9a-f]{32}#\d+\}!', $params['results'], $match, PREG_PATTERN_ORDER)) {
- // remove everything between every pair of outermost noache.../nocache-tags
- // and replace it by a single nocache-tag
- // this new nocache-tag will be replaced by dynamic contents in
- // smarty_core_process_compiled_includes() on a cache-read
-
- $match_count = count($match[0]);
- $results = preg_split('!(\{/?nocache\:[0-9a-f]{32}#\d+\})!', $params['results'], -1, PREG_SPLIT_DELIM_CAPTURE);
-
- $level = 0;
- $j = 0;
- for ($i=0, $results_count = count($results); $i < $results_count && $j < $match_count; $i++) {
- if ($results[$i] == $match[0][$j]) {
- // nocache tag
- if ($match[1][$j]) { // closing tag
- $level--;
- unset($results[$i]);
- } else { // opening tag
- if ($level++ > 0) unset($results[$i]);
- }
- $j++;
- } elseif ($level > 0) {
- unset($results[$i]);
- }
- }
- $params['results'] = implode('', $results);
- }
- $smarty->_cache_info['cache_serials'] = $smarty->_cache_serials;
-
- // prepend the cache header info into cache file
- $_cache_info = serialize($smarty->_cache_info);
- $params['results'] = strlen($_cache_info) . "\n" . $_cache_info . $params['results'];
-
- if (!empty($smarty->cache_handler_func)) {
- // use cache_handler function
- call_user_func_array($smarty->cache_handler_func,
- array('write', &$smarty, &$params['results'], $params['tpl_file'], $params['cache_id'], $params['compile_id'], null));
- } else {
- // use local cache file
-
- if(!@is_writable($smarty->cache_dir)) {
- // cache_dir not writable, see if it exists
- if(!@is_dir($smarty->cache_dir)) {
- $smarty->trigger_error('the $cache_dir \'' . $smarty->cache_dir . '\' does not exist, or is not a directory.', E_USER_ERROR);
- return false;
- }
- $smarty->trigger_error('unable to write to $cache_dir \'' . realpath($smarty->cache_dir) . '\'. Be sure $cache_dir is writable by the web server user.', E_USER_ERROR);
- return false;
- }
-
- $_auto_id = $smarty->_get_auto_id($params['cache_id'], $params['compile_id']);
- $_cache_file = $smarty->_get_auto_filename($smarty->cache_dir, $params['tpl_file'], $_auto_id);
- $_params = array('filename' => $_cache_file, 'contents' => $params['results'], 'create_dirs' => true);
- require_once(SMARTY_CORE_DIR . 'core.write_file.php');
- smarty_core_write_file($_params, $smarty);
- return true;
- }
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.write_compiled_include.php b/BSF/include/smarty/libs/internals/core.write_compiled_include.php
deleted file mode 100644
index c14adb5f4..000000000
--- a/BSF/include/smarty/libs/internals/core.write_compiled_include.php
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Extract non-cacheable parts out of compiled template and write it
- *
- * @param string $compile_path
- * @param string $template_compiled
- * @return boolean
- */
-
-function smarty_core_write_compiled_include($params, &$smarty)
-{
- $_tag_start = 'if \(\$this->caching && \!\$this->_cache_including\)\: echo \'\{nocache\:('.$params['cache_serial'].')#(\d+)\}\'; endif;';
- $_tag_end = 'if \(\$this->caching && \!\$this->_cache_including\)\: echo \'\{/nocache\:(\\2)#(\\3)\}\'; endif;';
-
- preg_match_all('!('.$_tag_start.'(.*)'.$_tag_end.')!Us',
- $params['compiled_content'], $_match_source, PREG_SET_ORDER);
-
- // no nocache-parts found: done
- if (count($_match_source)==0) return;
-
- // convert the matched php-code to functions
- $_include_compiled = "<?php /* Smarty version ".$smarty->_version.", created on ".strftime("%Y-%m-%d %H:%M:%S")."\n";
- $_include_compiled .= " compiled from " . strtr(urlencode($params['resource_name']), array('%2F'=>'/', '%3A'=>':')) . " */\n\n";
-
- $_compile_path = $params['include_file_path'];
-
- $smarty->_cache_serials[$_compile_path] = $params['cache_serial'];
- $_include_compiled .= "\$this->_cache_serials['".$_compile_path."'] = '".$params['cache_serial']."';\n\n?>";
-
- $_include_compiled .= $params['plugins_code'];
- $_include_compiled .= "<?php";
-
- $this_varname = ((double)phpversion() >= 5.0) ? '_smarty' : 'this';
- for ($_i = 0, $_for_max = count($_match_source); $_i < $_for_max; $_i++) {
- $_match =& $_match_source[$_i];
- $source = $_match[4];
- if ($this_varname == '_smarty') {
- /* rename $this to $_smarty in the sourcecode */
- $tokens = token_get_all('<?php ' . $_match[4]);
-
- /* remove trailing <?php */
- $open_tag = '';
- while ($tokens) {
- $token = array_shift($tokens);
- if (is_array($token)) {
- $open_tag .= $token[1];
- } else {
- $open_tag .= $token;
- }
- if ($open_tag == '<?php ') break;
- }
-
- for ($i=0, $count = count($tokens); $i < $count; $i++) {
- if (is_array($tokens[$i])) {
- if ($tokens[$i][0] == T_VARIABLE && $tokens[$i][1] == '$this') {
- $tokens[$i] = '$' . $this_varname;
- } else {
- $tokens[$i] = $tokens[$i][1];
- }
- }
- }
- $source = implode('', $tokens);
- }
-
- /* add function to compiled include */
- $_include_compiled .= "
-function _smarty_tplfunc_$_match[2]_$_match[3](&\$$this_varname)
-{
-$source
-}
-
-";
- }
- $_include_compiled .= "\n\n?>\n";
-
- $_params = array('filename' => $_compile_path,
- 'contents' => $_include_compiled, 'create_dirs' => true);
-
- require_once(SMARTY_CORE_DIR . 'core.write_file.php');
- smarty_core_write_file($_params, $smarty);
- return true;
-}
-
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.write_compiled_resource.php b/BSF/include/smarty/libs/internals/core.write_compiled_resource.php
deleted file mode 100644
index b902eff3c..000000000
--- a/BSF/include/smarty/libs/internals/core.write_compiled_resource.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * write the compiled resource
- *
- * @param string $compile_path
- * @param string $compiled_content
- * @return true
- */
-function smarty_core_write_compiled_resource($params, &$smarty)
-{
- if(!@is_writable($smarty->compile_dir)) {
- // compile_dir not writable, see if it exists
- if(!@is_dir($smarty->compile_dir)) {
- $smarty->trigger_error('the $compile_dir \'' . $smarty->compile_dir . '\' does not exist, or is not a directory.', E_USER_ERROR);
- return false;
- }
- $smarty->trigger_error('unable to write to $compile_dir \'' . realpath($smarty->compile_dir) . '\'. Be sure $compile_dir is writable by the web server user.', E_USER_ERROR);
- return false;
- }
-
- $_params = array('filename' => $params['compile_path'], 'contents' => $params['compiled_content'], 'create_dirs' => true);
- require_once(SMARTY_CORE_DIR . 'core.write_file.php');
- smarty_core_write_file($_params, $smarty);
- return true;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/internals/core.write_file.php b/BSF/include/smarty/libs/internals/core.write_file.php
deleted file mode 100644
index 8a3a3b398..000000000
--- a/BSF/include/smarty/libs/internals/core.write_file.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * write out a file to disk
- *
- * @param string $filename
- * @param string $contents
- * @param boolean $create_dirs
- * @return boolean
- */
-function smarty_core_write_file($params, &$smarty)
-{
- $_dirname = dirname($params['filename']);
-
- if ($params['create_dirs']) {
- $_params = array('dir' => $_dirname);
- require_once(SMARTY_CORE_DIR . 'core.create_dir_structure.php');
- smarty_core_create_dir_structure($_params, $smarty);
- }
-
- // write to tmp file, then rename it to avoid file locking race condition
- $_tmp_file = tempnam($_dirname, 'wrt');
-
- if (!($fd = @fopen($_tmp_file, 'wb'))) {
- $_tmp_file = $_dirname . DIRECTORY_SEPARATOR . uniqid('wrt');
- if (!($fd = @fopen($_tmp_file, 'wb'))) {
- $smarty->trigger_error("problem writing temporary file '$_tmp_file'");
- return false;
- }
- }
-
- fwrite($fd, $params['contents']);
- fclose($fd);
-
- if (DIRECTORY_SEPARATOR == '\\' || !@rename($_tmp_file, $params['filename'])) {
- // On platforms and filesystems that cannot overwrite with rename()
- // delete the file before renaming it -- because windows always suffers
- // this, it is short-circuited to avoid the initial rename() attempt
- @unlink($params['filename']);
- @rename($_tmp_file, $params['filename']);
- }
- @chmod($params['filename'], $smarty->_file_perms);
-
- return true;
-}
-
-/* vim: set expandtab: */
-
-?> \ No newline at end of file
diff --git a/BSF/include/smarty/libs/plugins/block.textformat.php b/BSF/include/smarty/libs/plugins/block.textformat.php
deleted file mode 100644
index 8cd010acb..000000000
--- a/BSF/include/smarty/libs/plugins/block.textformat.php
+++ /dev/null
@@ -1,103 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Smarty {textformat}{/textformat} block plugin
- *
- * Type: block function<br>
- * Name: textformat<br>
- * Purpose: format text a certain way with preset styles
- * or custom wrap/indent settings<br>
- * @link http://smarty.php.net/manual/en/language.function.textformat.php {textformat}
- * (Smarty online manual)
- * @param array
- * <pre>
- * Params: style: string (email)
- * indent: integer (0)
- * wrap: integer (80)
- * wrap_char string ("\n")
- * indent_char: string (" ")
- * wrap_boundary: boolean (true)
- * </pre>
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string contents of the block
- * @param Smarty clever simulation of a method
- * @return string string $content re-formatted
- */
-function smarty_block_textformat($params, $content, &$smarty)
-{
- if (is_null($content)) {
- return;
- }
-
- $style = null;
- $indent = 0;
- $indent_first = 0;
- $indent_char = ' ';
- $wrap = 80;
- $wrap_char = "\n";
- $wrap_cut = false;
- $assign = null;
-
- foreach ($params as $_key => $_val) {
- switch ($_key) {
- case 'style':
- case 'indent_char':
- case 'wrap_char':
- case 'assign':
- $$_key = (string)$_val;
- break;
-
- case 'indent':
- case 'indent_first':
- case 'wrap':
- $$_key = (int)$_val;
- break;
-
- case 'wrap_cut':
- $$_key = (bool)$_val;
- break;
-
- default:
- $smarty->trigger_error("textformat: unknown attribute '$_key'");
- }
- }
-
- if ($style == 'email') {
- $wrap = 72;
- }
-
- // split into paragraphs
- $_paragraphs = preg_split('![\r\n][\r\n]!',$content);
- $_output = '';
-
- for($_x = 0, $_y = count($_paragraphs); $_x < $_y; $_x++) {
- if ($_paragraphs[$_x] == '') {
- continue;
- }
- // convert mult. spaces & special chars to single space
- $_paragraphs[$_x] = preg_replace(array('!\s+!','!(^\s+)|(\s+$)!'), array(' ',''), $_paragraphs[$_x]);
- // indent first line
- if($indent_first > 0) {
- $_paragraphs[$_x] = str_repeat($indent_char, $indent_first) . $_paragraphs[$_x];
- }
- // wordwrap sentences
- $_paragraphs[$_x] = wordwrap($_paragraphs[$_x], $wrap - $indent, $wrap_char, $wrap_cut);
- // indent lines
- if($indent > 0) {
- $_paragraphs[$_x] = preg_replace('!^!m', str_repeat($indent_char, $indent), $_paragraphs[$_x]);
- }
- }
- $_output = implode($wrap_char . $wrap_char, $_paragraphs);
-
- return $assign ? $smarty->assign($assign, $_output) : $_output;
-
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/compiler.assign.php b/BSF/include/smarty/libs/plugins/compiler.assign.php
deleted file mode 100644
index abef377f8..000000000
--- a/BSF/include/smarty/libs/plugins/compiler.assign.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Smarty {assign} compiler function plugin
- *
- * Type: compiler function<br>
- * Name: assign<br>
- * Purpose: assign a value to a template variable
- * @link http://smarty.php.net/manual/en/language.custom.functions.php#LANGUAGE.FUNCTION.ASSIGN {assign}
- * (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com> (initial author)
- * @author messju mohr <messju at lammfellpuschen dot de> (conversion to compiler function)
- * @param string containing var-attribute and value-attribute
- * @param Smarty_Compiler
- */
-function smarty_compiler_assign($tag_attrs, &$compiler)
-{
- $_params = $compiler->_parse_attrs($tag_attrs);
-
- if (!isset($_params['var'])) {
- $compiler->_syntax_error("assign: missing 'var' parameter", E_USER_WARNING);
- return;
- }
-
- if (!isset($_params['value'])) {
- $compiler->_syntax_error("assign: missing 'value' parameter", E_USER_WARNING);
- return;
- }
-
- return "\$this->assign({$_params['var']}, {$_params['value']});";
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/function.assign_debug_info.php b/BSF/include/smarty/libs/plugins/function.assign_debug_info.php
deleted file mode 100644
index 654049876..000000000
--- a/BSF/include/smarty/libs/plugins/function.assign_debug_info.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Smarty {assign_debug_info} function plugin
- *
- * Type: function<br>
- * Name: assign_debug_info<br>
- * Purpose: assign debug info to the template<br>
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param array unused in this plugin, this plugin uses {@link Smarty::$_config},
- * {@link Smarty::$_tpl_vars} and {@link Smarty::$_smarty_debug_info}
- * @param Smarty
- */
-function smarty_function_assign_debug_info($params, &$smarty)
-{
- $assigned_vars = $smarty->_tpl_vars;
- ksort($assigned_vars);
- if (@is_array($smarty->_config[0])) {
- $config_vars = $smarty->_config[0];
- ksort($config_vars);
- $smarty->assign("_debug_config_keys", array_keys($config_vars));
- $smarty->assign("_debug_config_vals", array_values($config_vars));
- }
-
- $included_templates = $smarty->_smarty_debug_info;
-
- $smarty->assign("_debug_keys", array_keys($assigned_vars));
- $smarty->assign("_debug_vals", array_values($assigned_vars));
-
- $smarty->assign("_debug_tpls", $included_templates);
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/function.config_load.php b/BSF/include/smarty/libs/plugins/function.config_load.php
deleted file mode 100644
index db89f638c..000000000
--- a/BSF/include/smarty/libs/plugins/function.config_load.php
+++ /dev/null
@@ -1,142 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Smarty {config_load} function plugin
- *
- * Type: function<br>
- * Name: config_load<br>
- * Purpose: load config file vars
- * @link http://smarty.php.net/manual/en/language.function.config.load.php {config_load}
- * (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @author messju mohr <messju at lammfellpuschen dot de> (added use of resources)
- * @param array Format:
- * <pre>
- * array('file' => required config file name,
- * 'section' => optional config file section to load
- * 'scope' => local/parent/global
- * 'global' => overrides scope, setting to parent if true)
- * </pre>
- * @param Smarty
- */
-function smarty_function_config_load($params, &$smarty)
-{
- if ($smarty->debugging) {
- $_params = array();
- require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
- $_debug_start_time = smarty_core_get_microtime($_params, $smarty);
- }
-
- $_file = isset($params['file']) ? $smarty->_dequote($params['file']) : null;
- $_section = isset($params['section']) ? $smarty->_dequote($params['section']) : null;
- $_scope = isset($params['scope']) ? $smarty->_dequote($params['scope']) : 'global';
- $_global = isset($params['global']) ? $smarty->_dequote($params['global']) : false;
-
- if (!isset($_file) || strlen($_file) == 0) {
- $smarty->trigger_error("missing 'file' attribute in config_load tag", E_USER_ERROR, __FILE__, __LINE__);
- }
-
- if (isset($_scope)) {
- if ($_scope != 'local' &&
- $_scope != 'parent' &&
- $_scope != 'global') {
- $smarty->trigger_error("invalid 'scope' attribute value", E_USER_ERROR, __FILE__, __LINE__);
- }
- } else {
- if ($_global) {
- $_scope = 'parent';
- } else {
- $_scope = 'local';
- }
- }
-
- $_params = array('resource_name' => $_file,
- 'resource_base_path' => $smarty->config_dir,
- 'get_source' => false);
- $smarty->_parse_resource_name($_params);
- $_file_path = $_params['resource_type'] . ':' . $_params['resource_name'];
- if (isset($_section))
- $_compile_file = $smarty->_get_compile_path($_file_path.'|'.$_section);
- else
- $_compile_file = $smarty->_get_compile_path($_file_path);
-
- if($smarty->force_compile || !file_exists($_compile_file)) {
- $_compile = true;
- } elseif ($smarty->compile_check) {
- $_params = array('resource_name' => $_file,
- 'resource_base_path' => $smarty->config_dir,
- 'get_source' => false);
- $_compile = $smarty->_fetch_resource_info($_params) &&
- $_params['resource_timestamp'] > filemtime($_compile_file);
- } else {
- $_compile = false;
- }
-
- if($_compile) {
- // compile config file
- if(!is_object($smarty->_conf_obj)) {
- require_once SMARTY_DIR . $smarty->config_class . '.class.php';
- $smarty->_conf_obj = new $smarty->config_class();
- $smarty->_conf_obj->overwrite = $smarty->config_overwrite;
- $smarty->_conf_obj->booleanize = $smarty->config_booleanize;
- $smarty->_conf_obj->read_hidden = $smarty->config_read_hidden;
- $smarty->_conf_obj->fix_newlines = $smarty->config_fix_newlines;
- }
-
- $_params = array('resource_name' => $_file,
- 'resource_base_path' => $smarty->config_dir,
- $_params['get_source'] = true);
- if (!$smarty->_fetch_resource_info($_params)) {
- return;
- }
- $smarty->_conf_obj->set_file_contents($_file, $_params['source_content']);
- $_config_vars = array_merge($smarty->_conf_obj->get($_file),
- $smarty->_conf_obj->get($_file, $_section));
- if(function_exists('var_export')) {
- $_output = '<?php $_config_vars = ' . var_export($_config_vars, true) . '; ?>';
- } else {
- $_output = '<?php $_config_vars = unserialize(\'' . strtr(serialize($_config_vars),array('\''=>'\\\'', '\\'=>'\\\\')) . '\'); ?>';
- }
- $_params = (array('compile_path' => $_compile_file, 'compiled_content' => $_output, 'resource_timestamp' => $_params['resource_timestamp']));
- require_once(SMARTY_CORE_DIR . 'core.write_compiled_resource.php');
- smarty_core_write_compiled_resource($_params, $smarty);
- } else {
- include($_compile_file);
- }
-
- if ($smarty->caching) {
- $smarty->_cache_info['config'][$_file] = true;
- }
-
- $smarty->_config[0]['vars'] = @array_merge($smarty->_config[0]['vars'], $_config_vars);
- $smarty->_config[0]['files'][$_file] = true;
-
- if ($_scope == 'parent') {
- $smarty->_config[1]['vars'] = @array_merge($smarty->_config[1]['vars'], $_config_vars);
- $smarty->_config[1]['files'][$_file] = true;
- } else if ($_scope == 'global') {
- for ($i = 1, $for_max = count($smarty->_config); $i < $for_max; $i++) {
- $smarty->_config[$i]['vars'] = @array_merge($smarty->_config[$i]['vars'], $_config_vars);
- $smarty->_config[$i]['files'][$_file] = true;
- }
- }
-
- if ($smarty->debugging) {
- $_params = array();
- require_once(SMARTY_CORE_DIR . 'core.get_microtime.php');
- $smarty->_smarty_debug_info[] = array('type' => 'config',
- 'filename' => $_file.' ['.$_section.'] '.$_scope,
- 'depth' => $smarty->_inclusion_depth,
- 'exec_time' => smarty_core_get_microtime($_params, $smarty) - $_debug_start_time);
- }
-
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/function.counter.php b/BSF/include/smarty/libs/plugins/function.counter.php
deleted file mode 100644
index 1f26db5fb..000000000
--- a/BSF/include/smarty/libs/plugins/function.counter.php
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty {counter} function plugin
- *
- * Type: function<br>
- * Name: counter<br>
- * Purpose: print out a counter value
- * @author Monte Ohrt <monte at ohrt dot com>
- * @link http://smarty.php.net/manual/en/language.function.counter.php {counter}
- * (Smarty online manual)
- * @param array parameters
- * @param Smarty
- * @return string|null
- */
-function smarty_function_counter($params, &$smarty)
-{
- static $counters = array();
-
- $name = (isset($params['name'])) ? $params['name'] : 'default';
- if (!isset($counters[$name])) {
- $counters[$name] = array(
- 'start'=>1,
- 'skip'=>1,
- 'direction'=>'up',
- 'count'=>1
- );
- }
- $counter =& $counters[$name];
-
- if (isset($params['start'])) {
- $counter['start'] = $counter['count'] = (int)$params['start'];
- }
-
- if (!empty($params['assign'])) {
- $counter['assign'] = $params['assign'];
- }
-
- if (isset($counter['assign'])) {
- $smarty->assign($counter['assign'], $counter['count']);
- }
-
- if (isset($params['print'])) {
- $print = (bool)$params['print'];
- } else {
- $print = empty($counter['assign']);
- }
-
- if ($print) {
- $retval = $counter['count'];
- } else {
- $retval = null;
- }
-
- if (isset($params['skip'])) {
- $counter['skip'] = $params['skip'];
- }
-
- if (isset($params['direction'])) {
- $counter['direction'] = $params['direction'];
- }
-
- if ($counter['direction'] == "down")
- $counter['count'] -= $counter['skip'];
- else
- $counter['count'] += $counter['skip'];
-
- return $retval;
-
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/function.cycle.php b/BSF/include/smarty/libs/plugins/function.cycle.php
deleted file mode 100644
index fe78bb87d..000000000
--- a/BSF/include/smarty/libs/plugins/function.cycle.php
+++ /dev/null
@@ -1,102 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Smarty {cycle} function plugin
- *
- * Type: function<br>
- * Name: cycle<br>
- * Date: May 3, 2002<br>
- * Purpose: cycle through given values<br>
- * Input:
- * - name = name of cycle (optional)
- * - values = comma separated list of values to cycle,
- * or an array of values to cycle
- * (this can be left out for subsequent calls)
- * - reset = boolean - resets given var to true
- * - print = boolean - print var or not. default is true
- * - advance = boolean - whether or not to advance the cycle
- * - delimiter = the value delimiter, default is ","
- * - assign = boolean, assigns to template var instead of
- * printed.
- *
- * Examples:<br>
- * <pre>
- * {cycle values="#eeeeee,#d0d0d0d"}
- * {cycle name=row values="one,two,three" reset=true}
- * {cycle name=row}
- * </pre>
- * @link http://smarty.php.net/manual/en/language.function.cycle.php {cycle}
- * (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @author credit to Mark Priatel <mpriatel@rogers.com>
- * @author credit to Gerard <gerard@interfold.com>
- * @author credit to Jason Sweat <jsweat_php@yahoo.com>
- * @version 1.3
- * @param array
- * @param Smarty
- * @return string|null
- */
-function smarty_function_cycle($params, &$smarty)
-{
- static $cycle_vars;
-
- $name = (empty($params['name'])) ? 'default' : $params['name'];
- $print = (isset($params['print'])) ? (bool)$params['print'] : true;
- $advance = (isset($params['advance'])) ? (bool)$params['advance'] : true;
- $reset = (isset($params['reset'])) ? (bool)$params['reset'] : false;
-
- if (!in_array('values', array_keys($params))) {
- if(!isset($cycle_vars[$name]['values'])) {
- $smarty->trigger_error("cycle: missing 'values' parameter");
- return;
- }
- } else {
- if(isset($cycle_vars[$name]['values'])
- && $cycle_vars[$name]['values'] != $params['values'] ) {
- $cycle_vars[$name]['index'] = 0;
- }
- $cycle_vars[$name]['values'] = $params['values'];
- }
-
- $cycle_vars[$name]['delimiter'] = (isset($params['delimiter'])) ? $params['delimiter'] : ',';
-
- if(is_array($cycle_vars[$name]['values'])) {
- $cycle_array = $cycle_vars[$name]['values'];
- } else {
- $cycle_array = explode($cycle_vars[$name]['delimiter'],$cycle_vars[$name]['values']);
- }
-
- if(!isset($cycle_vars[$name]['index']) || $reset ) {
- $cycle_vars[$name]['index'] = 0;
- }
-
- if (isset($params['assign'])) {
- $print = false;
- $smarty->assign($params['assign'], $cycle_array[$cycle_vars[$name]['index']]);
- }
-
- if($print) {
- $retval = $cycle_array[$cycle_vars[$name]['index']];
- } else {
- $retval = null;
- }
-
- if($advance) {
- if ( $cycle_vars[$name]['index'] >= count($cycle_array) -1 ) {
- $cycle_vars[$name]['index'] = 0;
- } else {
- $cycle_vars[$name]['index']++;
- }
- }
-
- return $retval;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/function.debug.php b/BSF/include/smarty/libs/plugins/function.debug.php
deleted file mode 100644
index 43452307b..000000000
--- a/BSF/include/smarty/libs/plugins/function.debug.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty {debug} function plugin
- *
- * Type: function<br>
- * Name: debug<br>
- * Date: July 1, 2002<br>
- * Purpose: popup debug window
- * @link http://smarty.php.net/manual/en/language.function.debug.php {debug}
- * (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @version 1.0
- * @param array
- * @param Smarty
- * @return string output from {@link Smarty::_generate_debug_output()}
- */
-function smarty_function_debug($params, &$smarty)
-{
- if (isset($params['output'])) {
- $smarty->assign('_smarty_debug_output', $params['output']);
- }
- require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');
- return smarty_core_display_debug_console(null, $smarty);
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/function.eval.php b/BSF/include/smarty/libs/plugins/function.eval.php
deleted file mode 100644
index ff0472de2..000000000
--- a/BSF/include/smarty/libs/plugins/function.eval.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty {eval} function plugin
- *
- * Type: function<br>
- * Name: eval<br>
- * Purpose: evaluate a template variable as a template<br>
- * @link http://smarty.php.net/manual/en/language.function.eval.php {eval}
- * (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param array
- * @param Smarty
- */
-function smarty_function_eval($params, &$smarty)
-{
-
- if (!isset($params['var'])) {
- $smarty->trigger_error("eval: missing 'var' parameter");
- return;
- }
-
- if($params['var'] == '') {
- return;
- }
-
- $smarty->_compile_source('evaluated template', $params['var'], $_var_compiled);
-
- ob_start();
- $smarty->_eval('?>' . $_var_compiled);
- $_contents = ob_get_contents();
- ob_end_clean();
-
- if (!empty($params['assign'])) {
- $smarty->assign($params['assign'], $_contents);
- } else {
- return $_contents;
- }
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/function.fetch.php b/BSF/include/smarty/libs/plugins/function.fetch.php
deleted file mode 100644
index 81b1bfc6b..000000000
--- a/BSF/include/smarty/libs/plugins/function.fetch.php
+++ /dev/null
@@ -1,221 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty {fetch} plugin
- *
- * Type: function<br>
- * Name: fetch<br>
- * Purpose: fetch file, web or ftp data and display results
- * @link http://smarty.php.net/manual/en/language.function.fetch.php {fetch}
- * (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param array
- * @param Smarty
- * @return string|null if the assign parameter is passed, Smarty assigns the
- * result to a template variable
- */
-function smarty_function_fetch($params, &$smarty)
-{
- if (empty($params['file'])) {
- $smarty->_trigger_fatal_error("[plugin] parameter 'file' cannot be empty");
- return;
- }
-
- $content = '';
- if ($smarty->security && !preg_match('!^(http|ftp)://!i', $params['file'])) {
- $_params = array('resource_type' => 'file', 'resource_name' => $params['file']);
- require_once(SMARTY_CORE_DIR . 'core.is_secure.php');
- if(!smarty_core_is_secure($_params, $smarty)) {
- $smarty->_trigger_fatal_error('[plugin] (secure mode) fetch \'' . $params['file'] . '\' is not allowed');
- return;
- }
-
- // fetch the file
- if($fp = @fopen($params['file'],'r')) {
- while(!feof($fp)) {
- $content .= fgets ($fp,4096);
- }
- fclose($fp);
- } else {
- $smarty->_trigger_fatal_error('[plugin] fetch cannot read file \'' . $params['file'] . '\'');
- return;
- }
- } else {
- // not a local file
- if(preg_match('!^http://!i',$params['file'])) {
- // http fetch
- if($uri_parts = parse_url($params['file'])) {
- // set defaults
- $host = $server_name = $uri_parts['host'];
- $timeout = 30;
- $accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*";
- $agent = "Smarty Template Engine ".$smarty->_version;
- $referer = "";
- $uri = !empty($uri_parts['path']) ? $uri_parts['path'] : '/';
- $uri .= !empty($uri_parts['query']) ? '?' . $uri_parts['query'] : '';
- $_is_proxy = false;
- if(empty($uri_parts['port'])) {
- $port = 80;
- } else {
- $port = $uri_parts['port'];
- }
- if(!empty($uri_parts['user'])) {
- $user = $uri_parts['user'];
- }
- if(!empty($uri_parts['pass'])) {
- $pass = $uri_parts['pass'];
- }
- // loop through parameters, setup headers
- foreach($params as $param_key => $param_value) {
- switch($param_key) {
- case "file":
- case "assign":
- case "assign_headers":
- break;
- case "user":
- if(!empty($param_value)) {
- $user = $param_value;
- }
- break;
- case "pass":
- if(!empty($param_value)) {
- $pass = $param_value;
- }
- break;
- case "accept":
- if(!empty($param_value)) {
- $accept = $param_value;
- }
- break;
- case "header":
- if(!empty($param_value)) {
- if(!preg_match('![\w\d-]+: .+!',$param_value)) {
- $smarty->_trigger_fatal_error("[plugin] invalid header format '".$param_value."'");
- return;
- } else {
- $extra_headers[] = $param_value;
- }
- }
- break;
- case "proxy_host":
- if(!empty($param_value)) {
- $proxy_host = $param_value;
- }
- break;
- case "proxy_port":
- if(!preg_match('!\D!', $param_value)) {
- $proxy_port = (int) $param_value;
- } else {
- $smarty->_trigger_fatal_error("[plugin] invalid value for attribute '".$param_key."'");
- return;
- }
- break;
- case "agent":
- if(!empty($param_value)) {
- $agent = $param_value;
- }
- break;
- case "referer":
- if(!empty($param_value)) {
- $referer = $param_value;
- }
- break;
- case "timeout":
- if(!preg_match('!\D!', $param_value)) {
- $timeout = (int) $param_value;
- } else {
- $smarty->_trigger_fatal_error("[plugin] invalid value for attribute '".$param_key."'");
- return;
- }
- break;
- default:
- $smarty->_trigger_fatal_error("[plugin] unrecognized attribute '".$param_key."'");
- return;
- }
- }
- if(!empty($proxy_host) && !empty($proxy_port)) {
- $_is_proxy = true;
- $fp = fsockopen($proxy_host,$proxy_port,$errno,$errstr,$timeout);
- } else {
- $fp = fsockopen($server_name,$port,$errno,$errstr,$timeout);
- }
-
- if(!$fp) {
- $smarty->_trigger_fatal_error("[plugin] unable to fetch: $errstr ($errno)");
- return;
- } else {
- if($_is_proxy) {
- fputs($fp, 'GET ' . $params['file'] . " HTTP/1.0\r\n");
- } else {
- fputs($fp, "GET $uri HTTP/1.0\r\n");
- }
- if(!empty($host)) {
- fputs($fp, "Host: $host\r\n");
- }
- if(!empty($accept)) {
- fputs($fp, "Accept: $accept\r\n");
- }
- if(!empty($agent)) {
- fputs($fp, "User-Agent: $agent\r\n");
- }
- if(!empty($referer)) {
- fputs($fp, "Referer: $referer\r\n");
- }
- if(isset($extra_headers) && is_array($extra_headers)) {
- foreach($extra_headers as $curr_header) {
- fputs($fp, $curr_header."\r\n");
- }
- }
- if(!empty($user) && !empty($pass)) {
- fputs($fp, "Authorization: BASIC ".base64_encode("$user:$pass")."\r\n");
- }
-
- fputs($fp, "\r\n");
- while(!feof($fp)) {
- $content .= fgets($fp,4096);
- }
- fclose($fp);
- $csplit = split("\r\n\r\n",$content,2);
-
- $content = $csplit[1];
-
- if(!empty($params['assign_headers'])) {
- $smarty->assign($params['assign_headers'],split("\r\n",$csplit[0]));
- }
- }
- } else {
- $smarty->_trigger_fatal_error("[plugin] unable to parse URL, check syntax");
- return;
- }
- } else {
- // ftp fetch
- if($fp = @fopen($params['file'],'r')) {
- while(!feof($fp)) {
- $content .= fgets ($fp,4096);
- }
- fclose($fp);
- } else {
- $smarty->_trigger_fatal_error('[plugin] fetch cannot read file \'' . $params['file'] .'\'');
- return;
- }
- }
-
- }
-
-
- if (!empty($params['assign'])) {
- $smarty->assign($params['assign'],$content);
- } else {
- return $content;
- }
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/function.html_checkboxes.php b/BSF/include/smarty/libs/plugins/function.html_checkboxes.php
deleted file mode 100644
index ed8ad7f33..000000000
--- a/BSF/include/smarty/libs/plugins/function.html_checkboxes.php
+++ /dev/null
@@ -1,143 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty {html_checkboxes} function plugin
- *
- * File: function.html_checkboxes.php<br>
- * Type: function<br>
- * Name: html_checkboxes<br>
- * Date: 24.Feb.2003<br>
- * Purpose: Prints out a list of checkbox input types<br>
- * Input:<br>
- * - name (optional) - string default "checkbox"
- * - values (required) - array
- * - options (optional) - associative array
- * - checked (optional) - array default not set
- * - separator (optional) - ie <br> or &nbsp;
- * - output (optional) - the output next to each checkbox
- * - assign (optional) - assign the output as an array to this variable
- * Examples:
- * <pre>
- * {html_checkboxes values=$ids output=$names}
- * {html_checkboxes values=$ids name='box' separator='<br>' output=$names}
- * {html_checkboxes values=$ids checked=$checked separator='<br>' output=$names}
- * </pre>
- * @link http://smarty.php.net/manual/en/language.function.html.checkboxes.php {html_checkboxes}
- * (Smarty online manual)
- * @author Christopher Kvarme <christopher.kvarme@flashjab.com>
- * @author credits to Monte Ohrt <monte at ohrt dot com>
- * @version 1.0
- * @param array
- * @param Smarty
- * @return string
- * @uses smarty_function_escape_special_chars()
- */
-function smarty_function_html_checkboxes($params, &$smarty)
-{
- require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
-
- $name = 'checkbox';
- $values = null;
- $options = null;
- $selected = null;
- $separator = '';
- $labels = true;
- $output = null;
-
- $extra = '';
-
- foreach($params as $_key => $_val) {
- switch($_key) {
- case 'name':
- case 'separator':
- $$_key = $_val;
- break;
-
- case 'labels':
- $$_key = (bool)$_val;
- break;
-
- case 'options':
- $$_key = (array)$_val;
- break;
-
- case 'values':
- case 'output':
- $$_key = array_values((array)$_val);
- break;
-
- case 'checked':
- case 'selected':
- $selected = array_map('strval', array_values((array)$_val));
- break;
-
- case 'checkboxes':
- $smarty->trigger_error('html_checkboxes: the use of the "checkboxes" attribute is deprecated, use "options" instead', E_USER_WARNING);
- $options = (array)$_val;
- break;
-
- case 'assign':
- break;
-
- default:
- if(!is_array($_val)) {
- $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
- } else {
- $smarty->trigger_error("html_checkboxes: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
- }
- break;
- }
- }
-
- if (!isset($options) && !isset($values))
- return ''; /* raise error here? */
-
- settype($selected, 'array');
- $_html_result = array();
-
- if (isset($options)) {
-
- foreach ($options as $_key=>$_val)
- $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels);
-
-
- } else {
- foreach ($values as $_i=>$_key) {
- $_val = isset($output[$_i]) ? $output[$_i] : '';
- $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels);
- }
-
- }
-
- if(!empty($params['assign'])) {
- $smarty->assign($params['assign'], $_html_result);
- } else {
- return implode("\n",$_html_result);
- }
-
-}
-
-function smarty_function_html_checkboxes_output($name, $value, $output, $selected, $extra, $separator, $labels) {
- $_output = '';
- if ($labels) $_output .= '<label>';
- $_output .= '<input type="checkbox" name="'
- . smarty_function_escape_special_chars($name) . '[]" value="'
- . smarty_function_escape_special_chars($value) . '"';
-
- if (in_array((string)$value, $selected)) {
- $_output .= ' checked="checked"';
- }
- $_output .= $extra . ' />' . $output;
- if ($labels) $_output .= '</label>';
- $_output .= $separator;
-
- return $_output;
-}
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/function.html_image.php b/BSF/include/smarty/libs/plugins/function.html_image.php
deleted file mode 100644
index 9abae72ef..000000000
--- a/BSF/include/smarty/libs/plugins/function.html_image.php
+++ /dev/null
@@ -1,142 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty {html_image} function plugin
- *
- * Type: function<br>
- * Name: html_image<br>
- * Date: Feb 24, 2003<br>
- * Purpose: format HTML tags for the image<br>
- * Input:<br>
- * - file = file (and path) of image (required)
- * - height = image height (optional, default actual height)
- * - width = image width (optional, default actual width)
- * - basedir = base directory for absolute paths, default
- * is environment variable DOCUMENT_ROOT
- * - path_prefix = prefix for path output (optional, default empty)
- *
- * Examples: {html_image file="/images/masthead.gif"}
- * Output: <img src="/images/masthead.gif" width=400 height=23>
- * @link http://smarty.php.net/manual/en/language.function.html.image.php {html_image}
- * (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @author credits to Duda <duda@big.hu> - wrote first image function
- * in repository, helped with lots of functionality
- * @version 1.0
- * @param array
- * @param Smarty
- * @return string
- * @uses smarty_function_escape_special_chars()
- */
-function smarty_function_html_image($params, &$smarty)
-{
- require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
-
- $alt = '';
- $file = '';
- $height = '';
- $width = '';
- $extra = '';
- $prefix = '';
- $suffix = '';
- $path_prefix = '';
- $server_vars = ($smarty->request_use_auto_globals) ? $_SERVER : $GLOBALS['HTTP_SERVER_VARS'];
- $basedir = isset($server_vars['DOCUMENT_ROOT']) ? $server_vars['DOCUMENT_ROOT'] : '';
- foreach($params as $_key => $_val) {
- switch($_key) {
- case 'file':
- case 'height':
- case 'width':
- case 'dpi':
- case 'path_prefix':
- case 'basedir':
- $$_key = $_val;
- break;
-
- case 'alt':
- if(!is_array($_val)) {
- $$_key = smarty_function_escape_special_chars($_val);
- } else {
- $smarty->trigger_error("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
- }
- break;
-
- case 'link':
- case 'href':
- $prefix = '<a href="' . $_val . '">';
- $suffix = '</a>';
- break;
-
- default:
- if(!is_array($_val)) {
- $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
- } else {
- $smarty->trigger_error("html_image: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
- }
- break;
- }
- }
-
- if (empty($file)) {
- $smarty->trigger_error("html_image: missing 'file' parameter", E_USER_NOTICE);
- return;
- }
-
- if (substr($file,0,1) == '/') {
- $_image_path = $basedir . $file;
- } else {
- $_image_path = $file;
- }
-
- if(!isset($params['width']) || !isset($params['height'])) {
- if(!$_image_data = @getimagesize($_image_path)) {
- if(!file_exists($_image_path)) {
- $smarty->trigger_error("html_image: unable to find '$_image_path'", E_USER_NOTICE);
- return;
- } else if(!is_readable($_image_path)) {
- $smarty->trigger_error("html_image: unable to read '$_image_path'", E_USER_NOTICE);
- return;
- } else {
- $smarty->trigger_error("html_image: '$_image_path' is not a valid image file", E_USER_NOTICE);
- return;
- }
- }
- if ($smarty->security &&
- ($_params = array('resource_type' => 'file', 'resource_name' => $_image_path)) &&
- (require_once(SMARTY_CORE_DIR . 'core.is_secure.php')) &&
- (!smarty_core_is_secure($_params, $smarty)) ) {
- $smarty->trigger_error("html_image: (secure) '$_image_path' not in secure directory", E_USER_NOTICE);
- }
-
- if(!isset($params['width'])) {
- $width = $_image_data[0];
- }
- if(!isset($params['height'])) {
- $height = $_image_data[1];
- }
-
- }
-
- if(isset($params['dpi'])) {
- if(strstr($server_vars['HTTP_USER_AGENT'], 'Mac')) {
- $dpi_default = 72;
- } else {
- $dpi_default = 96;
- }
- $_resize = $dpi_default/$params['dpi'];
- $width = round($width * $_resize);
- $height = round($height * $_resize);
- }
-
- return $prefix . '<img src="'.$path_prefix.$file.'" alt="'.$alt.'" width="'.$width.'" height="'.$height.'"'.$extra.' />' . $suffix;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/function.html_options.php b/BSF/include/smarty/libs/plugins/function.html_options.php
deleted file mode 100644
index cebadde47..000000000
--- a/BSF/include/smarty/libs/plugins/function.html_options.php
+++ /dev/null
@@ -1,122 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty {html_options} function plugin
- *
- * Type: function<br>
- * Name: html_options<br>
- * Input:<br>
- * - name (optional) - string default "select"
- * - values (required if no options supplied) - array
- * - options (required if no values supplied) - associative array
- * - selected (optional) - string default not set
- * - output (required if not options supplied) - array
- * Purpose: Prints the list of <option> tags generated from
- * the passed parameters
- * @link http://smarty.php.net/manual/en/language.function.html.options.php {html_image}
- * (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param array
- * @param Smarty
- * @return string
- * @uses smarty_function_escape_special_chars()
- */
-function smarty_function_html_options($params, &$smarty)
-{
- require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
-
- $name = null;
- $values = null;
- $options = null;
- $selected = array();
- $output = null;
-
- $extra = '';
-
- foreach($params as $_key => $_val) {
- switch($_key) {
- case 'name':
- $$_key = (string)$_val;
- break;
-
- case 'options':
- $$_key = (array)$_val;
- break;
-
- case 'values':
- case 'output':
- $$_key = array_values((array)$_val);
- break;
-
- case 'selected':
- $$_key = array_map('strval', array_values((array)$_val));
- break;
-
- default:
- if(!is_array($_val)) {
- $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
- } else {
- $smarty->trigger_error("html_options: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
- }
- break;
- }
- }
-
- if (!isset($options) && !isset($values))
- return ''; /* raise error here? */
-
- $_html_result = '';
-
- if (isset($options)) {
-
- foreach ($options as $_key=>$_val)
- $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected);
-
- } else {
-
- foreach ($values as $_i=>$_key) {
- $_val = isset($output[$_i]) ? $output[$_i] : '';
- $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected);
- }
-
- }
-
- if(!empty($name)) {
- $_html_result = '<select name="' . $name . '"' . $extra . '>' . "\n" . $_html_result . '</select>' . "\n";
- }
-
- return $_html_result;
-
-}
-
-function smarty_function_html_options_optoutput($key, $value, $selected) {
- if(!is_array($value)) {
- $_html_result = '<option label="' . smarty_function_escape_special_chars($value) . '" value="' .
- smarty_function_escape_special_chars($key) . '"';
- if (in_array((string)$key, $selected))
- $_html_result .= ' selected="selected"';
- $_html_result .= '>' . smarty_function_escape_special_chars($value) . '</option>' . "\n";
- } else {
- $_html_result = smarty_function_html_options_optgroup($key, $value, $selected);
- }
- return $_html_result;
-}
-
-function smarty_function_html_options_optgroup($key, $values, $selected) {
- $optgroup_html = '<optgroup label="' . smarty_function_escape_special_chars($key) . '">' . "\n";
- foreach ($values as $key => $value) {
- $optgroup_html .= smarty_function_html_options_optoutput($key, $value, $selected);
- }
- $optgroup_html .= "</optgroup>\n";
- return $optgroup_html;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/function.html_radios.php b/BSF/include/smarty/libs/plugins/function.html_radios.php
deleted file mode 100644
index 7503cfaca..000000000
--- a/BSF/include/smarty/libs/plugins/function.html_radios.php
+++ /dev/null
@@ -1,156 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty {html_radios} function plugin
- *
- * File: function.html_radios.php<br>
- * Type: function<br>
- * Name: html_radios<br>
- * Date: 24.Feb.2003<br>
- * Purpose: Prints out a list of radio input types<br>
- * Input:<br>
- * - name (optional) - string default "radio"
- * - values (required) - array
- * - options (optional) - associative array
- * - checked (optional) - array default not set
- * - separator (optional) - ie <br> or &nbsp;
- * - output (optional) - the output next to each radio button
- * - assign (optional) - assign the output as an array to this variable
- * Examples:
- * <pre>
- * {html_radios values=$ids output=$names}
- * {html_radios values=$ids name='box' separator='<br>' output=$names}
- * {html_radios values=$ids checked=$checked separator='<br>' output=$names}
- * </pre>
- * @link http://smarty.php.net/manual/en/language.function.html.radios.php {html_radios}
- * (Smarty online manual)
- * @author Christopher Kvarme <christopher.kvarme@flashjab.com>
- * @author credits to Monte Ohrt <monte at ohrt dot com>
- * @version 1.0
- * @param array
- * @param Smarty
- * @return string
- * @uses smarty_function_escape_special_chars()
- */
-function smarty_function_html_radios($params, &$smarty)
-{
- require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
-
- $name = 'radio';
- $values = null;
- $options = null;
- $selected = null;
- $separator = '';
- $labels = true;
- $label_ids = false;
- $output = null;
- $extra = '';
-
- foreach($params as $_key => $_val) {
- switch($_key) {
- case 'name':
- case 'separator':
- $$_key = (string)$_val;
- break;
-
- case 'checked':
- case 'selected':
- if(is_array($_val)) {
- $smarty->trigger_error('html_radios: the "' . $_key . '" attribute cannot be an array', E_USER_WARNING);
- } else {
- $selected = (string)$_val;
- }
- break;
-
- case 'labels':
- case 'label_ids':
- $$_key = (bool)$_val;
- break;
-
- case 'options':
- $$_key = (array)$_val;
- break;
-
- case 'values':
- case 'output':
- $$_key = array_values((array)$_val);
- break;
-
- case 'radios':
- $smarty->trigger_error('html_radios: the use of the "radios" attribute is deprecated, use "options" instead', E_USER_WARNING);
- $options = (array)$_val;
- break;
-
- case 'assign':
- break;
-
- default:
- if(!is_array($_val)) {
- $extra .= ' '.$_key.'="'.smarty_function_escape_special_chars($_val).'"';
- } else {
- $smarty->trigger_error("html_radios: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
- }
- break;
- }
- }
-
- if (!isset($options) && !isset($values))
- return ''; /* raise error here? */
-
- $_html_result = array();
-
- if (isset($options)) {
-
- foreach ($options as $_key=>$_val)
- $_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids);
-
- } else {
-
- foreach ($values as $_i=>$_key) {
- $_val = isset($output[$_i]) ? $output[$_i] : '';
- $_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels, $label_ids);
- }
-
- }
-
- if(!empty($params['assign'])) {
- $smarty->assign($params['assign'], $_html_result);
- } else {
- return implode("\n",$_html_result);
- }
-
-}
-
-function smarty_function_html_radios_output($name, $value, $output, $selected, $extra, $separator, $labels, $label_ids) {
- $_output = '';
- if ($labels) {
- if($label_ids) {
- $_id = smarty_function_escape_special_chars(preg_replace('![^\w\-\.]!', '_', $name . '_' . $value));
- $_output .= '<label for="' . $_id . '">';
- } else {
- $_output .= '<label>';
- }
- }
- $_output .= '<input type="radio" name="'
- . smarty_function_escape_special_chars($name) . '" value="'
- . smarty_function_escape_special_chars($value) . '"';
-
- if ($labels && $label_ids) $_output .= ' id="' . $_id . '"';
-
- if ((string)$value==$selected) {
- $_output .= ' checked="checked"';
- }
- $_output .= $extra . ' />' . $output;
- if ($labels) $_output .= '</label>';
- $_output .= $separator;
-
- return $_output;
-}
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/function.html_select_date.php b/BSF/include/smarty/libs/plugins/function.html_select_date.php
deleted file mode 100644
index e5eb18307..000000000
--- a/BSF/include/smarty/libs/plugins/function.html_select_date.php
+++ /dev/null
@@ -1,331 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Smarty {html_select_date} plugin
- *
- * Type: function<br>
- * Name: html_select_date<br>
- * Purpose: Prints the dropdowns for date selection.
- *
- * ChangeLog:<br>
- * - 1.0 initial release
- * - 1.1 added support for +/- N syntax for begin
- * and end year values. (Monte)
- * - 1.2 added support for yyyy-mm-dd syntax for
- * time value. (Jan Rosier)
- * - 1.3 added support for choosing format for
- * month values (Gary Loescher)
- * - 1.3.1 added support for choosing format for
- * day values (Marcus Bointon)
- * - 1.3.2 support negative timestamps, force year
- * dropdown to include given date unless explicitly set (Monte)
- * - 1.3.4 fix behaviour of 0000-00-00 00:00:00 dates to match that
- * of 0000-00-00 dates (cybot, boots)
- * @link http://smarty.php.net/manual/en/language.function.html.select.date.php {html_select_date}
- * (Smarty online manual)
- * @version 1.3.4
- * @author Andrei Zmievski
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param array
- * @param Smarty
- * @return string
- */
-function smarty_function_html_select_date($params, &$smarty)
-{
- require_once $smarty->_get_plugin_filepath('shared','escape_special_chars');
- require_once $smarty->_get_plugin_filepath('shared','make_timestamp');
- require_once $smarty->_get_plugin_filepath('function','html_options');
- /* Default values. */
- $prefix = "Date_";
- $start_year = strftime("%Y");
- $end_year = $start_year;
- $display_days = true;
- $display_months = true;
- $display_years = true;
- $month_format = "%B";
- /* Write months as numbers by default GL */
- $month_value_format = "%m";
- $day_format = "%02d";
- /* Write day values using this format MB */
- $day_value_format = "%d";
- $year_as_text = false;
- /* Display years in reverse order? Ie. 2000,1999,.... */
- $reverse_years = false;
- /* Should the select boxes be part of an array when returned from PHP?
- e.g. setting it to "birthday", would create "birthday[Day]",
- "birthday[Month]" & "birthday[Year]". Can be combined with prefix */
- $field_array = null;
- /* <select size>'s of the different <select> tags.
- If not set, uses default dropdown. */
- $day_size = null;
- $month_size = null;
- $year_size = null;
- /* Unparsed attributes common to *ALL* the <select>/<input> tags.
- An example might be in the template: all_extra ='class ="foo"'. */
- $all_extra = null;
- /* Separate attributes for the tags. */
- $day_extra = null;
- $month_extra = null;
- $year_extra = null;
- /* Order in which to display the fields.
- "D" -> day, "M" -> month, "Y" -> year. */
- $field_order = 'MDY';
- /* String printed between the different fields. */
- $field_separator = "\n";
- $time = time();
- $all_empty = null;
- $day_empty = null;
- $month_empty = null;
- $year_empty = null;
- $extra_attrs = '';
-
- foreach ($params as $_key=>$_value) {
- switch ($_key) {
- case 'prefix':
- case 'time':
- case 'start_year':
- case 'end_year':
- case 'month_format':
- case 'day_format':
- case 'day_value_format':
- case 'field_array':
- case 'day_size':
- case 'month_size':
- case 'year_size':
- case 'all_extra':
- case 'day_extra':
- case 'month_extra':
- case 'year_extra':
- case 'field_order':
- case 'field_separator':
- case 'month_value_format':
- case 'month_empty':
- case 'day_empty':
- case 'year_empty':
- $$_key = (string)$_value;
- break;
-
- case 'all_empty':
- $$_key = (string)$_value;
- $day_empty = $month_empty = $year_empty = $all_empty;
- break;
-
- case 'display_days':
- case 'display_months':
- case 'display_years':
- case 'year_as_text':
- case 'reverse_years':
- $$_key = (bool)$_value;
- break;
-
- default:
- if(!is_array($_value)) {
- $extra_attrs .= ' '.$_key.'="'.smarty_function_escape_special_chars($_value).'"';
- } else {
- $smarty->trigger_error("html_select_date: extra attribute '$_key' cannot be an array", E_USER_NOTICE);
- }
- break;
- }
- }
-
- if (preg_match('!^-\d+$!', $time)) {
- // negative timestamp, use date()
- $time = date('Y-m-d', $time);
- }
- // If $time is not in format yyyy-mm-dd
- if (preg_match('/^(\d{0,4}-\d{0,2}-\d{0,2})/', $time, $found)) {
- $time = $found[1];
- } else {
- // use smarty_make_timestamp to get an unix timestamp and
- // strftime to make yyyy-mm-dd
- $time = strftime('%Y-%m-%d', smarty_make_timestamp($time));
- }
- // Now split this in pieces, which later can be used to set the select
- $time = explode("-", $time);
-
- // make syntax "+N" or "-N" work with start_year and end_year
- if (preg_match('!^(\+|\-)\s*(\d+)$!', $end_year, $match)) {
- if ($match[1] == '+') {
- $end_year = strftime('%Y') + $match[2];
- } else {
- $end_year = strftime('%Y') - $match[2];
- }
- }
- if (preg_match('!^(\+|\-)\s*(\d+)$!', $start_year, $match)) {
- if ($match[1] == '+') {
- $start_year = strftime('%Y') + $match[2];
- } else {
- $start_year = strftime('%Y') - $match[2];
- }
- }
- if (strlen($time[0]) > 0) {
- if ($start_year > $time[0] && !isset($params['start_year'])) {
- // force start year to include given date if not explicitly set
- $start_year = $time[0];
- }
- if($end_year < $time[0] && !isset($params['end_year'])) {
- // force end year to include given date if not explicitly set
- $end_year = $time[0];
- }
- }
-
- $field_order = strtoupper($field_order);
-
- $html_result = $month_result = $day_result = $year_result = "";
-
- $field_separator_count = -1;
- if ($display_months) {
- $field_separator_count++;
- $month_names = array();
- $month_values = array();
- if(isset($month_empty)) {
- $month_names[''] = $month_empty;
- $month_values[''] = '';
- }
- for ($i = 1; $i <= 12; $i++) {
- $month_names[$i] = strftime($month_format, mktime(0, 0, 0, $i, 1, 2000));
- $month_values[$i] = strftime($month_value_format, mktime(0, 0, 0, $i, 1, 2000));
- }
-
- $month_result .= '<select name=';
- if (null !== $field_array){
- $month_result .= '"' . $field_array . '[' . $prefix . 'Month]"';
- } else {
- $month_result .= '"' . $prefix . 'Month"';
- }
- if (null !== $month_size){
- $month_result .= ' size="' . $month_size . '"';
- }
- if (null !== $month_extra){
- $month_result .= ' ' . $month_extra;
- }
- if (null !== $all_extra){
- $month_result .= ' ' . $all_extra;
- }
- $month_result .= $extra_attrs . '>'."\n";
-
- $month_result .= smarty_function_html_options(array('output' => $month_names,
- 'values' => $month_values,
- 'selected' => (int)$time[1] ? strftime($month_value_format, mktime(0, 0, 0, (int)$time[1], 1, 2000)) : '',
- 'print_result' => false),
- $smarty);
- $month_result .= '</select>';
- }
-
- if ($display_days) {
- $field_separator_count++;
- $days = array();
- if (isset($day_empty)) {
- $days[''] = $day_empty;
- $day_values[''] = '';
- }
- for ($i = 1; $i <= 31; $i++) {
- $days[] = sprintf($day_format, $i);
- $day_values[] = sprintf($day_value_format, $i);
- }
-
- $day_result .= '<select name=';
- if (null !== $field_array){
- $day_result .= '"' . $field_array . '[' . $prefix . 'Day]"';
- } else {
- $day_result .= '"' . $prefix . 'Day"';
- }
- if (null !== $day_size){
- $day_result .= ' size="' . $day_size . '"';
- }
- if (null !== $all_extra){
- $day_result .= ' ' . $all_extra;
- }
- if (null !== $day_extra){
- $day_result .= ' ' . $day_extra;
- }
- $day_result .= $extra_attrs . '>'."\n";
- $day_result .= smarty_function_html_options(array('output' => $days,
- 'values' => $day_values,
- 'selected' => $time[2],
- 'print_result' => false),
- $smarty);
- $day_result .= '</select>';
- }
-
- if ($display_years) {
- $field_separator_count++;
- if (null !== $field_array){
- $year_name = $field_array . '[' . $prefix . 'Year]';
- } else {
- $year_name = $prefix . 'Year';
- }
- if ($year_as_text) {
- $year_result .= '<input type="text" name="' . $year_name . '" value="' . $time[0] . '" size="4" maxlength="4"';
- if (null !== $all_extra){
- $year_result .= ' ' . $all_extra;
- }
- if (null !== $year_extra){
- $year_result .= ' ' . $year_extra;
- }
- $year_result .= ' />';
- } else {
- $years = range((int)$start_year, (int)$end_year);
- if ($reverse_years) {
- rsort($years, SORT_NUMERIC);
- } else {
- sort($years, SORT_NUMERIC);
- }
- $yearvals = $years;
- if(isset($year_empty)) {
- array_unshift($years, $year_empty);
- array_unshift($yearvals, '');
- }
- $year_result .= '<select name="' . $year_name . '"';
- if (null !== $year_size){
- $year_result .= ' size="' . $year_size . '"';
- }
- if (null !== $all_extra){
- $year_result .= ' ' . $all_extra;
- }
- if (null !== $year_extra){
- $year_result .= ' ' . $year_extra;
- }
- $year_result .= $extra_attrs . '>'."\n";
- $year_result .= smarty_function_html_options(array('output' => $years,
- 'values' => $yearvals,
- 'selected' => $time[0],
- 'print_result' => false),
- $smarty);
- $year_result .= '</select>';
- }
- }
-
- // Loop thru the field_order field
- for ($i = 0; $i <= 2; $i++){
- $c = substr($field_order, $i, 1);
- switch ($c){
- case 'D':
- $html_result .= $day_result;
- break;
-
- case 'M':
- $html_result .= $month_result;
- break;
-
- case 'Y':
- $html_result .= $year_result;
- break;
- }
- // Add the field seperator
- if($i < $field_separator_count) {
- $html_result .= $field_separator;
- }
- }
-
- return $html_result;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/function.html_select_time.php b/BSF/include/smarty/libs/plugins/function.html_select_time.php
deleted file mode 100644
index 2e5be7efe..000000000
--- a/BSF/include/smarty/libs/plugins/function.html_select_time.php
+++ /dev/null
@@ -1,194 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty {html_select_time} function plugin
- *
- * Type: function<br>
- * Name: html_select_time<br>
- * Purpose: Prints the dropdowns for time selection
- * @link http://smarty.php.net/manual/en/language.function.html.select.time.php {html_select_time}
- * (Smarty online manual)
- * @author Roberto Berto <roberto@berto.net>
- * @credits Monte Ohrt <monte AT ohrt DOT com>
- * @param array
- * @param Smarty
- * @return string
- * @uses smarty_make_timestamp()
- */
-function smarty_function_html_select_time($params, &$smarty)
-{
- require_once $smarty->_get_plugin_filepath('shared','make_timestamp');
- require_once $smarty->_get_plugin_filepath('function','html_options');
- /* Default values. */
- $prefix = "Time_";
- $time = time();
- $display_hours = true;
- $display_minutes = true;
- $display_seconds = true;
- $display_meridian = true;
- $use_24_hours = true;
- $minute_interval = 1;
- $second_interval = 1;
- /* Should the select boxes be part of an array when returned from PHP?
- e.g. setting it to "birthday", would create "birthday[Hour]",
- "birthday[Minute]", "birthday[Seconds]" & "birthday[Meridian]".
- Can be combined with prefix. */
- $field_array = null;
- $all_extra = null;
- $hour_extra = null;
- $minute_extra = null;
- $second_extra = null;
- $meridian_extra = null;
-
- foreach ($params as $_key=>$_value) {
- switch ($_key) {
- case 'prefix':
- case 'time':
- case 'field_array':
- case 'all_extra':
- case 'hour_extra':
- case 'minute_extra':
- case 'second_extra':
- case 'meridian_extra':
- $$_key = (string)$_value;
- break;
-
- case 'display_hours':
- case 'display_minutes':
- case 'display_seconds':
- case 'display_meridian':
- case 'use_24_hours':
- $$_key = (bool)$_value;
- break;
-
- case 'minute_interval':
- case 'second_interval':
- $$_key = (int)$_value;
- break;
-
- default:
- $smarty->trigger_error("[html_select_time] unknown parameter $_key", E_USER_WARNING);
- }
- }
-
- $time = smarty_make_timestamp($time);
-
- $html_result = '';
-
- if ($display_hours) {
- $hours = $use_24_hours ? range(0, 23) : range(1, 12);
- $hour_fmt = $use_24_hours ? '%H' : '%I';
- for ($i = 0, $for_max = count($hours); $i < $for_max; $i++)
- $hours[$i] = sprintf('%02d', $hours[$i]);
- $html_result .= '<select name=';
- if (null !== $field_array) {
- $html_result .= '"' . $field_array . '[' . $prefix . 'Hour]"';
- } else {
- $html_result .= '"' . $prefix . 'Hour"';
- }
- if (null !== $hour_extra){
- $html_result .= ' ' . $hour_extra;
- }
- if (null !== $all_extra){
- $html_result .= ' ' . $all_extra;
- }
- $html_result .= '>'."\n";
- $html_result .= smarty_function_html_options(array('output' => $hours,
- 'values' => $hours,
- 'selected' => strftime($hour_fmt, $time),
- 'print_result' => false),
- $smarty);
- $html_result .= "</select>\n";
- }
-
- if ($display_minutes) {
- $all_minutes = range(0, 59);
- for ($i = 0, $for_max = count($all_minutes); $i < $for_max; $i+= $minute_interval)
- $minutes[] = sprintf('%02d', $all_minutes[$i]);
- $selected = intval(floor(strftime('%M', $time) / $minute_interval) * $minute_interval);
- $html_result .= '<select name=';
- if (null !== $field_array) {
- $html_result .= '"' . $field_array . '[' . $prefix . 'Minute]"';
- } else {
- $html_result .= '"' . $prefix . 'Minute"';
- }
- if (null !== $minute_extra){
- $html_result .= ' ' . $minute_extra;
- }
- if (null !== $all_extra){
- $html_result .= ' ' . $all_extra;
- }
- $html_result .= '>'."\n";
-
- $html_result .= smarty_function_html_options(array('output' => $minutes,
- 'values' => $minutes,
- 'selected' => $selected,
- 'print_result' => false),
- $smarty);
- $html_result .= "</select>\n";
- }
-
- if ($display_seconds) {
- $all_seconds = range(0, 59);
- for ($i = 0, $for_max = count($all_seconds); $i < $for_max; $i+= $second_interval)
- $seconds[] = sprintf('%02d', $all_seconds[$i]);
- $selected = intval(floor(strftime('%S', $time) / $second_interval) * $second_interval);
- $html_result .= '<select name=';
- if (null !== $field_array) {
- $html_result .= '"' . $field_array . '[' . $prefix . 'Second]"';
- } else {
- $html_result .= '"' . $prefix . 'Second"';
- }
-
- if (null !== $second_extra){
- $html_result .= ' ' . $second_extra;
- }
- if (null !== $all_extra){
- $html_result .= ' ' . $all_extra;
- }
- $html_result .= '>'."\n";
-
- $html_result .= smarty_function_html_options(array('output' => $seconds,
- 'values' => $seconds,
- 'selected' => $selected,
- 'print_result' => false),
- $smarty);
- $html_result .= "</select>\n";
- }
-
- if ($display_meridian && !$use_24_hours) {
- $html_result .= '<select name=';
- if (null !== $field_array) {
- $html_result .= '"' . $field_array . '[' . $prefix . 'Meridian]"';
- } else {
- $html_result .= '"' . $prefix . 'Meridian"';
- }
-
- if (null !== $meridian_extra){
- $html_result .= ' ' . $meridian_extra;
- }
- if (null !== $all_extra){
- $html_result .= ' ' . $all_extra;
- }
- $html_result .= '>'."\n";
-
- $html_result .= smarty_function_html_options(array('output' => array('AM', 'PM'),
- 'values' => array('am', 'pm'),
- 'selected' => strtolower(strftime('%p', $time)),
- 'print_result' => false),
- $smarty);
- $html_result .= "</select>\n";
- }
-
- return $html_result;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/function.html_table.php b/BSF/include/smarty/libs/plugins/function.html_table.php
deleted file mode 100644
index 32aeba83c..000000000
--- a/BSF/include/smarty/libs/plugins/function.html_table.php
+++ /dev/null
@@ -1,177 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty {html_table} function plugin
- *
- * Type: function<br>
- * Name: html_table<br>
- * Date: Feb 17, 2003<br>
- * Purpose: make an html table from an array of data<br>
- * Input:<br>
- * - loop = array to loop through
- * - cols = number of columns, comma separated list of column names
- * or array of column names
- * - rows = number of rows
- * - table_attr = table attributes
- * - th_attr = table heading attributes (arrays are cycled)
- * - tr_attr = table row attributes (arrays are cycled)
- * - td_attr = table cell attributes (arrays are cycled)
- * - trailpad = value to pad trailing cells with
- * - caption = text for caption element
- * - vdir = vertical direction (default: "down", means top-to-bottom)
- * - hdir = horizontal direction (default: "right", means left-to-right)
- * - inner = inner loop (default "cols": print $loop line by line,
- * $loop will be printed column by column otherwise)
- *
- *
- * Examples:
- * <pre>
- * {table loop=$data}
- * {table loop=$data cols=4 tr_attr='"bgcolor=red"'}
- * {table loop=$data cols="first,second,third" tr_attr=$colors}
- * </pre>
- * @author Monte Ohrt <monte at ohrt dot com>
- * @author credit to Messju Mohr <messju at lammfellpuschen dot de>
- * @author credit to boots <boots dot smarty at yahoo dot com>
- * @version 1.1
- * @link http://smarty.php.net/manual/en/language.function.html.table.php {html_table}
- * (Smarty online manual)
- * @param array
- * @param Smarty
- * @return string
- */
-function smarty_function_html_table($params, &$smarty)
-{
- $table_attr = 'border="1"';
- $tr_attr = '';
- $th_attr = '';
- $td_attr = '';
- $cols = $cols_count = 3;
- $rows = 3;
- $trailpad = '&nbsp;';
- $vdir = 'down';
- $hdir = 'right';
- $inner = 'cols';
- $caption = '';
-
- if (!isset($params['loop'])) {
- $smarty->trigger_error("html_table: missing 'loop' parameter");
- return;
- }
-
- foreach ($params as $_key=>$_value) {
- switch ($_key) {
- case 'loop':
- $$_key = (array)$_value;
- break;
-
- case 'cols':
- if (is_array($_value) && !empty($_value)) {
- $cols = $_value;
- $cols_count = count($_value);
- } elseif (!is_numeric($_value) && is_string($_value) && !empty($_value)) {
- $cols = explode(',', $_value);
- $cols_count = count($cols);
- } elseif (!empty($_value)) {
- $cols_count = (int)$_value;
- } else {
- $cols_count = $cols;
- }
- break;
-
- case 'rows':
- $$_key = (int)$_value;
- break;
-
- case 'table_attr':
- case 'trailpad':
- case 'hdir':
- case 'vdir':
- case 'inner':
- case 'caption':
- $$_key = (string)$_value;
- break;
-
- case 'tr_attr':
- case 'td_attr':
- case 'th_attr':
- $$_key = $_value;
- break;
- }
- }
-
- $loop_count = count($loop);
- if (empty($params['rows'])) {
- /* no rows specified */
- $rows = ceil($loop_count/$cols_count);
- } elseif (empty($params['cols'])) {
- if (!empty($params['rows'])) {
- /* no cols specified, but rows */
- $cols_count = ceil($loop_count/$rows);
- }
- }
-
- $output = "<table $table_attr>\n";
-
- if (!empty($caption)) {
- $output .= '<caption>' . $caption . "</caption>\n";
- }
-
- if (is_array($cols)) {
- $cols = ($hdir == 'right') ? $cols : array_reverse($cols);
- $output .= "<thead><tr>\n";
-
- for ($r=0; $r<$cols_count; $r++) {
- $output .= '<th' . smarty_function_html_table_cycle('th', $th_attr, $r) . '>';
- $output .= $cols[$r];
- $output .= "</th>\n";
- }
- $output .= "</tr></thead>\n";
- }
-
- $output .= "<tbody>\n";
- for ($r=0; $r<$rows; $r++) {
- $output .= "<tr" . smarty_function_html_table_cycle('tr', $tr_attr, $r) . ">\n";
- $rx = ($vdir == 'down') ? $r*$cols_count : ($rows-1-$r)*$cols_count;
-
- for ($c=0; $c<$cols_count; $c++) {
- $x = ($hdir == 'right') ? $rx+$c : $rx+$cols_count-1-$c;
- if ($inner!='cols') {
- /* shuffle x to loop over rows*/
- $x = floor($x/$cols_count) + ($x%$cols_count)*$rows;
- }
-
- if ($x<$loop_count) {
- $output .= "<td" . smarty_function_html_table_cycle('td', $td_attr, $c) . ">" . $loop[$x] . "</td>\n";
- } else {
- $output .= "<td" . smarty_function_html_table_cycle('td', $td_attr, $c) . ">$trailpad</td>\n";
- }
- }
- $output .= "</tr>\n";
- }
- $output .= "</tbody>\n";
- $output .= "</table>\n";
-
- return $output;
-}
-
-function smarty_function_html_table_cycle($name, $var, $no) {
- if(!is_array($var)) {
- $ret = $var;
- } else {
- $ret = $var[$no % count($var)];
- }
-
- return ($ret) ? ' '.$ret : '';
-}
-
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/function.mailto.php b/BSF/include/smarty/libs/plugins/function.mailto.php
deleted file mode 100644
index 20e9ed984..000000000
--- a/BSF/include/smarty/libs/plugins/function.mailto.php
+++ /dev/null
@@ -1,165 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty {mailto} function plugin
- *
- * Type: function<br>
- * Name: mailto<br>
- * Date: May 21, 2002
- * Purpose: automate mailto address link creation, and optionally
- * encode them.<br>
- * Input:<br>
- * - address = e-mail address
- * - text = (optional) text to display, default is address
- * - encode = (optional) can be one of:
- * * none : no encoding (default)
- * * javascript : encode with javascript
- * * javascript_charcode : encode with javascript charcode
- * * hex : encode with hexidecimal (no javascript)
- * - cc = (optional) address(es) to carbon copy
- * - bcc = (optional) address(es) to blind carbon copy
- * - subject = (optional) e-mail subject
- * - newsgroups = (optional) newsgroup(s) to post to
- * - followupto = (optional) address(es) to follow up to
- * - extra = (optional) extra tags for the href link
- *
- * Examples:
- * <pre>
- * {mailto address="me@domain.com"}
- * {mailto address="me@domain.com" encode="javascript"}
- * {mailto address="me@domain.com" encode="hex"}
- * {mailto address="me@domain.com" subject="Hello to you!"}
- * {mailto address="me@domain.com" cc="you@domain.com,they@domain.com"}
- * {mailto address="me@domain.com" extra='class="mailto"'}
- * </pre>
- * @link http://smarty.php.net/manual/en/language.function.mailto.php {mailto}
- * (Smarty online manual)
- * @version 1.2
- * @author Monte Ohrt <monte at ohrt dot com>
- * @author credits to Jason Sweat (added cc, bcc and subject functionality)
- * @param array
- * @param Smarty
- * @return string
- */
-function smarty_function_mailto($params, &$smarty)
-{
- $extra = '';
-
- if (empty($params['address'])) {
- $smarty->trigger_error("mailto: missing 'address' parameter");
- return;
- } else {
- $address = $params['address'];
- }
-
- $text = $address;
-
- // netscape and mozilla do not decode %40 (@) in BCC field (bug?)
- // so, don't encode it.
- $search = array('%40', '%2C');
- $replace = array('@', ',');
- $mail_parms = array();
- foreach ($params as $var=>$value) {
- switch ($var) {
- case 'cc':
- case 'bcc':
- case 'followupto':
- if (!empty($value))
- $mail_parms[] = $var.'='.str_replace($search,$replace,rawurlencode($value));
- break;
-
- case 'subject':
- case 'newsgroups':
- $mail_parms[] = $var.'='.rawurlencode($value);
- break;
-
- case 'extra':
- case 'text':
- $$var = $value;
-
- default:
- }
- }
-
- $mail_parm_vals = '';
- for ($i=0; $i<count($mail_parms); $i++) {
- $mail_parm_vals .= (0==$i) ? '?' : '&';
- $mail_parm_vals .= $mail_parms[$i];
- }
- $address .= $mail_parm_vals;
-
- $encode = (empty($params['encode'])) ? 'none' : $params['encode'];
- if (!in_array($encode,array('javascript','javascript_charcode','hex','none')) ) {
- $smarty->trigger_error("mailto: 'encode' parameter must be none, javascript or hex");
- return;
- }
-
- if ($encode == 'javascript' ) {
- $string = 'document.write(\'<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>\');';
-
- $js_encode = '';
- for ($x=0; $x < strlen($string); $x++) {
- $js_encode .= '%' . bin2hex($string[$x]);
- }
-
- return '<script type="text/javascript">eval(unescape(\''.$js_encode.'\'))</script>';
-
- } elseif ($encode == 'javascript_charcode' ) {
- $string = '<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>';
-
- for($x = 0, $y = strlen($string); $x < $y; $x++ ) {
- $ord[] = ord($string[$x]);
- }
-
- $_ret = "<script type=\"text/javascript\" language=\"javascript\">\n";
- $_ret .= "<!--\n";
- $_ret .= "{document.write(String.fromCharCode(";
- $_ret .= implode(',',$ord);
- $_ret .= "))";
- $_ret .= "}\n";
- $_ret .= "//-->\n";
- $_ret .= "</script>\n";
-
- return $_ret;
-
-
- } elseif ($encode == 'hex') {
-
- preg_match('!^(.*)(\?.*)$!',$address,$match);
- if(!empty($match[2])) {
- $smarty->trigger_error("mailto: hex encoding does not work with extra attributes. Try javascript.");
- return;
- }
- $address_encode = '';
- for ($x=0; $x < strlen($address); $x++) {
- if(preg_match('!\w!',$address[$x])) {
- $address_encode .= '%' . bin2hex($address[$x]);
- } else {
- $address_encode .= $address[$x];
- }
- }
- $text_encode = '';
- for ($x=0; $x < strlen($text); $x++) {
- $text_encode .= '&#x' . bin2hex($text[$x]).';';
- }
-
- $mailto = "&#109;&#97;&#105;&#108;&#116;&#111;&#58;";
- return '<a href="'.$mailto.$address_encode.'" '.$extra.'>'.$text_encode.'</a>';
-
- } else {
- // no encoding
- return '<a href="mailto:'.$address.'" '.$extra.'>'.$text.'</a>';
-
- }
-
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/function.math.php b/BSF/include/smarty/libs/plugins/function.math.php
deleted file mode 100644
index 71672fea4..000000000
--- a/BSF/include/smarty/libs/plugins/function.math.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty {math} function plugin
- *
- * Type: function<br>
- * Name: math<br>
- * Purpose: handle math computations in template<br>
- * @link http://smarty.php.net/manual/en/language.function.math.php {math}
- * (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param array
- * @param Smarty
- * @return string
- */
-function smarty_function_math($params, &$smarty)
-{
- // be sure equation parameter is present
- if (empty($params['equation'])) {
- $smarty->trigger_error("math: missing equation parameter");
- return;
- }
-
- $equation = $params['equation'];
-
- // make sure parenthesis are balanced
- if (substr_count($equation,"(") != substr_count($equation,")")) {
- $smarty->trigger_error("math: unbalanced parenthesis");
- return;
- }
-
- // match all vars in equation, make sure all are passed
- preg_match_all("!(?:0x[a-fA-F0-9]+)|([a-zA-Z][a-zA-Z0-9_]+)!",$equation, $match);
- $allowed_funcs = array('int','abs','ceil','cos','exp','floor','log','log10',
- 'max','min','pi','pow','rand','round','sin','sqrt','srand','tan');
-
- foreach($match[1] as $curr_var) {
- if ($curr_var && !in_array($curr_var, array_keys($params)) && !in_array($curr_var, $allowed_funcs)) {
- $smarty->trigger_error("math: function call $curr_var not allowed");
- return;
- }
- }
-
- foreach($params as $key => $val) {
- if ($key != "equation" && $key != "format" && $key != "assign") {
- // make sure value is not empty
- if (strlen($val)==0) {
- $smarty->trigger_error("math: parameter $key is empty");
- return;
- }
- if (!is_numeric($val)) {
- $smarty->trigger_error("math: parameter $key: is not numeric");
- return;
- }
- $equation = preg_replace("/\b$key\b/", " \$params['$key'] ", $equation);
- }
- }
-
- eval("\$smarty_math_result = ".$equation.";");
-
- if (empty($params['format'])) {
- if (empty($params['assign'])) {
- return $smarty_math_result;
- } else {
- $smarty->assign($params['assign'],$smarty_math_result);
- }
- } else {
- if (empty($params['assign'])){
- printf($params['format'],$smarty_math_result);
- } else {
- $smarty->assign($params['assign'],sprintf($params['format'],$smarty_math_result));
- }
- }
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/function.popup.php b/BSF/include/smarty/libs/plugins/function.popup.php
deleted file mode 100644
index 3a76b785a..000000000
--- a/BSF/include/smarty/libs/plugins/function.popup.php
+++ /dev/null
@@ -1,119 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty {popup} function plugin
- *
- * Type: function<br>
- * Name: popup<br>
- * Purpose: make text pop up in windows via overlib
- * @link http://smarty.php.net/manual/en/language.function.popup.php {popup}
- * (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param array
- * @param Smarty
- * @return string
- */
-function smarty_function_popup($params, &$smarty)
-{
- $append = '';
- foreach ($params as $_key=>$_value) {
- switch ($_key) {
- case 'text':
- case 'trigger':
- case 'function':
- case 'inarray':
- $$_key = (string)$_value;
- if ($_key == 'function' || $_key == 'inarray')
- $append .= ',' . strtoupper($_key) . ",'$_value'";
- break;
-
- case 'caption':
- case 'closetext':
- case 'status':
- $append .= ',' . strtoupper($_key) . ",'" . str_replace("'","\'",$_value) . "'";
- break;
-
- case 'fgcolor':
- case 'bgcolor':
- case 'textcolor':
- case 'capcolor':
- case 'closecolor':
- case 'textfont':
- case 'captionfont':
- case 'closefont':
- case 'fgbackground':
- case 'bgbackground':
- case 'caparray':
- case 'capicon':
- case 'background':
- case 'frame':
- $append .= ',' . strtoupper($_key) . ",'$_value'";
- break;
-
- case 'textsize':
- case 'captionsize':
- case 'closesize':
- case 'width':
- case 'height':
- case 'border':
- case 'offsetx':
- case 'offsety':
- case 'snapx':
- case 'snapy':
- case 'fixx':
- case 'fixy':
- case 'padx':
- case 'pady':
- case 'timeout':
- case 'delay':
- $append .= ',' . strtoupper($_key) . ",$_value";
- break;
-
- case 'sticky':
- case 'left':
- case 'right':
- case 'center':
- case 'above':
- case 'below':
- case 'noclose':
- case 'autostatus':
- case 'autostatuscap':
- case 'fullhtml':
- case 'hauto':
- case 'vauto':
- case 'mouseoff':
- case 'followmouse':
- case 'closeclick':
- if ($_value) $append .= ',' . strtoupper($_key);
- break;
-
- default:
- $smarty->trigger_error("[popup] unknown parameter $_key", E_USER_WARNING);
- }
- }
-
- if (empty($text) && !isset($inarray) && empty($function)) {
- $smarty->trigger_error("overlib: attribute 'text' or 'inarray' or 'function' required");
- return false;
- }
-
- if (empty($trigger)) { $trigger = "onmouseover"; }
-
- $retval = $trigger . '="return overlib(\''.preg_replace(array("!'!","![\r\n]!"),array("\'",'\r'),$text).'\'';
- $retval .= $append . ');"';
- if ($trigger == 'onmouseover')
- $retval .= ' onmouseout="nd();"';
-
-
- return $retval;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/function.popup_init.php b/BSF/include/smarty/libs/plugins/function.popup_init.php
deleted file mode 100644
index 93cb45450..000000000
--- a/BSF/include/smarty/libs/plugins/function.popup_init.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty {popup_init} function plugin
- *
- * Type: function<br>
- * Name: popup_init<br>
- * Purpose: initialize overlib
- * @link http://smarty.php.net/manual/en/language.function.popup.init.php {popup_init}
- * (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param array
- * @param Smarty
- * @return string
- */
-function smarty_function_popup_init($params, &$smarty)
-{
- $zindex = 1000;
-
- if (!empty($params['zindex'])) {
- $zindex = $params['zindex'];
- }
-
- if (!empty($params['src'])) {
- return '<div id="overDiv" style="position:absolute; visibility:hidden; z-index:'.$zindex.';"></div>' . "\n"
- . '<script type="text/javascript" language="JavaScript" src="'.$params['src'].'"></script>' . "\n";
- } else {
- $smarty->trigger_error("popup_init: missing src parameter");
- }
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.capitalize.php b/BSF/include/smarty/libs/plugins/modifier.capitalize.php
deleted file mode 100644
index 4a611d9f0..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.capitalize.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty capitalize modifier plugin
- *
- * Type: modifier<br>
- * Name: capitalize<br>
- * Purpose: capitalize words in the string
- * @link http://smarty.php.net/manual/en/language.modifiers.php#LANGUAGE.MODIFIER.CAPITALIZE
- * capitalize (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @return string
- */
-function smarty_modifier_capitalize($string, $uc_digits = false)
-{
- smarty_modifier_capitalize_ucfirst(null, $uc_digits);
- return preg_replace_callback('!\'?\b\w(\w|\')*\b!', 'smarty_modifier_capitalize_ucfirst', $string);
-}
-
-function smarty_modifier_capitalize_ucfirst($string, $uc_digits = null)
-{
- static $_uc_digits = false;
-
- if(isset($uc_digits)) {
- $_uc_digits = $uc_digits;
- return;
- }
-
- if(substr($string[0],0,1) != "'" && !preg_match("!\d!",$string[0]) || $_uc_digits)
- return ucfirst($string[0]);
- else
- return $string[0];
-}
-
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.cat.php b/BSF/include/smarty/libs/plugins/modifier.cat.php
deleted file mode 100644
index 2e37940d4..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.cat.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty cat modifier plugin
- *
- * Type: modifier<br>
- * Name: cat<br>
- * Date: Feb 24, 2003
- * Purpose: catenate a value to a variable
- * Input: string to catenate
- * Example: {$var|cat:"foo"}
- * @link http://smarty.php.net/manual/en/language.modifier.cat.php cat
- * (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @version 1.0
- * @param string
- * @param string
- * @return string
- */
-function smarty_modifier_cat($string, $cat)
-{
- return $string . $cat;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.count_characters.php b/BSF/include/smarty/libs/plugins/modifier.count_characters.php
deleted file mode 100644
index 5ed9a87cd..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.count_characters.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty count_characters modifier plugin
- *
- * Type: modifier<br>
- * Name: count_characteres<br>
- * Purpose: count the number of characters in a text
- * @link http://smarty.php.net/manual/en/language.modifier.count.characters.php
- * count_characters (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @param boolean include whitespace in the character count
- * @return integer
- */
-function smarty_modifier_count_characters($string, $include_spaces = false)
-{
- if ($include_spaces)
- return(strlen($string));
-
- return preg_match_all("/[^\s]/",$string, $match);
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.count_paragraphs.php b/BSF/include/smarty/libs/plugins/modifier.count_paragraphs.php
deleted file mode 100644
index e0e274da7..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.count_paragraphs.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty count_paragraphs modifier plugin
- *
- * Type: modifier<br>
- * Name: count_paragraphs<br>
- * Purpose: count the number of paragraphs in a text
- * @link http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php
- * count_paragraphs (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @return integer
- */
-function smarty_modifier_count_paragraphs($string)
-{
- // count \r or \n characters
- return count(preg_split('/[\r\n]+/', $string));
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.count_sentences.php b/BSF/include/smarty/libs/plugins/modifier.count_sentences.php
deleted file mode 100644
index f66ea1703..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.count_sentences.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty count_sentences modifier plugin
- *
- * Type: modifier<br>
- * Name: count_sentences
- * Purpose: count the number of sentences in a text
- * @link http://smarty.php.net/manual/en/language.modifier.count.paragraphs.php
- * count_sentences (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @return integer
- */
-function smarty_modifier_count_sentences($string)
-{
- // find periods with a word before but not after.
- return preg_match_all('/[^\s]\.(?!\w)/', $string, $match);
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.count_words.php b/BSF/include/smarty/libs/plugins/modifier.count_words.php
deleted file mode 100644
index 9d339f542..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.count_words.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty count_words modifier plugin
- *
- * Type: modifier<br>
- * Name: count_words<br>
- * Purpose: count the number of words in a text
- * @link http://smarty.php.net/manual/en/language.modifier.count.words.php
- * count_words (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @return integer
- */
-function smarty_modifier_count_words($string)
-{
- // split text by ' ',\r,\n,\f,\t
- $split_array = preg_split('/\s+/',$string);
- // count matches that contain alphanumerics
- $word_count = preg_grep('/[a-zA-Z0-9\\x80-\\xff]/', $split_array);
-
- return count($word_count);
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.date_format.php b/BSF/include/smarty/libs/plugins/modifier.date_format.php
deleted file mode 100644
index 8cf7d5e14..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.date_format.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Include the {@link shared.make_timestamp.php} plugin
- */
-require_once $smarty->_get_plugin_filepath('shared', 'make_timestamp');
-/**
- * Smarty date_format modifier plugin
- *
- * Type: modifier<br>
- * Name: date_format<br>
- * Purpose: format datestamps via strftime<br>
- * Input:<br>
- * - string: input date string
- * - format: strftime format for output
- * - default_date: default date if $string is empty
- * @link http://smarty.php.net/manual/en/language.modifier.date.format.php
- * date_format (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @param string
- * @param string
- * @return string|void
- * @uses smarty_make_timestamp()
- */
-function smarty_modifier_date_format($string, $format = '%b %e, %Y', $default_date = '')
-{
- if ($string != '') {
- $timestamp = smarty_make_timestamp($string);
- } elseif ($default_date != '') {
- $timestamp = smarty_make_timestamp($default_date);
- } else {
- return;
- }
- if (DIRECTORY_SEPARATOR == '\\') {
- $_win_from = array('%D', '%h', '%n', '%r', '%R', '%t', '%T');
- $_win_to = array('%m/%d/%y', '%b', "\n", '%I:%M:%S %p', '%H:%M', "\t", '%H:%M:%S');
- if (strpos($format, '%e') !== false) {
- $_win_from[] = '%e';
- $_win_to[] = sprintf('%\' 2d', date('j', $timestamp));
- }
- if (strpos($format, '%l') !== false) {
- $_win_from[] = '%l';
- $_win_to[] = sprintf('%\' 2d', date('h', $timestamp));
- }
- $format = str_replace($_win_from, $_win_to, $format);
- }
- return strftime($format, $timestamp);
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.debug_print_var.php b/BSF/include/smarty/libs/plugins/modifier.debug_print_var.php
deleted file mode 100644
index e4f7bc0cc..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.debug_print_var.php
+++ /dev/null
@@ -1,90 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty debug_print_var modifier plugin
- *
- * Type: modifier<br>
- * Name: debug_print_var<br>
- * Purpose: formats variable contents for display in the console
- * @link http://smarty.php.net/manual/en/language.modifier.debug.print.var.php
- * debug_print_var (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param array|object
- * @param integer
- * @param integer
- * @return string
- */
-function smarty_modifier_debug_print_var($var, $depth = 0, $length = 40)
-{
- $_replace = array(
- "\n" => '<i>\n</i>',
- "\r" => '<i>\r</i>',
- "\t" => '<i>\t</i>'
- );
-
- switch (gettype($var)) {
- case 'array' :
- $results = '<b>Array (' . count($var) . ')</b>';
- foreach ($var as $curr_key => $curr_val) {
- $results .= '<br>' . str_repeat('&nbsp;', $depth * 2)
- . '<b>' . strtr($curr_key, $_replace) . '</b> =&gt; '
- . smarty_modifier_debug_print_var($curr_val, ++$depth, $length);
- $depth--;
- }
- break;
- case 'object' :
- $object_vars = get_object_vars($var);
- $results = '<b>' . get_class($var) . ' Object (' . count($object_vars) . ')</b>';
- foreach ($object_vars as $curr_key => $curr_val) {
- $results .= '<br>' . str_repeat('&nbsp;', $depth * 2)
- . '<b> -&gt;' . strtr($curr_key, $_replace) . '</b> = '
- . smarty_modifier_debug_print_var($curr_val, ++$depth, $length);
- $depth--;
- }
- break;
- case 'boolean' :
- case 'NULL' :
- case 'resource' :
- if (true === $var) {
- $results = 'true';
- } elseif (false === $var) {
- $results = 'false';
- } elseif (null === $var) {
- $results = 'null';
- } else {
- $results = htmlspecialchars((string) $var);
- }
- $results = '<i>' . $results . '</i>';
- break;
- case 'integer' :
- case 'float' :
- $results = htmlspecialchars((string) $var);
- break;
- case 'string' :
- $results = strtr($var, $_replace);
- if (strlen($var) > $length ) {
- $results = substr($var, 0, $length - 3) . '...';
- }
- $results = htmlspecialchars('"' . $results . '"');
- break;
- case 'unknown type' :
- default :
- $results = strtr((string) $var, $_replace);
- if (strlen($results) > $length ) {
- $results = substr($results, 0, $length - 3) . '...';
- }
- $results = htmlspecialchars($results);
- }
-
- return $results;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.default.php b/BSF/include/smarty/libs/plugins/modifier.default.php
deleted file mode 100644
index 70011fd6b..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.default.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty default modifier plugin
- *
- * Type: modifier<br>
- * Name: default<br>
- * Purpose: designate default value for empty variables
- * @link http://smarty.php.net/manual/en/language.modifier.default.php
- * default (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @param string
- * @return string
- */
-function smarty_modifier_default($string, $default = '')
-{
- if (!isset($string) || $string === '')
- return $default;
- else
- return $string;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.escape.php b/BSF/include/smarty/libs/plugins/modifier.escape.php
deleted file mode 100644
index a2f52b232..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.escape.php
+++ /dev/null
@@ -1,93 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty escape modifier plugin
- *
- * Type: modifier<br>
- * Name: escape<br>
- * Purpose: Escape the string according to escapement type
- * @link http://smarty.php.net/manual/en/language.modifier.escape.php
- * escape (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @param html|htmlall|url|quotes|hex|hexentity|javascript
- * @return string
- */
-function smarty_modifier_escape($string, $esc_type = 'html', $char_set = 'ISO-8859-1')
-{
- switch ($esc_type) {
- case 'html':
- return htmlspecialchars($string, ENT_QUOTES, $char_set);
-
- case 'htmlall':
- return htmlentities($string, ENT_QUOTES, $char_set);
-
- case 'url':
- return rawurlencode($string);
-
- case 'urlpathinfo':
- return str_replace('%2F','/',rawurlencode($string));
-
- case 'quotes':
- // escape unescaped single quotes
- return preg_replace("%(?<!\\\\)'%", "\\'", $string);
-
- case 'hex':
- // escape every character into hex
- $return = '';
- for ($x=0; $x < strlen($string); $x++) {
- $return .= '%' . bin2hex($string[$x]);
- }
- return $return;
-
- case 'hexentity':
- $return = '';
- for ($x=0; $x < strlen($string); $x++) {
- $return .= '&#x' . bin2hex($string[$x]) . ';';
- }
- return $return;
-
- case 'decentity':
- $return = '';
- for ($x=0; $x < strlen($string); $x++) {
- $return .= '&#' . ord($string[$x]) . ';';
- }
- return $return;
-
- case 'javascript':
- // escape quotes and backslashes, newlines, etc.
- return strtr($string, array('\\'=>'\\\\',"'"=>"\\'",'"'=>'\\"',"\r"=>'\\r',"\n"=>'\\n','</'=>'<\/'));
-
- case 'mail':
- // safe way to display e-mail address on a web page
- return str_replace(array('@', '.'),array(' [AT] ', ' [DOT] '), $string);
-
- case 'nonstd':
- // escape non-standard chars, such as ms document quotes
- $_res = '';
- for($_i = 0, $_len = strlen($string); $_i < $_len; $_i++) {
- $_ord = ord(substr($string, $_i, 1));
- // non-standard char, escape it
- if($_ord >= 126){
- $_res .= '&#' . $_ord . ';';
- }
- else {
- $_res .= substr($string, $_i, 1);
- }
- }
- return $_res;
-
- default:
- return $string;
- }
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.indent.php b/BSF/include/smarty/libs/plugins/modifier.indent.php
deleted file mode 100644
index 394147a29..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.indent.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty indent modifier plugin
- *
- * Type: modifier<br>
- * Name: indent<br>
- * Purpose: indent lines of text
- * @link http://smarty.php.net/manual/en/language.modifier.indent.php
- * indent (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @param integer
- * @param string
- * @return string
- */
-function smarty_modifier_indent($string,$chars=4,$char=" ")
-{
- return preg_replace('!^!m',str_repeat($char,$chars),$string);
-}
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.lower.php b/BSF/include/smarty/libs/plugins/modifier.lower.php
deleted file mode 100644
index 20e7a8d39..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.lower.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty lower modifier plugin
- *
- * Type: modifier<br>
- * Name: lower<br>
- * Purpose: convert string to lowercase
- * @link http://smarty.php.net/manual/en/language.modifier.lower.php
- * lower (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @return string
- */
-function smarty_modifier_lower($string)
-{
- return strtolower($string);
-}
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.nl2br.php b/BSF/include/smarty/libs/plugins/modifier.nl2br.php
deleted file mode 100644
index d6fabff64..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.nl2br.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty plugin
- *
- * Type: modifier<br>
- * Name: nl2br<br>
- * Date: Feb 26, 2003
- * Purpose: convert \r\n, \r or \n to <<br>>
- * Input:<br>
- * - contents = contents to replace
- * - preceed_test = if true, includes preceeding break tags
- * in replacement
- * Example: {$text|nl2br}
- * @link http://smarty.php.net/manual/en/language.modifier.nl2br.php
- * nl2br (Smarty online manual)
- * @version 1.0
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @return string
- */
-function smarty_modifier_nl2br($string)
-{
- return nl2br($string);
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.regex_replace.php b/BSF/include/smarty/libs/plugins/modifier.regex_replace.php
deleted file mode 100644
index d1f1545d8..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.regex_replace.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty regex_replace modifier plugin
- *
- * Type: modifier<br>
- * Name: regex_replace<br>
- * Purpose: regular expression search/replace
- * @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php
- * regex_replace (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @param string|array
- * @param string|array
- * @return string
- */
-function smarty_modifier_regex_replace($string, $search, $replace)
-{
- if (($pos = strpos($search,"\0")) !== false)
- $search = substr($search,0,$pos);
- if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
- /* remove eval-modifier from $search */
- $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]);
- }
-
- return preg_replace($search, $replace, $string);
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.replace.php b/BSF/include/smarty/libs/plugins/modifier.replace.php
deleted file mode 100644
index df041c884..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.replace.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty replace modifier plugin
- *
- * Type: modifier<br>
- * Name: replace<br>
- * Purpose: simple search/replace
- * @link http://smarty.php.net/manual/en/language.modifier.replace.php
- * replace (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @param string
- * @param string
- * @return string
- */
-function smarty_modifier_replace($string, $search, $replace)
-{
- return str_replace($search, $replace, $string);
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.spacify.php b/BSF/include/smarty/libs/plugins/modifier.spacify.php
deleted file mode 100644
index c2423f4f2..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.spacify.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty spacify modifier plugin
- *
- * Type: modifier<br>
- * Name: spacify<br>
- * Purpose: add spaces between characters in a string
- * @link http://smarty.php.net/manual/en/language.modifier.spacify.php
- * spacify (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @param string
- * @return string
- */
-function smarty_modifier_spacify($string, $spacify_char = ' ')
-{
- return implode($spacify_char,
- preg_split('//', $string, -1, PREG_SPLIT_NO_EMPTY));
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.string_format.php b/BSF/include/smarty/libs/plugins/modifier.string_format.php
deleted file mode 100644
index 9e051a578..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.string_format.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty string_format modifier plugin
- *
- * Type: modifier<br>
- * Name: string_format<br>
- * Purpose: format strings via sprintf
- * @link http://smarty.php.net/manual/en/language.modifier.string.format.php
- * string_format (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @param string
- * @return string
- */
-function smarty_modifier_string_format($string, $format)
-{
- return sprintf($format, $string);
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.strip.php b/BSF/include/smarty/libs/plugins/modifier.strip.php
deleted file mode 100644
index cc5c453c8..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.strip.php
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty strip modifier plugin
- *
- * Type: modifier<br>
- * Name: strip<br>
- * Purpose: Replace all repeated spaces, newlines, tabs
- * with a single space or supplied replacement string.<br>
- * Example: {$var|strip} {$var|strip:"&nbsp;"}
- * Date: September 25th, 2002
- * @link http://smarty.php.net/manual/en/language.modifier.strip.php
- * strip (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @version 1.0
- * @param string
- * @param string
- * @return string
- */
-function smarty_modifier_strip($text, $replace = ' ')
-{
- return preg_replace('!\s+!', $replace, $text);
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.strip_tags.php b/BSF/include/smarty/libs/plugins/modifier.strip_tags.php
deleted file mode 100644
index 93011a892..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.strip_tags.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty strip_tags modifier plugin
- *
- * Type: modifier<br>
- * Name: strip_tags<br>
- * Purpose: strip html tags from text
- * @link http://smarty.php.net/manual/en/language.modifier.strip.tags.php
- * strip_tags (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @param boolean
- * @return string
- */
-function smarty_modifier_strip_tags($string, $replace_with_space = true)
-{
- if ($replace_with_space)
- return preg_replace('!<[^>]*?>!', ' ', $string);
- else
- return strip_tags($string);
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.truncate.php b/BSF/include/smarty/libs/plugins/modifier.truncate.php
deleted file mode 100644
index 35c89690a..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.truncate.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty truncate modifier plugin
- *
- * Type: modifier<br>
- * Name: truncate<br>
- * Purpose: Truncate a string to a certain length if necessary,
- * optionally splitting in the middle of a word, and
- * appending the $etc string or inserting $etc into the middle.
- * @link http://smarty.php.net/manual/en/language.modifier.truncate.php
- * truncate (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @param integer
- * @param string
- * @param boolean
- * @param boolean
- * @return string
- */
-function smarty_modifier_truncate($string, $length = 80, $etc = '...',
- $break_words = false, $middle = false)
-{
- if ($length == 0)
- return '';
-
- if (strlen($string) > $length) {
- $length -= min($length, strlen($etc));
- if (!$break_words && !$middle) {
- $string = preg_replace('/\s+?(\S+)?$/', '', substr($string, 0, $length+1));
- }
- if(!$middle) {
- return substr($string, 0, $length) . $etc;
- } else {
- return substr($string, 0, $length/2) . $etc . substr($string, -$length/2);
- }
- } else {
- return $string;
- }
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.upper.php b/BSF/include/smarty/libs/plugins/modifier.upper.php
deleted file mode 100644
index c12480fbd..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.upper.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty upper modifier plugin
- *
- * Type: modifier<br>
- * Name: upper<br>
- * Purpose: convert string to uppercase
- * @link http://smarty.php.net/manual/en/language.modifier.upper.php
- * upper (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @return string
- */
-function smarty_modifier_upper($string)
-{
- return strtoupper($string);
-}
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/modifier.wordwrap.php b/BSF/include/smarty/libs/plugins/modifier.wordwrap.php
deleted file mode 100644
index ce0718156..000000000
--- a/BSF/include/smarty/libs/plugins/modifier.wordwrap.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty wordwrap modifier plugin
- *
- * Type: modifier<br>
- * Name: wordwrap<br>
- * Purpose: wrap a string of text at a given length
- * @link http://smarty.php.net/manual/en/language.modifier.wordwrap.php
- * wordwrap (Smarty online manual)
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @param integer
- * @param string
- * @param boolean
- * @return string
- */
-function smarty_modifier_wordwrap($string,$length=80,$break="\n",$cut=false)
-{
- return wordwrap($string,$length,$break,$cut);
-}
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/outputfilter.trimwhitespace.php b/BSF/include/smarty/libs/plugins/outputfilter.trimwhitespace.php
deleted file mode 100644
index 97b0d21e8..000000000
--- a/BSF/include/smarty/libs/plugins/outputfilter.trimwhitespace.php
+++ /dev/null
@@ -1,75 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-/**
- * Smarty trimwhitespace outputfilter plugin
- *
- * File: outputfilter.trimwhitespace.php<br>
- * Type: outputfilter<br>
- * Name: trimwhitespace<br>
- * Date: Jan 25, 2003<br>
- * Purpose: trim leading white space and blank lines from
- * template source after it gets interpreted, cleaning
- * up code and saving bandwidth. Does not affect
- * <<PRE>></PRE> and <SCRIPT></SCRIPT> blocks.<br>
- * Install: Drop into the plugin directory, call
- * <code>$smarty->load_filter('output','trimwhitespace');</code>
- * from application.
- * @author Monte Ohrt <monte at ohrt dot com>
- * @author Contributions from Lars Noschinski <lars@usenet.noschinski.de>
- * @version 1.3
- * @param string
- * @param Smarty
- */
-function smarty_outputfilter_trimwhitespace($source, &$smarty)
-{
- // Pull out the script blocks
- preg_match_all("!<script[^>]+>.*?</script>!is", $source, $match);
- $_script_blocks = $match[0];
- $source = preg_replace("!<script[^>]+>.*?</script>!is",
- '@@@SMARTY:TRIM:SCRIPT@@@', $source);
-
- // Pull out the pre blocks
- preg_match_all("!<pre>.*?</pre>!is", $source, $match);
- $_pre_blocks = $match[0];
- $source = preg_replace("!<pre>.*?</pre>!is",
- '@@@SMARTY:TRIM:PRE@@@', $source);
-
- // Pull out the textarea blocks
- preg_match_all("!<textarea[^>]+>.*?</textarea>!is", $source, $match);
- $_textarea_blocks = $match[0];
- $source = preg_replace("!<textarea[^>]+>.*?</textarea>!is",
- '@@@SMARTY:TRIM:TEXTAREA@@@', $source);
-
- // remove all leading spaces, tabs and carriage returns NOT
- // preceeded by a php close tag.
- $source = trim(preg_replace('/((?<!\?>)\n)[\s]+/m', '\1', $source));
-
- // replace textarea blocks
- smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:TEXTAREA@@@",$_textarea_blocks, $source);
-
- // replace pre blocks
- smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:PRE@@@",$_pre_blocks, $source);
-
- // replace script blocks
- smarty_outputfilter_trimwhitespace_replace("@@@SMARTY:TRIM:SCRIPT@@@",$_script_blocks, $source);
-
- return $source;
-}
-
-function smarty_outputfilter_trimwhitespace_replace($search_str, $replace, &$subject) {
- $_len = strlen($search_str);
- $_pos = 0;
- for ($_i=0, $_count=count($replace); $_i<$_count; $_i++)
- if (($_pos=strpos($subject, $search_str, $_pos))!==false)
- $subject = substr_replace($subject, $replace[$_i], $_pos, $_len);
- else
- break;
-
-}
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/shared.escape_special_chars.php b/BSF/include/smarty/libs/plugins/shared.escape_special_chars.php
deleted file mode 100644
index c07ce31be..000000000
--- a/BSF/include/smarty/libs/plugins/shared.escape_special_chars.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-/**
- * Smarty shared plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * escape_special_chars common function
- *
- * Function: smarty_function_escape_special_chars<br>
- * Purpose: used by other smarty functions to escape
- * special chars except for already escaped ones
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @return string
- */
-function smarty_function_escape_special_chars($string)
-{
- if(!is_array($string)) {
- $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
- $string = htmlspecialchars($string);
- $string = str_replace(array('%%%SMARTY_START%%%','%%%SMARTY_END%%%'), array('&',';'), $string);
- }
- return $string;
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/smarty/libs/plugins/shared.make_timestamp.php b/BSF/include/smarty/libs/plugins/shared.make_timestamp.php
deleted file mode 100644
index b42eb11d8..000000000
--- a/BSF/include/smarty/libs/plugins/shared.make_timestamp.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-/**
- * Smarty shared plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Function: smarty_make_timestamp<br>
- * Purpose: used by other smarty functions to make a timestamp
- * from a string.
- * @author Monte Ohrt <monte at ohrt dot com>
- * @param string
- * @return string
- */
-function smarty_make_timestamp($string)
-{
- if(empty($string)) {
- // use "now":
- $time = time();
-
- } elseif (preg_match('/^\d{14}$/', $string)) {
- // it is mysql timestamp format of YYYYMMDDHHMMSS?
- $time = mktime(substr($string, 8, 2),substr($string, 10, 2),substr($string, 12, 2),
- substr($string, 4, 2),substr($string, 6, 2),substr($string, 0, 4));
-
- } elseif (is_numeric($string)) {
- // it is a numeric string, we handle it as timestamp
- $time = (int)$string;
-
- } else {
- // strtotime should handle it
- $time = strtotime($string);
- if ($time == -1 || $time === false) {
- // strtotime() was not able to parse $string, use "now":
- $time = time();
- }
- }
- return $time;
-
-}
-
-/* vim: set expandtab: */
-
-?>
diff --git a/BSF/include/template.class.php b/BSF/include/template.class.php
deleted file mode 100644
index 1fd3c94ac..000000000
--- a/BSF/include/template.class.php
+++ /dev/null
@@ -1,385 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-
-require_once 'smarty/libs/Smarty.class.php';
-
-// migrate lang:XXX
-// sed "s/{lang:\([^}]\+\)}/{\'\1\'|@translate}/g" my_template.tpl
-// migrate change root level vars {XXX}
-// sed "s/{pwg_root}/{ROOT_URL}/g" my_template.tpl
-// migrate change root level vars {XXX}
-// sed "s/{\([a-zA-Z_]\+\)}/{$\1}/g" my_template.tpl
-// migrate all
-// cat my_template.tpl | sed "s/{lang:\([^}]\+\)}/{\'\1\'|@translate}/g" | sed "s/{pwg_root}/{ROOT_URL}/g" | sed "s/{\([a-zA-Z_]\+\)}/{$\1}/g"
-
-
-class Template {
-
- var $smarty;
-
- var $output = '';
-
- // Hash of filenames for each template handle.
- var $files = array();
-
- // used by html_head smarty block to add content before </head>
- var $html_head_elements = array();
-
- function Template($root = ".", $theme= "")
- {
- global $conf;
-
- $this->smarty = new Smarty;
- $this->smarty->debugging = $conf['debug_template'];
-
- if ( isset($conf['compiled_template_dir'] ) )
- {
- $compile_dir = $conf['compiled_template_dir'];
- }
- else
- {
- $compile_dir = $conf['local_data_dir'];
- if ( !is_dir($compile_dir) )
- {
- mkdir( $compile_dir, 0777);
- file_put_contents($compile_dir.'/index.htm', '');
- }
- $compile_dir .= '/templates_c';
- }
- if ( !is_dir($compile_dir) )
- {
- mkdir( $compile_dir, 0777 );
- file_put_contents($compile_dir.'/index.htm', '');
- }
-
- $this->smarty->compile_dir = $compile_dir;
-
- $this->smarty->assign_by_ref( 'pwg', new PwgTemplateAdapter() );
- $this->smarty->register_modifier( 'translate', array('Template', 'mod_translate') );
- $this->smarty->register_modifier( 'explode', array('Template', 'mod_explode') );
- $this->smarty->register_block('html_head', array(&$this, 'block_html_head') );
- if ( $conf['compiled_template_cache_language'] )
- {
- $this->smarty->register_prefilter( array(&$this, 'prefilter_language') );
- }
-
- if ( !empty($theme) )
- {
- include($root.'/theme/'.$theme.'/themeconf.inc.php');
- $this->smarty->assign('themeconf', $themeconf);
- }
-
- $this->set_template_dir($root);
- }
-
- /**
- * Sets the template root directory for this Template object.
- */
- function set_template_dir($dir)
- {
- $this->smarty->template_dir = $dir;
-
- $real_dir = realpath($dir);
- $compile_id = crc32( $real_dir===false ? $dir : $real_dir);
- $this->smarty->compile_id = base_convert($compile_id, 10, 36 );
- }
-
- /**
- * Gets the template root directory for this Template object.
- */
- function get_template_dir()
- {
- return $this->smarty->template_dir;
- }
-
- /**
- * Deletes all compiled templates.
- */
- function delete_compiled_templates()
- {
- $save_compile_id = $this->smarty->compile_id;
- $this->smarty->compile_id = null;
- $this->smarty->clear_compiled_tpl();
- $this->smarty->compile_id = $save_compile_id;
- file_put_contents($this->smarty->compile_dir.'/index.htm', '');
- }
-
- function get_themeconf($val)
- {
- $tc = $this->smarty->get_template_vars('themeconf');
- return isset($tc[$val]) ? $tc[$val] : '';
- }
-
- /**
- * Sets the template filename for handle.
- */
- function set_filename($handle, $filename)
- {
- return $this->set_filenames( array($handle=>$filename) );
- }
-
- /**
- * Sets the template filenames for handles. $filename_array should be a
- * hash of handle => filename pairs.
- */
- function set_filenames($filename_array)
- {
- if (!is_array($filename_array))
- {
- return false;
- }
-
- reset($filename_array);
- while(list($handle, $filename) = each($filename_array))
- {
- if (is_null($filename))
- unset( $this->files[$handle] );
- else
- $this->files[$handle] = $filename;
- }
- return true;
- }
-
- /** see smarty assign http://www.smarty.net/manual/en/api.assign.php */
- function assign($tpl_var, $value = null)
- {
- $this->smarty->assign( $tpl_var, $value );
- }
-
- /**
- * Inserts the uncompiled code for $handle as the value of $varname in the
- * root-level. This can be used to effectively include a template in the
- * middle of another template.
- * This is equivalent to assign($varname, $this->parse($handle, true))
- */
- function assign_var_from_handle($varname, $handle)
- {
- $this->assign($varname, $this->parse($handle, true));
- return true;
- }
-
- /** see smarty append http://www.smarty.net/manual/en/api.append.php */
- function append($tpl_var, $value=null, $merge=false)
- {
- $this->smarty->append( $tpl_var, $value, $merge );
- }
-
- /**
- * Root-level variable concatenation. Appends a string to an existing
- * variable assignment with the same name.
- */
- function concat($tpl_var, $value)
- {
- $old_val = & $this->smarty->get_template_vars($tpl_var);
- if ( isset($old_val) )
- {
- $old_val .= $value;
- }
- else
- {
- $this->assign($tpl_var, $value);
- }
- }
-
- /** see smarty append http://www.smarty.net/manual/en/api.clear_assign.php */
- function clear_assign($tpl_var)
- {
- $this->smarty->clear_assign( $tpl_var );
- }
-
- /** see smarty get_template_vars http://www.smarty.net/manual/en/api.get_template_vars.php */
- function &get_template_vars($name=null)
- {
- return $this->smarty->get_template_vars( $name );
- }
-
-
- /**
- * Load the file for the handle, eventually compile the file and run the compiled
- * code. This will add the output to the results or return the result if $return
- * is true.
- */
- function parse($handle, $return=false)
- {
- if ( !isset($this->files[$handle]) )
- {
- die("Template->parse(): Couldn't load template file for handle $handle");
- }
-
- $this->smarty->assign( 'ROOT_URL', get_root_url() );
- $this->smarty->assign( 'TAG_INPUT_ENABLED',
- ((is_adviser()) ? 'disabled="disabled" onclick="return false;"' : ''));
-
- global $conf, $lang_info;
- if ( $conf['compiled_template_cache_language'] and isset($lang_info['code']) )
- {
- $save_compile_id = $this->smarty->compile_id;
- $this->smarty->compile_id .= '.'.$lang_info['code'];
- }
-
- $v = $this->smarty->fetch($this->files[$handle], null, null, false);
-
- if (isset ($save_compile_id) )
- {
- $this->smarty->compile_id = $save_compile_id;
- }
-
- if ($return)
- {
- return $v;
- }
- $this->output .= $v;
- }
-
- /**
- * Load the file for the handle, eventually compile the file and run the compiled
- * code. This will print out the results of executing the template.
- */
- function pparse($handle)
- {
- $this->parse($handle, false);
- $this->flush();
- }
-
- function flush()
- {
- if ( count($this->html_head_elements) )
- {
- $search = "\n</head>";
- $pos = strpos( $this->output, $search );
- if ($pos !== false)
- {
- $this->output = substr_replace( $this->output, "\n".implode( "\n", $this->html_head_elements ), $pos, 0 );
- } //else maybe error or warning ?
- $this->html_head_elements = array();
- }
- echo $this->output;
- $this->output='';
- }
-
- /** flushes the output */
- function p()
- {
- $start = get_moment();
-
- $this->flush();
-
- if ($this->smarty->debugging)
- {
- global $t2;
- $this->smarty->assign(
- array(
- 'AAAA_DEBUG_OUTPUT_TIME__' => get_elapsed_time($start, get_moment()),
- 'AAAA_DEBUG_TOTAL_TIME__' => get_elapsed_time($t2, get_moment())
- )
- );
- require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');
- echo smarty_core_display_debug_console(null, $this->smarty);
- }
- }
-
- /**
- * translate variable modifier - translates a text to the currently loaded
- * language
- */
- /*static*/ function mod_translate($text)
- {
- return l10n($text);
- }
-
- /**
- * explode variable modifier - similar to php explode
- * 'Yes;No'|@explode:';' -> array('Yes', 'No')
- */
- /*static*/ function mod_explode($text, $delimiter=',')
- {
- return explode($delimiter, $text);
- }
-
- /**
- * This smarty "html_head" block allows to add content just before
- * </head> element in the output after the head has been parsed. This is
- * handy in order to respect strict standards when <style> and <link>
- * html elements must appear in the <head> element
- */
- function block_html_head($params, $content, &$smarty, &$repeat)
- {
- $content = trim($content);
- if ( !empty($content) )
- { // second call
- if ( empty($this->output) )
- {//page header not parsed yet
- $this->append('head_elements', $content);
- }
- else
- {
- $this->html_head_elements[] = $content;
- }
- }
- }
-
- /**
- * Smarty prefilter to allow caching (whenever possible) language strings
- * from templates.
- */
- function prefilter_language($source, &$smarty)
- {
- global $lang;
- $ldq = preg_quote($this->smarty->left_delimiter, '~');
- $rdq = preg_quote($this->smarty->right_delimiter, '~');
-
- $regex = "~$ldq *\'([^'$]+)\'\|@translate *$rdq~";
- $source = preg_replace( $regex.'e', 'isset($lang[\'$1\']) ? $lang[\'$1\'] : \'$0\'', $source);
-
- $regex = "~$ldq *\'([^'$]+)\'\|@translate\|~";
- $source = preg_replace( $regex.'e', 'isset($lang[\'$1\']) ? \'{\'.var_export($lang[\'$1\'],true).\'|\' : \'$0\'', $source);
-
- return $source;
- }
-}
-
-/**
- * This class contains basic functions that can be called directly from the
- * templates in the form $pwg->l10n('edit')
- */
-class PwgTemplateAdapter
-{
- function l10n($text)
- {
- return l10n($text);
- }
-
- function l10n_dec($s, $p, $v)
- {
- return l10n_dec($s, $p, $v);
- }
-
- function sprintf()
- {
- $args = func_get_args();
- return call_user_func_array('sprintf', $args );
- }
-}
-
-?>
diff --git a/BSF/include/upload.class.php b/BSF/include/upload.class.php
deleted file mode 100644
index f9587ddb8..000000000
--- a/BSF/include/upload.class.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-class Upload
-{
- function Upload()
- {
- }
-
- /**
- * Return list of Uploadable categories
- *
- * @param void
- * @return array
- */
- function get_cat()
- {
- }
-}
-
-?>
diff --git a/BSF/include/user.inc.php b/BSF/include/user.inc.php
deleted file mode 100644
index b267790f8..000000000
--- a/BSF/include/user.inc.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// by default we start with guest
-$user['id'] = $conf['guest_id'];
-
-if (isset($_COOKIE[session_name()]))
-{
- session_start();
- if (isset($_GET['act']) and $_GET['act'] == 'logout')
- { // logout
- $_SESSION = array();
- session_unset();
- session_destroy();
- setcookie(session_name(),'',0,
- ini_get('session.cookie_path'),
- ini_get('session.cookie_domain')
- );
- setcookie($conf['remember_me_name'], '', 0, cookie_path());
- redirect(make_index_url());
- }
- elseif (!empty($_SESSION['pwg_uid']))
- {
- $user['id'] = $_SESSION['pwg_uid'];
- }
-}
-
-// Now check the auto-login
-if ( $user['id']==$conf['guest_id'] )
-{
- auto_login();
-}
-
-if (session_id()=="")
-{
- session_start();
-}
-
-// using Apache authentication override the above user search
-if ($conf['apache_authentication'] and isset($_SERVER['REMOTE_USER']))
-{
- if (!($user['id'] = get_userid($_SERVER['REMOTE_USER'])))
- {
- register_user($_SERVER['REMOTE_USER'], '', '', false);
- $user['id'] = get_userid($_SERVER['REMOTE_USER']);
- }
-}
-
-$user = build_user( $user['id'],
- ( defined('IN_ADMIN') and IN_ADMIN ) ? false : true // use cache ?
- );
-
-trigger_action('user_init', $user);
-?>
diff --git a/BSF/include/ws_core.inc.php b/BSF/include/ws_core.inc.php
deleted file mode 100644
index c78d4f402..000000000
--- a/BSF/include/ws_core.inc.php
+++ /dev/null
@@ -1,619 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**** WEB SERVICE CORE CLASSES************************************************
- * PwgServer - main object - the link between web service methods, request
- * handler and response encoder
- * PwgRequestHandler - base class for handlers
- * PwgResponseEncoder - base class for response encoders
- * PwgError, PwgNamedArray, PwgNamedStruct - can be used by web service functions
- * as return values
- */
-
-
-define( 'WS_PARAM_ACCEPT_ARRAY', 0x010000 );
-define( 'WS_PARAM_FORCE_ARRAY', 0x030000 );
-define( 'WS_PARAM_OPTIONAL', 0x040000 );
-
-define( 'WS_ERR_INVALID_METHOD', 1001 );
-define( 'WS_ERR_MISSING_PARAM', 1002 );
-define( 'WS_ERR_INVALID_PARAM', 1003 );
-
-define( 'WS_XML_ATTRIBUTES', 'attributes_xml_');
-define( 'WS_XML_CONTENT', 'content_xml_');
-
-/**
- * PwgError object can be returned from any web service function implementation.
- */
-class PwgError
-{
- var $_code;
- var $_codeText;
-
- function PwgError($code, $codeText)
- {
- $this->_code = $code;
- $this->_codeText = $codeText;
- }
-
- function code() { return $this->_code; }
- function message() { return $this->_codeText; }
-}
-
-/**
- * Simple wrapper around an array (keys are consecutive integers starting at 0).
- * Provides naming clues for xml output (xml attributes vs. xml child elements?)
- * Usually returned by web service function implementation.
- */
-class PwgNamedArray
-{
- /*private*/ var $_content;
- /*private*/ var $_itemName;
- /*private*/ var $_xmlAttributes;
-
- /**
- * Constructs a named array
- * @param arr array (keys must be consecutive integers starting at 0)
- * @param itemName string xml element name for values of arr (e.g. image)
- * @param xmlAttributes array of sub-item attributes that will be encoded as
- * xml attributes instead of xml child elements
- */
- function PwgNamedArray(&$arr, $itemName, $xmlAttributes=array() )
- {
- $this->_content = $arr;
- $this->_itemName = $itemName;
- $this->_xmlAttributes = array_flip($xmlAttributes);
- }
-}
-/**
- * Simple wrapper around a "struct" (php array whose keys are not consecutive
- * integers starting at 0). Provides naming clues for xml output (what is xml
- * attributes and what is element)
- */
-class PwgNamedStruct
-{
- /*private*/ var $_content;
- /*private*/ var $_name;
- /*private*/ var $_xmlAttributes;
-
- /**
- * Constructs a named struct (usually returned by web service function
- * implementation)
- * @param name string - containing xml element name
- * @param content array - the actual content (php array)
- * @param xmlAttributes array - name of the keys in $content that will be
- * encoded as xml attributes (if null - automatically prefer xml attributes
- * whenever possible)
- */
- function PwgNamedStruct($name, $content, $xmlAttributes=null, $xmlElements=null )
- {
- $this->_name = $name;
- $this->_content = $content;
- if ( isset($xmlAttributes) )
- {
- $this->_xmlAttributes = array_flip($xmlAttributes);
- }
- else
- {
- $this->_xmlAttributes = array();
- foreach ($this->_content as $key=>$value)
- {
- if (!empty($key) and (is_scalar($value) or is_null($value)) )
- {
- if ( empty($xmlElements) or !in_array($key,$xmlElements) )
- {
- $this->_xmlAttributes[$key]=1;
- }
- }
- }
- }
- }
-}
-
-
-/**
- * Replace array_walk_recursive()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.array_walk_recursive
- * @author Tom Buskens <ortega@php.net>
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision$
- * @since PHP 5
- * @require PHP 4.0.6 (is_callable)
- */
-if (!function_exists('array_walk_recursive')) {
- function array_walk_recursive(&$input, $funcname)
- {
- if (!is_callable($funcname)) {
- if (is_array($funcname)) {
- $funcname = $funcname[0] . '::' . $funcname[1];
- }
- user_error('array_walk_recursive() Not a valid callback ' . $user_func,
- E_USER_WARNING);
- return;
- }
-
- if (!is_array($input)) {
- user_error('array_walk_recursive() The argument should be an array',
- E_USER_WARNING);
- return;
- }
-
- $args = func_get_args();
-
- foreach ($input as $key => $item) {
- if (is_array($item)) {
- array_walk_recursive($item, $funcname, $args);
- $input[$key] = $item;
- } else {
- $args[0] = &$item;
- $args[1] = &$key;
- call_user_func_array($funcname, $args);
- $input[$key] = $item;
- }
- }
- }
-}
-
-/**
- * Abstract base class for request handlers.
- */
-class PwgRequestHandler
-{
- /** Virtual abstract method. Decodes the request (GET or POST) handles the
- * method invocation as well as response sending.
- */
- function handleRequest(&$server) { assert(false); }
-}
-
-/**
- *
- * Base class for web service response encoder.
- */
-class PwgResponseEncoder
-{
- /** encodes the web service response to the appropriate output format
- * @param response mixed the unencoded result of a service method call
- */
- function encodeResponse($response) { assert(false); }
-
- /** default "Content-Type" http header for this kind of response format
- */
- function getContentType() { assert(false); }
-
- /**
- * returns true if the parameter is a 'struct' (php array type whose keys are
- * NOT consecutive integers starting with 0)
- */
- function is_struct(&$data)
- {
- if (is_array($data) )
- {
- if (range(0, count($data) - 1) !== array_keys($data) )
- { # string keys, unordered, non-incremental keys, .. - whatever, make object
- return true;
- }
- }
- return false;
- }
-
- /**
- * removes all XML formatting from $response (named array, named structs, etc)
- * usually called by every response encoder, except rest xml.
- */
- function flattenResponse(&$response)
- {
- PwgResponseEncoder::_mergeAttributesAndContent($response);
- PwgResponseEncoder::_removeNamedArray($response);
- PwgResponseEncoder::_removeNamedStruct($response);
- if (is_array($response))
- { // need to call 2 times (first time might add new arrays)
- array_walk_recursive($response, array('PwgResponseEncoder', '_remove_named_callback') );
- array_walk_recursive($response, array('PwgResponseEncoder', '_remove_named_callback') );
- }
-//print_r($response);
- PwgResponseEncoder::_mergeAttributesAndContent($response);
- }
-
- /*private*/ function _remove_named_callback(&$value, $key)
- {
- do
- {
- $changed = 0;
- $changed += PwgResponseEncoder::_removeNamedArray($value);
- $changed += PwgResponseEncoder::_removeNamedStruct($value);
- // print_r('walk '.$key."<br/>\n");
- }
- while ($changed);
- }
-
- /*private*/ function _mergeAttributesAndContent(&$value)
- {
- if ( !is_array($value) )
- return;
-/* $first_key = '';
- if (count($value)) { $ak = array_keys($value); $first_key = $ak[0]; }
-
- print_r( '_mergeAttributesAndContent is_struct='.PwgResponseEncoder::is_struct($value)
- .' count='.count($value)
- .' first_key='.$first_key
- ."<br/>\n"
- );*/
- $ret = 0;
- if (PwgResponseEncoder::is_struct($value))
- {
- if ( isset($value[WS_XML_ATTRIBUTES]) )
- {
- $value = array_merge( $value, $value[WS_XML_ATTRIBUTES] );
- unset( $value[WS_XML_ATTRIBUTES] );
- $ret=1;
- }
- if ( isset($value[WS_XML_CONTENT]) )
- {
- $cont_processed = 0;
- if ( count($value)==1 )
- {
- $value = $value[WS_XML_CONTENT];
- $cont_processed=1;
- }
- else
- {
- if (PwgResponseEncoder::is_struct($value[WS_XML_CONTENT]))
- {
- $value = array_merge( $value, $value[WS_XML_CONTENT] );
- unset( $value[WS_XML_CONTENT] );
- $cont_processed=1;
- }
- }
- $ret += $cont_processed;
- if (!$cont_processed)
- {
- $value['_content'] = $value[WS_XML_CONTENT];
- unset( $value[WS_XML_CONTENT] );
- $ret++;
- }
- }
- }
-
- foreach ($value as $key=>$v)
- {
- if ( PwgResponseEncoder::_mergeAttributesAndContent($v) )
- {
- $value[$key]=$v;
- $ret++;
- }
- }
- return $ret;
- }
-
- /*private*/ function _removeNamedArray(&$value)
- {
- if ( strtolower( get_class($value) ) =='pwgnamedarray')
- {
- $value = $value->_content;
- return 1;
- }
- return 0;
- }
-
- /*private*/ function _removeNamedStruct(&$value)
- {
- if ( strtolower( get_class($value) ) =='pwgnamedstruct')
- {
- if ( isset($value->_content['']) )
- {
- $unknown = $value->_content[''];
- unset( $value->_content[''] );
- $value->_content[$value->_name] = $unknown;
- }
- $value = $value->_content;
- return 1;
- }
- return 0;
- }
-}
-
-
-
-class PwgServer
-{
- var $_requestHandler;
- var $_requestFormat;
- var $_responseEncoder;
- var $_responseFormat;
-
- var $_methods;
- var $_methodSignatures;
-
- function PwgServer()
- {
- $methods = array();
- }
-
- /**
- * Initializes the request handler.
- */
- function setHandler($requestFormat, &$requestHandler)
- {
- $this->_requestHandler = &$requestHandler;
- $this->_requestFormat = $requestFormat;
- }
-
- /**
- * Initializes the request handler.
- */
- function setEncoder($responseFormat, &$encoder)
- {
- $this->_responseEncoder = &$encoder;
- $this->_responseFormat = $responseFormat;
- }
-
- /**
- * Runs the web service call (handler and response encoder should have been
- * created)
- */
- function run()
- {
- if ( is_null($this->_responseEncoder) )
- {
- set_status_header(500);
- @header("Content-Type: text/plain");
- echo ("Cannot process your request. Unknown response format.
-Request format: ".@$this->_requestFormat." handler:".$this->_requestHandler."
-Response format: ".@$this->_responseFormat." encoder:".$this->_responseEncoder."
- ");
- var_export($this);
- die(0);
- }
-
- if ( is_null($this->_requestHandler) )
- {
- $this->sendResponse(
- new PwgError(500, 'Unknown request format')
- );
- return;
- }
-
- $this->addMethod('reflection.getMethodList',
- array('PwgServer', 'ws_getMethodList'),
- null, '' );
- $this->addMethod('reflection.getMethodDetails',
- array('PwgServer', 'ws_getMethodDetails'),
- array('methodName'),'');
-
- trigger_action('ws_add_methods', array(&$this) );
- uksort( $this->_methods, 'strnatcmp' );
- $this->_requestHandler->handleRequest($this);
- }
-
- /**
- * Encodes a response and sends it back to the browser.
- */
- function sendResponse($response)
- {
- $encodedResponse = $this->_responseEncoder->encodeResponse($response);
- $contentType = $this->_responseEncoder->getContentType();
-
- @header('Content-Type: '.$contentType);
- print_r($encodedResponse);
- }
-
- /**
- * Registers a web service method.
- * @param methodName string - the name of the method as seen externally
- * @param callback mixed - php method to be invoked internally
- * @param params array - map of allowed parameter names with optional default
- * values and parameter flags. Example of $params:
- * array( 'param1' => array('default'=>523, 'flags'=>WS_PARAM_FORCE_ARRAY) ) .
- * Possible parameter flags are:
- * WS_PARAM_ALLOW_ARRAY - this parameter can be an array
- * WS_PARAM_FORCE_ARRAY - if this parameter is scalar, force it to an array
- * before invoking the method
- * @param description string - a description of the method.
- */
- function addMethod($methodName, $callback, $params=array(), $description, $include_file='')
- {
- $this->_methods[$methodName] = $callback;
- $this->_methodDescriptions[$methodName] = $description;
-
- if (!is_array($params))
- {
- $params = array();
- }
-
- if ( range(0, count($params) - 1) === array_keys($params) )
- {
- $params = array_flip($params);
- }
-
- foreach( $params as $param=>$options)
- {
- if ( !is_array($options) )
- {
- $params[$param] = array('flags'=>0);
- }
- else
- {
- $flags = isset($options['flags']) ? $options['flags'] : 0;
- if ( array_key_exists('default', $options) )
- {
- $flags |= WS_PARAM_OPTIONAL;
- }
- if ( $flags & WS_PARAM_FORCE_ARRAY )
- {
- $flags |= WS_PARAM_ACCEPT_ARRAY;
- }
- $options['flags'] = $flags;
- $params[$param] = $options;
- }
- }
- $this->_methodSignatures[$methodName] = $params;
- }
-
- function hasMethod($methodName)
- {
- return isset($this->_methods[$methodName]);
- }
-
- function getMethodDescription($methodName)
- {
- $desc = @$this->_methodDescriptions[$methodName];
- return isset($desc) ? $desc : '';
- }
-
- function getMethodSignature($methodName)
- {
- $signature = @$this->_methodSignatures[$methodName];
- return isset($signature) ? $signature : array();
- }
-
- /*static*/ function isPost()
- {
- return isset($HTTP_RAW_POST_DATA) or !empty($_POST);
- }
-
- /*static*/ function makeArrayParam(&$param)
- {
- if ( $param==null )
- {
- $param = array();
- }
- else
- {
- if (! is_array($param) )
- {
- $param = array($param);
- }
- }
- }
-
- /**
- * Invokes a registered method. Returns the return of the method (or
- * a PwgError object if the method is not found)
- * @param methodName string the name of the method to invoke
- * @param params array array of parameters to pass to the invoked method
- */
- function invoke($methodName, $params)
- {
- $callback = @$this->_methods[$methodName];
-
- if ( $callback==null )
- {
- return new PwgError(WS_ERR_INVALID_METHOD, 'Method name "'.$methodName.'" is not valid');
- }
-
- // parameter check and data coercion !
- $signature = @$this->_methodSignatures[$methodName];
- $missing_params = array();
- foreach($signature as $name=>$options)
- {
- $flags = $options['flags'];
- if ( !array_key_exists($name, $params) )
- {// parameter not provided in the request
- if ( !($flags&WS_PARAM_OPTIONAL) )
- {
- $missing_params[] = $name;
- }
- else if ( array_key_exists('default',$options) )
- {
- $params[$name] = $options['default'];
- if ( ($flags&WS_PARAM_FORCE_ARRAY) )
- {
- $this->makeArrayParam( $params[$name] );
- }
- }
- }
- else
- {// parameter provided - do some basic checks
- $the_param = $params[$name];
- if ( is_array($the_param) and ($flags&WS_PARAM_ACCEPT_ARRAY)==0 )
- {
- return new PwgError(WS_ERR_INVALID_PARAM, $name.' must be scalar' );
- }
- if ( ($flags&WS_PARAM_FORCE_ARRAY) )
- {
- $this->makeArrayParam( $the_param );
- }
- if ( isset($options['maxValue']) and $the_param>$options['maxValue'])
- {
- $the_param = $options['maxValue'];
- }
- $params[$name] = $the_param;
- }
- }
- if (count($missing_params))
- {
- return new PwgError(WS_ERR_MISSING_PARAM, 'Missing parameters: '.implode(',',$missing_params));
- }
- $result = trigger_event('ws_invoke_allowed', true, $methodName, $params);
- if ( strtolower( get_class($result) )!='pwgerror')
- {
- $result = call_user_func_array($callback, array($params, &$this) );
- }
- return $result;
- }
-
- /**
- * WS reflection method implementation: lists all available methods
- */
- /*static*/ function ws_getMethodList($params, &$service)
- {
- return array('methods' => new PwgNamedArray( array_keys($service->_methods),'method' ) );
- }
-
- /**
- * WS reflection method implementation: gets information about a given method
- */
- /*static*/ function ws_getMethodDetails($params, &$service)
- {
- $methodName = $params['methodName'];
- if (!$service->hasMethod($methodName))
- {
- return new PwgError(WS_ERR_INVALID_PARAM,
- 'Requested method does not exist');
- }
- $res = array(
- 'name' => $methodName,
- 'description' => $service->getMethodDescription($methodName),
- 'params' => array(),
- );
- $signature = $service->getMethodSignature($methodName);
- foreach ($signature as $name => $options)
- {
- $param_data = array(
- 'name' => $name,
- 'optional' => ($options['flags']&WS_PARAM_OPTIONAL)?true:false,
- 'acceptArray' => ($options['flags']&WS_PARAM_ACCEPT_ARRAY)?true:false,
- );
- if (isset($options['default']))
- {
- $param_data['defaultValue'] = $options['default'];
- }
- $res['params'][] = $param_data;
- }
- return $res;
- }
-}
-?>
diff --git a/BSF/include/ws_functions.inc.php b/BSF/include/ws_functions.inc.php
deleted file mode 100644
index 2488fd0bf..000000000
--- a/BSF/include/ws_functions.inc.php
+++ /dev/null
@@ -1,1103 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**** IMPLEMENTATION OF WEB SERVICE METHODS ***********************************/
-
-/**
- * Event handler for method invocation security check. Should return a PwgError
- * if the preconditions are not satifsied for method invocation.
- */
-function ws_isInvokeAllowed($res, $methodName, $params)
-{
- global $conf, $calling_partner_id;
-
- if ( strpos($methodName,'reflection.')===0 )
- { // OK for reflection
- return $res;
- }
-
- if ( !is_autorize_status(ACCESS_GUEST) and
- strpos($methodName,'pwg.session.')!==0 )
- {
- return new PwgError(401, 'Access denied');
- }
-
- if ( !$conf['ws_access_control'] )
- {
- return $res; // No controls are requested
- }
- $query = '
-SELECT * FROM '.WEB_SERVICES_ACCESS_TABLE."
- WHERE `name` = '$calling_partner_id'
- AND NOW() <= end; ";
- $result = pwg_query($query);
- $row = mysql_fetch_assoc($result);
- if ( empty($row) )
- {
- return new PwgError(403, 'Partner id does not exist or is expired');
- }
- if ( !empty($row['request'])
- and strpos($methodName, $row['request'])==false
- and strpos($methodName, 'session')==false
- and strpos($methodName, 'getVersion')==false )
- { // session and getVersion are allowed to diagnose any failure reason
- return new PwgError(403, 'Method not allowed');
- }
-
- return $res;
-}
-
-/**
- * ws_addControls
- * returns additionnal controls if requested
- * usable for 99% of Web Service methods
- *
- * - Args
- * $methodName: is the requested method
- * $partner: is the key
- * $tbl_name: is the alias_name in the query (sometimes called correlation name)
- * null if !getting picture informations
- * - Logic
- * Access_control is not active: Return
- * Key is incorrect: Return 0 = 1 (False condition for MySQL)
- * One of Params doesn't match with type of request: return 0 = 1 again
- * Access list(id/cat/tag) is converted in expended image-id list
- * image-id list: converted to an in-where-clause
- *
- * The additionnal in-where-clause is return
- */
-function ws_addControls( $methodName, &$params, $tbl_name )
-{
- global $conf, $calling_partner_id;
- if ( !$conf['ws_access_control'] or !isset($calling_partner_id) )
- {
- return '1=1'; // No controls are requested
- }
-
-// Is it an active Partner?
- $query = '
-SELECT * FROM '.WEB_SERVICES_ACCESS_TABLE."
- WHERE `name` = '$calling_partner_id'
- AND NOW() <= end; ";
-$result = pwg_query($query);
- if ( mysql_num_rows( $result ) == 0 )
- {
- return '0=1'; // Unknown partner or Obsolate agreement
- }
-
- $row = mysql_fetch_array($result);
-
-// Overide general object limit
- $params['per_page'] = $row['limit'];
-
-// Target restrict
-// 3 cases: list, cat or tag
-// Behind / we could found img-ids, cat-ids or tag-ids
- $target = $row['access'];
- if ( $target == '')
- {
- return '1=1'; // No controls are requested
- }
- list($type, $str_ids) = explode('/',$target); // Find type list
-
-// (array) 1,2,21,3,22,4,5,9-12,6,11,12,13,2,4,6,
- $arr_ids = expand_id_list( explode( ',',$str_ids ) );
- $addings = implode(',', $arr_ids);
-// (string) 1,2,3,4,5,6,9,10,11,12,13,21,22,
- if ( $type == 'list')
- {
- return $tbl_name . 'id IN ( ' . $addings . ' ) ';
- }
-
- if ( $type == 'cat' )
- {
- $addings = implode(',', get_image_ids_for_cats($arr_ids));
- return $tbl_name . 'id IN ( ' . $addings . ' ) ';
- }
-
- if ( $type == 'tag' )
- {
- $addings = implode(',', get_image_ids_for_tags($arr_ids, 'OR'));
- return $tbl_name . 'id IN ( ' . $addings . ' ) ';
- }
- // Unmanaged new type?
- return ' 0 = 1 '; // ???
-}
-
-/**
- * returns a "standard" (for our web service) array of sql where clauses that
- * filters the images (images table only)
- */
-function ws_std_image_sql_filter( $params, $tbl_name='' )
-{
- $clauses = array();
- if ( is_numeric($params['f_min_rate']) )
- {
- $clauses[] = $tbl_name.'average_rate>'.$params['f_min_rate'];
- }
- if ( is_numeric($params['f_max_rate']) )
- {
- $clauses[] = $tbl_name.'average_rate<='.$params['f_max_rate'];
- }
- if ( is_numeric($params['f_min_hit']) )
- {
- $clauses[] = $tbl_name.'hit>'.$params['f_min_hit'];
- }
- if ( is_numeric($params['f_max_hit']) )
- {
- $clauses[] = $tbl_name.'hit<='.$params['f_max_hit'];
- }
- if ( isset($params['f_min_date_posted']) )
- {
- $clauses[] = $tbl_name."date_available>='".$params['f_min_date_posted']."'";
- }
- if ( isset($params['f_max_date_posted']) )
- {
- $clauses[] = $tbl_name."date_available<'".$params['f_max_date_posted']."'";
- }
- if ( isset($params['f_min_date_created']) )
- {
- $clauses[] = $tbl_name."date_creation>='".$params['f_min_date_created']."'";
- }
- if ( isset($params['f_max_date_created']) )
- {
- $clauses[] = $tbl_name."date_creation<'".$params['f_max_date_created']."'";
- }
- if ( is_numeric($params['f_min_ratio']) )
- {
- $clauses[] = $tbl_name.'width/'.$tbl_name.'height>'.$params['f_min_ratio'];
- }
- if ( is_numeric($params['f_max_ratio']) )
- {
- $clauses[] = $tbl_name.'width/'.$tbl_name.'height<='.$params['f_max_ratio'];
- }
- if ( $params['f_with_thumbnail'] )
- {
- $clauses[] = $tbl_name.'tn_ext IS NOT NULL';
- }
- return $clauses;
-}
-
-/**
- * returns a "standard" (for our web service) ORDER BY sql clause for images
- */
-function ws_std_image_sql_order( $params, $tbl_name='' )
-{
- $ret = '';
- if ( empty($params['order']) )
- {
- return $ret;
- }
- $matches = array();
- preg_match_all('/([a-z_]+) *(?:(asc|desc)(?:ending)?)? *(?:, *|$)/i',
- $params['order'], $matches);
- for ($i=0; $i<count($matches[1]); $i++)
- {
- switch ($matches[1][$i])
- {
- case 'date_created':
- $matches[1][$i] = 'date_creation'; break;
- case 'date_posted':
- $matches[1][$i] = 'date_available'; break;
- case 'rand': case 'random':
- $matches[1][$i] = 'RAND()'; break;
- }
- $sortable_fields = array('id', 'file', 'name', 'hit', 'average_rate',
- 'date_creation', 'date_available', 'RAND()' );
- if ( in_array($matches[1][$i], $sortable_fields) )
- {
- if (!empty($ret))
- $ret .= ', ';
- if ($matches[1][$i] != 'RAND()' )
- {
- $ret .= $tbl_name;
- }
- $ret .= $matches[1][$i];
- $ret .= ' '.$matches[2][$i];
- }
- }
- return $ret;
-}
-
-/**
- * returns an array map of urls (thumb/element) for image_row - to be returned
- * in a standard way by different web service methods
- */
-function ws_std_get_urls($image_row)
-{
- $ret = array(
- 'tn_url' => get_thumbnail_url($image_row),
- 'element_url' => get_element_url($image_row)
- );
- global $user;
- if ($user['enabled_high'] and $image_row['has_high'] )
- {
- $ret['high_url'] = get_high_url($image_row);
- }
- return $ret;
-}
-
-/**
- * returns an array of image attributes that are to be encoded as xml attributes
- * instead of xml elements
- */
-function ws_std_get_image_xml_attributes()
-{
- return array(
- 'id','tn_url','element_url','high_url', 'file','width','height','hit'
- );
-}
-
-/**
- * returns PWG version (web service method)
- */
-function ws_getVersion($params, &$service)
-{
- global $conf;
- if ($conf['show_version'])
- return PHPWG_VERSION;
- else
- return new PwgError(403, 'Forbidden');
-}
-
-
-/**
- * returns images per category (web service method)
- */
-function ws_categories_getImages($params, &$service)
-{
- @include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php');
- global $user, $conf;
-
- $images = array();
-
- //------------------------------------------------- get the related categories
- $where_clauses = array();
- foreach($params['cat_id'] as $cat_id)
- {
- $cat_id = (int)$cat_id;
- if ($cat_id<=0)
- continue;
- if ($params['recursive'])
- {
- $where_clauses[] = 'uppercats REGEXP \'(^|,)'.$cat_id.'(,|$)\'';
- }
- else
- {
- $where_clauses[] = 'id='.$cat_id;
- }
- }
- if (!empty($where_clauses))
- {
- $where_clauses = array( '('.
- implode('
- OR ', $where_clauses) . ')'
- );
- }
- $where_clauses[] = get_sql_condition_FandF(
- array('forbidden_categories' => 'id'),
- NULL, true
- );
-
- $query = '
-SELECT id, name, permalink, image_order
- FROM '.CATEGORIES_TABLE.'
- WHERE '. implode('
- AND ', $where_clauses);
- $result = pwg_query($query);
- $cats = array();
- while ($row = mysql_fetch_assoc($result))
- {
- $row['id'] = (int)$row['id'];
- $cats[ $row['id'] ] = $row;
- }
-
- //-------------------------------------------------------- get the images
- if ( !empty($cats) )
- {
- $where_clauses = ws_std_image_sql_filter( $params, 'i.' );
- $where_clauses[] = 'category_id IN ('
- .implode(',', array_keys($cats) )
- .')';
- $where_clauses[] = get_sql_condition_FandF( array(
- 'visible_images' => 'i.id'
- ), null, true
- );
- $where_clauses[] = ws_addControls( 'categories.getImages', $params, 'i.' );
-
- $order_by = ws_std_image_sql_order($params, 'i.');
- if ( empty($order_by)
- and count($params['cat_id'])==1
- and isset($cats[ $params['cat_id'][0] ]['image_order'])
- )
- {
- $order_by = $cats[ $params['cat_id'][0] ]['image_order'];
- }
- $order_by = empty($order_by) ? $conf['order_by'] : 'ORDER BY '.$order_by;
-
- $query = '
-SELECT i.*, GROUP_CONCAT(category_id) cat_ids
- FROM '.IMAGES_TABLE.' i
- INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON i.id=image_id
- WHERE '. implode('
- AND ', $where_clauses).'
-GROUP BY i.id
-'.$order_by.'
-LIMIT '.$params['per_page']*$params['page'].','.$params['per_page'];
-
- $result = pwg_query($query);
- while ($row = mysql_fetch_assoc($result))
- {
- $image = array();
- foreach ( array('id', 'width', 'height', 'hit') as $k )
- {
- if (isset($row[$k]))
- {
- $image[$k] = (int)$row[$k];
- }
- }
- foreach ( array('file', 'name', 'comment') as $k )
- {
- $image[$k] = $row[$k];
- }
- $image = array_merge( $image, ws_std_get_urls($row) );
-
- $image_cats = array();
- foreach ( explode(',', $row['cat_ids']) as $cat_id )
- {
- $url = make_index_url(
- array(
- 'category' => $cats[$cat_id],
- )
- );
- $page_url = make_picture_url(
- array(
- 'category' => $cats[$cat_id],
- 'image_id' => $row['id'],
- 'image_file' => $row['file'],
- )
- );
- array_push( $image_cats, array(
- WS_XML_ATTRIBUTES => array (
- 'id' => (int)$cat_id,
- 'url' => $url,
- 'page_url' => $page_url,
- )
- )
- );
- }
-
- $image['categories'] = new PwgNamedArray(
- $image_cats,'category', array('id','url','page_url')
- );
- array_push($images, $image);
- }
- }
-
- return array( 'images' =>
- array (
- WS_XML_ATTRIBUTES =>
- array(
- 'page' => $params['page'],
- 'per_page' => $params['per_page'],
- 'count' => count($images)
- ),
- WS_XML_CONTENT => new PwgNamedArray($images, 'image',
- ws_std_get_image_xml_attributes() )
- )
- );
-}
-
-
-/**
- * returns a list of categories (web service method)
- */
-function ws_categories_getList($params, &$service)
-{
- global $user,$conf;
-
- $where = array();
-
- if (!$params['recursive'])
- {
- if ($params['cat_id']>0)
- $where[] = '(id_uppercat='.(int)($params['cat_id']).'
- OR id='.(int)($params['cat_id']).')';
- else
- $where[] = 'id_uppercat IS NULL';
- }
- else if ($params['cat_id']>0)
- {
- $where[] = 'uppercats REGEXP \'(^|,)'.
- (int)($params['cat_id'])
- .'(,|$)\'';
- }
-
- if ($params['public'])
- {
- $where[] = 'status = "public"';
- $where[] = 'visible = "true"';
- $where[]= 'user_id='.$conf['guest_id'];
- }
- else
- {
- $where[]= 'user_id='.$user['id'];
- }
-
- $query = '
-SELECT id, name, permalink, uppercats, global_rank,
- nb_images, count_images AS total_nb_images,
- date_last, max_date_last, count_categories AS nb_categories
- FROM '.CATEGORIES_TABLE.'
- INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.' ON id=cat_id
- WHERE '. implode('
- AND ', $where);
-
- $result = pwg_query($query);
-
- $cats = array();
- while ($row = mysql_fetch_assoc($result))
- {
- $row['url'] = make_index_url(
- array(
- 'category' => $row
- )
- );
- foreach( array('id','nb_images','total_nb_images','nb_categories') as $key)
- {
- $row[$key] = (int)$row[$key];
- }
- array_push($cats, $row);
- }
- usort($cats, 'global_rank_compare');
- return array(
- 'categories' =>
- new PwgNamedArray($cats,'category',
- array('id','url','nb_images','total_nb_images','nb_categories','date_last','max_date_last')
- )
- );
-}
-
-
-/**
- * returns detailed information for an element (web service method)
- */
-function ws_images_addComment($params, &$service)
-{
- if (!$service->isPost())
- {
- return new PwgError(405, "This method requires HTTP POST");
- }
- $params['image_id'] = (int)$params['image_id'];
- $query = '
-SELECT DISTINCT image_id
- FROM '.IMAGE_CATEGORY_TABLE.' INNER JOIN '.CATEGORIES_TABLE.' ON category_id=id
- WHERE commentable="true"
- AND image_id='.$params['image_id'].
- get_sql_condition_FandF(
- array(
- 'forbidden_categories' => 'id',
- 'visible_categories' => 'id',
- 'visible_images' => 'image_id'
- ),
- ' AND'
- );
- if ( !mysql_num_rows( pwg_query( $query ) ) )
- {
- return new PwgError(WS_ERR_INVALID_PARAM, "Invalid image_id");
- }
-
- include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php');
-
- $comm = array(
- 'author' => trim( stripslashes($params['author']) ),
- 'content' => trim( stripslashes($params['content']) ),
- 'image_id' => $params['image_id'],
- );
-
- include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php');
-
- $comment_action = insert_user_comment(
- $comm, $params['key'], $infos
- );
-
- switch ($comment_action)
- {
- case 'reject':
- array_push($infos, l10n('comment_not_added') );
- return new PwgError(403, implode("\n", $infos) );
- case 'validate':
- case 'moderate':
- $ret = array(
- 'id' => $comm['id'],
- 'validation' => $comment_action=='validate',
- );
- return new PwgNamedStruct(
- 'comment',
- $ret,
- null, array()
- );
- default:
- return new PwgError(500, "Unknown comment action ".$comment_action );
- }
-}
-
-/**
- * returns detailed information for an element (web service method)
- */
-function ws_images_getInfo($params, &$service)
-{
- @include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php');
- global $user, $conf;
- $params['image_id'] = (int)$params['image_id'];
- if ( $params['image_id']<=0 )
- {
- return new PwgError(WS_ERR_INVALID_PARAM, "Invalid image_id");
- }
-
- $query='
-SELECT * FROM '.IMAGES_TABLE.'
- WHERE id='.$params['image_id'].
- get_sql_condition_FandF(
- array('visible_images' => 'id'),
- ' AND'
- ).' AND '.
- ws_addControls( 'images.getInfo', $params, '' ).'
-LIMIT 1;';
-
- $image_row = mysql_fetch_assoc(pwg_query($query));
- if ($image_row==null)
- {
- return new PwgError(404, "image_id not found");
- }
- $image_row = array_merge( $image_row, ws_std_get_urls($image_row) );
-
- //-------------------------------------------------------- related categories
- $query = '
-SELECT id, name, permalink, uppercats, global_rank, commentable
- FROM '.IMAGE_CATEGORY_TABLE.'
- INNER JOIN '.CATEGORIES_TABLE.' ON category_id = id
- WHERE image_id = '.$image_row['id'].
- get_sql_condition_FandF(
- array( 'forbidden_categories' => 'category_id' ),
- ' AND'
- ).'
-;';
- $result = pwg_query($query);
- $is_commentable = false;
- $related_categories = array();
- while ($row = mysql_fetch_assoc($result))
- {
- if ($row['commentable']=='true')
- {
- $is_commentable = true;
- }
- unset($row['commentable']);
- $row['url'] = make_index_url(
- array(
- 'category' => $row
- )
- );
-
- $row['page_url'] = make_picture_url(
- array(
- 'image_id' => $image_row['id'],
- 'image_file' => $image_row['file'],
- 'category' => $row
- )
- );
- $row['id']=(int)$row['id'];
- array_push($related_categories, $row);
- }
- usort($related_categories, 'global_rank_compare');
- if ( empty($related_categories) )
- {
- return new PwgError(401, 'Access denied');
- }
-
- //-------------------------------------------------------------- related tags
- $related_tags = get_common_tags( array($image_row['id']), -1 );
- foreach( $related_tags as $i=>$tag)
- {
- $tag['url'] = make_index_url(
- array(
- 'tags' => array($tag)
- )
- );
- $tag['page_url'] = make_picture_url(
- array(
- 'image_id' => $image_row['id'],
- 'image_file' => $image_row['file'],
- 'tags' => array($tag),
- )
- );
- unset($tag['counter']);
- $tag['id']=(int)$tag['id'];
- $related_tags[$i]=$tag;
- }
- //------------------------------------------------------------- related rates
- $query = '
-SELECT COUNT(rate) AS count
- , ROUND(AVG(rate),2) AS average
- , ROUND(STD(rate),2) AS stdev
- FROM '.RATE_TABLE.'
- WHERE element_id = '.$image_row['id'].'
-;';
- $rating = mysql_fetch_assoc(pwg_query($query));
- $rating['count'] = (int)$rating['count'];
-
- //---------------------------------------------------------- related comments
- $related_comments = array();
-
- $where_comments = 'image_id = '.$image_row['id'];
- if ( !is_admin() )
- {
- $where_comments .= '
- AND validated="true"';
- }
-
- $query = '
-SELECT COUNT(id) nb_comments
- FROM '.COMMENTS_TABLE.'
- WHERE '.$where_comments;
- list($nb_comments) = array_from_query($query, 'nb_comments');
- $nb_comments = (int)$nb_comments;
-
- if ( $nb_comments>0 and $params['comments_per_page']>0 )
- {
- $query = '
-SELECT id, date, author, content
- FROM '.COMMENTS_TABLE.'
- WHERE '.$where_comments.'
- ORDER BY date
- LIMIT '.$params['comments_per_page']*(int)$params['comments_page'].
- ','.$params['comments_per_page'];
-
- $result = pwg_query($query);
- while ($row = mysql_fetch_assoc($result))
- {
- $row['id']=(int)$row['id'];
- array_push($related_comments, $row);
- }
- }
-
- $comment_post_data = null;
- if ($is_commentable and
- (!is_a_guest()
- or (is_a_guest() and $conf['comments_forall'] )
- )
- )
- {
- include_once(PHPWG_ROOT_PATH.'include/functions_comment.inc.php');
- $comment_post_data['author'] = $user['username'];
- $comment_post_data['key'] = get_comment_post_key($params['image_id']);
- }
-
- $ret = $image_row;
- foreach ( array('id','width','height','hit','filesize') as $k )
- {
- if (isset($ret[$k]))
- {
- $ret[$k] = (int)$ret[$k];
- }
- }
- foreach ( array('path', 'storage_category_id') as $k )
- {
- unset($ret[$k]);
- }
-
- $ret['rates'] = array( WS_XML_ATTRIBUTES => $rating );
- $ret['categories'] = new PwgNamedArray($related_categories, 'category', array('id','url', 'page_url') );
- $ret['tags'] = new PwgNamedArray($related_tags, 'tag', array('id','url_name','url','page_url') );
- if ( isset($comment_post_data) )
- {
- $ret['comment_post'] = array( WS_XML_ATTRIBUTES => $comment_post_data );
- }
- $ret['comments'] = array(
- WS_XML_ATTRIBUTES =>
- array(
- 'page' => $params['comments_page'],
- 'per_page' => $params['comments_per_page'],
- 'count' => count($related_comments),
- 'nb_comments' => $nb_comments,
- ),
- WS_XML_CONTENT => new PwgNamedArray($related_comments, 'comment', array('id','date') )
- );
-
- return new PwgNamedStruct('image',$ret, null, array('name','comment') );
-}
-
-/**
- * returns a list of elements corresponding to a query search
- */
-function ws_images_search($params, &$service)
-{
- global $page;
- $images = array();
- include_once( PHPWG_ROOT_PATH .'include/functions_search.inc.php' );
- include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php');
-
- $where_clauses = ws_std_image_sql_filter( $params, 'i.' );
- $order_by = ws_std_image_sql_order($params, 'i.');
-
- if ( !empty($order_by) )
- {
- global $conf;
- $conf['order_by'] = 'ORDER BY '.$order_by;
- $page['super_order_by']=1; // quick_search_result might be faster
- }
-
- $search_result = get_quick_search_results($params['query'],
- implode(',', $where_clauses) );
- $image_ids = $search_result['items'];
-
- $image_ids = array_slice($image_ids,
- $params['page']*$params['per_page'],
- $params['per_page'] );
-
- if ( count($image_ids) )
- {
- $query = '
-SELECT * FROM '.IMAGES_TABLE.'
- WHERE id IN ('
- .wordwrap(implode(', ', $image_ids), 80, "\n")
- .')';
-
- $result = pwg_query($query);
- while ($row = mysql_fetch_assoc($result))
- {
- $image = array();
- foreach ( array('id', 'width', 'height', 'hit') as $k )
- {
- if (isset($row[$k]))
- {
- $image[$k] = (int)$row[$k];
- }
- }
- foreach ( array('file', 'name', 'comment') as $k )
- {
- $image[$k] = $row[$k];
- }
- $image = array_merge( $image, ws_std_get_urls($row) );
- array_push($images, $image);
- }
-
- $image_ids = array_flip($image_ids);
- usort(
- $images,
- create_function('$i1,$i2', 'global $image_ids; return $image_ids[$i1["id"]]-$image_ids[$i2["id"]];')
- );
- }
-
-
- return array( 'images' =>
- array (
- WS_XML_ATTRIBUTES =>
- array(
- 'page' => $params['page'],
- 'per_page' => $params['per_page'],
- 'count' => count($images)
- ),
- WS_XML_CONTENT => new PwgNamedArray($images, 'image',
- ws_std_get_image_xml_attributes() )
- )
- );
-}
-
-/**
- * perform a login (web service method)
- */
-function ws_session_login($params, &$service)
-{
- global $conf;
-
- if (!$service->isPost())
- {
- return new PwgError(405, "This method requires HTTP POST");
- }
- if (try_log_user($params['username'], $params['password'],false))
- {
- return true;
- }
- return new PwgError(999, 'Invalid username/password');
-}
-
-
-/**
- * performs a logout (web service method)
- */
-function ws_session_logout($params, &$service)
-{
- global $user, $conf;
- if (!is_a_guest())
- {
- $_SESSION = array();
- session_unset();
- session_destroy();
- setcookie(session_name(),'',0,
- ini_get('session.cookie_path'),
- ini_get('session.cookie_domain')
- );
- setcookie($conf['remember_me_name'], '', 0, cookie_path());
- }
- return true;
-}
-
-function ws_session_getStatus($params, &$service)
-{
- global $user;
- $res = array();
- $res['username'] = is_a_guest() ? 'guest' : $user['username'];
- foreach ( array('status', 'template', 'theme', 'language') as $k )
- {
- $res[$k] = $user[$k];
- }
- $res['charset'] = get_pwg_charset();
- return $res;
-}
-
-
-/**
- * returns a list of tags (web service method)
- */
-function ws_tags_getList($params, &$service)
-{
- $tags = get_available_tags();
- if ($params['sort_by_counter'])
- {
- usort($tags, create_function('$a,$b', 'return -$a["counter"]+$b["counter"];') );
- }
- else
- {
- usort($tags, 'name_compare');
- }
- for ($i=0; $i<count($tags); $i++)
- {
- $tags[$i]['id'] = (int)$tags[$i]['id'];
- $tags[$i]['counter'] = (int)$tags[$i]['counter'];
- $tags[$i]['url'] = make_index_url(
- array(
- 'section'=>'tags',
- 'tags'=>array($tags[$i])
- )
- );
- }
- return array('tags' => new PwgNamedArray($tags, 'tag', array('id','url_name','url', 'counter' )) );
-}
-
-
-/**
- * returns a list of images for tags (web service method)
- */
-function ws_tags_getImages($params, &$service)
-{
- @include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php');
- global $conf;
-
- // first build all the tag_ids we are interested in
- $params['tag_id'] = array_map( 'intval',$params['tag_id'] );
- $tags = find_tags($params['tag_id'], $params['tag_url_name'], $params['tag_name']);
- $tags_by_id = array();
- foreach( $tags as $tag )
- {
- $tags['id'] = (int)$tag['id'];
- $tags_by_id[ $tag['id'] ] = $tag;
- }
- unset($tags);
- $tag_ids = array_keys($tags_by_id);
-
-
- $image_ids = array();
- $image_tag_map = array();
-
- if ( !empty($tag_ids) )
- { // build list of image ids with associated tags per image
- if ($params['tag_mode_and'])
- {
- $image_ids = get_image_ids_for_tags( $tag_ids );
- }
- else
- {
- $query = '
-SELECT image_id, GROUP_CONCAT(tag_id) tag_ids
- FROM '.IMAGE_TAG_TABLE.'
- WHERE tag_id IN ('.implode(',',$tag_ids).')
- GROUP BY image_id';
- $result = pwg_query($query);
- while ( $row=mysql_fetch_assoc($result) )
- {
- $row['image_id'] = (int)$row['image_id'];
- array_push( $image_ids, $row['image_id'] );
- $image_tag_map[ $row['image_id'] ] = explode(',', $row['tag_ids']);
- }
- }
- }
-
- $images = array();
- if ( !empty($image_ids))
- {
- $where_clauses = ws_std_image_sql_filter($params);
- $where_clauses[] = get_sql_condition_FandF(
- array
- (
- 'forbidden_categories' => 'category_id',
- 'visible_categories' => 'category_id',
- 'visible_images' => 'i.id'
- ),
- '', true
- );
- $where_clauses[] = 'id IN ('.implode(',',$image_ids).')';
- $where_clauses[] = ws_addControls( 'tags.getImages', $params, 'i.' );
-
- $order_by = ws_std_image_sql_order($params);
- if (empty($order_by))
- {
- $order_by = $conf['order_by'];
- }
- else
- {
- $order_by = 'ORDER BY '.$order_by;
- }
-
- $query = '
-SELECT DISTINCT i.* FROM '.IMAGES_TABLE.' i
- INNER JOIN '.IMAGE_CATEGORY_TABLE.' ON i.id=image_id
- WHERE '. implode('
- AND ', $where_clauses).'
-'.$order_by.'
-LIMIT '.$params['per_page']*$params['page'].','.$params['per_page'];
-
- $result = pwg_query($query);
- while ($row = mysql_fetch_assoc($result))
- {
- $image = array();
- foreach ( array('id', 'width', 'height', 'hit') as $k )
- {
- if (isset($row[$k]))
- {
- $image[$k] = (int)$row[$k];
- }
- }
- foreach ( array('file', 'name', 'comment') as $k )
- {
- $image[$k] = $row[$k];
- }
- $image = array_merge( $image, ws_std_get_urls($row) );
-
- $image_tag_ids = ($params['tag_mode_and']) ? $tag_ids : $image_tag_map[$image['id']];
- $image_tags = array();
- foreach ($image_tag_ids as $tag_id)
- {
- $url = make_index_url(
- array(
- 'section'=>'tags',
- 'tags'=> array($tags_by_id[$tag_id])
- )
- );
- $page_url = make_picture_url(
- array(
- 'section'=>'tags',
- 'tags'=> array($tags_by_id[$tag_id]),
- 'image_id' => $row['id'],
- 'image_file' => $row['file'],
- )
- );
- array_push($image_tags, array(
- 'id' => (int)$tag_id,
- 'url' => $url,
- 'page_url' => $page_url,
- )
- );
- }
- $image['tags'] = new PwgNamedArray($image_tags, 'tag',
- array('id','url_name','url','page_url')
- );
- array_push($images, $image);
- }
- }
-
- return array( 'images' =>
- array (
- WS_XML_ATTRIBUTES =>
- array(
- 'page' => $params['page'],
- 'per_page' => $params['per_page'],
- 'count' => count($images)
- ),
- WS_XML_CONTENT => new PwgNamedArray($images, 'image',
- ws_std_get_image_xml_attributes() )
- )
- );
-}
-
-
-/**
- * expand_id_list($ids) convert a human list expression to a full ordered list
- * example : expand_id_list( array(5,2-3,2) ) returns array( 2, 3, 5)
- * */
-function expand_id_list($ids)
-{
- $tid = array();
- foreach ( $ids as $id )
- {
- if ( is_numeric($id) )
- {
- $tid[] = (int) $id;
- }
- else
- {
- $range = explode( '-', $id );
- if ( is_numeric($range[0]) and is_numeric($range[1]) )
- {
- $from = min($range[0],$range[1]);
- $to = max($range[0],$range[1]);
- for ($i = $from; $i <= $to; $i++)
- {
- $tid[] = (int) $i;
- }
- }
- }
- }
- $result = array_unique ($tid); // remove duplicates...
- sort ($result);
- return $result;
-}
-
-
-/**
- * converts a cat-ids array in image-ids array
- * FIXME Function which should already exist somewhere else
- * */
-function get_image_ids_for_cats($cat_ids)
-{
- $cat_list = implode(',', $cat_ids);
- $ret_ids = array();
- $query = '
- SELECT DISTINCT image_id
- FROM '.IMAGE_CATEGORY_TABLE.'
- WHERE category_id in ('.$cat_list.')
- ;';
- return array_from_query($query, 'image_id');
-}
-
-?>
diff --git a/BSF/include/ws_protocols/index.php b/BSF/include/ws_protocols/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/include/ws_protocols/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/include/ws_protocols/json_encoder.php b/BSF/include/ws_protocols/json_encoder.php
deleted file mode 100644
index 8c2d7b0a0..000000000
--- a/BSF/include/ws_protocols/json_encoder.php
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-
-#_____________________ PHP 5.2
-if (! function_exists('json_encode')) {
- function json_encode($data) {
- switch (gettype($data)) {
- case 'boolean':
- return ($data ? 'true' : 'false');
- case 'null':
- case 'NULL':
- return 'null';
- case 'integer':
- case 'double':
- return $data;
- case 'string':
- return '"'. str_replace(array("\\",'"',"/","\n","\r","\t"), array("\\\\",'\"',"\\/","\\n","\\r","\\t"), $data) .'"';
- case 'object':
- case 'array':
- if ($data === array()) return '[]'; # empty array
- if (range(0, count($data) - 1) !== array_keys($data) ) { # string keys, unordered, non-incremental keys, .. - whatever, make object
- $out = "\n".'{';
- foreach($data as $key => $value) {
- $out .= json_encode((string) $key) . ':' . json_encode($value) . ',';
- }
- $out = substr($out, 0, -1) . "\n". '}';
- }else{
- # regular array
- $out = "\n".'[' . join("\n".',', array_map('json_encode', $data)) ."\n".']';
- }
- return $out;
- }
- }
-}
-
-class PwgJsonEncoder extends PwgResponseEncoder
-{
- function encodeResponse($response)
- {
- $respClass = strtolower( get_class($response) );
- if ($respClass=='pwgerror')
- {
- return json_encode(
- array(
- 'stat' => 'fail',
- 'err' => $response->code(),
- 'message' => $response->message(),
- )
- );
- }
- parent::flattenResponse($response);
- return json_encode(
- array(
- 'stat' => 'ok',
- 'result' => $response,
- )
- );
- }
-
- function getContentType()
- {
- return 'text/plain';
- }
-}
-
-?>
diff --git a/BSF/include/ws_protocols/php_encoder.php b/BSF/include/ws_protocols/php_encoder.php
deleted file mode 100644
index ce9afd3e6..000000000
--- a/BSF/include/ws_protocols/php_encoder.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-class PwgSerialPhpEncoder extends PwgResponseEncoder
-{
- function encodeResponse($response)
- {
- $respClass = strtolower( get_class($response) );
- if ($respClass=='pwgerror')
- {
- return serialize(
- array(
- 'stat' => 'fail',
- 'err' => $response->code(),
- 'message' => $response->message(),
- )
- );
- }
- parent::flattenResponse($response);
- return serialize(
- array(
- 'stat' => 'ok',
- 'result' => $response
- )
- );
- }
-
- function getContentType()
- {
- return 'text/plain';
- }
-}
-
-?>
diff --git a/BSF/include/ws_protocols/rest_encoder.php b/BSF/include/ws_protocols/rest_encoder.php
deleted file mode 100644
index e057c6427..000000000
--- a/BSF/include/ws_protocols/rest_encoder.php
+++ /dev/null
@@ -1,281 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-
-class PwgXmlWriter
-{
- var $_indent;
- var $_indentStr;
-
- var $_elementStack;
- var $_lastTagOpen;
- var $_indentLevel;
-
- var $_encodedXml;
-
- function PwgXmlWriter()
- {
- $this->_elementStack = array();
- $this->_lastTagOpen = false;
- $this->_indentLevel = 0;
-
- $this->_encodedXml = '';
- $this->_indent = true;
- $this->_indentStr = "\t";
- }
-
- function &getOutput()
- {
- return $this->_encodedXml;
- }
-
-
- function start_element($name)
- {
- $this->_end_prev(false);
- if (!empty($this->_elementStack))
- {
- $this->_eol_indent();
- }
- $this->_indentLevel++;
- $this->_indent();
- $this->_output( '<'.$name );
- $this->_lastTagOpen = true;
- array_push( $this->_elementStack, $name);
- }
-
- function end_element($x)
- {
- $close_tag = $this->_end_prev(true);
- $name = array_pop( $this->_elementStack );
- if ($close_tag)
- {
- $this->_indentLevel--;
- $this->_indent();
-// $this->_eol_indent();
- $this->_output('</'.$name.">");
- }
- }
-
- function write_content($value)
- {
- $this->_end_prev(false);
- $value = (string)$value;
- $this->_output( htmlspecialchars( $value ) );
- }
-
- function write_cdata($value)
- {
- $this->_end_prev(false);
- $value = (string)$value;
- $this->_output(
- '<![CDATA['
- . str_replace(']]>', ']]&gt;', $value)
- . ']]>' );
- }
-
- function write_attribute($name, $value)
- {
- $this->_output(' '.$name.'="'.$this->encode_attribute($value).'"');
- }
-
- function encode_attribute($value)
- {
- return htmlspecialchars( (string)$value);
- }
-
- function _end_prev($done)
- {
- $ret = true;
- if ($this->_lastTagOpen)
- {
- if ($done)
- {
- $this->_indentLevel--;
- $this->_output( ' />' );
- //$this->_eol_indent();
- $ret = false;
- }
- else
- {
- $this->_output( '>' );
- }
- $this->_lastTagOpen = false;
- }
- return $ret;
- }
-
- function _eol_indent()
- {
- if ($this->_indent)
- $this->_output("\n");
- }
-
- function _indent()
- {
- if ($this->_indent and
- $this->_indentLevel > count($this->_elementStack) )
- {
- $this->_output(
- str_repeat( $this->_indentStr, count($this->_elementStack) )
- );
- }
- }
-
- function _output($raw_content)
- {
- $this->_encodedXml .= $raw_content;
- }
-}
-
-class PwgRestEncoder extends PwgResponseEncoder
-{
- function encodeResponse($response)
- {
- $respClass = strtolower( get_class($response) );
- if ($respClass=='pwgerror')
- {
- $ret = '<?xml version="1.0"?>
-<rsp stat="fail">
- <err code="'.$response->code().'" msg="'.htmlspecialchars($response->message()).'" />
-</rsp>';
- return $ret;
- }
-
- $this->_writer = new PwgXmlWriter();
- $this->encode($response);
- $ret = $this->_writer->getOutput();
- $ret = '<?xml version="1.0" encoding="'.get_pwg_charset().'" ?>
-<rsp stat="ok">
-'.$ret.'
-</rsp>';
-
- return $ret;
- }
-
- function getContentType()
- {
- return 'text/xml';
- }
-
- function encode_array($data, $itemName, $xml_attributes=array())
- {
- foreach ($data as $item)
- {
- $this->_writer->start_element( $itemName );
- $this->encode($item, $xml_attributes);
- $this->_writer->end_element( $itemName );
- }
- }
-
- function encode_struct($data, $skip_underscore, $xml_attributes=array())
- {
- foreach ($data as $name => $value)
- {
- if (is_numeric($name))
- continue;
- if ($skip_underscore and $name[0]=='_')
- continue;
- if ( is_null($value) )
- continue; // null means we dont put it
- if ( $name==WS_XML_ATTRIBUTES)
- {
- foreach ($value as $attr_name => $attr_value)
- {
- $this->_writer->write_attribute($attr_name, $attr_value);
- }
- unset($data[$name]);
- }
- else if ( isset($xml_attributes[$name]) )
- {
- $this->_writer->write_attribute($name, $value);
- unset($data[$name]);
- }
- }
-
- foreach ($data as $name => $value)
- {
- if (is_numeric($name))
- continue;
- if ($skip_underscore and $name[0]=='_')
- continue;
- if ( is_null($value) )
- continue; // null means we dont put it
- if ($name!=WS_XML_CONTENT)
- $this->_writer->start_element($name);
- $this->encode($value);
- if ($name!=WS_XML_CONTENT)
- $this->_writer->end_element($name);
- }
- }
-
- function encode($data, $xml_attributes=array() )
- {
- switch (gettype($data))
- {
- case 'null':
- case 'NULL':
- $this->_writer->write_content('');
- break;
- case 'boolean':
- $this->_writer->write_content($data ? '1' : '0');
- break;
- case 'integer':
- case 'double':
- $this->_writer->write_content($data);
- break;
- case 'string':
- $this->_writer->write_content($data);
- break;
- case 'array':
- $is_array = range(0, count($data) - 1) === array_keys($data);
- if ($is_array)
- {
- $this->encode_array($data, 'item' );
- }
- else
- {
- $this->encode_struct($data, false, $xml_attributes);
- }
- break;
- case 'object':
- switch ( strtolower(get_class($data)) )
- {
- case 'pwgnamedarray':
- $this->encode_array($data->_content, $data->_itemName, $data->_xmlAttributes);
- break;
- case 'pwgnamedstruct':
- $this->encode_array( array($data->_content), $data->_name, $data->_xmlAttributes);
- break;
- default:
- $this->encode_struct(get_object_vars($data), true);
- break;
- }
- break;
- default:
- trigger_error("Invalid type ". gettype($data)." ".get_class($data), E_USER_WARNING );
- }
- }
-}
-
-?>
diff --git a/BSF/include/ws_protocols/rest_handler.php b/BSF/include/ws_protocols/rest_handler.php
deleted file mode 100644
index c9c8ad9b0..000000000
--- a/BSF/include/ws_protocols/rest_handler.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-class PwgRestRequestHandler
-{
- function handleRequest(&$service)
- {
- $params = array();
-
- $param_array = $service->isPost() ? $_POST : $_GET;
- foreach ($param_array as $name => $value)
- {
- if ($name=='format' or $name=='partner')
- continue; // ignore - special keys
- if ($name=='method')
- {
- $method = $value;
- }
- else
- {
- $params[$name]=$value;
- }
- }
-
- if ( empty($method) )
- {
- $service->sendResponse(
- new PwgError(400, 'Missing "method" name')
- );
- return;
- }
- $resp = $service->invoke($method, $params);
- $service->sendResponse($resp);
- }
-}
-
-?>
diff --git a/BSF/include/ws_protocols/xmlrpc_encoder.php b/BSF/include/ws_protocols/xmlrpc_encoder.php
deleted file mode 100644
index 26f0f510e..000000000
--- a/BSF/include/ws_protocols/xmlrpc_encoder.php
+++ /dev/null
@@ -1,115 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-function xmlrpc_encode($data)
-{
- switch (gettype($data))
- {
- case 'boolean':
- return '<boolean>'.($data ? '1' : '0').'</boolean>';
- case 'integer':
- return '<int>'.$data.'</int>';
- case 'double':
- return '<double>'.$data.'</double>';
- case 'string':
- return '<string>'.htmlspecialchars($data).'</string>';
- case 'object':
- case 'array':
- $is_array = range(0, count($data) - 1) === array_keys($data);
- if ($is_array)
- {
- $return = '<array><data>'."\n";
- foreach ($data as $item)
- {
- $return .= ' <value>'.xmlrpc_encode($item)."</value>\n";
- }
- $return .= '</data></array>';
- }
- else
- {
- $return = '<struct>'."\n";
- foreach ($data as $name => $value)
- {
- $name = htmlspecialchars($name);
- $return .= " <member><name>$name</name><value>";
- $return .= xmlrpc_encode($value)."</value></member>\n";
- }
- $return .= '</struct>';
- }
- return $return;
- }
-}
-
-class PwgXmlRpcEncoder extends PwgResponseEncoder
-{
- function encodeResponse($response)
- {
- $respClass = strtolower( get_class($response) );
- if ($respClass=='pwgerror')
- {
- $code = $response->code();
- $msg = htmlspecialchars($response->message());
- $ret = <<<EOD
-<methodResponse>
- <fault>
- <value>
- <struct>
- <member>
- <name>faultCode</name>
- <value><int>{$code}</int></value>
- </member>
- <member>
- <name>faultString</name>
- <value><string>{$msg}</string></value>
- </member>
- </struct>
- </value>
- </fault>
-</methodResponse>
-EOD;
- return $ret;
- }
-
- parent::flattenResponse($response);
- $ret = xmlrpc_encode($response);
- $ret = <<<EOD
-<methodResponse>
- <params>
- <param>
- <value>
- $ret
- </value>
- </param>
- </params>
-</methodResponse>
-EOD;
- return $ret;
- }
-
- function getContentType()
- {
- return 'text/xml';
- }
-}
-
-?>
diff --git a/BSF/index.php b/BSF/index.php
deleted file mode 100644
index 1f667130f..000000000
--- a/BSF/index.php
+++ /dev/null
@@ -1,292 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-//--------------------------------------------------------------------- include
-define('PHPWG_ROOT_PATH','./');
-include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
-include(PHPWG_ROOT_PATH.'include/section_init.inc.php');
-
-trigger_action('loc_begin_index');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_GUEST);
-
-//---------------------------------------------- change of image display order
-if (isset($_GET['image_order']))
-{
- if ( (int)$_GET['image_order'] > 0)
- {
- pwg_set_session_var('image_order', (int)$_GET['image_order']);
- }
- else
- {
- pwg_unset_session_var('image_order');
- }
- redirect(
- duplicate_index_url(
- array(), // nothing to redefine
- array('start') // changing display order goes back to section first page
- )
- );
-}
-//-------------------------------------------------------------- initialization
-// detection of the start picture to display
-if (!isset($page['start']))
-{
- $page['start'] = 0;
-}
-
-// access authorization check
-if (isset($page['category']))
-{
- check_restrictions($page['category']['id']);
-}
-
-if (count($page['items']) > $user['nb_image_page'])
-{
- $page['navigation_bar'] = create_navigation_bar(
- duplicate_index_url(array(), array('start')),
- count($page['items']),
- $page['start'],
- $user['nb_image_page'],
- true
- );
-}
-else
-{
- $page['navigation_bar'] = '';
-}
-
-// caddie filling :-)
-if (isset($_GET['caddie']))
-{
- fill_caddie($page['items']);
- redirect(duplicate_index_url());
-}
-
-//----------------------------------------------------- template initialization
-//
-// Start output of page
-//
-$title = $page['title'];
-$page['body_id'] = 'theCategoryPage';
-
-$template->set_filenames( array('index'=>'index.tpl') );
-//-------------------------------------------------------------- category title
-$template_title = $page['title'];
-if (count($page['items']) > 0)
-{
- $template_title.= ' ['.count($page['items']).']';
-}
-$template->assign('TITLE', $template_title);
-
-if (isset($page['flat']) or isset($page['chronology_field']))
-{
- $template->assign(
- 'U_MODE_NORMAL',
- duplicate_index_url( array(), array('chronology_field', 'start', 'flat') )
- );
-}
-
-if (!isset($page['flat']) and 'categories' == $page['section'])
-{
- $template->assign(
- 'U_MODE_FLAT',
- duplicate_index_url(array('flat' => ''), array('start', 'chronology_field'))
- );
-}
-
-if (!isset($page['chronology_field']))
-{
- $chronology_params =
- array(
- 'chronology_field' => 'created',
- 'chronology_style' => 'monthly',
- 'chronology_view' => 'list',
- );
- $template->assign(
- 'U_MODE_CREATED',
- duplicate_index_url( $chronology_params, array('start', 'flat') )
- );
-
- $chronology_params['chronology_field'] = 'posted';
- $template->assign(
- 'U_MODE_POSTED',
- duplicate_index_url( $chronology_params, array('start', 'flat') )
- );
-}
-else
-{
- if ($page['chronology_field'] == 'created')
- {
- $chronology_field = 'posted';
- }
- else
- {
- $chronology_field = 'created';
- }
- $url = duplicate_index_url(
- array('chronology_field'=>$chronology_field ),
- array('chronology_date', 'start', 'flat')
- );
- $template->assign(
- 'U_MODE_'.strtoupper($chronology_field),
- $url
- );
-}
-// include menubar
-include(trigger_event('menubar_file',
- PHPWG_ROOT_PATH.'include/menubar.inc.php'));
-
-if ('search' == $page['section'])
-{
- $template->assign(
- 'U_SEARCH_RULES',
- get_root_url().'search_rules.php?search_id='.$page['search']
- );
-}
-
-if (isset($page['category']) and is_admin())
-{
- $template->assign(
- 'U_EDIT',
- get_root_url().'admin.php?page=cat_modify'
- .'&amp;cat_id='.$page['category']['id']
- );
-}
-
-if (is_admin() and !empty($page['items']))
-{
- $template->assign(
- 'U_CADDIE',
- add_url_params(duplicate_index_url(), array('caddie'=>1) )
- );
-}
-
-if ( $page['section']=='search' and $page['start']==0 and
- !isset($page['chronology_field']) and isset($page['qsearch_details']) )
-{
- $template->assign('QUERY_SEARCH',
- htmlspecialchars($page['qsearch_details']['q']) );
-
- $cats = array_merge(
- (array)@$page['qsearch_details']['matching_cats_no_images'],
- (array)@$page['qsearch_details']['matching_cats'] );
- if (count($cats))
- {
- usort($cats, 'name_compare');
- $hints = array();
- foreach ( $cats as $cat )
- {
- $hints[] = get_cat_display_name( array($cat) );
- }
- $template->assign( 'category_search_results', $hints);
- }
-
- $tags = (array)@$page['qsearch_details']['matching_tags'];
- if (count($tags))
- {
- usort($tags, 'name_compare');
- $hints = array();
- foreach ( $tags as $tag )
- {
- $hints[] =
- '<a href="' . make_index_url(array('tags'=>array($tag))) . '">'
- .$tag['name']
- .'</a>';
- }
- $template->assign( 'tag_search_results', $hints);
- }
-}
-
-//------------------------------------------------------ main part : thumbnails
-if ( 0==$page['start']
- and !isset($page['flat'])
- and !isset($page['chronology_field'])
- and ('recent_cats'==$page['section'] or 'categories'==$page['section'])
- )
-{
- include(PHPWG_ROOT_PATH.'include/category_cats.inc.php');
-}
-if ( !empty($page['items']) )
-{
- include(PHPWG_ROOT_PATH.'include/category_default.inc.php');
-}
-//------------------------------------------------------- category informations
-
-// slideshow
-// execute after init thumbs in order to have all picture informations
-if (!empty($page['cat_slideshow_url']))
-{
- if (isset($_GET['slideshow']))
- {
- redirect($page['cat_slideshow_url']);
- }
- else
- {
- $template->assign('U_SLIDESHOW', $page['cat_slideshow_url']);
- }
-}
-
-// navigation bar
-$template->assign( 'NAV_BAR', $page['navigation_bar'] );
-
-if ( count($page['items']) > 0
- and $page['section'] != 'most_visited'
- and $page['section'] != 'best_rated')
-{
- // image order
- $order_idx = pwg_get_session_var( 'image_order', 0 );
-
- $orders = get_category_preferred_image_orders();
- for ($i = 0; $i < count($orders); $i++)
- {
- if ($orders[$i][2])
- {
- $template->append(
- 'image_orders',
- array(
- 'DISPLAY' => $orders[$i][0],
- 'URL' => add_url_params( duplicate_index_url(), array('image_order'=>$i) ),
- 'SELECTED' => ($order_idx==$i ? true:false),
- )
- );
- }
- }
-}
-
-// category comment
-if (isset($page['comment']) and $page['comment'] != '')
-{
- $template->assign('CONTENT_DESCRIPTION', $page['comment'] );
-}
-//------------------------------------------------------------ log informations
-pwg_log();
-
-include(PHPWG_ROOT_PATH.'include/page_header.php');
-trigger_action('loc_end_index');
-$template->pparse('index');
-include(PHPWG_ROOT_PATH.'include/page_tail.php');
-?>
diff --git a/BSF/install.php b/BSF/install.php
deleted file mode 100644
index a1c737c56..000000000
--- a/BSF/install.php
+++ /dev/null
@@ -1,409 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-//----------------------------------------------------------- include
-define('PHPWG_ROOT_PATH','./');
-
-/**
- * loads an sql file and executes all queries
- *
- * Before executing a query, $replaced is... replaced by $replacing. This is
- * useful when the SQL file contains generic words. Drop table queries are
- * not executed.
- *
- * @param string filepath
- * @param string replaced
- * @param string replacing
- * @return void
- */
-function execute_sqlfile($filepath, $replaced, $replacing)
-{
- $sql_lines = file($filepath);
- $query = '';
- foreach ($sql_lines as $sql_line)
- {
- $sql_line = trim($sql_line);
- if (preg_match('/(^--|^$)/', $sql_line))
- {
- continue;
- }
- $query.= ' '.$sql_line;
- // if we reached the end of query, we execute it and reinitialize the
- // variable "query"
- if (preg_match('/;$/', $sql_line))
- {
- $query = trim($query);
- $query = str_replace($replaced, $replacing, $query);
- // we don't execute "DROP TABLE" queries
- if (!preg_match('/^DROP TABLE/i', $query))
- {
- global $install_charset_collate;
- if ( !empty($install_charset_collate) )
- {
- if ( preg_match('/^(CREATE TABLE .*)[\s]*;[\s]*/im', $query, $matches) )
- {
- $query = $matches[1].' '.$install_charset_collate.';';
- }
- }
- mysql_query($query);
- }
- $query = '';
- }
- }
-}
-
-set_magic_quotes_runtime(0); // Disable magic_quotes_runtime
-//
-// addslashes to vars if magic_quotes_gpc is off this is a security
-// precaution to prevent someone trying to break out of a SQL statement.
-//
-if( !get_magic_quotes_gpc() )
-{
- if( is_array($_POST) )
- {
- while( list($k, $v) = each($_POST) )
- {
- if( is_array($_POST[$k]) )
- {
- while( list($k2, $v2) = each($_POST[$k]) )
- {
- $_POST[$k][$k2] = addslashes($v2);
- }
- @reset($_POST[$k]);
- }
- else
- {
- $_POST[$k] = addslashes($v);
- }
- }
- @reset($_POST);
- }
-
- if( is_array($_GET) )
- {
- while( list($k, $v) = each($_GET) )
- {
- if( is_array($_GET[$k]) )
- {
- while( list($k2, $v2) = each($_GET[$k]) )
- {
- $_GET[$k][$k2] = addslashes($v2);
- }
- @reset($_GET[$k]);
- }
- else
- {
- $_GET[$k] = addslashes($v);
- }
- }
- @reset($_GET);
- }
-
- if( is_array($_COOKIE) )
- {
- while( list($k, $v) = each($_COOKIE) )
- {
- if( is_array($_COOKIE[$k]) )
- {
- while( list($k2, $v2) = each($_COOKIE[$k]) )
- {
- $_COOKIE[$k][$k2] = addslashes($v2);
- }
- @reset($_COOKIE[$k]);
- }
- else
- {
- $_COOKIE[$k] = addslashes($v);
- }
- }
- @reset($_COOKIE);
- }
-}
-
-//----------------------------------------------------- variable initialization
-
-define('DEFAULT_PREFIX_TABLE', 'piwigo_');
-
-// Obtain various vars
-$dbhost = (!empty($_POST['dbhost'])) ? $_POST['dbhost'] : 'localhost';
-$dbuser = (!empty($_POST['dbuser'])) ? $_POST['dbuser'] : '';
-$dbpasswd = (!empty($_POST['dbpasswd'])) ? $_POST['dbpasswd'] : '';
-$dbname = (!empty($_POST['dbname'])) ? $_POST['dbname'] : '';
-
-if (isset($_POST['install']))
-{
- $table_prefix = $_POST['prefix'];
-}
-else
-{
- $table_prefix = DEFAULT_PREFIX_TABLE;
-}
-
-$admin_name = (!empty($_POST['admin_name'])) ? $_POST['admin_name'] : '';
-$admin_pass1 = (!empty($_POST['admin_pass1'])) ? $_POST['admin_pass1'] : '';
-$admin_pass2 = (!empty($_POST['admin_pass2'])) ? $_POST['admin_pass2'] : '';
-$admin_mail = (!empty($_POST['admin_mail'])) ? $_POST['admin_mail'] : '';
-
-$infos = array();
-$errors = array();
-
-// Open config.php ... if it exists
-$config_file = PHPWG_ROOT_PATH.'include/mysql.inc.php';
-if (@file_exists($config_file))
-{
- include($config_file);
- // Is Piwigo already installed ?
- if (defined("PHPWG_INSTALLED"))
- {
- die('Piwigo is already installed');
- }
-}
-
-$prefixeTable = $table_prefix;
-include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
-@include(PHPWG_ROOT_PATH. 'include/config_local.inc.php');
-include(PHPWG_ROOT_PATH . 'include/constants.php');
-include(PHPWG_ROOT_PATH . 'include/functions.inc.php');
-include(PHPWG_ROOT_PATH . 'admin/include/functions.php');
-include(PHPWG_ROOT_PATH . 'admin/include/functions_upgrade.php');
-include(PHPWG_ROOT_PATH . 'include/template.class.php');
-
-if (isset($_GET['language']))
-{
- $language = strip_tags($_GET['language']);
-}
-else
-{
- $language = 'en_UK';
- // Try to get browser language
- foreach (get_languages('utf-8') as $language_code => $language_name)
- {
- if (substr($language_code,0,2) == @substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2))
- {
- $language = $language_code;
- break;
- }
- }
-}
-
-load_language( 'common.lang', '', $language, false, 'utf-8' );
-load_language( 'admin.lang', '', $language, false, 'utf-8' );
-load_language( 'install.lang', '', $language, false, 'utf-8' );
-
-//----------------------------------------------------- template initialization
-$template=new Template(PHPWG_ROOT_PATH.'template/yoga', 'clear');
-$template->set_filenames( array('install'=>'install.tpl') );
-$step = 1;
-//---------------------------------------------------------------- form analyze
-if ( isset( $_POST['install'] ))
-{
- if ( @mysql_connect( $_POST['dbhost'],
- $_POST['dbuser'],
- $_POST['dbpasswd'] ) )
- {
- if ( @mysql_select_db($_POST['dbname'] ) )
- {
- array_push( $infos, l10n('step1_confirmation') );
- }
- else
- {
- array_push( $errors, l10n('step1_err_db') );
- }
- if ( version_compare(mysql_get_server_info(), '4.1.0', '>=') )
- {
- $pwg_charset='utf-8';
- $pwg_db_charset='utf8';
- $install_charset_collate = "DEFAULT CHARACTER SET $pwg_db_charset";
- }
- else
- {
- $pwg_charset='iso-8859-1';
- $pwg_db_charset='latin1';
- $install_charset_collate = '';
- if ( !array_key_exists($language, get_languages($pwg_charset) ) )
- {
- $language='en_UK';
- }
- }
- }
- else
- {
- array_push( $errors, l10n('step1_err_server') );
- }
-
- $webmaster = trim(preg_replace( '/\s{2,}/', ' ', $admin_name ));
- if ( empty($webmaster))
- array_push( $errors, l10n('step2_err_login1') );
- else if ( preg_match( '/[\'"]/', $webmaster ) )
- array_push( $errors, l10n('step2_err_login3') );
- if ( $admin_pass1 != $admin_pass2 || empty($admin_pass1) )
- array_push( $errors, l10n('step2_err_pass') );
- if ( empty($admin_mail))
- array_push( $errors, l10n('reg_err_mail_address') );
- else
- {
- $error_mail_address = validate_mail_address(null, $admin_mail);
- if (!empty($error_mail_address))
- array_push( $errors, $error_mail_address );
- }
-
- if ( count( $errors ) == 0 )
- {
- $step = 2;
- $file_content = '<?php
-$cfgBase = \''.$dbname.'\';
-$cfgUser = \''.$dbuser.'\';
-$cfgPassword = \''.$dbpasswd.'\';
-$cfgHote = \''.$dbhost.'\';
-
-$prefixeTable = \''.$table_prefix.'\';
-
-define(\'PHPWG_INSTALLED\', true);
-define(\'PWG_CHARSET\', \''.$pwg_charset.'\');
-define(\'DB_CHARSET\', \''.$pwg_db_charset.'\');
-define(\'DB_COLLATE\', \'\');
-
-?'.'>';
-
- @umask(0111);
- // writing the configuration file
- if ( !($fp = @fopen( $config_file, 'w' )))
- {
- $html_content = htmlentities( $file_content, ENT_QUOTES );
- $html_content = nl2br( $html_content );
- $template->assign('error_copy', $html_content);
- }
- @fputs($fp, $file_content, strlen($file_content));
- @fclose($fp);
-
- // Create empty local files to avoid log errors
- create_empty_local_files();
-
- // tables creation, based on piwigo_structure.sql
- execute_sqlfile(
- PHPWG_ROOT_PATH.'install/piwigo_structure.sql',
- DEFAULT_PREFIX_TABLE,
- $table_prefix
- );
- // We fill the tables with basic informations
- execute_sqlfile(
- PHPWG_ROOT_PATH.'install/config.sql',
- DEFAULT_PREFIX_TABLE,
- $table_prefix
- );
-
- // fill $conf global array
- load_conf_from_db();
-
- $insert = array(
- 'id' => 1,
- 'galleries_url' => PHPWG_ROOT_PATH.'galleries/',
- );
- mass_inserts(SITES_TABLE, array_keys($insert), array($insert));
-
- // webmaster admin user
- $inserts = array(
- array(
- 'id' => 1,
- 'username' => $admin_name,
- 'password' => md5($admin_pass1),
- 'mail_address' => $admin_mail,
- ),
- array(
- 'id' => 2,
- 'username' => 'guest',
- ),
- );
- mass_inserts(USERS_TABLE, array_keys($inserts[0]), $inserts);
-
- create_user_infos(array(1,2), array('language' => $language));
-
- // Available upgrades must be ignored after a fresh installation. To
- // make PWG avoid upgrading, we must tell it upgrades have already been
- // made.
- list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
- define('CURRENT_DATE', $dbnow);
- $datas = array();
- foreach (get_available_upgrade_ids() as $upgrade_id)
- {
- array_push(
- $datas,
- array(
- 'id' => $upgrade_id,
- 'applied' => CURRENT_DATE,
- 'description' => 'upgrade included in installation',
- )
- );
- }
- mass_inserts(
- UPGRADE_TABLE,
- array_keys($datas[0]),
- $datas
- );
- }
-}
-
-//------------------------------------------------------ start template output
-foreach (get_languages('utf-8') as $language_code => $language_name)
-{
- if ($language == $language_code)
- {
- $template->assign('language_selection', $language_code);
- }
- $languages_options[$language_code] = $language_name;
-}
-$template->assign('language_options', $languages_options);
-
-$template->assign(
- array(
- 'T_CONTENT_ENCODING' => 'utf-8',
- 'RELEASE'=>PHPWG_VERSION,
- 'F_ACTION' => 'install.php?language=' . $language,
- 'F_DB_HOST'=>$dbhost,
- 'F_DB_USER'=>$dbuser,
- 'F_DB_NAME'=>$dbname,
- 'F_DB_PREFIX' => $table_prefix,
- 'F_ADMIN'=>$admin_name,
- 'F_ADMIN_EMAIL'=>$admin_mail,
- 'L_INSTALL_HELP'=>sprintf(l10n('install_help'), 'http://forum.'.PHPWG_DOMAIN.'/'),
- ));
-
-//------------------------------------------------------ errors & infos display
-if (count($errors) != 0)
-{
- $template->assign('errors', $errors);
-}
-
-if (count($infos) != 0 )
-{
- $template->assign('infos', $infos);
-}
-
-if ($step == 1)
-{
- $template->assign('install', true);
-}
-
-//----------------------------------------------------------- html code display
-$template->pparse('install');
-?>
diff --git a/BSF/install/config.sql b/BSF/install/config.sql
deleted file mode 100644
index 36ec2088a..000000000
--- a/BSF/install/config.sql
+++ /dev/null
@@ -1,29 +0,0 @@
--- initial configuration for Piwigo
-
-INSERT INTO piwigo_config (param,value,comment) VALUES ('nb_comment_page','10','number of comments to display on each page');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('log','false','keep an history of visits on your website');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('comments_validation','false','administrators validate users comments before becoming visible');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('comments_forall','false','even guest not registered can post comments');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('gallery_locked','false','Lock your gallery temporary for non admin users');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('gallery_title','Piwigo demonstration site','Title at top of each page and for RSS feed');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('gallery_url','http://demo.piwigo.net','URL given in RSS feed');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('rate','true','Rating pictures feature is enabled');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('rate_anonymous','true','Rating pictures feature is also enabled for visitors');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('page_banner','<h1>Piwigo demonstration site</h1><p>My photos web site</p>','html displayed on the top each page of your gallery');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('history_admin','false','keep a history of administrator visits on your website');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('history_guest','true','keep a history of guest visits on your website');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('allow_user_registration','true','allow visitors to register?');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('secret_key', MD5(RAND()), 'a secret key specific to the gallery for internal use');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('nbm_send_html_mail','true','Send mail on HTML format for notification by mail');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('nbm_send_mail_as','','Send mail as param value for notification by mail');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('nbm_send_detailed_content','true','Send detailed content for notification by mail');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('nbm_complementary_mail_content','','Complementary mail content for notification by mail');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('nbm_send_recent_post_dates','true','Send recent post by dates for notification by mail');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('email_admin_on_new_user','false','Send an email to theadministrators when a user registers');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('email_admin_on_comment','false','Send an email to the administrators when a valid comment is entered');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('email_admin_on_comment_validation','false','Send an email to the administrators when a comment requires validation');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('email_admin_on_picture_uploaded','false','Send an email to the administrators when a picture is uploaded');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('obligatory_user_mail_address','false','Mail address is obligatory for users');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('c13y_ignore',null,'List of ignored anomalies');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('upload_link_everytime','false','Show upload link every time');
-INSERT INTO piwigo_config (param,value,comment) VALUES ('upload_user_access',2 /*ACCESS_CLASSIC*/,'User access level to upload');
diff --git a/BSF/install/db/1-database.php b/BSF/install/db/1-database.php
deleted file mode 100644
index 5cc4ac96f..000000000
--- a/BSF/install/db/1-database.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Just a beginning test';
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-list($now) = mysql_fetch_row(pwg_query('SELECT NOW()'));
-echo
-$now
-."\n"
-.'This upgrade script is for test purpose only'
-."\n"
-;
-?>
diff --git a/BSF/install/db/10-database.php b/BSF/install/db/10-database.php
deleted file mode 100644
index 47b9a17f1..000000000
--- a/BSF/install/db/10-database.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'New table #categories_link';
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = "
-CREATE TABLE phpwebgallery_categories_link (
- source smallint(5) unsigned NOT NULL default '0',
- destination smallint(5) unsigned NOT NULL default '0',
- PRIMARY KEY (source,destination)
-) TYPE=MyISAM;";
-pwg_query($query);
-
-// +-----------------------------------------------------------------------+
-// | End notification |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.'Table '.PREFIX_TABLE.'categories_link created'
-."\n"
-;
-?>
diff --git a/BSF/install/db/11-database.php b/BSF/install/db/11-database.php
deleted file mode 100644
index c4b3a485c..000000000
--- a/BSF/install/db/11-database.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description =
- 'Table #categories_link created once again with correct prefix';
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-if (PREFIX_TABLE == 'phpwebgallery_')
-{
- echo
- "\n"
- .'Table '.PREFIX_TABLE.'categories_link was already correctly created'
- ."\n"
- ;
-}
-else
-{
- $query = '
-DROP TABLE phpwebgallery_categories_link;
-;';
- pwg_query($query);
-
- $query = "
-CREATE TABLE ".PREFIX_TABLE."categories_link (
- source smallint(5) unsigned NOT NULL default '0',
- destination smallint(5) unsigned NOT NULL default '0',
- PRIMARY KEY (source,destination)
-) TYPE=MyISAM;";
- pwg_query($query);
-
- echo
- "\n"
- .'Table '.PREFIX_TABLE.'categories_link created'
- ."\n"
- ;
-}
-?>
diff --git a/BSF/install/db/12-database.php b/BSF/install/db/12-database.php
deleted file mode 100644
index b63495276..000000000
--- a/BSF/install/db/12-database.php
+++ /dev/null
@@ -1,99 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Field "Status" Table #user_infos changed';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
-@include(PHPWG_ROOT_PATH. 'include/config_local.inc.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-echo "Alter table ".USER_INFOS_TABLE;
-$query = "
-alter table ".USER_INFOS_TABLE."
- modify column `status` enum('webmaster', 'admin', 'normal', 'generic', 'guest') NOT NULL default 'guest'
-;";
-pwg_query($query);
-
-echo "Define webmaster";
-$query = '
-update
- '.USER_INFOS_TABLE.'
-set status = \'webmaster\'
-where
- user_id = '.$conf['webmaster_id'].' and status = \'admin\'
-;';
-$result = pwg_query($query);
-
-echo "Define normal";
-$query = '
-select
- user_id
-from
- '.USER_INFOS_TABLE.'
-where
- user_id != '.$conf['guest_id'].' and status = \'guest\'
-;';
-$result = pwg_query($query);
-
-$datas = array();
-
-while ($row = mysql_fetch_array($result))
-{
- array_push(
- $datas,
- array(
- 'user_id' => $row['user_id'],
- 'status' => 'normal'
- )
- );
-}
-
-mass_updates(
- USER_INFOS_TABLE,
- array(
- 'primary' => array('user_id'),
- 'update' => array('status')
- ),
- $datas
- );
-
-// +-----------------------------------------------------------------------+
-// | End notification |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.'Column '.USER_INFOS_TABLE.'.status changed'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/13-database.php b/BSF/install/db/13-database.php
deleted file mode 100644
index d6df66fad..000000000
--- a/BSF/install/db/13-database.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = '#config (gallery_description out page_banner in)';
-
-$query = "
-ALTER TABLE ".PREFIX_TABLE."config MODIFY COLUMN `value` TEXT;";
-pwg_query($query);
-
-
-$query = '
-SELECT value
- FROM '.PREFIX_TABLE.'config
- WHERE param=\'gallery_title\'
-;';
-list($t) = array_from_query($query, 'value');
-
-$query = '
-SELECT value
- FROM '.PREFIX_TABLE.'config
- WHERE param=\'gallery_description\'
-;';
-list($d) = array_from_query($query, 'value');
-
-$page_banner='<div id="theHeader"><h1>'.$t.'</h1><p>'.$d.'</p></div>';
-$page_banner=addslashes($page_banner);
-$query = '
-INSERT INTO '.PREFIX_TABLE.'config (param,value,comment) VALUES (' .
-"'page_banner','$page_banner','html displayed on the top each page of your gallery');";
-pwg_query($query);
-
-$query = '
-DELETE FROM '.PREFIX_TABLE.'config
- WHERE param=\'gallery_description\'
-;';
-pwg_query($query);
-
-
-echo
-"\n"
-.'Table '.PREFIX_TABLE.'config updated'
-."\n"
-;
-?>
diff --git a/BSF/install/db/14-database.php b/BSF/install/db/14-database.php
deleted file mode 100644
index 596673814..000000000
--- a/BSF/install/db/14-database.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Update database to new pwg_high structure';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
-@include(PHPWG_ROOT_PATH. 'include/config_local.inc.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-echo "Alter table ".USER_INFOS_TABLE. ' add field enabled_high';
-$query = "
-alter table ".USER_INFOS_TABLE."
- add column `enabled_high` enum('true','false') NOT NULL default 'true'
-;";
-pwg_query($query);
-
-echo "Update ".USER_INFOS_TABLE.".enabled_high with default value";
-$query = "
-update ".USER_INFOS_TABLE." set enabled_high = '".$conf['newuser_default_enabled_high']."'
-where enabled_high <> '".$conf['newuser_default_enabled_high']."'
-;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/15-database.php b/BSF/install/db/15-database.php
deleted file mode 100644
index 0b393d629..000000000
--- a/BSF/install/db/15-database.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = '#user_cache, add column nb_total_pictures (feature 262)';
-
-$query = "
-ALTER TABLE ".PREFIX_TABLE."user_cache ADD COLUMN `nb_total_images` MEDIUMINT(8) UNSIGNED;";
-pwg_query($query);
-
-$query = "
-UPDATE ".PREFIX_TABLE."user_cache SET need_update='true'";
-pwg_query($query);
-
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/16-database.php b/BSF/install/db/16-database.php
deleted file mode 100644
index ad7a49883..000000000
--- a/BSF/install/db/16-database.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Update database from adviser functionnality';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-echo "Alter table ".USER_INFOS_TABLE. ' add field adviser';
-$query = "
-alter table ".USER_INFOS_TABLE."
- add column `adviser` enum('true','false') NOT NULL default 'false' after `status`
-;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/17-database.php b/BSF/install/db/17-database.php
deleted file mode 100644
index d707c55d1..000000000
--- a/BSF/install/db/17-database.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add notification by mail param';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-echo "Add param on ".CONFIG_TABLE;
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('nbm_send_mail_as','','Send mail as param value for notification by mail');
-";
-pwg_query($query);
-
-
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('nbm_send_detailed_content','true','Send detailed content for notification by mail');
-";
-pwg_query($query);
-
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('nbm_complementary_mail_content','','Complementary mail content for notification by mail');
-";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/18-database.php b/BSF/install/db/18-database.php
deleted file mode 100644
index 52aa0e9fa..000000000
--- a/BSF/install/db/18-database.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Reduce length of #_user_mail_notification.check_key';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/functions_notification_by_mail.inc.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-echo "Compute new check_key";
-$query = '
-select
- user_id
-from
- '.USER_MAIL_NOTIFICATION_TABLE.'
-;';
-$result = pwg_query($query);
-
-$datas = array();
-
-while ($row = mysql_fetch_array($result))
-{
- array_push(
- $datas,
- array(
- 'user_id' => $row['user_id'],
- 'check_key' => find_available_check_key()
- )
- );
-}
-
-mass_updates(
- USER_MAIL_NOTIFICATION_TABLE,
- array(
- 'primary' => array('user_id'),
- 'update' => array('check_key')
- ),
- $datas
- );
-
-echo "Alter table ".USER_MAIL_NOTIFICATION_TABLE;
-$query = "
-alter table ".USER_MAIL_NOTIFICATION_TABLE."
- modify column `check_key` varchar(16) binary NOT NULL default ''
-;";
-pwg_query($query);
-
-
-// +-----------------------------------------------------------------------+
-// | End notification |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.'Column '.USER_MAIL_NOTIFICATION_TABLE.'.check_key changed'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/19-database.php b/BSF/install/db/19-database.php
deleted file mode 100644
index e26b502f7..000000000
--- a/BSF/install/db/19-database.php
+++ /dev/null
@@ -1,149 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = '#images.keywords moved to new table #tags';
-
-// +-----------------------------------------------------------------------+
-// | New tables |
-// +-----------------------------------------------------------------------+
-
-$query = '
-CREATE TABLE '.PREFIX_TABLE.'tags (
- id smallint(5) UNSIGNED NOT NULL auto_increment,
- name varchar(255) BINARY NOT NULL,
- url_name varchar(255) BINARY NOT NULL,
- PRIMARY KEY (id)
-) TYPE=MyISAM
-;';
-pwg_query($query);
-
-$query = '
-CREATE TABLE '.PREFIX_TABLE.'image_tag (
- image_id mediumint(8) UNSIGNED NOT NULL,
- tag_id smallint(5) UNSIGNED NOT NULL,
- PRIMARY KEY (image_id,tag_id)
-) TYPE=MyISAM
-;';
-pwg_query($query);
-
-// +-----------------------------------------------------------------------+
-// | Move keywords to tags |
-// +-----------------------------------------------------------------------+
-
-// each tag label is associated to a numeric identifier
-$tag_id = array();
-// to each tag id (key) a list of image ids (value) is associated
-$tag_images = array();
-
-$current_id = 1;
-
-$query = '
-SELECT id, keywords
- FROM '.PREFIX_TABLE.'images
- WHERE keywords IS NOT NULL
-;';
-$result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
-{
- foreach(preg_split('/[,]+/', $row['keywords']) as $keyword)
- {
- if (!isset($tag_id[$keyword]))
- {
- $tag_id[$keyword] = $current_id++;
- }
-
- if (!isset($tag_images[ $tag_id[$keyword] ]))
- {
- $tag_images[ $tag_id[$keyword] ] = array();
- }
-
- array_push($tag_images[ $tag_id[$keyword] ], $row['id']);
- }
-}
-
-$datas = array();
-foreach ($tag_id as $tag_name => $tag_id)
-{
- array_push(
- $datas,
- array(
- 'id' => $tag_id,
- 'name' => $tag_name,
- 'url_name' => str2url($tag_name),
- )
- );
-}
-if (!empty($datas))
-mass_inserts(
- PREFIX_TABLE.'tags',
- array_keys($datas[0]),
- $datas
- );
-
-$datas = array();
-foreach ($tag_images as $tag_id => $images)
-{
- foreach (array_unique($images) as $image_id)
- {
- array_push(
- $datas,
- array(
- 'tag_id' => $tag_id,
- 'image_id' => $image_id,
- )
- );
- }
-}
-
-if (!empty($datas))
-mass_inserts(
- PREFIX_TABLE.'image_tag',
- array_keys($datas[0]),
- $datas
- );
-
-// +-----------------------------------------------------------------------+
-// | Delete images.keywords |
-// +-----------------------------------------------------------------------+
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'images DROP COLUMN keywords
-;';
-pwg_query($query);
-
-// +-----------------------------------------------------------------------+
-// | End notification |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.'Table '.PREFIX_TABLE.'tags created and filled'."\n"
-.'Table '.PREFIX_TABLE.'image_tag created and filled'."\n"
-.'Column '.PREFIX_TABLE.'images.keywords dropped'."\n"
-;
-?>
diff --git a/BSF/install/db/2-database.php b/BSF/install/db/2-database.php
deleted file mode 100644
index 14c4cbfc2..000000000
--- a/BSF/install/db/2-database.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Update template preference for every user';
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-// configuration update
-$query = '
-UPDATE '.PREFIX_TABLE.'config
- SET value = \'yoga/clear\'
- WHERE param = \'default_template\'
-;';
-pwg_query($query);
-
-// set yoga/clear as default value for user_infos.template column
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'user_infos
- CHANGE COLUMN template template varchar(255) NOT NULL default \'yoga/clear\'
-;';
-pwg_query($query);
-
-// users having yoga-dark for template now have yoga/dark
-$query = '
-UPDATE '.PREFIX_TABLE.'user_infos
- SET template = \'yoga/dark\'
- WHERE template = \'yoga-dark\'
-;';
-pwg_query($query);
-
-// all other users have yoga/clear
-$query = '
-UPDATE '.PREFIX_TABLE.'user_infos
- SET template = \'yoga/clear\'
- WHERE template != \'yoga/dark\'
-;';
-pwg_query($query);
-
-echo
-"\n"
-.'Default template modified to yoga/clear'
-."\n"
-.'Template preference modified for every users : yoga/dark'
-.' (for yoga-dark users) and yoga/clear as default'
-."\n"
-;
-?>
diff --git a/BSF/install/db/20-database.php b/BSF/install/db/20-database.php
deleted file mode 100644
index 4561e44ec..000000000
--- a/BSF/install/db/20-database.php
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description =
- '#image_category.is_storage replaced by #image.storage_category_id';
-
-// +-----------------------------------------------------------------------+
-// | New column |
-// +-----------------------------------------------------------------------+
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'images
- ADD storage_category_id smallint(5) unsigned default NULL
-;';
-pwg_query($query);
-
-$query = '
-SELECT category_id, image_id
- FROM '.PREFIX_TABLE.'image_category
- WHERE is_storage = \'true\'
-;';
-$result = pwg_query($query);
-
-$datas = array();
-while ($row = mysql_fetch_array($result))
-{
- array_push(
- $datas,
- array(
- 'id' => $row['image_id'],
- 'storage_category_id' => $row['category_id'],
- )
- );
-}
-mass_updates(
- PREFIX_TABLE.'images',
- array(
- 'primary' => array('id'),
- 'update' => array('storage_category_id'),
- ),
- $datas
- );
-
-// +-----------------------------------------------------------------------+
-// | Delete obsolete column |
-// +-----------------------------------------------------------------------+
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'image_category DROP COLUMN is_storage
-;';
-pwg_query($query);
-
-// +-----------------------------------------------------------------------+
-// | End notification |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.'Column '.PREFIX_TABLE.'image_category'
-.' replaced by '.PREFIX_TABLE.'images.storage_category_id'."\n"
-;
-?>
diff --git a/BSF/install/db/21-database.php b/BSF/install/db/21-database.php
deleted file mode 100644
index 743bbcbe6..000000000
--- a/BSF/install/db/21-database.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'drop table #categories_link';
-
-// +-----------------------------------------------------------------------+
-// | New column |
-// +-----------------------------------------------------------------------+
-
-$query = '
-DROP TABLE '.PREFIX_TABLE.'categories_link
-;';
-pwg_query($query);
-
-// +-----------------------------------------------------------------------+
-// | End notification |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.'Table '.PREFIX_TABLE.'categories_link dropped'."\n"
-;
-?>
diff --git a/BSF/install/db/22-database.php b/BSF/install/db/22-database.php
deleted file mode 100644
index a402b57d1..000000000
--- a/BSF/install/db/22-database.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'add index on #tags.url_name and #image_tag.tag_id ';
-
-
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'tags ADD INDEX `tags_i1`(`url_name`);
-;';
-pwg_query($query);
-
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'image_tag ADD INDEX `image_tag_i1`(`tag_id`);
-;';
-pwg_query($query);
-
-
-// +-----------------------------------------------------------------------+
-// | End notification |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.'Tables '.PREFIX_TABLE.'tags and '.PREFIX_TABLE.'image_tag updated'."\n"
-;
-echo $upgrade_description;
-?>
diff --git a/BSF/install/db/23-database.php b/BSF/install/db/23-database.php
deleted file mode 100644
index 78b0fe2a3..000000000
--- a/BSF/install/db/23-database.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'index images_i1 on storage_category_id comes back';
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'images
- ADD INDEX images_i1(storage_category_id)
-;';
-pwg_query($query);
-
-// +-----------------------------------------------------------------------+
-// | End notification |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.$upgrade_description
-."\n"
-;
-?>
diff --git a/BSF/install/db/24-database.php b/BSF/install/db/24-database.php
deleted file mode 100644
index 21467fd7b..000000000
--- a/BSF/install/db/24-database.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'increase categories.rank size, up to 65535';
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'categories
- CHANGE COLUMN rank rank SMALLINT(5) UNSIGNED DEFAULT NULL
-;';
-pwg_query($query);
-
-// +-----------------------------------------------------------------------+
-// | End notification |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.$upgrade_description
-."\n"
-;
-?>
diff --git a/BSF/install/db/25-database.php b/BSF/install/db/25-database.php
deleted file mode 100644
index 9afa5e5ac..000000000
--- a/BSF/install/db/25-database.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'reinitialize page_banner';
-
-$query = '
-UPDATE '.PREFIX_TABLE.'config
- SET value = \'<h1>Piwigo demonstration site</h1><p>My photos web site</p>\'
- WHERE param = \'page_banner\'
-;';
-pwg_query($query);
-
-// +-----------------------------------------------------------------------+
-// | End notification |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.$upgrade_description
-."\n"
-;
-?>
diff --git a/BSF/install/db/26-database.php b/BSF/install/db/26-database.php
deleted file mode 100644
index 9e614f5d5..000000000
--- a/BSF/install/db/26-database.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'add an auto login key in users table';
-
-// add column auto_login_key
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'users
- ADD auto_login_key varchar(64) NOT NULL
-;';
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
diff --git a/BSF/install/db/27-database.php b/BSF/install/db/27-database.php
deleted file mode 100644
index 600002550..000000000
--- a/BSF/install/db/27-database.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'change username length in users table';
-
-// add column auto_login_key
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'users
- CHANGE username username VARCHAR(100) NOT NULL
-;';
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
diff --git a/BSF/install/db/28-database.php b/BSF/install/db/28-database.php
deleted file mode 100644
index 93758cbba..000000000
--- a/BSF/install/db/28-database.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Delete old file index.htm';
-
-@unlink(PHPWG_ROOT_PATH.'/admin/images/index.htm');
-@unlink(PHPWG_ROOT_PATH.'/admin/include/index.htm');
-@unlink(PHPWG_ROOT_PATH.'/admin/index.htm');
-@unlink(PHPWG_ROOT_PATH.'/language/index.htm');
-@unlink(PHPWG_ROOT_PATH.'/galleries/index.htm');
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
diff --git a/BSF/install/db/29-database.php b/BSF/install/db/29-database.php
deleted file mode 100644
index 04f65c0cb..000000000
--- a/BSF/install/db/29-database.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add column #categories.image_order';
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'categories
- ADD COLUMN image_order VARCHAR(128) DEFAULT NULL
-;';
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
diff --git a/BSF/install/db/3-database.php b/BSF/install/db/3-database.php
deleted file mode 100644
index 3a53f27a8..000000000
--- a/BSF/install/db/3-database.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Update session table for new session system';
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-// delete content of old session table
-$query = '
-DELETE FROM '.PREFIX_TABLE.'sessions
-;';
-pwg_query($query);
-
-// column user_id becomes data of type text
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'sessions
- CHANGE COLUMN user_id data text NOT NULL
-;';
-pwg_query($query);
-
-echo
-"\n"
-.'Column modified in sessions table'
-."\n"
-;
-?>
diff --git a/BSF/install/db/30-database.php b/BSF/install/db/30-database.php
deleted file mode 100644
index d6442965c..000000000
--- a/BSF/install/db/30-database.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add history_guest and login_history to #config';
-
-$query = '
-INSERT INTO '.PREFIX_TABLE."config (param,value,comment) VALUES ('history_admin',".
-((isset($conf['history_admin']) and $conf['history_admin']) ? 'true' : 'false').
-",'keep a history of administrator visits on your website');";
-pwg_query($query);
-
-$query = '
-INSERT INTO '.PREFIX_TABLE."config (param,value,comment) VALUES ('history_guest','true','keep a history of guest visits on your website');";
-pwg_query($query);
-
-$query = '
-INSERT INTO '.PREFIX_TABLE."config (param,value,comment) VALUES ('login_history','true','keep a history of user logins on your website');";
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
diff --git a/BSF/install/db/31-database.php b/BSF/install/db/31-database.php
deleted file mode 100644
index 1463a826f..000000000
--- a/BSF/install/db/31-database.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'change the upgrade 27 - username is binary';
-
-// add column auto_login_key
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'users
- CHANGE username username VARCHAR(100) binary NOT NULL
-;';
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
diff --git a/BSF/install/db/32-database.php b/BSF/install/db/32-database.php
deleted file mode 100644
index 72990ff76..000000000
--- a/BSF/install/db/32-database.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'add active_plugins to config';
-
-// add column auto_login_key
-$query = '
-INSERT INTO '.PREFIX_TABLE.'config (param,value,comment)
- VALUES (\'active_plugins\',\'\',\'activated plugins\')
-;';
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
diff --git a/BSF/install/db/33-database.php b/BSF/install/db/33-database.php
deleted file mode 100644
index 2f771a62f..000000000
--- a/BSF/install/db/33-database.php
+++ /dev/null
@@ -1,51 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add column #group.is_default';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-echo "Add column is_default on ".GROUPS_TABLE;
-$query = '
-alter table '.GROUPS_TABLE.' add column
-`is_default` enum(\'true\',\'false\') NOT NULL default \'false\'
-;';
-pwg_query($query);
-
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/34-database.php b/BSF/install/db/34-database.php
deleted file mode 100644
index 95092b074..000000000
--- a/BSF/install/db/34-database.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add #plugins and remove active_plugins from #config';
-
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = '
-DELETE FROM '.PREFIX_TABLE.'config WHERE param="active_plugins"';
-pwg_query($query);
-
-$query = '
-CREATE TABLE '.PREFIX_TABLE.'plugins (
- `id` varchar(64) binary NOT NULL default "",
- `state` enum("inactive","active") NOT NULL default "inactive",
- `version` varchar(64) NOT NULL default "0",
- PRIMARY KEY (`id`)
-);';
-pwg_query($query);
-
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/35-database.php b/BSF/install/db/35-database.php
deleted file mode 100644
index 8b9e4448f..000000000
--- a/BSF/install/db/35-database.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add email_admin_on_new_user, email_admin_on_comment, email_admin_on_comment_validation';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('email_admin_on_new_user','false','Send an email to the admin when a user registers');
-";
-pwg_query($query);
-
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('email_admin_on_comment','false','Send an email to the admin when a valid comment is entered');
-";
-pwg_query($query);
-
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('email_admin_on_comment_validation','false','Send an email to the admin when a comment requires validation');
-";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/36-database.php b/BSF/install/db/36-database.php
deleted file mode 100644
index e1eccbe3b..000000000
--- a/BSF/install/db/36-database.php
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'get rid of #users.auto_login_key';
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'users
- DROP COLUMN auto_login_key
-;';
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/37-database.php b/BSF/install/db/37-database.php
deleted file mode 100644
index 05362e33a..000000000
--- a/BSF/install/db/37-database.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Cache user categories update';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-echo "Create table ".USER_CACHE_CATEGORIES_TABLE;
-$query = '
-CREATE TABLE '.USER_CACHE_CATEGORIES_TABLE.' (
- `user_id` smallint(5) NOT NULL default \'0\',
- `cat_id` smallint(5) unsigned NOT NULL default \'0\',
- `is_child_date_last` enum(\'true\',\'false\') NOT NULL default \'false\',
- `max_date_last` datetime default NULL,
- `count_images` mediumint(8) unsigned default 0,
- `count_categories` mediumint(8) unsigned default 0,
- PRIMARY KEY (`user_id`, `cat_id`)
-) TYPE=MyISAM;';
-pwg_query($query);
-
-echo "Update table cache ".USER_CACHE_TABLE;
-$query = '
-UPDATE '.USER_CACHE_TABLE.'
- SET need_update = \'true\'
-;';
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/38-database.php b/BSF/install/db/38-database.php
deleted file mode 100644
index ff9a3e788..000000000
--- a/BSF/install/db/38-database.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'delete #user_cache_categories.is_child_date_last';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-$query = '
-ALTER TABLE '.USER_CACHE_CATEGORIES_TABLE.' DROP COLUMN is_child_date_last';
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/39-database.php b/BSF/install/db/39-database.php
deleted file mode 100644
index 7adc8be61..000000000
--- a/BSF/install/db/39-database.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add allow_user_registration to #config';
-
-$query = '
-INSERT INTO '.PREFIX_TABLE."config (param,value,comment) VALUES ('allow_user_registration','true','allow visitors to register?');";
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
diff --git a/BSF/install/db/4-database.php b/BSF/install/db/4-database.php
deleted file mode 100644
index 5385575b9..000000000
--- a/BSF/install/db/4-database.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Table #search is required for search engine redesign';
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-// column user_id becomes data of type text
-$query = '
-CREATE TABLE '.PREFIX_TABLE.'search (
- id int UNSIGNED NOT NULL AUTO_INCREMENT,
- last_seen date DEFAULT NULL,
- rules text,
- PRIMARY KEY (id)
-);';
-pwg_query($query);
-
-echo
-"\n"
-.'Table '.PREFIX_TABLE.'search created'
-."\n"
-;
-?>
diff --git a/BSF/install/db/40-database.php b/BSF/install/db/40-database.php
deleted file mode 100644
index bc5543f0d..000000000
--- a/BSF/install/db/40-database.php
+++ /dev/null
@@ -1,40 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add ws_status to #config';
-
-$query = '
-INSERT INTO '.PREFIX_TABLE."config (param,value,comment) VALUES ('ws_status','true','Web Service is active/inactive');";
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
diff --git a/BSF/install/db/41-database.php b/BSF/install/db/41-database.php
deleted file mode 100644
index 6810fbad1..000000000
--- a/BSF/install/db/41-database.php
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Web service access table creation';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-echo "Create table ".WEB_SERVICES_ACCESS_TABLE;
-$query = '
-CREATE TABLE '.WEB_SERVICES_ACCESS_TABLE." (
- id smallint(5) unsigned NOT NULL auto_increment,
- name varchar(32) NOT NULL default '',
- access varchar(255) default NULL,
- `start` datetime default NULL,
- `end` datetime default NULL,
- request varchar(255) default NULL,
- high enum('true','false') NOT NULL default 'true',
- normal enum('true','false') NOT NULL default 'true',
- `limit` smallint(5) unsigned default NULL,
- `comment` varchar(255) default NULL,
- PRIMARY KEY (id),
- UNIQUE KEY name (name)
-) ENGINE=MyISAM COMMENT='Access for Web Services';";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/42-database.php b/BSF/install/db/42-database.php
deleted file mode 100644
index 12d40b140..000000000
--- a/BSF/install/db/42-database.php
+++ /dev/null
@@ -1,84 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'History table new model and new table history_summary';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-echo "Recreate table ".HISTORY_TABLE."\n";
-
-$query = 'DROP TABLE '.HISTORY_TABLE.';';
-pwg_query($query);
-
-$query = "
-CREATE TABLE `".HISTORY_TABLE."` (
- `id` int(10) unsigned NOT NULL auto_increment,
- `date` date NOT NULL default '0000-00-00',
- `time` time NOT NULL default '00:00:00',
- `year` smallint(4) NOT NULL default '0',
- `month` tinyint(2) NOT NULL default '0',
- `day` tinyint(2) NOT NULL default '0',
- `hour` tinyint(2) NOT NULL default '0',
- `user_id` smallint(5) NOT NULL default '0',
- `IP` varchar(15) NOT NULL default '',
- `section` enum('categories','tags','search','list','favorites','most_visited','best_rated','recent_pics','recent_cats') default NULL,
- `category_id` smallint(5) default NULL,
- `tag_ids` varchar(50) default NULL,
- `image_id` mediumint(8) default NULL,
- `summarized` enum('true','false') default 'false',
- PRIMARY KEY (`id`),
- KEY `history_i1` (`summarized`)
-) TYPE=MyISAM
-;";
-pwg_query($query);
-
-echo "Create table ".HISTORY_SUMMARY_TABLE."\n";
-$query = "
-CREATE TABLE `".HISTORY_SUMMARY_TABLE."` (
- `id` varchar(13) NOT NULL default '',
- `year` smallint(4) NOT NULL default '0',
- `month` tinyint(2) default NULL,
- `day` tinyint(2) default NULL,
- `hour` tinyint(2) default NULL,
- `nb_pages` int(11) default NULL,
- PRIMARY KEY (`id`)
-) TYPE=MyISAM
-;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/43-database.php b/BSF/install/db/43-database.php
deleted file mode 100644
index cc50f4a50..000000000
--- a/BSF/install/db/43-database.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Insert secret_key into #config';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = '
-INSERT INTO '.PREFIX_TABLE."config (param,value,comment) VALUES ('secret_key', MD5(RAND()), 'a secret key specific to the gallery for internal use');";
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/44-database.php b/BSF/install/db/44-database.php
deleted file mode 100644
index 45f98f06e..000000000
--- a/BSF/install/db/44-database.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'None efficient index removed for performance reasons';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'image_category DROP INDEX `image_category_i1;';
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/45-database.php b/BSF/install/db/45-database.php
deleted file mode 100644
index 79221ae35..000000000
--- a/BSF/install/db/45-database.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Index rename without any reason except human logic';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'image_category DROP INDEX image_category_i2 ,
-ADD INDEX image_category ( category_id ) ;';
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/46-database.php b/BSF/install/db/46-database.php
deleted file mode 100644
index 07e9e9d53..000000000
--- a/BSF/install/db/46-database.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'remove login_history from #config (partial revert 30-database.php)';
-
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = '
-DELETE FROM '.PREFIX_TABLE.'config WHERE param="login_history"';
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/47-database.php b/BSF/install/db/47-database.php
deleted file mode 100644
index e5248187b..000000000
--- a/BSF/install/db/47-database.php
+++ /dev/null
@@ -1,52 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Remove ws_status from #config';
-
-$query = '
-DELETE FROM '.PREFIX_TABLE."config WHERE param ='ws_status';";
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-$upgrade_description = 'Add show_nb_hits to #user_infos';
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE."user_infos ADD `show_nb_hits`
-ENUM( 'true', 'false' ) DEFAULT 'false' NOT NULL AFTER `show_nb_comments` ;";
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-?>
diff --git a/BSF/install/db/48-database.php b/BSF/install/db/48-database.php
deleted file mode 100644
index 888d2f8ee..000000000
--- a/BSF/install/db/48-database.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Insert show_nb_hits into #config';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = '
-INSERT INTO '.PREFIX_TABLE."config (param,value,comment)
-VALUES ('show_nb_hits', 'false', 'Show hits count under thumbnails');";
-pwg_query($query);
-
-echo
-"\n"
-. $upgrade_description
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/49-database.php b/BSF/install/db/49-database.php
deleted file mode 100644
index 50f04bcc1..000000000
--- a/BSF/install/db/49-database.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add notification by mail params (HTML mail and new informartions)';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-echo "Add params on ".CONFIG_TABLE;
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('nbm_send_html_mail','true','Send mail on HTML format for notification by mail');
-";
-pwg_query($query);
-
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('nbm_send_recent_post_dates','true','Send recent post by dates for notification by mail');
-";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/5-database.php b/BSF/install/db/5-database.php
deleted file mode 100644
index d7c8d6903..000000000
--- a/BSF/install/db/5-database.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Update images table with has_high column';
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-// column user_id becomes data of type text
-$query = "
-ALTER TABLE ".PREFIX_TABLE."images ADD COLUMN has_high ENUM('true') DEFAULT NULL AFTER average_rate;
-";
-pwg_query($query);
-
-echo
-"\n"
-.'Column has_high '.PREFIX_TABLE.'images added'
-."\n"
-;
-?>
diff --git a/BSF/install/db/50-database.php b/BSF/install/db/50-database.php
deleted file mode 100644
index ee7589e84..000000000
--- a/BSF/install/db/50-database.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Remove high and normal columns from #ws_access';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-echo "Drop some columns from ".WEB_SERVICES_ACCESS_TABLE;
-$query = "
-ALTER TABLE ".WEB_SERVICES_ACCESS_TABLE."
- DROP `high`,
- DROP `normal`;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/51-database.php b/BSF/install/db/51-database.php
deleted file mode 100644
index 6ccac09a6..000000000
--- a/BSF/install/db/51-database.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add #history.is_high column';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = "
-ALTER TABLE ".HISTORY_TABLE."
- ADD COLUMN is_high ENUM('true', 'false') DEFAULT NULL
-;";
-pwg_query($query);
-
-$query = "
-UPDATE ".HISTORY_TABLE."
- SET is_high = 'false'
- WHERE image_id IS NOT NULL
- AND is_high IS NULL
-;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.', ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/52-database.php b/BSF/install/db/52-database.php
deleted file mode 100644
index fb5a117d2..000000000
--- a/BSF/install/db/52-database.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Replace #history.is_high by #history.image_type';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = "
-ALTER TABLE ".HISTORY_TABLE."
- ADD COLUMN image_type ENUM('picture', 'high', 'other') DEFAULT NULL
-;";
-pwg_query($query);
-
-$query = "
-UPDATE ".HISTORY_TABLE."
- SET image_type = 'high'
- WHERE is_high = 'true'
-;";
-pwg_query($query);
-
-$query = "
-UPDATE ".HISTORY_TABLE."
- SET image_type = 'picture'
- WHERE is_high = 'false'
-;";
-pwg_query($query);
-
-$query = "
-ALTER TABLE ".HISTORY_TABLE."
- DROP COLUMN is_high
-;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.', ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/53-database.php b/BSF/install/db/53-database.php
deleted file mode 100644
index 2618bd41e..000000000
--- a/BSF/install/db/53-database.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = '#comments.content is not html escaped anymore';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-
-$replacements = array(
- array('&#039;', '\''),
- array('&quot;', '"'),
- array('&lt;', '<'),
- array('&gt;', '>'),
- array('&amp;', '&') // <- this must be the last one
- );
-
-foreach ($replacements as $replacement)
-{
- $query = '
-UPDATE '.COMMENTS_TABLE.'
- SET content = REPLACE(content, "'.addslashes($replacement[0]).'", "'.addslashes($replacement[1]).'")
-;';
- pwg_query($query);
-}
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.', ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/54-database.php b/BSF/install/db/54-database.php
deleted file mode 100644
index 332b556f8..000000000
--- a/BSF/install/db/54-database.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'add column #categories.permalink and table #old_permalinks';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-defined('OLD_PERMALINKS_TABLE') or die('OLD_PERMALINKS_TABLE is not defined');
-
-$query = "
-CREATE TABLE `".OLD_PERMALINKS_TABLE."` (
- `cat_id` smallint(5) unsigned NOT NULL,
- `permalink` VARCHAR(64) NOT NULL,
- `date_deleted` datetime NOT NULL,
- `last_hit` datetime default NULL,
- `hit` int(10) unsigned NOT NULL default '0',
- PRIMARY KEY (`permalink`)
-) TYPE=MyISAM
-;";
-pwg_query($query);
-
-$query = "
-ALTER TABLE `".CATEGORIES_TABLE."`
- ADD COLUMN `permalink` VARCHAR(64) default NULL
-;";
-pwg_query($query);
-
-$query = "
-ALTER TABLE `".CATEGORIES_TABLE."`
- ADD UNIQUE INDEX `categories_i3` (`permalink`)
-;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/55-database.php b/BSF/install/db/55-database.php
deleted file mode 100644
index 72d85c5f3..000000000
--- a/BSF/install/db/55-database.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description =
- 'Update #history.image_type to "picture" by default when image_id is not null';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = "
-UPDATE ".HISTORY_TABLE."
- SET image_type = 'picture'
- WHERE image_id IS NOT NULL
- AND image_type IS NULL
-;";
-pwg_query($query);
-
-$query = "
-UPDATE ".HISTORY_TABLE."
- SET image_type = NULL
- WHERE image_id IS NULL
-;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.', ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/56-database.php b/BSF/install/db/56-database.php
deleted file mode 100644
index 05837b217..000000000
--- a/BSF/install/db/56-database.php
+++ /dev/null
@@ -1,49 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add #images.high_filesize';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = "
-ALTER TABLE ".IMAGES_TABLE."
- ADD COLUMN high_filesize mediumint(9) unsigned default NULL
-;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.', ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/57-database.php b/BSF/install/db/57-database.php
deleted file mode 100644
index ba760f4e1..000000000
--- a/BSF/install/db/57-database.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Update email_admin_on_new_user, email_admin_on_comment, email_admin_on_comment_validation & Add email_admin_on_picture_uploaded';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = "
-UPDATE ".CONFIG_TABLE." set comment = 'Send an email to the administrators when a user registers' where param = 'email_admin_on_new_user';
-";
-pwg_query($query);
-
-$query = "
-UPDATE ".CONFIG_TABLE." set comment = 'Send an email to the administrators when a valid comment is entered' where param = 'email_admin_on_comment';
-";
-pwg_query($query);
-
-$query = "
-UPDATE ".CONFIG_TABLE." set comment = 'Send an email to the administrators when a comment requires validation' where param = 'email_admin_on_comment_validation';
-";
-pwg_query($query);
-
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('email_admin_on_picture_uploaded','false','Send an email to the administrators when a picture is uploaded');
-";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/58-database.php b/BSF/install/db/58-database.php
deleted file mode 100644
index c7a5b77a3..000000000
--- a/BSF/install/db/58-database.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Change default value for #user_infos.language';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = "
-ALTER TABLE ".USER_INFOS_TABLE." CHANGE `language` `language` varchar(50) NOT NULL default 'en_UK.iso-8859-1'
-";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/59-database.php b/BSF/install/db/59-database.php
deleted file mode 100644
index adcbbb3e3..000000000
--- a/BSF/install/db/59-database.php
+++ /dev/null
@@ -1,79 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Rename some indexes following PWG naming rules';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = "
-DROP INDEX image_category ON ".IMAGE_CATEGORY_TABLE."
-;
-";
-pwg_query($query);
-
-$query = "
-CREATE INDEX image_category_i1 ON ".IMAGE_CATEGORY_TABLE." (category_id)
-;
-";
-pwg_query($query);
-
-$query = "
-DROP INDEX uidx_check_key ON ".USER_MAIL_NOTIFICATION_TABLE."
-;
-";
-pwg_query($query);
-
-$query = "
-CREATE UNIQUE INDEX user_mail_notification_ui1 ON ".USER_MAIL_NOTIFICATION_TABLE." (check_key)
-;
-";
-pwg_query($query);
-
-$query = "
-DROP INDEX name ON ".WEB_SERVICES_ACCESS_TABLE."
-;
-";
-pwg_query($query);
-
-$query = "
-CREATE UNIQUE INDEX ws_access_ui1 ON ".WEB_SERVICES_ACCESS_TABLE." (name)
-;
-";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?> \ No newline at end of file
diff --git a/BSF/install/db/6-database.php b/BSF/install/db/6-database.php
deleted file mode 100644
index cc21c009e..000000000
--- a/BSF/install/db/6-database.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Table #user_mail_notification is required for NBM';
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-// Creating table user_mail_notification
-$query = '
-CREATE TABLE '.PREFIX_TABLE.'user_mail_notification
-(
- user_id smallint(5) NOT NULL default \'0\',
- check_key varchar(128) binary NOT NULL,
- enabled enum(\'true\',\'false\') NOT NULL default \'false\',
- last_send datetime default NULL,
- PRIMARY KEY (`user_id`),
- UNIQUE KEY `uidx_check_key` (`check_key`)
-) TYPE=MyISAM;';
-pwg_query($query);
-
-echo
-"\n"
-.'Table '.PREFIX_TABLE.'user_mail_notification created'
-."\n"
-;
-?>
diff --git a/BSF/install/db/60-database.php b/BSF/install/db/60-database.php
deleted file mode 100644
index cc5d8ccfb..000000000
--- a/BSF/install/db/60-database.php
+++ /dev/null
@@ -1,86 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Change default value on #user_infos for guest';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
-@include(PHPWG_ROOT_PATH. 'include/config_local.inc.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-load_conf_from_db();
-
-$query = "
-update ".USER_INFOS_TABLE."
-set
- template = '".$conf['default_template']."',
- nb_image_line = ".$conf['nb_image_line'].",
- nb_line_page = ".$conf['nb_line_page'].",
- language = '".$conf['default_language']."',
- maxwidth = ".(empty($conf['default_maxwidth']) ? "null" : $conf['default_maxwidth']).",
- maxheight = ".(empty($conf['default_maxheight']) ? "null" : $conf['default_maxheight']).",
- recent_period = ".$conf['recent_period'].",
- expand = '".boolean_to_string($conf['auto_expand'])."',
- show_nb_comments = '".boolean_to_string($conf['show_nb_comments'])."',
- show_nb_hits = '".boolean_to_string($conf['show_nb_hits'])."',
- enabled_high = '".boolean_to_string(
- (isset($conf['newuser_default_enabled_high']) ?
- $conf['newuser_default_enabled_high'] : true))."'
-where
- user_id = ".$conf['default_user_id'].";";
-pwg_query($query);
-
-
-$query = "
-delete from ".CONFIG_TABLE."
-where
- param in
-(
- 'default_template',
- 'nb_image_line',
- 'nb_line_page',
- 'default_language',
- 'default_maxwidth',
- 'default_maxheight',
- 'recent_period',
- 'auto_expand',
- 'show_nb_comments',
- 'show_nb_hits'
-);";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/61-database.php b/BSF/install/db/61-database.php
deleted file mode 100644
index 83090473a..000000000
--- a/BSF/install/db/61-database.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add unique index on #_groups for name';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-
-$query = "
-alter table ".GROUPS_TABLE."
- add UNIQUE KEY `groups_ui1` (`name`)
-;";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/62-database.php b/BSF/install/db/62-database.php
deleted file mode 100644
index 18d2d7fa8..000000000
--- a/BSF/install/db/62-database.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add obligatory_user_mail config';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('obligatory_user_mail_address','false','Mail address is obligatory for users');
-";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/63-database.php b/BSF/install/db/63-database.php
deleted file mode 100644
index 69e6dd972..000000000
--- a/BSF/install/db/63-database.php
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add #user_infos.level, #images.level and #user_cache.forbidden_images';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = '
-ALTER TABLE '.IMAGES_TABLE.' ADD COLUMN level TINYINT UNSIGNED NOT NULL DEFAULT 0
-';
-pwg_query($query);
-
-$query = '
-ALTER TABLE '.USER_INFOS_TABLE.' ADD COLUMN level TINYINT UNSIGNED NOT NULL DEFAULT 0
-';
-pwg_query($query);
-
-$query = '
-ALTER TABLE '.USER_CACHE_TABLE.' ADD COLUMN image_access_type enum("NOT IN","IN") NOT NULL default "NOT IN"
-';
-pwg_query($query);
-
-$query = '
-ALTER TABLE '.USER_CACHE_TABLE.' ADD COLUMN image_access_list TEXT DEFAULT NULL
-';
-pwg_query($query);
-
-$query = '
-UPDATE '.USER_INFOS_TABLE.' SET level=8 WHERE status="webmaster"
-';
-pwg_query($query);
-
-$query = '
-UPDATE '.USER_CACHE_TABLE.' SET need_update=true
-';
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/64-database.php b/BSF/install/db/64-database.php
deleted file mode 100644
index 37dca478f..000000000
--- a/BSF/install/db/64-database.php
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Activation of c13_upgrade plugin';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = '
-REPLACE INTO '.PLUGINS_TABLE.'
- (id, state)
- VALUES (\'c13y_upgrade\', \'active\')
-;';
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/65-database.php b/BSF/install/db/65-database.php
deleted file mode 100644
index daa59de30..000000000
--- a/BSF/install/db/65-database.php
+++ /dev/null
@@ -1,319 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-function upgrade65_change_table_to_blob($table, $field_definitions)
-{
- $types = array('varchar' => 'varbinary',
- 'text' => 'blob',
- 'mediumtext' => 'mediumblob',
- 'longtext' => 'longblob');
-
- $changes=array();
- foreach( $field_definitions as $row)
- {
- if ( !isset($row['Collation']) or $row['Collation']=='NULL' )
- continue;
- list ($type) = explode('(', $row['Type']);
- if (!isset($types[$type]))
- continue; // no need
- $binaryType = preg_replace('/'. $type .'/i', $types[$type], $row['Type'] );
- $changes[] = 'MODIFY COLUMN '.$row['Field'].' '.$binaryType;
- }
- if (count($changes))
- {
- $query = 'ALTER TABLE '.$table.' '.implode(', ', $changes);
- pwg_query($query);
- }
-}
-
-function upgrade65_change_table_to_charset($table, $field_definitions, $db_charset)
-{
- $changes=array();
- foreach( $field_definitions as $row)
- {
- if ( !isset($row['Collation']) or $row['Collation']=='NULL' )
- continue;
- $query = $row['Field'].' '.$row['Type'];
- $query .= ' CHARACTER SET '.$db_charset;
- if (strpos($row['Collation'],'_bin')!==false)
- {
- $query .= ' BINARY';
- }
- if ($row['Null']!='YES')
- {
- $query.=' NOT NULL';
- if (isset($row['Default']))
- $query.=' DEFAULT "'.addslashes($row['Default']).'"';
- }
- else
- {
- if (!isset($row['Default']))
- $query.=' DEFAULT NULL';
- else
- $query.=' DEFAULT "'.addslashes($row['Default']).'"';
- }
-
- if ($row['Extra']=='auto_increment')
- {
- $query.=' auto_increment';
- }
- $changes[] = 'MODIFY COLUMN '.$query;
- }
-
- if (count($changes))
- {
- $query = 'ALTER TABLE `'.$table.'` '.implode(', ', $changes);
- pwg_query($query);
- }
-}
-
-
-$upgrade_description = 'PWG charset migration';
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-if ( !defined('PWG_CHARSET') )
-{
- $upgrade_log = '';
-
-// +-----------------------------------------------------------------------+
-// load the config file
- $config_file = PHPWG_ROOT_PATH.'include/mysql.inc.php';
- $config_file_contents = @file_get_contents($config_file);
- if ($config_file_contents === false)
- {
- die('CANNOT LOAD '.$config_file);
- }
- $php_end_tag = strrpos($config_file_contents, '?'.'>');
- if ($php_end_tag === false)
- {
- die('CANNOT FIND PHP END TAG IN '.$config_file);
- }
- if (!is_writable($config_file))
- {
- die('FILE NOT WRITABLE '.$config_file);
- }
-
-
-// +-----------------------------------------------------------------------+
-// load all the user languages
- $all_langs=array();
- $query='
-SELECT language, COUNT(user_id) AS count FROM '.USER_INFOS_TABLE.'
- GROUP BY language';
- $result = pwg_query($query);
- while ( $row=mysql_fetch_assoc($result) )
- {
- $lang = $row["language"];
- $lang_def = explode('.', $lang);
- if ( count($lang_def)==2 )
- {
- $new_lang = $lang_def[0];
- $charset = strtolower($lang_def[1]);
- }
- else
- {
- $new_lang = 'en_UK';
- $charset = 'iso-8859-1';
- }
- $all_langs[$lang] = array(
- 'count' => $row['count'],
- 'new_lang' => $new_lang,
- 'charset' => $charset,
- );
- $upgrade_log .= ">>user_lang\t".$lang."\t".$row['count']."\n";
- }
- $upgrade_log .= "\n";
-
-
-// +-----------------------------------------------------------------------+
-// get admin charset
- include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
- @include(PHPWG_ROOT_PATH. 'include/config_local.inc.php');
- $admin_charset='iso-8859-1';
- $query='
-SELECT language FROM '.USER_INFOS_TABLE.'
- WHERE user_id='.$conf['webmaster_id'];
- $result = pwg_query($query);
- if (mysql_num_rows($result)==0)
- {
- $query='
-SELECT language FROM '.USER_INFOS_TABLE.'
- WHERE status="webmaster" and adviser="false"
- LIMIT 1';
- $result = pwg_query($query);
- }
-
- if ( $row=mysql_fetch_assoc($result) )
- {
- $admin_charset = $all_langs[$row['language']]['charset'];
- }
- $upgrade_log .= ">>admin_charset\t".$admin_charset."\n";
-
-
-// +-----------------------------------------------------------------------+
-// get mysql version and structure of tables
- $mysql_version = mysql_get_server_info();
- $upgrade_log .= ">>mysql_ver\t".$mysql_version."\n";
-
- $all_tables = array();
- $query = 'SHOW TABLES LIKE "'.$prefixeTable.'%"';
- $result = pwg_query($query);
- while ( $row=mysql_fetch_array($result) )
- {
- array_push($all_tables, $row[0]);
- }
-
- $all_tables_definition = array();
- foreach( $all_tables as $table)
- {
- $query = 'SHOW FULL COLUMNS FROM '.$table;
- $result = pwg_query($query);
- $field_definitions=array();
- while ( $row=mysql_fetch_array($result) )
- {
- if ( !isset($row['Collation']) or $row['Collation']=='NULL' )
- continue;
- array_push($field_definitions, $row);
- }
- $all_tables_definition[$table] = $field_definitions;
- }
-
-// +-----------------------------------------------------------------------+
-// calculate the result and convert the tables
-
-//tables that can be converted without going through binary (they contain only ascii data)
- $safe_tables=array('history','history_backup','history_summary','old_permalinks','plugins','rate','upgrade','user_cache','user_feed','user_infos','user_mail_notification', 'users', 'waiting','ws_access');
- $safe_tables=array_flip($safe_tables);
-
- $pwg_charset = 'iso-8859-1';
- $db_charset = 'latin1';
- $db_collate = '';
- if ( version_compare($mysql_version, '4.1', '<') )
- { // below 4.1 no charset support
- $upgrade_log .= "< conversion\tnothing\n";
- }
- elseif ($admin_charset=='iso-8859-1')
- {
- $pwg_charset = 'utf-8';
- $db_charset = 'utf8';
- foreach($all_tables as $table)
- {
- upgrade65_change_table_to_charset($table, $all_tables_definition[$table], 'utf8' );
- $query = 'ALTER TABLE '.$table.' DEFAULT CHARACTER SET utf8';
- pwg_query($query);
- }
- $upgrade_log .= "< conversion\tchange utf8\n";
- }
-/*ALTER TABLE tbl_name CONVERT TO CHARACTER SET charset_name; (or change column character set)
-
-Warning: The preceding operation converts column values between the character sets. This is not what you want if you have a column in one character set (like latin1) but the stored values actually use some other, incompatible character set (like utf8). In this case, you have to do the following for each such column:
-
-ALTER TABLE t1 CHANGE c1 c1 BLOB;
-ALTER TABLE t1 CHANGE c1 c1 TEXT CHARACTER SET utf8;
-*/
- elseif ( $admin_charset=='utf-8')
- {
- $pwg_charset = 'utf-8';
- $db_charset = 'utf8';
- foreach($all_tables as $table)
- {
- if ( !isset($safe_tables[ substr($table, strlen($prefixeTable)) ]) )
- upgrade65_change_table_to_blob($table, $all_tables_definition[$table] );
- upgrade65_change_table_to_charset($table, $all_tables_definition[$table], 'utf8' );
- $query = 'ALTER TABLE '.$table.' DEFAULT CHARACTER SET utf8';
- pwg_query($query);
- }
- $upgrade_log .= "< conversion\tchange binary\n";
- $upgrade_log .= "< conversion\tchange utf8\n";
- }
- elseif ( $admin_charset=='iso-8859-2'/*Central European*/)
- {
- $pwg_charset = 'utf-8';
- $db_charset = 'utf8';
- foreach($all_tables as $table)
- {
- if ( !isset($safe_tables[ substr($table, strlen($prefixeTable)) ]) )
- {
- upgrade65_change_table_to_blob($table, $all_tables_definition[$table] );
- upgrade65_change_table_to_charset($table, $all_tables_definition[$table], 'latin2' );
- }
- upgrade65_change_table_to_charset($table, $all_tables_definition[$table], 'utf8' );
- $query = 'ALTER TABLE '.$table.' DEFAULT CHARACTER SET utf8';
- pwg_query($query);
- }
- $upgrade_log .= "< conversion\tchange binary\n";
- $upgrade_log .= "< conversion\tchange latin2\n";
- $upgrade_log .= "< conversion\tchange utf8\n";
- }
-
-
-// +-----------------------------------------------------------------------+
-// write the result to file and update #user_infos.language
- $config_file_contents =
- substr($config_file_contents, 0, $php_end_tag).'
-define(\'PWG_CHARSET\', \''.$pwg_charset.'\');
-define(\'DB_CHARSET\', \''.$db_charset.'\');
-define(\'DB_COLLATE\', \'\');
-'.substr($config_file_contents, $php_end_tag);
-
- $fp = @fopen( $config_file, 'w' );
- @fputs($fp, $config_file_contents, strlen($config_file_contents));
- @fclose($fp);
-
- foreach ($all_langs as $old_lang=>$lang_data)
- {
- $query='
- UPDATE '.USER_INFOS_TABLE.' SET language="'.$lang_data['new_lang'].'"
- WHERE language="'.$old_lang.'"';
- pwg_query($query);
- }
-
- define('PWG_CHARSET', $pwg_charset);
- define('DB_CHARSET', $db_charset);
- define('DB_COLLATE', '');
-
- echo $upgrade_log;
- $fp = @fopen( PHPWG_ROOT_PATH.'upgrade65.log', 'w' );
- if ($fp)
- {
- @fputs($fp, $upgrade_log, strlen($upgrade_log));
- @fclose($fp);
- }
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-}
-else
-{
- echo 'PWG_CHARSET already defined - nada';
-}
-?>
diff --git a/BSF/install/db/66-database.php b/BSF/install/db/66-database.php
deleted file mode 100644
index d6a861ae2..000000000
--- a/BSF/install/db/66-database.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add c13y_ignore config';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = "
-INSERT INTO ".CONFIG_TABLE." (param,value,comment) VALUES ('c13y_ignore',null,'List of ignored anomalies');
-";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/67-database.php b/BSF/install/db/67-database.php
deleted file mode 100644
index 993f5dd21..000000000
--- a/BSF/install/db/67-database.php
+++ /dev/null
@@ -1,48 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Uninstall dew plugin';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = "
-delete from ".PLUGINS_TABLE." where id ='dew';
-";
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/68-database.php b/BSF/install/db/68-database.php
deleted file mode 100644
index 39283a7a2..000000000
--- a/BSF/install/db/68-database.php
+++ /dev/null
@@ -1,55 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Change type from text to mediumtext for #sessions.data #user_cache.forbidden_categories and #user_cache.image_access_list';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = '
-ALTER TABLE '.SESSIONS_TABLE.'
- MODIFY COLUMN data MEDIUMTEXT NOT NULL';
-pwg_query($query);
-
-$query = '
-ALTER TABLE '.USER_CACHE_TABLE.'
- MODIFY COLUMN forbidden_categories MEDIUMTEXT,
- MODIFY COLUMN image_access_list MEDIUMTEXT
- ';
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/69-database.php b/BSF/install/db/69-database.php
deleted file mode 100644
index dad302401..000000000
--- a/BSF/install/db/69-database.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Move #categories.date_last and nb_images to #user_cache_categories';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = '
-ALTER TABLE '.USER_CACHE_CATEGORIES_TABLE.'
- ADD COLUMN date_last datetime default NULL AFTER cat_id,
- ADD COLUMN nb_images mediumint(8) unsigned NOT NULL default 0 AFTER max_date_last';
-pwg_query($query);
-
-$query = '
-ALTER TABLE '.CATEGORIES_TABLE.'
- DROP COLUMN date_last,
- DROP COLUMN nb_images
- ';
-pwg_query($query);
-
-invalidate_user_cache(); // just to force recalculation
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/7-database.php b/BSF/install/db/7-database.php
deleted file mode 100644
index d6f37e164..000000000
--- a/BSF/install/db/7-database.php
+++ /dev/null
@@ -1,65 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Anonymous rating';
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'rate DROP PRIMARY KEY;'
-;
-pwg_query($query);
-
-$query ='
-ALTER TABLE '.PREFIX_TABLE.'rate ADD COLUMN anonymous_id VARCHAR(45) NOT NULL DEFAULT \'\' AFTER element_id;'
-;
-pwg_query($query);
-
-$query ='
-ALTER TABLE '.PREFIX_TABLE.'rate ADD COLUMN date DATE NOT NULL AFTER rate;'
-;
-pwg_query($query);
-
-$query ='
-UPDATE '.PREFIX_TABLE.'rate SET date=NOW() WHERE date<"1990-01-01";'
-;
-pwg_query($query);
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'rate ADD PRIMARY KEY (element_id, user_id, anonymous_id);'
-;
-pwg_query($query);
-
-echo
-"\n"
-.'Table '.PREFIX_TABLE.'rate upgraded'
-."\n"
-;
-?>
diff --git a/BSF/install/db/70-database.php b/BSF/install/db/70-database.php
deleted file mode 100644
index 50dfc161b..000000000
--- a/BSF/install/db/70-database.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Add upload config';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = "
-replace into ".CONFIG_TABLE."
- (param, value, comment)
-values
-('upload_link_everytime','false','Show Upload link every time'),
-('upload_user_access',".ACCESS_CLASSIC.",'Minimal user status allowed to upload pictures')
-;";
-
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/71-database.php b/BSF/install/db/71-database.php
deleted file mode 100644
index ef453509f..000000000
--- a/BSF/install/db/71-database.php
+++ /dev/null
@@ -1,58 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Delete unnecessary #history_summary.id, #history.year, #history.month, #history.day and #history.hour';
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = 'ALTER TABLE '.HISTORY_SUMMARY_TABLE.'
-DROP PRIMARY KEY,
-DROP COLUMN id,
-ADD UNIQUE KEY history_summary_ymdh (`year`, `month`, `day`, `hour`)
-;';
-pwg_query($query);
-
-$query = 'ALTER TABLE '.HISTORY_TABLE.'
-DROP COLUMN year,
-DROP COLUMN month,
-DROP COLUMN day,
-DROP COLUMN hour
-;';
-pwg_query($query);
-
-echo
-"\n"
-.'"'.$upgrade_description.'"'.' ended'
-."\n"
-;
-
-?>
diff --git a/BSF/install/db/8-database.php b/BSF/install/db/8-database.php
deleted file mode 100644
index 5971ef8ea..000000000
--- a/BSF/install/db/8-database.php
+++ /dev/null
@@ -1,83 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description = 'Move rate, rate_anonymous and gallery_url from config file to database';
-
-$params = array(
- 'gallery_url' => array('http://demo.phpwebgallery.net','URL given in RSS feed'),
- 'rate' => array('true','Rating pictures feature is enabled') ,
- 'rate_anonymous' => array('true','Rating pictures feature is also enabled for visitors')
- );
-
-
-
-// +-Get real values from config file--------------------------------------+
-
-$conf_save = $conf;
-unset($conf);
-@include(PHPWG_ROOT_PATH. 'include/config_local.inc.php');
-if ( isset($conf['gallery_url']) )
-{
- $params['gallery_url'][0] = $conf['gallery_url'];
-}
-if ( isset($conf['rate']) and is_bool($conf['rate']) )
-{
- $params['rate'][0] = $conf['rate'] ? 'true' : 'false';
-}
-if ( isset($conf['rate_anonymous']) and is_bool($conf['rate_anonymous']) )
-{
- $params['rate_anonymous'][0] = $conf['rate_anonymous'] ? 'true' : 'false';
-}
-$conf = $conf_save;
-
-
-
-// +-Do I already have them in DB ?----------------------------------------+
-$query = 'SELECT param FROM '.PREFIX_TABLE.'config';
-$result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
-{
- unset( $params[ $row['param'] ] );
-}
-
-// +-Perform the insert query----------------------------------------------+
-foreach ($params as $param_key => $param_values)
-{
- $query = '
-INSERT INTO '.PREFIX_TABLE.'config (param,value,comment) VALUES (' .
-"'$param_key','$param_values[0]','$param_values[1]');";
- pwg_query($query);
-}
-
-
-echo
-"\n"
-.'Table '.PREFIX_TABLE.'config upgraded'
-."\n"
-;
-?>
diff --git a/BSF/install/db/9-database.php b/BSF/install/db/9-database.php
deleted file mode 100644
index 2a8c0034a..000000000
--- a/BSF/install/db/9-database.php
+++ /dev/null
@@ -1,86 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-$upgrade_description =
- 'Column #image_category.is_storage replaces #images.storage_category_id';
-
-// +-----------------------------------------------------------------------+
-// | Upgrade content |
-// +-----------------------------------------------------------------------+
-
-$query = "
-ALTER TABLE ".PREFIX_TABLE."image_category
- ADD COLUMN is_storage ENUM('true','false') DEFAULT 'false'
-;";
-pwg_query($query);
-
-$query = '
-SELECT id, storage_category_id
- FROM '.PREFIX_TABLE.'images
-;';
-$result = pwg_query($query);
-
-$datas = array();
-
-while ($row = mysql_fetch_array($result))
-{
- array_push(
- $datas,
- array(
- 'image_id' => $row['id'],
- 'category_id' => $row['storage_category_id'],
- 'is_storage' => 'true',
- )
- );
-}
-
-mass_updates(
- PREFIX_TABLE.'image_category',
- array(
- 'primary' => array('image_id', 'category_id'),
- 'update' => array('is_storage')
- ),
- $datas
- );
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'images
- DROP COLUMN storage_category_id
-;';
-pwg_query($query);
-
-// +-----------------------------------------------------------------------+
-// | End notification |
-// +-----------------------------------------------------------------------+
-
-echo
-"\n"
-.'Column '.PREFIX_TABLE.'image_category.is_storage created and filled'
-."\n"
-;
-?>
diff --git a/BSF/install/db/index.php b/BSF/install/db/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/install/db/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/install/index.php b/BSF/install/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/install/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/install/piwigo_structure.sql b/BSF/install/piwigo_structure.sql
deleted file mode 100644
index aa290149f..000000000
--- a/BSF/install/piwigo_structure.sql
+++ /dev/null
@@ -1,457 +0,0 @@
--- MySQL dump 9.11
---
--- Host: localhost Database: pwg-bsf
--- ------------------------------------------------------
--- Server version 4.0.24_Debian-10-log
-
---
--- Table structure for table `piwigo_caddie`
---
-
-DROP TABLE IF EXISTS `piwigo_caddie`;
-CREATE TABLE `piwigo_caddie` (
- `user_id` smallint(5) NOT NULL default '0',
- `element_id` mediumint(8) NOT NULL default '0',
- PRIMARY KEY (`user_id`,`element_id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_categories`
---
-
-DROP TABLE IF EXISTS `piwigo_categories`;
-CREATE TABLE `piwigo_categories` (
- `id` smallint(5) unsigned NOT NULL auto_increment,
- `name` varchar(255) NOT NULL default '',
- `id_uppercat` smallint(5) unsigned default NULL,
- `comment` text,
- `dir` varchar(255) default NULL,
- `rank` smallint(5) unsigned default NULL,
- `status` enum('public','private') NOT NULL default 'public',
- `site_id` tinyint(4) unsigned default '1',
- `visible` enum('true','false') NOT NULL default 'true',
- `uploadable` enum('true','false') NOT NULL default 'false',
- `representative_picture_id` mediumint(8) unsigned default NULL,
- `uppercats` varchar(255) NOT NULL default '',
- `commentable` enum('true','false') NOT NULL default 'true',
- `global_rank` varchar(255) default NULL,
- `image_order` varchar(128) default NULL,
- `permalink` varchar(64) default NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `categories_i3` (`permalink`),
- KEY `categories_i2` (`id_uppercat`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_comments`
---
-
-DROP TABLE IF EXISTS `piwigo_comments`;
-CREATE TABLE `piwigo_comments` (
- `id` int(11) unsigned NOT NULL auto_increment,
- `image_id` mediumint(8) unsigned NOT NULL default '0',
- `date` datetime NOT NULL default '0000-00-00 00:00:00',
- `author` varchar(255) default NULL,
- `content` longtext,
- `validated` enum('true','false') NOT NULL default 'false',
- `validation_date` datetime default NULL,
- PRIMARY KEY (`id`),
- KEY `comments_i2` (`validation_date`),
- KEY `comments_i1` (`image_id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_config`
---
-
-DROP TABLE IF EXISTS `piwigo_config`;
-CREATE TABLE `piwigo_config` (
- `param` varchar(40) NOT NULL default '',
- `value` text,
- `comment` varchar(255) default NULL,
- PRIMARY KEY (`param`)
-) TYPE=MyISAM COMMENT='configuration table';
-
---
--- Table structure for table `piwigo_favorites`
---
-
-DROP TABLE IF EXISTS `piwigo_favorites`;
-CREATE TABLE `piwigo_favorites` (
- `user_id` smallint(5) NOT NULL default '0',
- `image_id` mediumint(8) unsigned NOT NULL default '0',
- PRIMARY KEY (`user_id`,`image_id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_group_access`
---
-
-DROP TABLE IF EXISTS `piwigo_group_access`;
-CREATE TABLE `piwigo_group_access` (
- `group_id` smallint(5) unsigned NOT NULL default '0',
- `cat_id` smallint(5) unsigned NOT NULL default '0',
- PRIMARY KEY (`group_id`,`cat_id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_groups`
---
-
-DROP TABLE IF EXISTS `piwigo_groups`;
-CREATE TABLE `piwigo_groups` (
- `id` smallint(5) unsigned NOT NULL auto_increment,
- `name` varchar(255) NOT NULL default '',
- `is_default` enum('true','false') NOT NULL default 'false',
- PRIMARY KEY (`id`),
- UNIQUE KEY `groups_ui1` (`name`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_history`
---
-
-DROP TABLE IF EXISTS `piwigo_history`;
-CREATE TABLE `piwigo_history` (
- `id` int(10) unsigned NOT NULL auto_increment,
- `date` date NOT NULL default '0000-00-00',
- `time` time NOT NULL default '00:00:00',
- `user_id` smallint(5) NOT NULL default '0',
- `IP` varchar(15) NOT NULL default '',
- `section` enum('categories','tags','search','list','favorites','most_visited','best_rated','recent_pics','recent_cats') default NULL,
- `category_id` smallint(5) default NULL,
- `tag_ids` varchar(50) default NULL,
- `image_id` mediumint(8) default NULL,
- `summarized` enum('true','false') default 'false',
- `image_type` enum('picture','high','other') default NULL,
- PRIMARY KEY (`id`),
- KEY `history_i1` (`summarized`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_history_summary`
---
-
-DROP TABLE IF EXISTS `piwigo_history_summary`;
-CREATE TABLE `piwigo_history_summary` (
- `year` smallint(4) NOT NULL default '0',
- `month` tinyint(2) default NULL,
- `day` tinyint(2) default NULL,
- `hour` tinyint(2) default NULL,
- `nb_pages` int(11) default NULL,
- UNIQUE KEY history_summary_ymdh (`year`,`month`,`day`,`hour`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_image_category`
---
-
-DROP TABLE IF EXISTS `piwigo_image_category`;
-CREATE TABLE `piwigo_image_category` (
- `image_id` mediumint(8) unsigned NOT NULL default '0',
- `category_id` smallint(5) unsigned NOT NULL default '0',
- PRIMARY KEY (`image_id`,`category_id`),
- KEY `image_category_i1` (`category_id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_image_tag`
---
-
-DROP TABLE IF EXISTS `piwigo_image_tag`;
-CREATE TABLE `piwigo_image_tag` (
- `image_id` mediumint(8) unsigned NOT NULL default '0',
- `tag_id` smallint(5) unsigned NOT NULL default '0',
- PRIMARY KEY (`image_id`,`tag_id`),
- KEY `image_tag_i1` (`tag_id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_images`
---
-
-DROP TABLE IF EXISTS `piwigo_images`;
-CREATE TABLE `piwigo_images` (
- `id` mediumint(8) unsigned NOT NULL auto_increment,
- `file` varchar(255) NOT NULL default '',
- `date_available` datetime NOT NULL default '0000-00-00 00:00:00',
- `date_creation` date default NULL,
- `tn_ext` varchar(4) default '',
- `name` varchar(255) default NULL,
- `comment` text,
- `author` varchar(255) default NULL,
- `hit` int(10) unsigned NOT NULL default '0',
- `filesize` mediumint(9) unsigned default NULL,
- `width` smallint(9) unsigned default NULL,
- `height` smallint(9) unsigned default NULL,
- `representative_ext` varchar(4) default NULL,
- `date_metadata_update` date default NULL,
- `average_rate` float(5,2) unsigned default NULL,
- `has_high` enum('true') default NULL,
- `path` varchar(255) NOT NULL default '',
- `storage_category_id` smallint(5) unsigned default NULL,
- `high_filesize` mediumint(9) unsigned default NULL,
- `level` tinyint unsigned NOT NULL default '0',
- PRIMARY KEY (`id`),
- KEY `images_i2` (`date_available`),
- KEY `images_i3` (`average_rate`),
- KEY `images_i4` (`hit`),
- KEY `images_i5` (`date_creation`),
- KEY `images_i1` (`storage_category_id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_old_permalinks`
---
-
-DROP TABLE IF EXISTS `piwigo_old_permalinks`;
-CREATE TABLE `piwigo_old_permalinks` (
- `cat_id` smallint(5) unsigned NOT NULL default '0',
- `permalink` varchar(64) NOT NULL default '',
- `date_deleted` datetime NOT NULL default '0000-00-00 00:00:00',
- `last_hit` datetime default NULL,
- `hit` int(10) unsigned NOT NULL default '0',
- PRIMARY KEY (`permalink`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_plugins`
---
-
-DROP TABLE IF EXISTS `piwigo_plugins`;
-CREATE TABLE `piwigo_plugins` (
- `id` varchar(64) binary NOT NULL default '',
- `state` enum('inactive','active') NOT NULL default 'inactive',
- `version` varchar(64) NOT NULL default '0',
- PRIMARY KEY (`id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_rate`
---
-
-DROP TABLE IF EXISTS `piwigo_rate`;
-CREATE TABLE `piwigo_rate` (
- `user_id` smallint(5) NOT NULL default '0',
- `element_id` mediumint(8) unsigned NOT NULL default '0',
- `anonymous_id` varchar(45) NOT NULL default '',
- `rate` tinyint(2) unsigned NOT NULL default '0',
- `date` date NOT NULL default '0000-00-00',
- PRIMARY KEY (`element_id`,`user_id`,`anonymous_id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_search`
---
-
-DROP TABLE IF EXISTS `piwigo_search`;
-CREATE TABLE `piwigo_search` (
- `id` int(10) unsigned NOT NULL auto_increment,
- `last_seen` date default NULL,
- `rules` text,
- PRIMARY KEY (`id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_sessions`
---
-
-DROP TABLE IF EXISTS `piwigo_sessions`;
-CREATE TABLE `piwigo_sessions` (
- `id` varchar(255) binary NOT NULL default '',
- `data` mediumtext NOT NULL,
- `expiration` datetime NOT NULL default '0000-00-00 00:00:00',
- PRIMARY KEY (`id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_sites`
---
-
-DROP TABLE IF EXISTS `piwigo_sites`;
-CREATE TABLE `piwigo_sites` (
- `id` tinyint(4) NOT NULL auto_increment,
- `galleries_url` varchar(255) NOT NULL default '',
- PRIMARY KEY (`id`),
- UNIQUE KEY `sites_ui1` (`galleries_url`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_tags`
---
-
-DROP TABLE IF EXISTS `piwigo_tags`;
-CREATE TABLE `piwigo_tags` (
- `id` smallint(5) unsigned NOT NULL auto_increment,
- `name` varchar(255) binary NOT NULL default '',
- `url_name` varchar(255) binary NOT NULL default '',
- PRIMARY KEY (`id`),
- KEY `tags_i1` (`url_name`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_upgrade`
---
-
-DROP TABLE IF EXISTS `piwigo_upgrade`;
-CREATE TABLE `piwigo_upgrade` (
- `id` varchar(20) NOT NULL default '',
- `applied` datetime NOT NULL default '0000-00-00 00:00:00',
- `description` varchar(255) default NULL,
- PRIMARY KEY (`id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_user_access`
---
-
-DROP TABLE IF EXISTS `piwigo_user_access`;
-CREATE TABLE `piwigo_user_access` (
- `user_id` smallint(5) NOT NULL default '0',
- `cat_id` smallint(5) unsigned NOT NULL default '0',
- PRIMARY KEY (`user_id`,`cat_id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_user_cache`
---
-
-DROP TABLE IF EXISTS `piwigo_user_cache`;
-CREATE TABLE `piwigo_user_cache` (
- `user_id` smallint(5) NOT NULL default '0',
- `need_update` enum('true','false') NOT NULL default 'true',
- `forbidden_categories` mediumtext,
- `nb_total_images` mediumint(8) unsigned default NULL,
- `image_access_type` enum('NOT IN','IN') NOT NULL default 'NOT IN',
- `image_access_list` mediumtext default NULL,
- PRIMARY KEY (`user_id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_user_cache_categories`
---
-
-DROP TABLE IF EXISTS `piwigo_user_cache_categories`;
-CREATE TABLE `piwigo_user_cache_categories` (
- `user_id` smallint(5) NOT NULL default '0',
- `cat_id` smallint(5) unsigned NOT NULL default '0',
- `date_last` datetime default NULL,
- `max_date_last` datetime default NULL,
- `nb_images` mediumint(8) unsigned NOT NULL default '0',
- `count_images` mediumint(8) unsigned default '0',
- `count_categories` mediumint(8) unsigned default '0',
- PRIMARY KEY (`user_id`,`cat_id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_user_feed`
---
-
-DROP TABLE IF EXISTS `piwigo_user_feed`;
-CREATE TABLE `piwigo_user_feed` (
- `id` varchar(50) binary NOT NULL default '',
- `user_id` smallint(5) NOT NULL default '0',
- `last_check` datetime default NULL,
- PRIMARY KEY (`id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_user_group`
---
-
-DROP TABLE IF EXISTS `piwigo_user_group`;
-CREATE TABLE `piwigo_user_group` (
- `user_id` smallint(5) NOT NULL default '0',
- `group_id` smallint(5) unsigned NOT NULL default '0',
- PRIMARY KEY (`group_id`,`user_id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_user_infos`
---
-
-DROP TABLE IF EXISTS `piwigo_user_infos`;
-CREATE TABLE `piwigo_user_infos` (
- `user_id` smallint(5) NOT NULL default '0',
- `nb_image_line` tinyint(1) unsigned NOT NULL default '5',
- `nb_line_page` tinyint(3) unsigned NOT NULL default '3',
- `status` enum('webmaster','admin','normal','generic','guest') NOT NULL default 'guest',
- `adviser` enum('true','false') NOT NULL default 'false',
- `language` varchar(50) NOT NULL default 'en_UK',
- `maxwidth` smallint(6) default NULL,
- `maxheight` smallint(6) default NULL,
- `expand` enum('true','false') NOT NULL default 'false',
- `show_nb_comments` enum('true','false') NOT NULL default 'false',
- `show_nb_hits` enum('true','false') NOT NULL default 'false',
- `recent_period` tinyint(3) unsigned NOT NULL default '7',
- `template` varchar(255) NOT NULL default 'yoga/clear',
- `registration_date` datetime NOT NULL default '0000-00-00 00:00:00',
- `enabled_high` enum('true','false') NOT NULL default 'true',
- `level` tinyint unsigned NOT NULL default '0',
- UNIQUE KEY `user_infos_ui1` (`user_id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_user_mail_notification`
---
-
-DROP TABLE IF EXISTS `piwigo_user_mail_notification`;
-CREATE TABLE `piwigo_user_mail_notification` (
- `user_id` smallint(5) NOT NULL default '0',
- `check_key` varchar(16) binary NOT NULL default '',
- `enabled` enum('true','false') NOT NULL default 'false',
- `last_send` datetime default NULL,
- PRIMARY KEY (`user_id`),
- UNIQUE KEY `user_mail_notification_ui1` (`check_key`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_users`
---
-
-DROP TABLE IF EXISTS `piwigo_users`;
-CREATE TABLE `piwigo_users` (
- `id` smallint(5) NOT NULL auto_increment,
- `username` varchar(100) binary NOT NULL default '',
- `password` varchar(32) default NULL,
- `mail_address` varchar(255) default NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `users_ui1` (`username`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_waiting`
---
-
-DROP TABLE IF EXISTS `piwigo_waiting`;
-CREATE TABLE `piwigo_waiting` (
- `id` int(10) unsigned NOT NULL auto_increment,
- `storage_category_id` smallint(5) unsigned NOT NULL default '0',
- `file` varchar(255) NOT NULL default '',
- `username` varchar(255) NOT NULL default '',
- `mail_address` varchar(255) NOT NULL default '',
- `date` int(10) unsigned NOT NULL default '0',
- `tn_ext` char(3) default NULL,
- `validated` enum('true','false') NOT NULL default 'false',
- `infos` text,
- PRIMARY KEY (`id`)
-) TYPE=MyISAM;
-
---
--- Table structure for table `piwigo_ws_access`
---
-
-DROP TABLE IF EXISTS `piwigo_ws_access`;
-CREATE TABLE `piwigo_ws_access` (
- `id` smallint(5) unsigned NOT NULL auto_increment,
- `name` varchar(32) NOT NULL default '',
- `access` varchar(255) default NULL,
- `start` datetime default NULL,
- `end` datetime default NULL,
- `request` varchar(255) default NULL,
- `limit` smallint(5) unsigned default NULL,
- `comment` varchar(255) default NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `ws_access_ui1` (`name`)
-) TYPE=MyISAM COMMENT='Access for Web Services';
-
diff --git a/BSF/install/upgrade_1.3.0.php b/BSF/install/upgrade_1.3.0.php
deleted file mode 100644
index ef2d1f8f7..000000000
--- a/BSF/install/upgrade_1.3.0.php
+++ /dev/null
@@ -1,126 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-
-/**
- * Upgrade from 1.3.0 to 1.3.1
- */
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die ('This page cannot be loaded directly, load upgrade.php');
-}
-else
-{
- if (!defined('PHPWG_IN_UPGRADE') or !PHPWG_IN_UPGRADE)
- {
- die ('Hacking attempt!');
- }
-}
-
-$queries = array(
- "
-ALTER TABLE phpwebgallery_categories
- ADD COLUMN uppercats varchar(255) NOT NULL default ''
-;",
-
- "
-CREATE TABLE phpwebgallery_user_category (
- user_id smallint(5) unsigned NOT NULL default '0'
-)
-;",
-
- "
-ALTER TABLE phpwebgallery_categories
- ADD INDEX id (id)
-;",
-
- "
-ALTER TABLE phpwebgallery_categories
- ADD INDEX id_uppercat (id_uppercat)
-;",
-
- "
-ALTER TABLE phpwebgallery_image_category
- ADD INDEX category_id (category_id)
-;",
-
- "
-ALTER TABLE phpwebgallery_image_category
- ADD INDEX image_id (image_id)
-;",
- );
-
-foreach ($queries as $query)
-{
- $query = str_replace('phpwebgallery_', PREFIX_TABLE, $query);
- pwg_query($query);
-}
-// filling the new column categories.uppercats
-$id_uppercats = array();
-
-$query = '
-SELECT id, id_uppercat
- FROM '.CATEGORIES_TABLE.'
-;';
-$result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
-{
- if (!isset($row['id_uppercat']) or $row['id_uppercat'] == '')
- {
- $row['id_uppercat'] = 'NULL';
- }
- $id_uppercats[$row['id']] = $row['id_uppercat'];
-}
-
-$datas = array();
-
-foreach (array_keys($id_uppercats) as $id)
-{
- $data = array();
- $data['id'] = $id;
- $uppercats = array();
-
- array_push($uppercats, $id);
- while (isset($id_uppercats[$id]) and $id_uppercats[$id] != 'NULL')
- {
- array_push($uppercats, $id_uppercats[$id]);
- $id = $id_uppercats[$id];
- }
- $data['uppercats'] = implode(',', array_reverse($uppercats));
-
- array_push($datas, $data);
-}
-
-mass_updates(
- CATEGORIES_TABLE,
- array(
- 'primary' => array('id'),
- 'update' => array('uppercats')
- ),
- $datas
- );
-
-// now we upgrade from 1.3.1 to 1.6.0
-include_once(PHPWG_ROOT_PATH.'install/upgrade_1.3.1.php');
-?> \ No newline at end of file
diff --git a/BSF/install/upgrade_1.3.1.php b/BSF/install/upgrade_1.3.1.php
deleted file mode 100644
index 0ce03ece6..000000000
--- a/BSF/install/upgrade_1.3.1.php
+++ /dev/null
@@ -1,601 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * Upgrade from 1.3.x (x >= 1) to 1.4.0
- */
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die ('This page cannot be loaded directly, load upgrade.php');
-}
-else
-{
- if (!defined('PHPWG_IN_UPGRADE') or !PHPWG_IN_UPGRADE)
- {
- die ('Hacking attempt!');
- }
-}
-
-// save data before deletion
-$query = '
-SELECT prefix_thumbnail, mail_webmaster
- FROM '.PREFIX_TABLE.'config
-;';
-$save = mysql_fetch_array(mysql_query($query));
-
-$queries = array(
- "
-DROP TABLE phpwebgallery_config
-;",
-
- "
-CREATE TABLE phpwebgallery_config (
- param varchar(40) NOT NULL default '',
- value varchar(255) default NULL,
- comment varchar(255) default NULL,
- PRIMARY KEY (param)
-) TYPE=MyISAM COMMENT='configuration table'
-;",
-
- "
-ALTER TABLE phpwebgallery_categories
- CHANGE COLUMN site_id site_id tinyint(4) unsigned default '1'
-;",
-
- "
-ALTER TABLE phpwebgallery_categories
- ADD COLUMN commentable enum('true','false') NOT NULL default 'true'
-;",
-
- "
-ALTER TABLE phpwebgallery_categories
- ADD COLUMN global_rank varchar(255) default NULL
-;",
-
- "
-ALTER TABLE phpwebgallery_categories
- ADD INDEX categories_i2 (id_uppercat)
-;",
-
- "
-ALTER TABLE phpwebgallery_comments
- ADD COLUMN date_temp int(11) unsigned
-;",
-
- "
-UPDATE phpwebgallery_comments
- SET date_temp = date
-;",
-
- "
-ALTER TABLE phpwebgallery_comments
- CHANGE COLUMN date date datetime NOT NULL default '0000-00-00 00:00:00'
-;",
-
- "
-UPDATE phpwebgallery_comments
- SET date = FROM_UNIXTIME(date_temp)
-;",
-
- "
-ALTER TABLE phpwebgallery_comments
- DROP COLUMN date_temp
-;",
-
- "
-ALTER TABLE phpwebgallery_favorites
- DROP INDEX user_id
-;",
-
- "
-ALTER TABLE phpwebgallery_favorites
- ADD PRIMARY KEY (user_id,image_id)
-;",
-
- "
-ALTER TABLE phpwebgallery_history
- ADD COLUMN date_temp int(11) unsigned
-;",
-
- "
-UPDATE phpwebgallery_history
- SET date_temp = date
-;",
-
- "
-ALTER TABLE phpwebgallery_history
- CHANGE COLUMN date date datetime NOT NULL default '0000-00-00 00:00:00'
-;",
-
- "
-UPDATE phpwebgallery_history
- SET date = FROM_UNIXTIME(date_temp)
-;",
-
- "
-ALTER TABLE phpwebgallery_history
- DROP COLUMN date_temp
-;",
-
- "
-ALTER TABLE phpwebgallery_history
- ADD INDEX history_i1 (date)
-;",
-
- "
-ALTER TABLE phpwebgallery_image_category
- ADD INDEX image_category_i1 (image_id),
- ADD INDEX image_category_i2 (category_id)
-;",
-
- "
-ALTER TABLE phpwebgallery_images
- CHANGE COLUMN tn_ext tn_ext varchar(4) default ''
-;",
-
- "
-ALTER TABLE phpwebgallery_images
- ADD COLUMN path varchar(255) NOT NULL default ''
-;",
-
- "
-ALTER TABLE phpwebgallery_images
- ADD COLUMN date_metadata_update date default NULL
-;",
-
- "
-ALTER TABLE phpwebgallery_images
- ADD COLUMN average_rate float(5,2) unsigned default NULL
-;",
-
- "
-ALTER TABLE phpwebgallery_images
- ADD COLUMN representative_ext varchar(4) default NULL
-;",
-
- "
-ALTER TABLE phpwebgallery_images
- DROP INDEX storage_category_id
-;",
-
- "
-ALTER TABLE phpwebgallery_images
- ADD INDEX images_i1 (storage_category_id)
-;",
-
- "
-ALTER TABLE phpwebgallery_images
- ADD INDEX images_i2 (date_available)
-;",
-
- "
-ALTER TABLE phpwebgallery_images
- ADD INDEX images_i3 (average_rate)
-;",
-
- "
-ALTER TABLE phpwebgallery_images
- ADD INDEX images_i4 (hit)
-;",
-
- "
-ALTER TABLE phpwebgallery_images
- ADD INDEX images_i5 (date_creation)
-;",
-
- "
-ALTER TABLE phpwebgallery_sessions
- DROP COLUMN ip
-;",
-
- "
-ALTER TABLE phpwebgallery_sessions
- ADD COLUMN expiration_temp int(11) unsigned
-;",
-
- "
-UPDATE phpwebgallery_sessions
- SET expiration_temp = expiration
-;",
-
- "
-ALTER TABLE phpwebgallery_sessions
- CHANGE COLUMN expiration expiration datetime NOT NULL default '0000-00-00 00:00:00'
-;",
-
- "
-UPDATE phpwebgallery_sessions
- SET expiration = FROM_UNIXTIME(expiration_temp)
-;",
-
- "
-ALTER TABLE phpwebgallery_sessions
- DROP COLUMN expiration_temp
-;",
-
- "
-ALTER TABLE phpwebgallery_sites
- DROP INDEX galleries_url
-;",
-
- "
-ALTER TABLE phpwebgallery_sites
- ADD UNIQUE sites_ui1 (galleries_url)
-;",
-
- "
-DROP TABLE phpwebgallery_user_category
-;",
-
- "
-ALTER TABLE phpwebgallery_users
- DROP COLUMN long_period
-;",
-
- "
-ALTER TABLE phpwebgallery_users
- DROP COLUMN short_period
-;",
-
- "
-ALTER TABLE phpwebgallery_users
- ADD COLUMN recent_period tinyint(3) unsigned NOT NULL default '7'
-;",
-
- "
-ALTER TABLE phpwebgallery_users
- DROP INDEX username
-;",
-
- "
-ALTER TABLE phpwebgallery_users
- ADD UNIQUE users_ui1 (username)
-;",
-
- "
-CREATE TABLE phpwebgallery_rate (
- user_id smallint(5) unsigned NOT NULL default '0',
- element_id mediumint(8) unsigned NOT NULL default '0',
- rate tinyint(2) unsigned NOT NULL default '0',
- PRIMARY KEY (user_id,element_id)
-) TYPE=MyISAM
-;",
-
- "
-CREATE TABLE phpwebgallery_user_forbidden (
- user_id smallint(5) unsigned NOT NULL default '0',
- need_update enum('true','false') NOT NULL default 'true',
- forbidden_categories text,
- PRIMARY KEY (user_id)
-) TYPE=MyISAM
-;",
-
- "
-UPDATE phpwebgallery_users
- SET language = 'en_UK.iso-8859-1'
- , template = 'default'
-;",
-
- "
-DELETE FROM phpwebgallery_user_access
-;",
-
- "
-DELETE FROM phpwebgallery_group_access
-;"
-
- );
-
-foreach ($queries as $query)
-{
- $query = str_replace('phpwebgallery_', PREFIX_TABLE, $query);
- pwg_query($query);
-}
-
-//
-// check indexes
-//
-$indexes_of = array(
- 'categories' => array(
- 'categories_i2' => array(
- 'columns' => array('id_uppercat'),
- 'unique' => false,
- )
- ),
- 'image_category' => array(
- 'image_category_i1' => array(
- 'columns' => array('image_id'),
- 'unique' => false,
- ),
- 'image_category_i2' => array(
- 'columns' => array('category_id'),
- 'unique' => false,
- ),
- ),
- );
-
-foreach (array_keys($indexes_of) as $table)
-{
- $existing_indexes = array();
-
- $query = '
-SHOW INDEX
- FROM '.PREFIX_TABLE.$table.'
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- if ($row['Key_name'] != 'PRIMARY')
- {
- if (!in_array($row['Key_name'], array_keys($indexes_of[$table])))
- {
- $query = '
-ALTER TABLE '.PREFIX_TABLE.$table.'
- DROP INDEX '.$row['Key_name'].'
-;';
- pwg_query($query);
- }
- else
- {
- array_push($existing_indexes, $row['Key_name']);
- }
- }
- }
-
- foreach ($indexes_of[$table] as $index_name => $index)
- {
- if (!in_array($index_name, $existing_indexes))
- {
- $query = '
-ALTER TABLE '.PREFIX_TABLE.$table.'
- ADD '.($index['unique'] ? 'UNIQUE' : 'INDEX').' '
- .$index_name.' ('.implode(',', $index['columns']).')
-;';
- pwg_query($query);
- }
- }
-}
-
-//
-// insert params in new configuration table
-//
-$params = array(
- array(
- 'param' => 'prefix_thumbnail',
- 'value' => $save['prefix_thumbnail'],
- 'comment' => 'thumbnails filename prefix'
- ),
- array(
- 'param' => 'mail_webmaster',
- 'value' => $save['mail_webmaster'],
- 'comment' => 'webmaster mail'
- ),
- array(
- 'param' => 'default_language',
- 'value' => 'en_UK.iso-8859-1',
- 'comment' => 'Default gallery language'
- ),
- array(
- 'param' => 'default_template',
- 'value' => 'default',
- 'comment' => 'Default gallery style'
- ),
- array(
- 'param' => 'default_maxwidth',
- 'value' => '',
- 'comment' => 'maximum width authorized for displaying images'
- ),
- array(
- 'param' => 'default_maxheight',
- 'value' => '',
- 'comment' => 'maximum height authorized for the displaying images'
- ),
- array(
- 'param' => 'nb_comment_page',
- 'value' => '10',
- 'comment' => 'number of comments to display on each page'
- ),
- array(
- 'param' => 'upload_maxfilesize',
- 'value' => '150',
- 'comment' => 'maximum filesize for the uploaded pictures'
- ),
- array(
- 'param' => 'upload_maxwidth',
- 'value' => '800',
- 'comment' => 'maximum width authorized for the uploaded images'
- ),
- array(
- 'param' => 'upload_maxheight',
- 'value' => '600',
- 'comment' => 'maximum height authorized for the uploaded images'
- ),
- array(
- 'param' => 'upload_maxwidth_thumbnail',
- 'value' => '150',
- 'comment' => 'maximum width authorized for the uploaded thumbnails'
- ),
- array(
- 'param' => 'upload_maxheight_thumbnail',
- 'value' => '100',
- 'comment' => 'maximum height authorized for the uploaded thumbnails'
- ),
- array(
- 'param' => 'log',
- 'value' => 'false',
- 'comment' => 'keep an history of visits on your website'
- ),
- array(
- 'param' => 'comments_validation',
- 'value' => 'false',
- 'comment' => 'administrators validate users comments before becoming visible'
- ),
- array(
- 'param' => 'comments_forall',
- 'value' => 'false',
- 'comment' => 'even guest not registered can post comments'
- ),
- array(
- 'param' => 'mail_notification',
- 'value' => 'false',
- 'comment' => 'automated mail notification for adminsitrators'
- ),
- array(
- 'param' => 'nb_image_line',
- 'value' => '5',
- 'comment' => 'Number of images displayed per row'
- ),
- array(
- 'param' => 'nb_line_page',
- 'value' => '3',
- 'comment' => 'Number of rows displayed per page'
- ),
- array(
- 'param' => 'recent_period',
- 'value' => '7',
- 'comment' => 'Period within which pictures are displayed as new (in days)'
- ),
- array(
- 'param' => 'auto_expand',
- 'value' => 'false',
- 'comment' => 'Auto expand of the category tree'
- ),
- array(
- 'param' => 'show_nb_comments',
- 'value' => 'false',
- 'comment' => 'Show the number of comments under the thumbnails'
- ),
- array(
- 'param' => 'use_iptc',
- 'value' => 'false',
- 'comment' => 'Use IPTC data during database synchronization with files metadata'
- ),
- array(
- 'param' => 'use_exif',
- 'value' => 'false',
- 'comment' => 'Use EXIF data during database synchronization with files metadata'
- ),
- array(
- 'param' => 'show_iptc',
- 'value' => 'false',
- 'comment' => 'Show IPTC metadata on picture.php if asked by user'
- ),
- array(
- 'param' => 'show_exif',
- 'value' => 'true',
- 'comment' => 'Show EXIF metadata on picture.php if asked by user'
- ),
- array(
- 'param' => 'authorize_remembering',
- 'value' => 'true',
- 'comment' => 'Authorize users to be remembered, see $conf{remember_me_length}'
- ),
- array(
- 'param' => 'gallery_locked',
- 'value' => 'false',
- 'comment' => 'Lock your gallery temporary for non admin users'
- ),
- );
-
-mass_inserts(
- CONFIG_TABLE,
- array_keys($params[0]),
- $params
- );
-
-// refresh calculated datas
-update_global_rank();
-update_category();
-
-// update calculated field "images.path"
-$cat_ids = array();
-
-$query = '
-SELECT DISTINCT(storage_category_id) AS unique_storage_category_id
- FROM '.IMAGES_TABLE.'
-;';
-$result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
-{
- array_push($cat_ids, $row['unique_storage_category_id']);
-}
-$fulldirs = get_fulldirs($cat_ids);
-
-foreach ($cat_ids as $cat_id)
-{
- $query = '
-UPDATE '.IMAGES_TABLE.'
- SET path = CONCAT(\''.$fulldirs[$cat_id].'\',\'/\',file)
- WHERE storage_category_id = '.$cat_id.'
-;';
- pwg_query($query);
-}
-
-// all sub-categories of private categories become private
-$cat_ids = array();
-
-$query = '
-SELECT id
- FROM '.CATEGORIES_TABLE.'
- WHERE status = \'private\'
-;';
-$result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
-{
- array_push($cat_ids, $row['id']);
-}
-
-if (count($cat_ids) > 0)
-{
- $privates = get_subcat_ids($cat_ids);
-
- $query = '
-UPDATE '.CATEGORIES_TABLE.'
- SET status = \'private\'
- WHERE id IN ('.implode(',', $privates).')
-;';
- pwg_query($query);
-}
-
-$page['infos'] = array_merge(
- $page['infos'],
- array(
- 'all sub-categories of private categories become private',
-
- 'user permissions and group permissions have been erased',
-
- 'only thumbnails prefix and webmaster mail address have been saved from
-previous configuration',
-
- 'in include/mysql.inc.php, before
-<pre style="background-color:lightgray">?&gt;</pre>
-insert
-<pre style="background-color:lightgray">define(\'PHPWG_INSTALLED\', true);<pre>'
- )
- );
-
-
-// now we upgrade from 1.4.0
-include_once(PHPWG_ROOT_PATH.'install/upgrade_1.4.0.php');
-?> \ No newline at end of file
diff --git a/BSF/install/upgrade_1.4.0.php b/BSF/install/upgrade_1.4.0.php
deleted file mode 100644
index f49e2f9f2..000000000
--- a/BSF/install/upgrade_1.4.0.php
+++ /dev/null
@@ -1,292 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die ('This page cannot be loaded directly, load upgrade.php');
-}
-else
-{
- if (!defined('PHPWG_IN_UPGRADE') or !PHPWG_IN_UPGRADE)
- {
- die ('Hacking attempt!');
- }
-}
-
-$last_time = get_moment();
-
-// will the user have to edit include/config_local.inc.php for
-// prefix_thumbnail configuration parameter
-$query = '
-SELECT value
- FROM '.CONFIG_TABLE.'
- WHERE param = \'prefix_thumbnail\'
-;';
-list($prefix_thumbnail) = mysql_fetch_array(pwg_query($query));
-
-// delete obsolete configuration
-$query = '
-DELETE
- FROM '.PREFIX_TABLE.'config
- WHERE param IN (
- \'prefix_thumbnail\',
- \'mail_webmaster\',
- \'upload_maxfilesize\',
- \'upload_maxwidth\',
- \'upload_maxheight\',
- \'upload_maxwidth_thumbnail\',
- \'upload_maxheight_thumbnail\',
- \'mail_notification\',
- \'use_iptc\',
- \'use_exif\',
- \'show_iptc\',
- \'show_exif\',
- \'authorize_remembering\'
- )
-;';
-mysql_query($query);
-
-$queries = array(
-
- "
-ALTER TABLE piwigo_categories
- CHANGE COLUMN date_last date_last datetime default NULL
-;",
-
- "
-ALTER TABLE piwigo_comments
- ADD COLUMN validation_date datetime default NULL
-;",
-
- "
-UPDATE piwigo_comments
- SET validation_date = date
-",
-
- "
-ALTER TABLE piwigo_comments
- ADD INDEX comments_i1 (image_id)
-;",
-
- "
-ALTER TABLE piwigo_comments
- ADD INDEX comments_i2 (validation_date)
-;",
-
- "
-ALTER TABLE piwigo_favorites
- CHANGE COLUMN user_id user_id smallint(5) NOT NULL default '0'
-;",
-
- "
-ALTER TABLE piwigo_images
- CHANGE COLUMN date_available
- date_available datetime NOT NULL default '0000-00-00 00:00:00'
-;",
-
- "
-ALTER TABLE piwigo_rate
- CHANGE COLUMN user_id user_id smallint(5) NOT NULL default '0'
-;",
-
- "
-ALTER TABLE piwigo_sessions
- CHANGE COLUMN user_id user_id smallint(5) NOT NULL default '0'
-;",
-
- "
-ALTER TABLE piwigo_user_access
- CHANGE COLUMN user_id user_id smallint(5) NOT NULL default '0'
-;",
-
- "
-DROP TABLE piwigo_user_forbidden
-;",
-
- "
-ALTER TABLE piwigo_user_group
- CHANGE COLUMN user_id user_id smallint(5) NOT NULL default '0'
-;",
-
- "
-ALTER TABLE piwigo_users
- CHANGE COLUMN id id smallint(5) NOT NULL auto_increment
-;",
-
- "
-CREATE TABLE piwigo_caddie (
- user_id smallint(5) NOT NULL default '0',
- element_id mediumint(8) NOT NULL default '0',
- PRIMARY KEY (user_id,element_id)
-) TYPE=MyISAM
-;",
-
- "
-CREATE TABLE piwigo_user_cache (
- user_id smallint(5) NOT NULL default '0',
- need_update enum('true','false') NOT NULL default 'true',
- forbidden_categories text,
- PRIMARY KEY (user_id)
-) TYPE=MyISAM
-;",
-
- "
-CREATE TABLE piwigo_user_feed (
- id varchar(50) binary NOT NULL default '',
- user_id smallint(5) NOT NULL default '0',
- last_check datetime default NULL,
- PRIMARY KEY (id)
-) TYPE=MyISAM
-;",
-
- "
-CREATE TABLE piwigo_user_infos (
- user_id smallint(5) NOT NULL default '0',
- nb_image_line tinyint(1) unsigned NOT NULL default '5',
- nb_line_page tinyint(3) unsigned NOT NULL default '3',
- status enum('admin','guest') NOT NULL default 'guest',
- language varchar(50) NOT NULL default 'english',
- maxwidth smallint(6) default NULL,
- maxheight smallint(6) default NULL,
- expand enum('true','false') NOT NULL default 'false',
- show_nb_comments enum('true','false') NOT NULL default 'false',
- recent_period tinyint(3) unsigned NOT NULL default '7',
- template varchar(255) NOT NULL default 'yoga',
- registration_date datetime NOT NULL default '0000-00-00 00:00:00',
- UNIQUE KEY user_infos_ui1 (user_id)
-) TYPE=MyISAM
-;"
- );
-
-foreach ($queries as $query)
-{
- $query = str_replace('piwigo_', PREFIX_TABLE, $query);
- pwg_query($query);
-}
-
-// user datas migration from piwigo_users to piwigo_user_infos
-$query = '
-SELECT *
- FROM '.USERS_TABLE.'
-;';
-
-$datas = array();
-list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
-
-$result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
-{
- $row['user_id'] = $row['id'];
- $row['registration_date'] = $dbnow;
- array_push($datas, $row);
-}
-
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-mass_inserts(
- USER_INFOS_TABLE,
- array(
- 'user_id',
- 'nb_image_line',
- 'nb_line_page',
- 'status',
- 'language',
- 'maxwidth',
- 'maxheight',
- 'expand',
- 'show_nb_comments',
- 'recent_period',
- 'template',
- 'registration_date'
- ),
- $datas
- );
-
-$queries = array(
-
- "
-UPDATE ".USER_INFOS_TABLE."
- SET template = 'yoga'
-;",
-
- "
-UPDATE ".USER_INFOS_TABLE."
- SET language = 'en_UK.iso-8859-1'
- WHERE language NOT IN ('en_UK.iso-8859-1', 'fr_FR.iso-8859-1')
-;",
-
- "
-UPDATE ".CONFIG_TABLE."
- SET value = 'en_UK.iso-8859-1'
- WHERE param = 'default_language'
- AND value NOT IN ('en_UK.iso-8859-1', 'fr_FR.iso-8859-1')
-;",
-
- "
-UPDATE ".CONFIG_TABLE."
- SET value = 'yoga'
- WHERE param = 'default_template'
-;",
-
- "
-INSERT INTO ".CONFIG_TABLE."
- (param,value,comment)
- VALUES
- (
- 'gallery_title',
- 'Piwigo demonstration site',
- 'Title at top of each page and for RSS feed'
- )
-;",
-
- "
-INSERT INTO ".CONFIG_TABLE."
- (param,value,comment)
- VALUES
- (
- 'gallery_description',
- 'My photos web site',
- 'Short description displayed with gallery title'
- )
-;"
-
- );
-
-foreach ($queries as $query)
-{
- $query = str_replace('piwigo_', PREFIX_TABLE, $query);
- pwg_query($query);
-}
-
-if ($prefix_thumbnail != 'TN-')
-{
- array_push(
- $page['infos'],
- 'the thumbnail prefix configuration parameter was moved to configuration
-file, copy config_local.inc.php from "tools" directory to "include" directory
-and edit $conf[\'prefix_thumbnail\'] = '.$prefix_thumbnail
- );
-}
-
-// now we upgrade from 1.5.0 to 1.6.0
-include_once(PHPWG_ROOT_PATH.'install/upgrade_1.5.0.php');
-?> \ No newline at end of file
diff --git a/BSF/install/upgrade_1.5.0.php b/BSF/install/upgrade_1.5.0.php
deleted file mode 100644
index 1d9627c58..000000000
--- a/BSF/install/upgrade_1.5.0.php
+++ /dev/null
@@ -1,469 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die ('This page cannot be loaded directly, load upgrade.php');
-}
-else
-{
- if (!defined('PHPWG_IN_UPGRADE') or !PHPWG_IN_UPGRADE)
- {
- die ('Hacking attempt!');
- }
-}
-
-/**
- * replace old style #images.keywords by #tags. Requires a big data
- * migration.
- *
- * @return void
- */
-function tag_replace_keywords()
-{
- // code taken from upgrades 19 and 22
-
- $query = '
-CREATE TABLE '.PREFIX_TABLE.'tags (
- id smallint(5) UNSIGNED NOT NULL auto_increment,
- name varchar(255) BINARY NOT NULL,
- url_name varchar(255) BINARY NOT NULL,
- PRIMARY KEY (id)
-)
-;';
- pwg_query($query);
-
- $query = '
-CREATE TABLE '.PREFIX_TABLE.'image_tag (
- image_id mediumint(8) UNSIGNED NOT NULL,
- tag_id smallint(5) UNSIGNED NOT NULL,
- PRIMARY KEY (image_id,tag_id)
-)
-;';
- pwg_query($query);
-
- //
- // Move keywords to tags
- //
-
- // each tag label is associated to a numeric identifier
- $tag_id = array();
- // to each tag id (key) a list of image ids (value) is associated
- $tag_images = array();
-
- $current_id = 1;
-
- $query = '
-SELECT id, keywords
- FROM '.PREFIX_TABLE.'images
- WHERE keywords IS NOT NULL
-;';
- $result = pwg_query($query);
- while ($row = mysql_fetch_array($result))
- {
- foreach(preg_split('/[,]+/', $row['keywords']) as $keyword)
- {
- if (!isset($tag_id[$keyword]))
- {
- $tag_id[$keyword] = $current_id++;
- }
-
- if (!isset($tag_images[ $tag_id[$keyword] ]))
- {
- $tag_images[ $tag_id[$keyword] ] = array();
- }
-
- array_push(
- $tag_images[ $tag_id[$keyword] ],
- $row['id']
- );
- }
- }
-
- $datas = array();
- foreach ($tag_id as $tag_name => $tag_id)
- {
- array_push(
- $datas,
- array(
- 'id' => $tag_id,
- 'name' => $tag_name,
- 'url_name' => str2url($tag_name),
- )
- );
- }
-
- if (!empty($datas))
- {
- mass_inserts(
- PREFIX_TABLE.'tags',
- array_keys($datas[0]),
- $datas
- );
- }
-
- $datas = array();
- foreach ($tag_images as $tag_id => $images)
- {
- foreach (array_unique($images) as $image_id)
- {
- array_push(
- $datas,
- array(
- 'tag_id' => $tag_id,
- 'image_id' => $image_id,
- )
- );
- }
- }
-
- if (!empty($datas))
- {
- mass_inserts(
- PREFIX_TABLE.'image_tag',
- array_keys($datas[0]),
- $datas
- );
- }
-
- //
- // Delete images.keywords
- //
- $query = '
-ALTER TABLE '.PREFIX_TABLE.'images DROP COLUMN keywords
-;';
- pwg_query($query);
-
- //
- // Add useful indexes
- //
- $query = '
-ALTER TABLE '.PREFIX_TABLE.'tags
- ADD INDEX tags_i1(url_name)
-;';
- pwg_query($query);
-
-
- $query = '
-ALTER TABLE '.PREFIX_TABLE.'image_tag
- ADD INDEX image_tag_i1(tag_id)
-;';
- pwg_query($query);
-
- // print_time('tags have replaced keywords');
-}
-
-tag_replace_keywords();
-
-$queries = array(
- "
-CREATE TABLE ".PREFIX_TABLE."search (
- id int UNSIGNED NOT NULL AUTO_INCREMENT,
- last_seen date DEFAULT NULL,
- rules text,
- PRIMARY KEY (id)
-);",
-
- "
-CREATE TABLE ".PREFIX_TABLE."user_mail_notification (
- user_id smallint(5) NOT NULL default '0',
- check_key varchar(16) binary NOT NULL default '',
- enabled enum('true','false') NOT NULL default 'false',
- last_send datetime default NULL,
- PRIMARY KEY (user_id),
- UNIQUE KEY uidx_check_key (check_key)
-);",
-
- "
-CREATE TABLE ".PREFIX_TABLE."upgrade (
- id varchar(20) NOT NULL default '',
- applied datetime NOT NULL default '0000-00-00 00:00:00',
- description varchar(255) default NULL,
- PRIMARY KEY (`id`)
-);",
-
- "
-ALTER TABLE ".PREFIX_TABLE."config
- MODIFY COLUMN value TEXT
-;",
-
- "
-ALTER TABLE ".PREFIX_TABLE."images
- ADD COLUMN has_high enum('true') default NULL
-;",
-
- "
-ALTER TABLE ".PREFIX_TABLE."rate
- ADD COLUMN anonymous_id varchar(45) NOT NULL default ''
-;",
- "
-ALTER TABLE ".PREFIX_TABLE."rate
- ADD COLUMN date date NOT NULL default '0000-00-00'
-;",
- "
-ALTER TABLE ".PREFIX_TABLE."rate
- DROP PRIMARY KEY
-;",
- "
-ALTER TABLE ".PREFIX_TABLE."rate
- ADD PRIMARY KEY (element_id,user_id,anonymous_id)
-;",
- "
-UPDATE ".PREFIX_TABLE."rate
- SET date = CURDATE()
-;",
-
- "
-DELETE
- FROM ".PREFIX_TABLE."sessions
-;",
- "
-ALTER TABLE ".PREFIX_TABLE."sessions
- DROP COLUMN user_id
-;",
- "
-ALTER TABLE ".PREFIX_TABLE."sessions
- ADD COLUMN data text NOT NULL
-;",
-
- "
-ALTER TABLE ".PREFIX_TABLE."user_cache
- ADD COLUMN nb_total_images mediumint(8) unsigned default NULL
-;",
-
- "
-ALTER TABLE ".PREFIX_TABLE."user_infos
- CHANGE COLUMN status
- status enum('webmaster','admin','normal','generic','guest')
- NOT NULL default 'guest'
-;",
- "
-UPDATE ".PREFIX_TABLE."user_infos
- SET status = 'normal'
- WHERE status = 'guest'
-;",
- "
-UPDATE ".PREFIX_TABLE."user_infos
- SET status = 'guest'
- WHERE user_id = ".$conf['guest_id']."
-;",
- "
-UPDATE ".PREFIX_TABLE."user_infos
- SET status = 'webmaster'
- WHERE user_id = ".$conf['webmaster_id']."
-;",
-
- "
-ALTER TABLE ".PREFIX_TABLE."user_infos
- CHANGE COLUMN template template varchar(255) NOT NULL default 'yoga/clear'
-;",
-
- "
-UPDATE ".PREFIX_TABLE."user_infos
- SET template = 'yoga/dark'
- WHERE template = 'yoga-dark'
-;",
- "
-UPDATE ".PREFIX_TABLE."user_infos
- SET template = 'yoga/clear'
- WHERE template != 'yoga/dark'
-;",
- "
-ALTER TABLE ".PREFIX_TABLE."user_infos
- ADD COLUMN adviser enum('true','false') NOT NULL default 'false'
-;",
- "
-ALTER TABLE ".PREFIX_TABLE."user_infos
- ADD COLUMN enabled_high enum('true','false') NOT NULL default 'true'
-;",
- "
-ALTER TABLE ".PREFIX_TABLE."categories
- CHANGE COLUMN rank rank SMALLINT(5) UNSIGNED DEFAULT NULL
-;",
- // configuration table
- "
-UPDATE ".PREFIX_TABLE."config
- SET value = 'yoga/clear'
- WHERE param = 'default_template'
-;"
- );
-
-foreach ($queries as $query)
-{
- pwg_query($query);
-}
-
-//
-// Move rate, rate_anonymous and gallery_url from config file to database
-//
-$params = array(
- 'gallery_url' => array(
- 'http://demo.phpwebgallery.net',
- 'URL given in RSS feed'
- ),
- 'rate' => array(
- 'true',
- 'Rating pictures feature is enabled'
- ),
- 'rate_anonymous' => array(
- 'true',
- 'Rating pictures feature is also enabled for visitors'
- )
- );
-// Get real values from config file
-$conf_save = $conf;
-unset($conf);
-@include(PHPWG_ROOT_PATH. 'include/config_local.inc.php');
-if ( isset($conf['gallery_url']) )
-{
- $params['gallery_url'][0] = $conf['gallery_url'];
-}
-if ( isset($conf['rate']) and is_bool($conf['rate']) )
-{
- $params['rate'][0] = $conf['rate'] ? 'true' : 'false';
-}
-if ( isset($conf['rate_anonymous']) and is_bool($conf['rate_anonymous']) )
-{
- $params['rate_anonymous'][0] = $conf['rate_anonymous'] ? 'true' : 'false';
-}
-$conf = $conf_save;
-
-// Do I already have them in DB ?
-$query = 'SELECT param FROM '.PREFIX_TABLE.'config';
-$result = pwg_query($query);
-while ($row = mysql_fetch_array($result))
-{
- unset( $params[ $row['param'] ] );
-}
-
-// Perform the insert query
-foreach ($params as $param_key => $param_values)
-{
- $query = '
-INSERT INTO '.PREFIX_TABLE.'config
- (param,value,comment)
- VALUES
- ('."'$param_key','$param_values[0]','$param_values[1]')
-;";
- pwg_query($query);
-}
-
-$query = "
-ALTER TABLE ".PREFIX_TABLE."config MODIFY COLUMN `value` TEXT;";
-pwg_query($query);
-
-
-//
-// replace gallery_description by page_banner
-//
-$query = '
-SELECT value
- FROM '.PREFIX_TABLE.'config
- WHERE param=\'gallery_title\'
-;';
-list($t) = array_from_query($query, 'value');
-
-$query = '
-SELECT value
- FROM '.PREFIX_TABLE.'config
- WHERE param=\'gallery_description\'
-;';
-list($d) = array_from_query($query, 'value');
-
-$page_banner='<h1>'.$t.'</h1><p>'.$d.'</p>';
-$page_banner=addslashes($page_banner);
-$query = '
-INSERT INTO '.PREFIX_TABLE.'config
- (param,value,comment)
- VALUES
- (
- \'page_banner\',
- \''.$page_banner.'\',
- \'html displayed on the top each page of your gallery\'
- )
-;';
-pwg_query($query);
-
-$query = '
-DELETE FROM '.PREFIX_TABLE.'config
- WHERE param=\'gallery_description\'
-;';
-pwg_query($query);
-
-//
-// configuration for notification by mail
-//
-$query = "
-INSERT INTO ".CONFIG_TABLE."
- (param,value,comment)
- VALUES
- (
- 'nbm_send_mail_as',
- '',
- 'Send mail as param value for notification by mail'
- ),
- (
- 'nbm_send_detailed_content',
- 'true',
- 'Send detailed content for notification by mail'
- ),
- (
- 'nbm_complementary_mail_content',
- '',
- 'Complementary mail content for notification by mail'
- )
-;";
-pwg_query($query);
-
-// depending on the way the 1.5.0 was installed (from scratch or by upgrade)
-// the database structure has small differences that should be corrected.
-
-$query = '
-ALTER TABLE '.PREFIX_TABLE.'users
- CHANGE COLUMN password password varchar(32) default NULL
-;';
-pwg_query($query);
-
-$to_keep = array('id', 'username', 'password', 'mail_address');
-
-$query = '
-DESC '.PREFIX_TABLE.'users
-;';
-
-$result = pwg_query($query);
-
-while ($row = mysql_fetch_array($result))
-{
- if (!in_array($row['Field'], $to_keep))
- {
- $query = '
-ALTER TABLE '.PREFIX_TABLE.'users
- DROP COLUMN '.$row['Field'].'
-;';
- pwg_query($query);
- }
-}
-
-// now we upgrade from 1.6.0 to 1.6.2
-include_once(PHPWG_ROOT_PATH.'install/upgrade_1.6.0.php');
-?>
diff --git a/BSF/install/upgrade_1.6.0.php b/BSF/install/upgrade_1.6.0.php
deleted file mode 100644
index 76a5bc453..000000000
--- a/BSF/install/upgrade_1.6.0.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die ('This page cannot be loaded directly, load upgrade.php');
-}
-else
-{
- if (!defined('PHPWG_IN_UPGRADE') or !PHPWG_IN_UPGRADE)
- {
- die ('Hacking attempt!');
- }
-}
-
-$queries = array(
- "
-ALTER TABLE ".PREFIX_TABLE."user_infos
- ADD auto_login_key varchar(64) NOT NULL
-;",
- '
-ALTER TABLE '.PREFIX_TABLE.'users
- CHANGE username username VARCHAR(100) binary NOT NULL
-;',
- );
-
-foreach ($queries as $query)
-{
- pwg_query($query);
-}
-
-// now we upgrade from 1.6.2
-include_once(PHPWG_ROOT_PATH.'install/upgrade_1.6.2.php');
-?>
diff --git a/BSF/install/upgrade_1.6.2.php b/BSF/install/upgrade_1.6.2.php
deleted file mode 100644
index af5789b1c..000000000
--- a/BSF/install/upgrade_1.6.2.php
+++ /dev/null
@@ -1,346 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die ('This page cannot be loaded directly, load upgrade.php');
-}
-else
-{
- if (!defined('PHPWG_IN_UPGRADE') or !PHPWG_IN_UPGRADE)
- {
- die ('Hacking attempt!');
- }
-}
-
-$queries = array(
-"
-ALTER TABLE `".PREFIX_TABLE."categories`
- ADD COLUMN `permalink` varchar(64) default NULL
-;",
-
-"
-ALTER TABLE `".PREFIX_TABLE."categories`
- ADD COLUMN `image_order` varchar(128) default NULL
-;",
-
-"
-ALTER TABLE `".PREFIX_TABLE."categories`
- ADD UNIQUE `categories_i3` (`permalink`)
-;",
-
-"
-ALTER TABLE `".PREFIX_TABLE."groups`
- ADD COLUMN `is_default` enum('true','false') NOT NULL default 'false'
-;",
-
-"
-RENAME TABLE `".PREFIX_TABLE."history` TO `".PREFIX_TABLE."history_backup`
-;",
-
-"
-CREATE TABLE `".PREFIX_TABLE."history` (
- `id` int(10) unsigned NOT NULL auto_increment,
- `date` date NOT NULL default '0000-00-00',
- `time` time NOT NULL default '00:00:00',
- `year` smallint(4) NOT NULL default '0',
- `month` tinyint(2) NOT NULL default '0',
- `day` tinyint(2) NOT NULL default '0',
- `hour` tinyint(2) NOT NULL default '0',
- `user_id` smallint(5) NOT NULL default '0',
- `IP` varchar(15) NOT NULL default '',
- `section` enum('categories','tags','search','list','favorites','most_visited','best_rated','recent_pics','recent_cats') default NULL,
- `category_id` smallint(5) default NULL,
- `tag_ids` varchar(50) default NULL,
- `image_id` mediumint(8) default NULL,
- `summarized` enum('true','false') default 'false',
- `image_type` enum('picture','high','other') default NULL,
- PRIMARY KEY (`id`),
- KEY `history_i1` (`summarized`)
-) TYPE=MyISAM
-;",
-
-"
-ALTER TABLE `".PREFIX_TABLE."image_category`
- DROP INDEX `image_category_i1`
-;",
-
-"
-ALTER TABLE `".PREFIX_TABLE."image_category`
- ADD INDEX `image_category_i1` (`category_id`)
-;",
-
-"
-ALTER TABLE `".PREFIX_TABLE."image_category`
- DROP INDEX `image_category_i2`
-;",
-
-"
-ALTER TABLE `".PREFIX_TABLE."images`
- ADD COLUMN `high_filesize` mediumint(9) unsigned default NULL
-;",
-
-"
-ALTER TABLE `".PREFIX_TABLE."user_infos`
- CHANGE COLUMN `language`
- `language` varchar(50) NOT NULL default 'en_UK.iso-8859-1'
-;",
-
-"
-ALTER TABLE `".PREFIX_TABLE."user_infos`
- DROP COLUMN `auto_login_key`
-;",
-
-"
-ALTER TABLE `".PREFIX_TABLE."user_infos`
- ADD COLUMN `show_nb_hits` enum('true','false') NOT NULL default 'false'
-;",
-
-"
-ALTER TABLE `".PREFIX_TABLE."user_mail_notification`
- DROP INDEX `uidx_check_key`
-;",
-
-"
-ALTER TABLE `".PREFIX_TABLE."user_mail_notification`
- ADD UNIQUE `user_mail_notification_ui1` (`check_key`)
-;",
-
-"
-CREATE TABLE `".PREFIX_TABLE."history_summary` (
- `id` varchar(13) NOT NULL default '',
- `year` smallint(4) NOT NULL default '0',
- `month` tinyint(2) default NULL,
- `day` tinyint(2) default NULL,
- `hour` tinyint(2) default NULL,
- `nb_pages` int(11) default NULL,
- PRIMARY KEY (`id`)
-) TYPE=MyISAM
-;",
-
-"
-CREATE TABLE `".PREFIX_TABLE."old_permalinks` (
- `cat_id` smallint(5) unsigned NOT NULL default '0',
- `permalink` varchar(64) NOT NULL default '',
- `date_deleted` datetime NOT NULL default '0000-00-00 00:00:00',
- `last_hit` datetime default NULL,
- `hit` int(10) unsigned NOT NULL default '0',
- PRIMARY KEY (`permalink`)
-) TYPE=MyISAM
-;",
-
-"
-CREATE TABLE `".PREFIX_TABLE."plugins` (
- `id` varchar(64) binary NOT NULL default '',
- `state` enum('inactive','active') NOT NULL default 'inactive',
- `version` varchar(64) NOT NULL default '0',
- PRIMARY KEY (`id`)
-) TYPE=MyISAM
-;",
-
-"
-CREATE TABLE `".PREFIX_TABLE."user_cache_categories` (
- `user_id` smallint(5) NOT NULL default '0',
- `cat_id` smallint(5) unsigned NOT NULL default '0',
- `max_date_last` datetime default NULL,
- `count_images` mediumint(8) unsigned default '0',
- `count_categories` mediumint(8) unsigned default '0',
- PRIMARY KEY (`user_id`,`cat_id`)
-) TYPE=MyISAM
-;",
-
-"
-CREATE TABLE `".PREFIX_TABLE."ws_access` (
- `id` smallint(5) unsigned NOT NULL auto_increment,
- `name` varchar(32) NOT NULL default '',
- `access` varchar(255) default NULL,
- `start` datetime default NULL,
- `end` datetime default NULL,
- `request` varchar(255) default NULL,
- `limit` smallint(5) unsigned default NULL,
- `comment` varchar(255) default NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `ws_access_ui1` (`name`)
-) TYPE=MyISAM COMMENT='Access for Web Services'
-;",
-
-"
-INSERT INTO ".PREFIX_TABLE."config
- (param,value,comment)
- VALUES
- ('show_nb_hits', 'false', 'Show hits count under thumbnails')
-;",
-
-"
-INSERT INTO ".PREFIX_TABLE."config
- (param,value,comment)
- VALUES
- ('history_admin','false','keep a history of administrator visits on your website')
-;",
-
-"
-INSERT INTO ".PREFIX_TABLE."config
- (param,value,comment)
- VALUES
- ('history_guest','true','keep a history of guest visits on your website')
-;",
-
-"
-INSERT INTO ".PREFIX_TABLE."config
- (param,value,comment)
- VALUES
- ('allow_user_registration','true','allow visitors to register?')
-;",
-
-"
-INSERT INTO ".PREFIX_TABLE."config
- (param,value,comment)
- VALUES
- ('secret_key', MD5(RAND()), 'a secret key specific to the gallery for internal use')
-;",
-
-"
-INSERT INTO ".PREFIX_TABLE."config
- (param,value,comment)
- VALUES
- ('nbm_send_html_mail','true','Send mail on HTML format for notification by mail')
-;",
-
-"
-INSERT INTO ".PREFIX_TABLE."config
- (param,value,comment)
- VALUES
- ('nbm_send_recent_post_dates','true','Send recent post by dates for notification by mail')
-;",
-
-"
-INSERT INTO ".PREFIX_TABLE."config
- (param,value,comment)
- VALUES
- ('email_admin_on_new_user','false','Send an email to theadministrators when a user registers')
-;",
-
-"
-INSERT INTO ".PREFIX_TABLE."config
- (param,value,comment)
- VALUES
- ('email_admin_on_comment','false','Send an email to the administrators when a valid comment is entered')
-;",
-
-"
-INSERT INTO ".PREFIX_TABLE."config
- (param,value,comment)
- VALUES
- ('email_admin_on_comment_validation','false','Send an email to the administrators when a comment requires validation')
-;",
-
-"
-INSERT INTO ".PREFIX_TABLE."config
- (param,value,comment)
- VALUES
- ('email_admin_on_picture_uploaded','false','Send an email to the administrators when a picture is uploaded')
-;",
-
-"
-UPDATE ".PREFIX_TABLE."user_cache
- SET need_update = 'true'
-;",
-
-);
-
-foreach ($queries as $query)
-{
- pwg_query($query);
-}
-
-$replacements = array(
- array('&#039;', '\''),
- array('&quot;', '"'),
- array('&lt;', '<'),
- array('&gt;', '>'),
- array('&amp;', '&') // <- this must be the last one
- );
-
-foreach ($replacements as $replacement)
-{
- $query = '
-UPDATE '.PREFIX_TABLE.'comments
- SET content = REPLACE(content, "'.
- addslashes($replacement[0]).
- '", "'.
- addslashes($replacement[1]).
- '")
-;';
- pwg_query($query);
-}
-
-load_conf_from_db();
-
-$query = "
-UPDATE ".USER_INFOS_TABLE."
-SET
- template = '".$conf['default_template']."',
- nb_image_line = ".$conf['nb_image_line'].",
- nb_line_page = ".$conf['nb_line_page'].",
- language = '".$conf['default_language']."',
- maxwidth = ".
- (empty($conf['default_maxwidth']) ? "NULL" : $conf['default_maxwidth']).
- ",
- maxheight = ".
- (empty($conf['default_maxheight']) ? "NULL" : $conf['default_maxheight']).
- ",
- recent_period = ".$conf['recent_period'].",
- expand = '".boolean_to_string($conf['auto_expand'])."',
- show_nb_comments = '".boolean_to_string($conf['show_nb_comments'])."',
- show_nb_hits = '".boolean_to_string($conf['show_nb_hits'])."',
- enabled_high = '".boolean_to_string(
- (isset($conf['newuser_default_enabled_high']) ?
- $conf['newuser_default_enabled_high'] : true)
- ).
- "'
-WHERE
- user_id = ".$conf['default_user_id'].";";
-pwg_query($query);
-
-$query = "
-DELETE FROM ".CONFIG_TABLE."
-WHERE
- param IN
-(
- 'default_template',
- 'nb_image_line',
- 'nb_line_page',
- 'default_language',
- 'default_maxwidth',
- 'default_maxheight',
- 'recent_period',
- 'auto_expand',
- 'show_nb_comments',
- 'show_nb_hits'
-)
-;";
-pwg_query($query);
-
-// now we upgrade from 1.7.0
-// include_once(PHPWG_ROOT_PATH.'install/upgrade_1.7.0.php');
-?>
diff --git a/BSF/language/en_UK/about.html b/BSF/language/en_UK/about.html
deleted file mode 100644
index e185f7ddf..000000000
--- a/BSF/language/en_UK/about.html
+++ /dev/null
@@ -1,10 +0,0 @@
- <li>Piwigo is a web application giving you the possibility to
- create an online images gallery easily.</li>
-
- <li>Technicaly, Piwigo is fully developped with PHP (the elePHPant)
- with a MySQL database (the SQuirreL).</li>
-
- <li>If you have any suggestions or comments, please visit <a
- href="http://piwigo.org">Piwigo</a> official site, and
- its dedicated <a href="http://forum.Piwigo.net">forum</a>.</li>
-
diff --git a/BSF/language/en_UK/admin.lang.php b/BSF/language/en_UK/admin.lang.php
deleted file mode 100644
index fd48cb34c..000000000
--- a/BSF/language/en_UK/admin.lang.php
+++ /dev/null
@@ -1,649 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-$lang['%d association'] = '%d association';
-$lang['%d associations'] = '%d associations';
-$lang['cat_inclu_part1_S'] = '%d category including ';
-$lang['cat_inclu_part1_P'] = '%d categories including ';
-$lang['cat_inclu_part2_S'] = '%d physical';
-$lang['cat_inclu_part2_P'] = '%d physical';
-$lang['cat_inclu_part3_S'] = ' and %d virtual';
-$lang['cat_inclu_part3_P'] = ' and %d virtual';
-$lang['%d category moved'] = '%d category moved';
-$lang['%d categories moved'] = '%d categories moved';
-$lang['%d group'] = '%d group';
-$lang['%d groups'] = '%d groups';
-$lang['%d member'] = '%d member';
-$lang['%d members'] = '%d members';
-$lang['%d tag'] = '%d tag';
-$lang['%d tags'] = '%d tags';
-$lang['%d user comment rejected'] = '%d user comment rejected';
-$lang['%d user comments rejected'] = '%d user comments rejected';
-$lang['%d user comment validated'] = '%d user comment validated';
-$lang['%d user comments validated'] = '%d user comments validated';
-$lang['%d user deleted'] = '%d user deleted';
-$lang['%d users deleted'] = '%d users deleted';
-$lang['%d user'] = '%d user';
-$lang['%d users'] = '%d users';
-$lang['%d waiting for validation'] = '%d waiting for validation';
-$lang['%d waiting pictures rejected'] = '%d waiting pictures rejected';
-$lang['%d waiting pictures validated'] = '%d waiting pictures validated';
-$lang['Actions'] = 'Actions';
-$lang['Activate'] = 'Activate';
-$lang['Add/delete a permalink'] = 'Add/delete a permalink';
-$lang['Add a tag'] = 'Add a tag';
-$lang['Add a user'] = 'Add a user';
-$lang['Add group'] = 'Add group';
-$lang['Add selected elements to caddie'] = 'Add selected elements to caddie';
-$lang['Add'] = 'Add';
-$lang['Allow user registration'] = 'Allow user registration';
-$lang['Apply to subcategories'] = 'Apply to subcategories';
-$lang['Are you sure?'] = 'Are you sure?';
-$lang['Associated'] = 'Associated';
-$lang['Association to categories'] = 'Association to categories';
-$lang['Batch management'] = 'Batch management';
-$lang['Caddie management'] = 'Caddie management';
-$lang['Caddie'] = 'Caddie';
-$lang['Categories authorized thanks to group associations'] = 'Categories authorized thanks to group associations';
-$lang['Categories manual order was saved'] = 'Categories manual order was saved';
-$lang['Categories ordered alphanumerically'] = 'Categories ordered alphanumerically';
-$lang['Category elements associated to the following categories: %s'] = 'Category elements associated to the following categories: %s';
-$lang['Check for upgrade failed for unknown reasons.'] = 'Check for upgrade failed for unknown reasons.';
-$lang['Check for upgrade'] = 'Check for upgrade';
-$lang['Comments for all'] = 'Comments for all';
-$lang['Controversy'] = 'Controversy';
-$lang['Current name'] = 'Current name';
-$lang['Database'] = 'Database';
-$lang['Deactivate'] = 'Deactivate';
-$lang['Delete Representant'] = 'Delete Representant';
-$lang['Delete selected tags'] = 'Delete selected tags';
-$lang['Delete selected users'] = 'Delete selected users';
-$lang['Deletions'] = 'Deletions';
-$lang['Deny selected groups'] = 'Deny selected groups';
-$lang['Deny selected users'] = 'Deny selected users';
-$lang['Description'] = 'Description';
-$lang['Display options'] = 'Display options';
-$lang['Dissociated'] = 'Dissociated';
-$lang['Does not represent'] = 'Does not represent';
-$lang['Edit all picture informations'] = 'Edit all picture informations';
-$lang['Edit selected tags'] = 'Edit selected tags';
-$lang['Edit tags'] = 'Edit tags';
-$lang['Elements'] = 'Elements';
-$lang['Email administrators when a new user registers'] = 'Email admins when a new user registers';
-$lang['Email administrators when a valid comment is entered'] = 'Email admins when a valid comment is entered';
-$lang['Email administrators when a comment requires validation'] = 'Email admins when a comment requires validation';
-$lang['Email administrators when a picture is uploaded'] = 'Email admins when a picture is uploaded';
-$lang['Empty caddie'] = 'Empty caddie';
-$lang['Environment'] = 'Environment';
-$lang['Form'] = 'Form';
-$lang['Gallery URL'] = 'Gallery URL';
-$lang['Gallery description'] = 'Gallery description';
-$lang['Gallery title'] = 'Gallery title';
-$lang['Grant selected groups'] = 'Grant selected groups';
-$lang['Grant selected users'] = 'Grant selected users';
-$lang['Group name'] = 'Group name';
-$lang['Groups'] = 'Groups';
-$lang['Guests'] = 'Guests';
-$lang['History'] = 'History';
-$lang['Informations'] = 'Informations';
-$lang['Install'] = 'Install';
-$lang['Link all category elements to a new category'] = 'Link all category elements to a new category';
-$lang['Link all category elements to some existing categories'] = 'Link all category elements to some existing categories';
-$lang['Linked categories'] = 'Linked categories';
-$lang['Lock gallery'] = 'Lock gallery';
-$lang['Maintenance'] = 'Maintenance';
-$lang['Manage permissions for a category'] = 'Manage permissions for a category';
-$lang['Manage permissions for group "%s"'] = 'Manage permissions for group "%s"';
-$lang['Manage permissions for user "%s"'] = 'Manage permissions for user "%s"';
-$lang['Manage tags'] = 'Manage tags';
-$lang['Members'] = 'Members';
-$lang['Metadata synchronized from file'] = 'Metadata synchronized from file';
-$lang['Move categories'] = 'Move categories';
-$lang['Move'] = 'Move';
-$lang['Name'] = 'Name';
-$lang['New name'] = 'New name';
-$lang['New parent category'] = 'New parent category';
-$lang['New tag'] = 'New tag';
-$lang['No tag defined. Use Administration>Pictures>Tags'] = 'No tag defined. Use Administration>Pictures>Tags';
-$lang['Number of comments per page'] = 'Number of comments per page';
-$lang['Number of rates'] = 'Number of rates';
-$lang['Number of thumbnails to create'] = 'Number of thumbnails to create';
-$lang['Only private categories are listed'] = 'Only private categories are listed';
-$lang['Operating system'] = 'Operating system';
-$lang['Options'] = 'Options';
-$lang['Order alphanumerically'] = 'Order alphanumerically';
-$lang['Other private categories'] = 'Other private categories';
-$lang['Page banner'] = 'Page banner';
-$lang['Parent category'] = 'Parent category';
-$lang['Path'] = 'Path';
-$lang['Permalink'] = 'Permalink';
-$lang['Permalink_%s_histo_used_by_%s'] = 'Permalink %s has been previously used by category %s. Delete from the permalink history first';
-$lang['Permalink_name_rule'] = 'The permalink name must be composed of a-z, A-Z, 0-9, "-", "_" or "/". It must not be numeric or start with number followed by "-"';
-$lang['Permalink %s is already used by category %s'] = 'Permalink %s is already used by category %s';
-$lang['Permalink history'] = 'Permalink history';
-$lang['Permalinks'] = 'Permalinks';
-$lang['Permission denied'] = 'Permission denied';
-$lang['Permission granted thanks to a group'] = 'Permission granted thanks to a group';
-$lang['Permission granted'] = 'Permission granted';
-$lang['Picture informations updated'] = 'Picture informations updated';
-$lang['Plugins'] = 'Plugins';
-$lang['Position'] = 'Position';
-$lang['Preferences'] = 'Preferences';
-$lang['Properties'] = 'Properties';
-$lang['Random picture'] = 'Random picture';
-$lang['Rate date'] = 'Rate date';
-$lang['Rating by guests'] = 'Rating by guests';
-$lang['Rating'] = 'Rating';
-$lang['Reject All'] = 'Reject All';
-$lang['Reject'] = 'Reject';
-$lang['Representant'] = 'Representant';
-$lang['Representation of categories'] = 'Representation of categories';
-$lang['Representative'] = 'Representative';
-$lang['Represents'] = 'Represents';
-$lang['Save order'] = 'Save order';
-$lang['Save to permalink history'] = 'Save to permalink history';
-$lang['Select at least one category'] = 'Select at least one category';
-$lang['Select at least one picture'] = 'Select at least one picture';
-$lang['Select at least one user'] = 'Select at least one user';
-$lang['Show info'] = 'Show info';
-$lang['Site manager'] = 'Site manager';
-$lang['Status'] = 'Status';
-$lang['Statistics'] = 'Statistics';
-$lang['Storage category'] = 'Storage category';
-$lang['Sum of rates'] = 'Sum of rates';
-$lang['Tag "%s" already exists'] = 'Tag "%s" already exists';
-$lang['Tag "%s" was added'] = 'Tag "%s" was added';
-$lang['Tag selection'] = 'Tag selection';
-$lang['Take selected elements out of caddie'] = 'Take selected elements out of caddie';
-$lang['The %d following tag were deleted'] = 'The following tag were deleted';
-$lang['The %d following tags were deleted'] = 'The %d following tags were deleted';
-$lang['Unable to check for upgrade since allow_url_fopen is disabled.'] = 'Unable to check for upgrade since allow_url_fopen is disabled.';
-$lang['Uninstall'] = 'Uninstall';
-$lang['Use default sort order']='Use the default image sort order (defined in the configuration file)';
-$lang['User comments validation'] = 'User comments validation';
-$lang['Users'] = 'Users';
-$lang['Validate All'] = 'Validate All';
-$lang['Validate'] = 'Validate';
-$lang['Validation'] = 'Validation';
-$lang['Version'] = 'Version';
-$lang['Virtual categories movement'] = 'Virtual categories movement';
-$lang['Virtual categories to move'] = 'Virtual categories to move';
-$lang['Virtual category name'] = 'Virtual category name';
-$lang['Webmaster cannot be deleted'] = 'Webmaster cannot be deleted';
-$lang['You are running on development sources, no check possible.'] = 'You are running on development sources, no check possible.';
-$lang['You cannot delete your account'] = "You cannot delete your account";
-$lang['You cannot move a category in its own sub category'] = 'You cannot move a category in its own sub category';
-$lang['You need to confirm deletion'] = 'You need to confirm deletion';
-$lang['add tags'] = 'add tags';
-$lang['adviser'] = 'Adviser';
-$lang['associate to category'] = 'associate to category';
-$lang['associate to group'] = 'associate to group';
-$lang['authorized'] = 'Authorized';
-$lang['cat_add'] = 'Add a virtual category';
-$lang['cat_comments_title'] = 'Authorize users to add comments on selected categories';
-$lang['cat_error_name'] = 'The name of a category should not be empty';
-$lang['cat_lock_title'] = 'Lock categories';
-$lang['cat_private'] = 'Private category';
-$lang['cat_public'] = 'Public category';
-$lang['cat_representant'] = 'Find a new representant by random';
-$lang['cat_security'] = 'Public / Private';
-$lang['cat_status_title'] = 'Manage authorizations for selected categories';
-$lang['cat_upload_title'] = 'Select uploadable categories';
-$lang['cat_virtual_added'] = 'Virtual category added';
-$lang['cat_virtual_deleted'] = 'Virtual category deleted';
-$lang['category'] = 'category';
-$lang['conf_access'] = 'Access type';
-$lang['conf_comments_title'] = 'Comments';
-$lang['conf_confirmation'] = 'Information data registered in database';
-$lang['conf_display'] = 'Default display';
-$lang['conf_history_title'] = 'History';
-$lang['conf_gallery_url_error'] = 'The gallery URL is not valid.';
-$lang['conf_main_title'] = 'Main';
-$lang['conf_nb_comment_page_error'] = 'The number of comments a page must be between 5 and 50 included.';
-$lang['config'] = 'Configuration';
-$lang['confirm'] = 'confirm';
-$lang['Date'] = 'Date';
-$lang['delete category'] = 'delete category';
-$lang['description'] = 'description';
-$lang['dissociate from category'] = 'dissociate from category';
-$lang['dissociate from group'] = 'dissociate from group';
-$lang['edit category permissions'] = 'edit category permissions';
-$lang['editcat_confirm'] = 'Category informations updated successfully.';
-$lang['editcat_uploadable'] = 'Authorize upload';
-$lang['elements per page'] = 'elements per page';
-$lang['elements'] = 'elements';
-$lang['enabled_high'] = 'High definition enabled';
-$lang['file'] = 'file';
-$lang['filesize'] = 'filesize';
-$lang['first element added on %s'] = 'first element added on %s';
-$lang['forbidden'] = 'Forbidden';
-$lang['conf_general'] = 'General';
-$lang['global mode'] = 'global mode';
-$lang['group "%s" added'] = 'group "%s" added';
-$lang['group "%s" deleted'] = 'group "%s" deleted';
-$lang['group "%s" updated'] = 'group "%s" updated';
-$lang['group'] = 'group';
-$lang['group_add_error1'] = 'The name of a group must not contain " or \' or be empty.';
-$lang['group_add_error2'] = 'This name is already used by another group.';
-$lang['groups'] = 'Groups';
-$lang['instructions'] = 'Instructions';
-$lang['is_high_disabled'] = '';
-$lang['is_high_enabled'] = 'High definition';
-$lang['jump to category'] = 'jump to category';
-$lang['jump to image'] = 'jump to image';
-$lang['leave'] = 'leave';
-$lang['lock'] = 'Lock';
-$lang['locked'] = 'Locked';
-$lang['manage category elements'] = 'manage category elements';
-$lang['manage sub-categories'] = 'manage sub-categories';
-$lang['manage'] = 'Manage';
-$lang['maximum height'] = 'maximum height';
-$lang['maximum width'] = 'maximum width';
-$lang['name'] = 'name';
-$lang['nbm_background_treatment_redirect_second'] = 'Execution time is out, treatment must be continue [Estmated time: %d second].';
-$lang['nbm_background_treatment_redirect_seconds'] = 'Execution time is out, treatment must be continue [Estmated time: %d seconds].';
-$lang['nbm_break_timeout_list_user'] = 'Prepared time for list of users to send mail is limited. Others users are not listed.';
-$lang['nbm_break_timeout_send_mail'] = 'Time to send mail is limited. Others mails are skipped.';
-$lang['nbm_col_check_user_send_mail'] = 'To send ?';
-$lang['nbm_col_last_send'] = 'Last send';
-$lang['nbm_col_mail'] = 'email';
-$lang['nbm_col_user'] = 'User';
-$lang['nbm_complementary_mail_content'] = 'Complementary mail content';
-$lang['nbm_content_byebye'] = 'See you soon,';
-$lang['nbm_content_goto_1'] = 'Go to ';
-$lang['nbm_content_goto_2'] = '.';
-$lang['nbm_content_hello_1'] = 'Hello ';
-$lang['nbm_content_hello_2'] = ',';
-$lang['nbm_content_new_elements'] = 'New elements were added ';
-$lang['nbm_content_new_elements_single'] = ' on ';
-$lang['nbm_content_new_elements_between_1'] = 'between ';
-$lang['nbm_content_new_elements_between_2'] = ' and ';
-$lang['nbm_content_subscribe_by_admin'] = 'The webmaster has subscribed you to receiving notifications by mail.';
-$lang['nbm_content_subscribe_by_himself'] = 'You have subscribed to receiving notifications by mail.';
-$lang['nbm_content_subscribe_link'] = 'To subscribe';
-$lang['nbm_content_problem_contact'] = 'If you encounter problems or have any question, please send a message to ';
-$lang['nbm_content_pb_contact_object'] = '[NBM] Problems or questions';
-$lang['nbm_content_unsubscribe_by_admin'] = 'The webmaster has unsubscribed you from receiving notifications by mail.';
-$lang['nbm_content_unsubscribe_by_himself'] = 'You have unsubscribed from receiving notifications by mail.';
-$lang['nbm_content_click_on'] = ', click on ';
-$lang['nbm_content_unsubscribe_link'] = 'To unsubscribe';
-$lang['nbm_info_send_mail_as'] = 'With blank value, gallery title will be used';
-$lang['nbm_item_notification'] = 'Notification';
-$lang['nbm_msg_error_sending_email_to'] = 'Error when sending email to %s [%s].';
-$lang['nbm_msg_mail_sent_to'] = 'Mail sent to %s [%s].';
-$lang['nbm_msg_n_mail_sent'] = '%d mail was sent.';
-$lang['nbm_msg_n_mails_sent'] = '%d mails were sent.';
-$lang['nbm_msg_n_mail_not_send'] = '%d mail was not sent.';
-$lang['nbm_msg_n_mails_not_send'] = '%d mails were not sent.';
-$lang['nbm_no_mail_to_send'] = 'No mail to send.';
-$lang['nbm_no_user_available_to_send_L1'] = 'No user are available in order to send mail.';
-$lang['nbm_no_user_available_to_send_L2'] = 'A user is available, if there are new elements to notify.';
-$lang['nbm_no_user_available_to_send_L3'] = 'It\'s possible that the are no subscribed users (only webmaster can see this tab).';
-$lang['nbm_no_user_to send_notifications_by_mail'] = 'No user to send notifications by mail.';
-$lang['nbm_object_news'] = 'New elements added';
-$lang['nbm_object_subscribe'] = 'Subscribe to notification by mail';
-$lang['nbm_object_unsubscribe'] = 'Unsubscribe from notification by mail';
-$lang['nbm_param_mode'] = 'Parameter';
-$lang['nbm_redirect_msg'] = 'Processing treatment.'."\n\n".'Please wait...';
-$lang['nbm_repost_submit'] = 'Continue processing treatment';
-$lang['nbm_send_complementary_mail_content'] = 'Complementary mail content';
-$lang['nbm_send_detailed_content'] = 'Add detailed content';
-$lang['nbm_send_mail_as'] = 'Send mail as';
-$lang['nbm_send_mail_to_users'] = 'Send mail to users';
-$lang['nbm_send_mode'] = 'Send';
-$lang['nbm_send_options'] = 'Options';
-$lang['nbm_send_submit'] = 'Send';
-$lang['nbm_subscribe_col'] = 'Subscribed';
-$lang['nbm_subscribe_mode'] = 'Subscribe';
-$lang['nbm_title_param'] = 'Parameters';
-$lang['nbm_title_send'] = 'Select recipients';
-$lang['nbm_title_subscribe'] = 'Subscribe/unsubscribe users';
-$lang['nbm_unsubscribe_col'] = 'Unsubscribed';
-$lang['nbm_updated_param_count'] = '%d parameter was updated.';
-$lang['nbm_updated_params_count'] = '%d parameters were updated.';
-$lang['nbm_user_change_enabled_error_on_updated_data_count'] = '%d user was not updated.';
-$lang['nbm_users_change_enabled_error_on_updated_data_count'] = '%d users were not updated.';
-$lang['nbm_user_change_enabled_false'] = 'User %s [%s] was removed from the subscription list.';
-$lang['nbm_user_change_enabled_true'] = 'User %s [%s] was added to the subscription list.';
-$lang['nbm_user_change_enabled_updated_data_count'] = '%d user was updated.';
-$lang['nbm_users_change_enabled_updated_data_count'] = '%d users were updated.';
-$lang['nbm_user_not_change_enabled_false'] = 'User %s [%s] was not removed from the subscription list.';
-$lang['nbm_user_not_change_enabled_true'] = 'User %s [%s] was not added to the subscription list.';
-$lang['nbm_user_x_added'] = 'User %s [%s] added.';
-$lang['nbm_warning_subscribe_unsubscribe'] = 'Warning: subscribing or unsubscribing will send mails to users';
-$lang['nbm_send_html_mail'] = 'Send mail on HTML format';
-$lang['nbm_send_recent_post_dates'] = 'Include display of recent pictures group by dates';
-$lang['nbm_info_send_recent_post_dates'] = 'Available only with HTML format';
-$lang['no_write_access'] = 'no write access';
-$lang['path'] = 'path';
-$lang['permissions'] = 'Permissions';
-$lang['private'] = 'private';
-$lang['properties'] = 'Properties';
-$lang['public'] = 'public';
-$lang['purge never used notification feeds'] = 'Purge never used notification feeds';
-$lang['purge sessions'] = 'Purge sessions';
-$lang['randomly represented'] = 'randomly represented';
-$lang['registration_date'] = 'registration date';
-$lang['remote_site'] = 'Remote site';
-$lang['remote_site_clean'] = 'clean';
-$lang['remote_site_clean_hint'] = 'remove remote listing.xml file';
-$lang['remote_site_generate'] = 'generate listing';
-$lang['remote_site_generate_hint'] = 'generate file listing.xml on remote site';
-$lang['remote_site_local_create'] = 'Create this site';
-$lang['remote_site_local_found'] = 'A local listing.xml file has been found for ';
-$lang['remote_site_local_update'] = 'read local listing.xml and update';
-$lang['remote_site_test'] = 'test';
-$lang['remote_site_test_hint'] = 'test this remote site';
-$lang['remote_site_uncorrect_url'] = 'Remote site url must start by http or https and must only contain characters among "/", "a-zA-Z0-9", "-" or "_"';
-$lang['remove tags'] = 'remove tags';
-$lang['repair and optimize database'] = 'Repair and optimize database';
-$lang['selection'] = 'selection';
-$lang['set to'] = 'set to';
-$lang['singly represented'] = 'singly represented';
-$lang['site_already_exists'] = 'This site already exists';
-$lang['site_create'] = 'Create a new site : (give its URL to create_listing_file.php)';
-$lang['site_created'] = 'created';
-$lang['site_delete'] = 'delete';
-$lang['site_delete_hint'] = 'delete this site and all its attached elements';
-$lang['site_deleted'] = 'deleted';
-$lang['site_err'] = 'an error happened';
-$lang['site_err_remote_file_not_found'] = 'file create_listing_file.php on remote site was not found';
-$lang['site_local'] = 'Local';
-$lang['site_remote'] = 'Remote';
-$lang['site_synchronize'] = 'synchronize';
-$lang['site_synchronize_hint'] = 'update the database from files';
-$lang['status'] = 'status';
-$lang['storage'] = 'Directory';
-$lang['sub-categories'] = 'sub-categories';
-$lang['synchronize metadata'] = 'synchronize metadata';
-$lang['synchronize'] = 'synchronize';
-$lang['target'] = 'target';
-$lang['thumbnail'] = 'thumbnail';
-$lang['title'] = 'title';
-$lang['title_categories'] = 'Categories management';
-$lang['title_configuration'] = 'Piwigo configuration';
-$lang['title_default'] = 'Piwigo administration';
-$lang['title_edit_cat'] = 'Edit a category';
-$lang['title_groups'] = 'Group management';
-$lang['title_liste_users'] = 'User list';
-$lang['title_picmod'] = 'Modify informations about a picture';
-$lang['title_thumbnails'] = 'Thumbnail creation';
-$lang['title_update'] = 'Database synchronization with files';
-$lang['title_upload'] = 'Pictures waiting for validation';
-$lang['tn_all'] = 'all';
-$lang['tn_alone_title'] = 'pictures without thumbnail (jpeg and png only)';
-$lang['tn_err_height'] = 'height must be a number superior to';
-$lang['tn_err_width'] = 'width must be a number superior to';
-$lang['tn_format'] = 'for the file format';
-$lang['tn_no_missing'] = 'No missing thumbnail';
-$lang['tn_no_support'] = 'Picture unreachable or no support';
-$lang['tn_params_GD'] = 'GD version';
-$lang['tn_params_title'] = 'Miniaturization parameters';
-$lang['tn_results_gen_time'] = 'generated in';
-$lang['tn_results_title'] = 'Results of miniaturization';
-$lang['tn_stats'] = 'General statistics';
-$lang['tn_stats_max'] = 'max time';
-$lang['tn_stats_mean'] = 'average time';
-$lang['tn_stats_min'] = 'min time';
-$lang['tn_stats_nb'] = 'number of miniaturized pictures';
-$lang['tn_stats_total'] = 'total time';
-$lang['tn_thisformat'] = 'for this file format';
-$lang['unit mode'] = 'unit mode';
-$lang['unlocked'] = 'Unlocked';
-$lang['unset'] = 'unset';
-$lang['up'] = 'Move up';
-$lang['update categories informations'] = 'Update categories informations';
-$lang['update images informations'] = 'Update images informations';
-$lang['update'] = 'Synchronize';
-$lang['update_cats_subset'] = 'reduce to single existing categories';
-$lang['update_default_title'] = 'Choose an option';
-$lang['update_display_info'] = 'display maximum informations (added categories and elements, deleted categories and elements)';
-$lang['update_err_pwg_version_differs'] = 'Piwigo version differs on the remote site';
-$lang['update_err_pwg_version_differs_info'] = 'Version of create_listing_file.php on the remote site and Piwigo must be the same';
-$lang['update_err_remote_listing_not_found'] = 'listing.xml file was not found';
-$lang['update_err_remote_listing_not_found_info'] = 'listing.xml file was not found on the remote site. This file is generated by choosing the "generate listing" command in the Site manager';
-$lang['update_error_list_title'] = 'Error list';
-$lang['update_errors_caption'] = 'Errors caption';
-$lang['update_infos_title'] = 'Detailed informations';
-$lang['update_missing_file_or_dir'] = 'File/directory read error';
-$lang['update_missing_file_or_dir_info'] = 'The file or directory cannot be accessed (either it does not exist or the access is denied)';
-$lang['update_missing_tn_info'] = 'a picture filetype requires a thumbnail. The thumbnail must be present in the sub-directory "thumbnail" of the category directory. The thumbnail filename must start with the configured thumbnail prefix and the extension must be among the following list :';
-$lang['update_missing_tn_short'] = 'missing thumbnail';
-$lang['update_nb_del_categories'] = 'categories deleted in the database';
-$lang['update_nb_del_elements'] = 'elements deleted in the database';
-$lang['update_nb_elements_metadata_available'] = 'images candidates for metadata synchronization';
-$lang['update_nb_elements_metadata_sync'] = 'elements informations synchronized with files metadata';
-$lang['update_nb_errors'] = 'errors during synchronization';
-$lang['update_nb_new_categories'] = 'categories added in the database';
-$lang['update_nb_new_elements'] = 'elements added in the database';
-$lang['update_nb_upd_elements'] = 'elements updated in the database';
-$lang['update_part_research'] = 'Search for new images in the directories';
-$lang['update_research_added'] = 'added';
-$lang['update_research_deleted'] = 'deleted';
-$lang['update_result_metadata'] = 'Metadata synchronization results';
-$lang['update_simulate'] = 'only perform a simulation (no change in database will be made)';
-$lang['update_simulation_title'] = '[Simulation]';
-$lang['update_sync_all'] = 'directories + files';
-$lang['update_sync_dirs'] = 'only directories';
-$lang['update_sync_files'] = 'synchronize files structure with database';
-$lang['update_sync_metadata'] = 'synchronize files metadata with database elements informations';
-$lang['update_sync_metadata_all'] = 'even already synchronized elements';
-$lang['update_sync_metadata_new'] = 'only never synchronized elements';
-$lang['update_used_metadata'] = 'Used metadata';
-$lang['update_wrong_dirname_info'] = 'The name of directories and files must be composed of letters, figures, "-", "_" or "."';
-$lang['update_wrong_dirname_short'] = 'wrong filename';
-$lang['upload'] = 'Upload';
-$lang['user "%s" added'] = 'user "%s" added';
-$lang['user_status'] = 'User status';
-$lang['user_status_admin'] = 'Administrator';
-$lang['user_status_generic'] = 'Generic';
-$lang['user_status_guest'] = 'Guest';
-$lang['user_status_normal'] = 'User';
-$lang['user_status_webmaster'] = 'Webmaster';
-$lang['username'] = 'username';
-$lang['users'] = 'Users';
-$lang['virtual_category'] = 'Virtual category';
-$lang['waiting'] = 'Waiting';
-$lang['is_default_group'] = 'default';
-$lang['toggle_is_default_group'] = 'Toggle \'default group\' property';
-$lang['Advanced_features'] = 'Advanced features';
-$lang['Elements_not_linked'] = 'Not linked elements';
-$lang['web_services'] = 'Web services ';
-$lang['title_wscheck'] = ' Access management ';
-$lang['ws_failed_upd'] = ' -> <strong>Uncompleted demand</strong> ';
-$lang['ws_success_upd'] = ' -> Successfully completed ';
-$lang['ws_adding_legend'] = ' Add a new partner access to Web Services ';
-$lang['ws_update_legend'] = ' Revoke / Update selected partner access ';
-$lang['ws_delete_legend'] = ' Revoke selected partner access ';
-$lang['ws_Methods'] = ' Methods ';
-$lang['ws_KeyName'] = ' Partner ';
-$lang['ws_Access'] = ' Access ';
-$lang['ws_Start'] = ' Start ';
-$lang['ws_End'] = ' End ';
-$lang['ws_Request'] = ' Request ';
-$lang['ws_Limit'] = ' Limit ';
-$lang['ws_Comment'] = ' Comment ';
-$lang['Modify End from Now +'] = 'Modify End from Now + ';
-$lang['Delete'] = ' Remove ';
-$lang['Confidential partner key'] = 'Confidential partner key';
-$lang['Basis of access key calculation'] = 'Basis of access key calculation';
-$lang['Target'] = 'Target';
-$lang['Access: see help text for more'] = 'Access: see help text for more';
-$lang['Facultative and restrictive option'] = 'Facultative and restrictive option';
-$lang['Postponed availability in days'] = 'Postponed availability in days';
-$lang['Duration in days'] = 'Duration in days';
-$lang['Restrict access to'] = 'Restrict access to';
-$lang['Returned images limit'] = 'Returned images limit';
-$lang['Comment to identify your partner clearly'] = 'Comment to identify your partner clearly';
-$lang['Add this access definition'] = 'Add this access definition';
-$lang['Web Services availability duration in days'] = 'Web Services availability duration in days';
-$lang['Web Services under control'] = 'Piwigo Web Services are fully operationals and all requests are under control.';
-$lang['special_admin_menu'] = 'Specials';
-$lang['Duplicates'] = 'Files with same name in more than one physical category';
-
-$lang['Export data'] = 'Export data';
-$lang['Overall'] = 'Overall';
-$lang['Year'] = 'Year';
-$lang['Month'] = 'Month';
-$lang['Day'] = 'Day';
-$lang['Pages seen'] = 'Pages seen';
-$lang['Pictures'] = 'Pictures';
-$lang['time'] = 'time';
-$lang['user'] = 'user';
-$lang['IP'] = 'IP';
-$lang['image'] = '';
-$lang['section'] = 'section';
-$lang['tags'] = 'tags';
-$lang['conf_history_guest'] = 'Save page visits by guests';
-$lang['conf_history_user'] = 'Save page visits by users';
-$lang['conf_history_admin'] = 'Save page visits by administrators';
-$lang['cat_options_title'] = 'Properties';
-$lang['An information email was sent to group "%s"'] = 'An information email was sent to group "%s';
-$lang['Send an information email to group members'] = 'Send an information email to group members';
-$lang['Group'] = 'Group';
-$lang['[%s] Come to visit the category %s'] = '[%s] Come to visit the category %s';
-$lang['Hello,'] = 'Hello,';
-$lang['See you soon.'] = 'See you soon.';
-$lang['Come to discover the category:'] = 'Come to discover the category:';
-$lang['mail_content'] = 'Mail content';
-$lang['none'] = 'none';
-$lang['high'] = 'high';
-$lang['other'] = 'other';
-$lang['Element type'] = 'Element type';
-$lang['User'] = 'User';
-$lang['Image id'] = 'Image id';
-$lang['Summary'] = 'Summary';
-$lang['%d line filtered'] = '%d line filtered';
-$lang['%d lines filtered'] = '%d lines filtered';
-$lang['%d guest'] = '%d guest';
-$lang['%d guests'] = '%d guests';
-$lang['Hour'] = 'Hour';
-$lang['is_the_guest'] = 'guest';
-$lang['is_the_default'] = 'default values';
-$lang['High filesize'] = 'High filesize';
-// --------- Starting below: New or revised $lang ---- from version 1.7.1
-$lang['Guest cannot be deleted'] = 'Guest cannot be deleted';
-$lang['Default user cannot be deleted'] = 'Default user cannot be deleted';
-$lang['purge history detail'] = 'Purge history detail';
-$lang['purge history summary'] = 'Purge history summary';
-$lang['c13y_title'] = 'Check integrity';
-$lang['c13y_Anomaly'] = 'Anomaly';
-$lang['c13y_Correction'] = 'Correction';
-$lang['c13y_Automatic_correction'] = 'Automatic correction';
-$lang['c13y_Impossible_automatic_correction'] = 'Impossible automatic correction';
-$lang['c13y_Correction_applied_success'] = 'Correction applied with success';
-$lang['c13y_Correction_applied_error'] = 'Correction applied with error';
-$lang['c13y_anomaly_count'] = '%d anomaly has been detected.';
-$lang['c13y_anomalies_count'] = '%d anomalies have been detected.';
-$lang['c13y_anomaly_corrected_count'] = '%d anomaly has been corrected.';
-$lang['c13y_anomalies_corrected_count'] = '%d anomalies have been detected corrected.';
-$lang['c13y_anomaly_not_corrected_count'] = '%d anomaly has not been corrected.';
-$lang['c13y_anomalies_not_corrected_count'] = '%d anomalies have not been corrected.';
-$lang['c13y_more_info'] = 'Go to %s or %s for more informations';
-$lang['c13y_more_info_forum'] = 'the forum';
-$lang['c13y_more_info_wiki'] = 'the wiki';
-$lang['c13y_exif_anomaly'] = '%s value is not correct file because exif are not supported';
-$lang['c13y_exif_correction'] = '%s must be to set to false in your config_local.inc.php file';
-$lang['c13y_guest_non_existent'] = 'Main "guest" user does not exist';
-$lang['c13y_bad_guest_status'] = 'Main "guest" user status is incorrect';
-$lang['c13y_default_non_existent'] = 'Default user does not exist';
-$lang['c13y_webmaster_non_existent'] = 'Main "webmaster" user does not exist';
-$lang['c13y_bad_webmaster_status'] = 'Main "webmaster" user status is incorrect';
-$lang['c13y_user_created'] = 'User "%s" created with "%s" like password';
-$lang['c13y_user_status_updated'] = 'Status of user "%s" updated';
-$lang['add new elements to caddie'] = 'add new elements to caddie';
-// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
-$lang['no_display_thumbnail'] = 'No display';
-$lang['display_thumbnail_classic'] = 'Classic display';
-$lang['display_thumbnail_hoverbox'] = 'Hoverbox display';
-$lang['Thumbnails'] = 'Thumbnails';
-$lang['obligatory_user_mail_address'] = 'Mail address is obligatory for all users';
-$lang['Minimum privacy level'] = 'Minimum privacy level';
-$lang['Privacy level'] = 'Privacy level';
-$lang['Level 0'] = '---';
-$lang['Level 1'] = 'Contacts';
-$lang['Level 2'] = 'Friends';
-$lang['Level 4'] = 'Family';
-$lang['Level 8'] = 'Admins';
-$lang['c13y_maintenance'] = 'Reinitialize check integrity';
-$lang['Check all'] = 'Check all';
-$lang['Uncheck all'] = 'Uncheck all';
-$lang['c13y_check_auto'] = 'Check automatic corrections';
-$lang['c13y_submit_correction'] = 'Apply selected corrections';
-$lang['c13y_submit_ignore'] = 'Ignore selected anomalies';
-$lang['c13y_submit_refresh'] = 'Refresh';
-$lang['c13y_ignore_msg1'] = 'The anomaly will be ignored until next application version';
-$lang['c13y_ignore_msg2'] = 'Correction the anomaly will cancel the fact that it\'s ignored';
-$lang['c13y_anomaly_ignored_count'] = '%d anomaly has been ignored.';
-$lang['c13y_anomalies_ignored_count'] = '%d anomalies have been ignored.';
-$lang['plugins_need_update'] = 'Plugins which need upgrade';
-$lang['plugins_dontneed_update'] = 'Plugins up to date';
-$lang['plugins_cant_check'] = 'Plugin versions can\'t be checked';
-$lang['plugins_actual_version'] = 'Current<br>version';
-$lang['plugins_new_version'] = 'Available<br>version';
-$lang['plugins_auto_update'] = 'Automatic upgrade';
-$lang['plugins_auto_install'] = 'Automatic installation';
-$lang['plugins_download'] = 'Download file';
-$lang['plugins_description'] = '<b>Version:</b> %s<br><br><b>Date:</b> %s<br><br>%s';
-$lang['plugins_tab_list'] = 'Plugin list';
-$lang['plugins_tab_update'] = 'Check for updates';
-$lang['plugins_tab_new'] = 'Other plugins';
-$lang['plugins_revisions'] = 'Last revisions';
-$lang['plugins_delete'] = 'Delete';
-$lang['plugins_confirm_delete'] = 'Are you sure you want to delete this plugin?';
-$lang['plugins_confirm_install'] = 'Are you sure you want to install this plugin?';
-$lang['plugins_confirm_upgrade'] = 'Are you sur to install this upgrade? You must verify if this version does not need uninstallation.';
-$lang['plugins_upgrade_ok'] = '%s has been successfully upgraded.';
-$lang['plugins_install_ok'] = 'Plugin has been successfully copied';
-$lang['plugins_install_need_activate'] = 'You might go to plugin list to install and activate it.';
-$lang['plugins_temp_path_error'] = 'Can\'t create temporary file.';
-$lang['plugins_dl_archive_error'] = 'Can\'t download archive.';
-$lang['plugins_archive_error'] = 'Can\'t read or extract archive.';
-$lang['plugins_extract_error'] = 'An error occured during extraction (%s).';
-$lang['plugins_check_chmod'] = 'Please check "plugins" folder and sub-folders permissions (CHMOD).';
-$lang['plugins_server_error'] = 'Can\'t connect to server.';
-$lang['Purge compiled templates'] = 'Purge compiled templates';
-$lang['Caddie is currently empty'] = 'Caddie is currently empty';
-$lang['conf_upload_title'] = 'Upload';
-$lang['Show upload link every time'] = 'Show upload link every time';
-$lang['User access level to upload'] = 'User access level to upload';
-$lang['ACCESS_0'] = 'Free access';
-$lang['ACCESS_1'] = 'Access to all';
-$lang['ACCESS_2'] = 'Access to subscribed';
-$lang['ACCESS_3'] = 'Access to administrators';
-$lang['ACCESS_4'] = 'Access to webmasters';
-$lang['ACCESS_5'] = 'No access';
-$lang['DEMO'] = 'Demo';
-$lang['HOME'] = 'Piwigo home';
-$lang['FORUM'] = 'Support';
-$lang['BUGS'] = 'Bugs';
-$lang['EXTENSIONS'] = 'Extensions';
-$lang['WIKI / DOC'] = 'Documentation';
-$lang['A new version of Piwigo is available.'] = 'A new version of Piwigo is available.';
-$lang['Piwigo Administration'] = 'Piwigo Administration';
-$lang['Piwigo version'] = 'Piwigo version';
-$lang['You are running the latest version of Piwigo.'] = 'You are running the latest version of Piwigo.';
-$lang['c13y_version_anomaly'] = 'The version of %s [%s] installed is not compatible with the version required [%s]';
-$lang['c13y_version_correction'] = 'You need to upgrade your system to take full advantage of the application else the application will not work correctly, or not at all';
-
-?>
diff --git a/BSF/language/en_UK/common.lang.php b/BSF/language/en_UK/common.lang.php
deleted file mode 100644
index 0ff959fd6..000000000
--- a/BSF/language/en_UK/common.lang.php
+++ /dev/null
@@ -1,368 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Langage informations
-$lang_info['language_name'] = 'English';
-$lang_info['country'] = 'Great Britain';
-$lang_info['direction'] = 'ltr';
-$lang_info['code'] = 'en';
-$lang_info['zero_plural'] = true;
-
-$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (rated %d times, standard deviation = %.2f)';
-$lang['%d Kb'] = '%d Kb';
-$lang['%d category updated'] = '%d category updated';
-$lang['%d categories updated'] = '%d categories updated';
-$lang['%d comment to validate'] = '%d comment to validate';
-$lang['%d comments to validate'] = '%d comments to validate';
-$lang['%d new comment'] = '%d new comment';
-$lang['%d new comments'] = '%d new comments';
-$lang['%d comment'] = '%d comment';
-$lang['%d comments'] = '%d comments';
-$lang['%d hit'] = '%d hit';
-$lang['%d hits'] = '%d hits';
-$lang['%d new element'] = '%d new image';
-$lang['%d new elements'] = '%d new images';
-$lang['%d new user'] = '%d new user';
-$lang['%d new users'] = '%d new users';
-$lang['%d waiting element'] = '%d waiting element';
-$lang['%d waiting elements'] = '%d waiting elements';
-$lang['About'] = 'About';
-$lang['All tags must match'] = 'All tags must match';
-$lang['All tags'] = 'All tags';
-$lang['Any tag'] = 'Any tag';
-$lang['At least one listed rule must be satisfied.'] = 'At least one listed rule must be satisfied.';
-$lang['At least one tag must match'] = 'At least one tag must match';
-$lang['Author'] = 'Author';
-$lang['Average rate'] = 'Average rate';
-$lang['Categories'] = 'Categories';
-$lang['Category'] = 'Category';
-$lang['Close this window'] = 'Close this window';
-$lang['Complete RSS feed'] = 'Complete RSS feed (images, comments)';
-$lang['Confirm Password'] = 'Confirm Password';
-$lang['Connection settings'] = 'Connection settings';
-$lang['Connection'] = 'Connection';
-$lang['Contact webmaster'] = 'Contact webmaster';
-$lang['Create a new account'] = 'Create a new account';
-$lang['Created on'] = 'Created on';
-$lang['Creation date'] = 'Creation date';
-$lang['Current password is wrong'] = 'Current password is wrong';
-$lang['Dimensions'] = 'Dimensions';
-$lang['Display'] = 'Display';
-$lang['Each listed rule must be satisfied.'] = 'Each listed rule must be satisfied.';
-$lang['Email address is missing'] = 'Email address is missing';
-$lang['Email address'] = 'Email address';
-$lang['Enter your personnal informations'] = 'Enter your personnal informations';
-$lang['Error sending email'] = 'Error sending email';
-$lang['File name'] = 'File name';
-$lang['File'] = 'File';
-$lang['Filesize'] = 'Filesize';
-$lang['Filter and display'] = 'Filter and display';
-$lang['Filter'] = 'Filter';
-$lang['Forgot your password?'] = 'Forgot your password?';
-$lang['Go through the gallery as a visitor'] = 'Go through the gallery as a visitor';
-$lang['Help'] = 'Help';
-$lang['Identification'] = 'Identification';
-$lang['Image only RSS feed'] = 'Image only RSS feed';
-$lang['Keyword'] = 'Keyword';
-$lang['Links'] = 'Links';
-$lang['Mail address'] = 'Mail address';
-$lang['N/A'] = 'N/A';
-$lang['New on %s'] = 'New on %s';
-$lang['New password confirmation does not correspond'] = 'New password confirmation does not correspond';
-$lang['New password sent by email'] = 'New password sent by email';
-$lang['No email address'] = 'No email address';
-$lang['No user matches this email address'] = 'No classic user matches this email address';
-$lang['Notification'] = 'Notification';
-$lang['Number of items'] = 'Number of items';
-$lang['Original dimensions'] = 'Original dimensions';
-$lang['Password forgotten'] = 'Password forgotten';
-$lang['Password'] = 'Password';
-$lang['Post date'] = 'Post date';
-$lang['Posted on'] = 'Posted on';
-$lang['Profile'] = 'Profile';
-$lang['Quick connect'] = 'Quick connect';
-$lang['RSS feed'] = 'RSS feed';
-$lang['Rate'] = 'Rate';
-$lang['Register'] = 'Register';
-$lang['Registration'] = 'Registration';
-$lang['Related tags'] = 'Related tags';
-$lang['Reset'] = 'Reset';
-$lang['Retrieve password'] = 'Retrieve password';
-$lang['Search rules'] = 'Search rules';
-$lang['Search tags'] = 'Search tags';
-$lang['Search'] = 'Search';
-$lang['See available tags'] = 'See available tags';
-$lang['Send new password'] = 'Send new password';
-$lang['Since'] = 'Since';
-$lang['Sort by'] = 'Sort by';
-$lang['Sort order'] = 'Sort order';
-$lang['Tag'] = 'Tag';
-$lang['Tags'] = 'Tags';
-$lang['The RSS notification feed provides notification on news from this website : new pictures, updated categories, new comments. Use a RSS feed reader.'] = 'The RSS notification feed provides notification on news from this website : new pictures, updated categories, new comments. Use a RSS feed reader.';
-$lang['Unknown feed identifier'] = 'Unknown feed identifier';
-$lang['User comments'] = 'User comments';
-$lang['Username'] = 'Username';
-$lang['Visits'] = 'Visits';
-$lang['Webmaster'] = 'Webmaster';
-$lang['Week %d'] = 'Week %d';
-$lang['about_page_title'] = 'About Piwigo';
-$lang['access_forbiden'] = 'You are not authorized to access the requested page';
-$lang['add to caddie'] = 'add to caddie';
-$lang['add_favorites_hint'] = 'add this image to your favorites';
-$lang['admin'] = 'Administration';
-$lang['adviser_mode_enabled'] = 'Adviser mode enabled';
-$lang['all'] = 'all';
-$lang['ascending'] = 'ascending';
-$lang['author(s) : %s'] = 'author(s) : %s';
-$lang['auto_expand'] = 'Expand all categories';
-$lang['became available after %s (%s)'] = 'posted after %s (%s)';
-$lang['became available before %s (%s)'] = 'posted before %s (%s)';
-$lang['became available between %s (%s) and %s (%s)'] = 'posted between %s (%s) and %s (%s)';
-$lang['became available on %s'] = 'posted on %s';
-$lang['best_rated_cat'] = 'Best rated';
-$lang['best_rated_cat_hint'] = 'displays best rated items';
-$lang['caddie'] = 'caddie';
-$lang['calendar'] = 'Calendar';
-$lang['calendar_any'] = 'All';
-$lang['calendar_hint'] = 'displays each day with pictures, month per month';
-$lang['calendar_picture_hint'] = 'displays pictures added on ';
-$lang['calendar_view'] = 'View';
-$lang['chronology_monthly_calendar'] = 'Monthly calendar';
-$lang['chronology_monthly_list'] = 'Monthly list';
-$lang['chronology_weekly_list'] = 'Weekly list';
-$lang['click_to_redirect'] = 'Click here if your browser does not automatically forward you';
-$lang['comment date'] = 'comment date';
-$lang['comment'] = 'Comment';
-$lang['comment_added'] = 'Your comment has been registered';
-$lang['comment_anti-flood'] = 'Anti-flood system : please wait for a moment before trying to post another comment';
-$lang['comment_not_added'] = 'Your comment has NOT been registered because it did not pass the validation rules';
-$lang['comment_to_validate'] = 'An administrator must authorize your comment before it is visible.';
-$lang['comment_user_exists'] = 'This login is already used by another user';
-$lang['comments'] = 'Comments';
-$lang['comments_add'] = 'Add a comment';
-$lang['comments_del'] = 'delete this comment';
-$lang['comments_title'] = 'Comments from the users of the site';
-$lang['created after %s (%s)'] = 'created after %s (%s)';
-$lang['created before %s (%s)'] = 'created before %s (%s)';
-$lang['created between %s (%s) and %s (%s)'] = 'created between %s (%s) and %s (%s)';
-$lang['created on %s'] = 'created on %s';
-$lang['customize'] = 'Customize';
-$lang['customize_page_title'] = 'Your Gallery Customization ';
-$lang['day'][0] = 'Sunday';
-$lang['day'][1] = 'Monday';
-$lang['day'][2] = 'Tuesday';
-$lang['day'][3] = 'Wednesday';
-$lang['day'][4] = 'Thursday';
-$lang['day'][5] = 'Friday';
-$lang['day'][6] = 'Saturday';
-$lang['default_sort'] = 'Default';
-$lang['del_favorites_hint'] = 'delete this image from your favorites';
-$lang['delete'] = 'Delete';
-$lang['descending'] = 'descending';
-$lang['download'] = 'download';
-$lang['download_hint'] = 'download this file';
-$lang['edit category informations'] = 'edit category informations';
-$lang['edit'] = 'edit';
-$lang['err_date'] = 'wrong date';
-$lang['excluded'] = 'excluded';
-$lang['favorite_cat'] = 'My favorites';
-$lang['favorite_cat_hint'] = 'displays my favorites pictures';
-$lang['favorites'] = 'Favorites';
-$lang['first_page'] = 'First';
-$lang['gallery_locked_message'] = 'The gallery is locked for maintenance. Please, come back later.';
-$lang['generation_time'] = 'Page generated in';
-$lang['guest'] = 'guest';
-$lang['hello'] = 'Hello';
-$lang['hint_admin'] = 'available for administrators only';
-$lang['hint_category'] = 'shows images at the root of this category';
-$lang['hint_comments'] = 'See last users comments';
-$lang['hint_customize'] = 'customize the appareance of the gallery';
-$lang['hint_search'] = 'search';
-$lang['home'] = 'Home';
-$lang['identification'] = 'Identification';
-$lang['images_available_cpl'] = 'in this category';
-$lang['images_available_cat'] = 'in %d sub-category';
-$lang['images_available_cats'] = 'in %d sub-categories';
-$lang['included'] = 'included';
-$lang['invalid_pwd'] = 'Invalid password!';
-$lang['language']='Language';
-$lang['last %d days'] = 'last %d days';
-$lang['last_page'] = 'Last';
-$lang['link_info_image'] = 'Modify information';
-$lang['logout'] = 'Logout';
-$lang['mail_address'] = 'E-mail address';
-$lang['mandatory'] = 'obligatory';
-$lang['maxheight'] = 'Maximum height of the pictures';
-$lang['maxheight_error'] = 'Maximum height must be a number superior to 50';
-$lang['maxwidth'] = 'Maximum width of the pictures';
-$lang['maxwidth_error'] = 'Maximum width must be a number superior to 50';
-$lang['mode_created_hint'] = 'displays a calendar by creation date';
-$lang['mode_flat_hint'] = 'displays all elements in all sub-categories';
-$lang['mode_normal_hint'] = 'return to normal view mode';
-$lang['mode_posted_hint'] = 'displays a calendar by posted date';
-$lang['month'][10] = 'October';
-$lang['month'][11] = 'November';
-$lang['month'][12] = 'December';
-$lang['month'][1] = 'January';
-$lang['month'][2] = 'February';
-$lang['month'][3] = 'March';
-$lang['month'][4] = 'April';
-$lang['month'][5] = 'May';
-$lang['month'][6] = 'June';
-$lang['month'][7] = 'July';
-$lang['month'][8] = 'August';
-$lang['month'][9] = 'September';
-$lang['most_visited_cat'] = 'Most visited';
-$lang['most_visited_cat_hint'] = 'displays most visited pictures';
-$lang['nb_image_line_error'] = 'The number of images per row must be a not null scalar';
-$lang['nb_image_per_row'] = 'Number of images per row';
-$lang['nb_line_page_error'] = 'The number of rows per page must be a not null scalar';
-$lang['nb_row_per_page'] = 'Number of rows per page';
-$lang['nbm_unknown_identifier'] = 'Unknown identifier';
-$lang['new_password'] = 'New password';
-$lang['new_rate'] = 'Rate this picture';
-$lang['next_page'] = 'Next';
-$lang['no_category'] = 'Home';
-$lang['no_rate'] = 'no rate';
-$lang['note_filter_day'] = 'Only displays elements posted within the last %d day.';
-$lang['note_filter_days'] = 'Only displays elements posted within the last %d days.';
-$lang['password updated'] = 'password updated';
-$lang['periods_error'] = 'Recent period must be a positive integer value';
-/* DEPRECATED USED IN comments.php FOR image_id ? */ $lang['picture'] = 'picture';
-$lang['picture_high'] = 'Click on the picture to see it in high definition';
-$lang['picture_show_metadata'] = 'Show file metadata';
-$lang['powered_by'] = 'Powered by';
-$lang['preferences'] = 'Preferences';
-$lang['previous_page'] = 'Previous';
-$lang['random_cat'] = 'Random pictures';
-$lang['random_cat_hint'] = 'displays a set of random pictures';
-$lang['recent_cats_cat'] = 'Recent categories';
-$lang['recent_cats_cat_hint'] = 'displays recently updated categories';
-$lang['recent_period'] = 'Recent period';
-$lang['recent_pics_cat'] = 'Recent pictures';
-$lang['recent_pics_cat_hint'] = 'displays most recent pictures';
-$lang['redirect_msg'] = 'Redirection...';
-$lang['reg_err_login1'] = 'Please, enter a login';
-$lang['reg_err_login2'] = 'login mustn\'t end with a space character';
-$lang['reg_err_login3'] = 'login mustn\'t start with a space character';
-$lang['reg_err_login5'] = 'this login is already used';
-$lang['reg_err_mail_address'] = 'mail address must be like xxx@yyy.eee (example : jack@altern.org)';
-$lang['reg_err_pass'] = 'please enter your password again';
-$lang['remember_me'] = 'Auto login';
-$lang['remove this tag'] = 'remove this tag from the list';
-$lang['representative'] = 'representative';
-$lang['return to homepage'] = 'return to homepage';
-$lang['search_author'] = 'Search for Author';
-$lang['search_categories'] = 'Search in Categories';
-$lang['search_date'] = 'Search by Date';
-$lang['search_date_from'] = 'Date';
-$lang['search_date_to'] = 'End-Date';
-$lang['search_date_type'] = 'Kind of date';
-$lang['search_keywords'] = 'Search for words';
-$lang['search_mode_and'] = 'Search for all terms ';
-$lang['search_mode_or'] = 'Search for any terms';
-$lang['search_one_clause_at_least'] = 'Empty query. No criteria has been entered.';
-$lang['search_options'] = 'Search Options';
-$lang['search_result'] = 'Search results';
-$lang['search_subcats_included'] = 'Search in subcategories';
-$lang['search_title'] = 'Search';
-$lang['searched words : %s'] = 'searched words : %s';
-$lang['send_mail'] = 'Contact';
-$lang['set as category representative'] = 'set as category representative';
-$lang['show_nb_comments'] = 'Show number of comments';
-$lang['show_nb_hits'] = 'Show number of hits';
-$lang['slideshow'] = 'slideshow';
-$lang['slideshow_stop'] = 'stop the slideshow';
-$lang['special_categories'] = 'Specials';
-$lang['sql_queries_in'] = 'SQL queries in';
-$lang['start_filter_hint'] = 'displays only recently posted images';
-$lang['stop_filter_hint'] = 'return to the display of all images';
-$lang['the beginning'] = 'the beginning';
-$lang['theme'] = 'Interface theme';
-$lang['thumbnails'] = 'Thumbnails';
-$lang['title_menu'] = 'Menu';
-$lang['title_send_mail'] = 'A comment on your site';
-$lang['today'] = 'today';
-$lang['update_rate'] = 'Update your rating';
-$lang['update_wrong_dirname'] = 'wrong filename';
-$lang['upload_advise_filesize'] = 'the filesize of the picture must not exceed : ';
-$lang['upload_advise_filetype'] = 'the picture must be to the fileformat jpg, gif or png';
-$lang['upload_advise_height'] = 'the height of the picture must not exceed : ';
-$lang['upload_advise_thumbnail'] = 'Optional, but recommended : choose a thumbnail to associate to ';
-$lang['upload_advise_width'] = 'the width of the picture must not exceed : ';
-$lang['upload_author'] = 'Author (eg "Pierrick LE GALL")';
-$lang['upload_cannot_upload'] = 'can\'t upload the picture on the server';
-$lang['upload_err_username'] = 'the username must be given';
-$lang['upload_file_exists'] = 'A picture\'s name already used';
-$lang['upload_filenotfound'] = 'You must choose a picture fileformat for the image';
-$lang['upload_forbidden'] = 'You can\'t upload pictures in this category';
-$lang['upload_name'] = 'Name of the picture';
-$lang['upload_picture'] = 'Upload a picture';
-$lang['upload_successful'] = 'Picture uploaded with success, an administrator will validate it as soon as possible';
-$lang['upload_title'] = 'Upload a picture';
-$lang['useful when password forgotten'] = 'useful when password forgotten';
-$lang['qsearch'] = 'Quick search';
-$lang['Connected user: %s'] = 'Connected user: %s';
-$lang['IP: %s'] = 'IP: %s';
-$lang['Browser: %s'] = 'Browser: %s';
-$lang['Author: %s'] = 'Author: %s';
-$lang['Comment: %s'] = 'Comment: %s';
-$lang['Delete: %s'] = 'Delete: %s';
-$lang['Validate: %s'] = 'Validate: %s';
-$lang['Comment by %s'] = 'Comment by %s';
-$lang['User: %s'] = 'User: %s';
-$lang['Email: %s'] = 'Email: %s';
-$lang['Admin: %s'] = 'Admin: %s';
-$lang['Registration of %s'] = 'Registration of %s';
-$lang['Category: %s'] = 'Category: %s';
-$lang['Picture name: %s'] = 'Picture name: %s';
-$lang['Creation date: %s'] = 'Creation date: %s';
-$lang['Waiting page: %s'] = 'Waiting page: %s';
-$lang['Picture uploaded by %s'] = 'Picture uploaded by %s';
-// --------- Starting below: New or revised $lang ---- from version 1.7.1
-$lang['guest_must_be_guest'] = 'Bad status for user "guest", using default status. Please notify the webmaster.';
-// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
-$lang['Administrator, webmaster and special user cannot use this method'] = 'Administrator, webmaster and special user cannot use this method';
-$lang['reg_err_mail_address_dbl'] = 'a user use already this mail address';
-$lang['Category results for'] = 'Category results for';
-$lang['Tag results for'] = 'Tag results for';
-$lang['from %s to %s'] = 'from %s to %s';
-$lang['start_play'] = 'Play of slideshow';
-$lang['stop_play'] = 'Pause of slideshow';
-$lang['start_repeat'] = 'Repeat the slideshow';
-$lang['stop_repeat'] = 'Not repeat the slideshow';
-$lang['inc_period'] = 'Reduce diaporama speed';
-$lang['dec_period'] = 'Accelerate diaporama speed';
-$lang['Submit'] = 'Submit';
-$lang['Yes'] = 'Yes';
-$lang['No'] = 'No';
-$lang['%d element']='%d image';
-$lang['%d elements']='%d images';
-$lang['%d element are also linked to current tags'] = '%d image is also linked to current tags';
-$lang['%d elements are also linked to current tags'] = '%d images are also linked to current tags';
-$lang['See elements linked to this tag only'] = 'See images linked to this tag only';
-$lang['elements posted during the last %d days'] = 'images posted during the last %d days';
-$lang['Choose an image'] = 'Choose an image';
-$lang['Piwigo Help'] = 'Piwigo Help';
-
-?>
diff --git a/BSF/language/en_UK/help.html b/BSF/language/en_UK/help.html
deleted file mode 100644
index 1ca5c5ca9..000000000
--- a/BSF/language/en_UK/help.html
+++ /dev/null
@@ -1,259 +0,0 @@
-<h2>Help</h2>
-
-<h3>Quick start</h3>
-
-<ol>
-
- <li>Create a local directory "test_category".</li>
-
- <li>Copy pictures in "test_category".</li>
-
- <li>Open an FTP connection to this remote gallery.</li>
-
- <li>Upload local directory "test_category" into your remote directory
- names "galleries". Set authorizations to 777 on directory
- "galleries/test_category".</li>
-
- <li>Connect to your Piwigo as an admin.</li>
-
- <li>Go to <span class="pwgScreen">Administration, Pictures,
- Thumbnails</span>. Piwigo find the picture from "test_category"
- without thumbnails. Ask to create thumbnails.</li>
-
- <li>Go to <span class="pwgScreen">Administration, Categories,
- Synchronize</span>. Check "directories + files" option, uncheck "only
- perform a simulation" and submit the synchronization.</li>
-
- <li>Job's done. You've created a category "test_category" at the root of
-your gallery.</li>
-
-</ol>
-
-<h3>Adding elements</h3>
-
-<ul>
-
- <li>
-
- <p>Category directories are in the Piwigo directory
- "galleries". Here follow the directory tree of a very small gallery (but
- using many features) :</p>
-
- <pre>
-.
-|-- admin
-|-- doc
-|-- galleries
-| |-- category-1
-| | |-- category-1.1
-| | | |-- category-1.1.1
-| | | | |-- category-1.1.1.1
-| | | | | |-- pwg_high
-| | | | | | +-- wedding.jpg
-| | | | | |-- thumbnail
-| | | | | | +-- TN-wedding.jpg
-| | | | | +-- wedding.jpg
-| | | | +-- category-1.1.1.2
-| | | +-- category-1.1.2
-| | |-- category-1.2
-| | | |-- pookie.jpg
-| | | +-- thumbnail
-| | | +-- TN-pookie.jpg
-| | +-- category-1.3
-| +-- category-2
-| |-- piglet.gif
-| |-- pwg_representative
-| | +-- video.jpg
-| |-- thumbnail
-| | +-- TN-piglet.jpg
-| +-- video.avi
-|-- include
-|-- install
-|-- language
-|-- template
-+-- tool</pre>
-
- </li>
-
- <li>Basically, a category is represented by a directory at any level in
- Piwigo directory "galleries". Each category can contain as many
- sub-level as you wish. In the example above, category-1.1.1.1 is at level
- 4 of deepness.</li>
-
- <li>Basically, an element is represented by a file. A file can be a
- Piwigo element if its extenstion is among <code>file_ext</code>
- configuration parameter possibilities (see <span
- class="filename">include/config_default.inc.php</span> file). A file can
- be a picture if its extension is among <code>picture_ext</code>
- configuration parameter possibilities.</li>
-
- <li>Picture elements must have an associated thumbnail (see section below
- about thumbnails)</li>
-
- <li>Picture elements can have a high quality file associated. As for
- wedding.jpgin the example above. No prefix on the high quality picture is
- required.</li>
-
- <li>Non picture elements (video, sounds, file texts, what you want...) are
- by default represented by an icon corresponding to the filename
- extension. Optionaly, you can associate a thumbnail and a representative
- file (see video.avi in the example above).</li>
-
- <li><em>Warning</em> : the name of directories and files must be composed
-of letters, figures, "-", "_" or ".". No blank space, no accentuated
-characters</li>
-
- <li><em>Advise</em> : a category can contain elements and sub-categories
-in the same time. Nerverthless, you are strongly advised for each category
-to choose between category containing elements <strong>or</strong> category
-containing sub-categories.</li>
-
- <li>Once files, thumbnails and representatives are correctly placed in the
- directories, go to : <span class="pwgScreen">Administration, Categories,
- Synchronize</span></li>
-
-</ul>
-
-<h3>Thumbnails</h3>
-
-<ul>
-
- <li>As said earlier, each element of picture type must be associated with
- a thumbnail.</li>
-
- <li>Thumbnails are stored in the sub-directory "thumbnail" of the category
- directory. The thumbnail is a picture (same filename extensions possible
- than picture files) which filename is prefixed by the configured
- "Thumbnail prefix" (see admin panel, Configuration, General).</li>
-
- <li>Thumbnails don't need to have the same extension as their associated
- picture (a picture with .jpg extension can have a thumbnail in .GIF
- extention for instance).</li>
-
- <li>Advise: use an external module for thumbnails creation.</li>
-
- <li>You can also use the thumbnail creation page (<span
- class="pwgScreen">Administration, Pictures, Thumbnails</span>), but it is
- not recommended. Indeed, thumbnail quality may be poor and it uses a high
- CPU load which can be a problem if you use free web hosting.</li>
-
- <li>If you choose to use your hosting provider to create thumbnails, you
- must give write rights on all category directories and sub-directories
- "thumbnail" for ugo (user, group, other).</li>
-
-</ul>
-
-<h3>Access authorization</h3>
-
-<ul>
-
- <li>You can forbid access to categories. Categories can be "public" or
- "private". Permissions (for groups and users) can be set only if the
- category is private.</li>
-
- <li>You can set a category to private by editing a single category (<span
- class="pwgScreen">Administration, Categories, Manage, edit</span>) or by
- setting options to your whole category tree (<span
- class="pwgScreen">Administration, Categories, Properties, Public / Private</span>).</li>
-
- <li>
-
- <p>Once the category is private, you can manage permissions for groups
- and users through 3 screens :</p>
-
- <ul>
-
- <li><span class="pwgScreen">Administration, Identification, Users,
- permissions action (one link per user)</span></li>
-
- <li><span class="pwgScreen">Administration, Identification, Groups,
- permissions action (one link per group)</span></li>
-
- <li><span class="pwgScreen">Administration, Categories, Manage, edit
- category permissions action (one link per category)</span></li>
-
- </ul>
-
- </li>
-
-</ul>
-
-<h3>Users Groups</h3>
-
-<ul>
-
- <li>Piwigo is able to manage groups of users. It can be very useful
- to have common permission access for private categories.</li>
-
- <li>You can create groups in <span class="pwgScreen">Administration,
- Identification, Groups</span> and associate users to this group in <span
- class="pwgScreen">Administration, Identication, Users</span>.</li>
-
- <li>A user can belong to several groups. The authorization is stronger
- than prohibition : if user "jack" belongs to groups "family" and
- "friends", and that only group "family" can see category "Christmas 2003",
- "jack" will be able to see "Christmas 2003".</li>
-
-</ul>
-
-<h3>Files upload by users</h3>
-
-<p>Piwigo offers the possibility for users to upload images. in
-order to do it:</p>
-
-<ol>
-
- <li>authorize upload on any categories (<span
- class="pwgScreen">Administration, Categories, Manage, edit</span> or <span
- class="pwgScreen">Administration panel, Categories, Properties, Upload</span>)</li>
-
- <li>give write rights on directories for ugo (user, group, other)</li>
-
-</ol>
-
-<p>Files uploaded by users are not directly visible on the website, they
-must be validated by an administrator. For that purpose, an administrator
-must go in <span class="pwgScreen">Administration, Pictures, Waiting</span>
-in order to validate or to refuse the files proposed, then to synchronize
-filesystem with database.</p>
-
-
-<h3>Links between elements and categories, virtual categories</h3>
-
-<ul>
-
- <li>Piwigo dissociates categories where elements are stored and
- categories where they are shown.</li>
-
- <li>By default, elements are shown only in their real categories : the
- ones corresponding to directories on the web server.</li>
-
- <li>To link an element to a category, you just have to make the
- association on the page of element edition (link to this screen on
- picture.php logged as an administrator) or on the informations of all
- elements of a category.</li>
-
- <li>Using this principle, it is possible to create virtual categories : no
- directory coresponds to this category. You can create virtual categories
- in <span class="pwgScreen">Administration, Categories, Manage</span>.</li>
-
-</ul>
-
-<h3>Miscellanous informations</h3>
-
-<ul>
-
- <li>As soon as you created your gallery, modify default display properties
- in <span class="pwgScreen">Administration panel, Configuration,
- Default</span>. Indeed, every new registered user will have by default the
- same display properties.</li>
-
- <li>If you have any question, do not hesitate to take a look at the forum
- or ask a question there. The <a
- href="http://forum.phpwebgallery.net">forum</a> (message board) is
- available on the presentation site of Piwigo. Check the <a
- href="http://phpwebgallery.net/doc/">official Piwigo
- documentation</a> for further reading.</li>
-
-</ul>
-
diff --git a/BSF/language/en_UK/help/advanced_feature.html b/BSF/language/en_UK/help/advanced_feature.html
deleted file mode 100644
index 2fd5341fb..000000000
--- a/BSF/language/en_UK/help/advanced_feature.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<h2>Advanced features</h2>
-
-<p>List special functionnalties for expert PWG administrator:</p>
-
-<ul>
-
- <li>
- <strong>Not linked elements:</strong>
- Display images which are not associated to any virtual category.
- </li>
- <li>
- <strong>Files with same name in more than one physical category:</strong>
- Display images or any files which are found with the same filename in some categories.
- </li>
-
-</ul>
diff --git a/BSF/language/en_UK/help/cat_modify.html b/BSF/language/en_UK/help/cat_modify.html
deleted file mode 100644
index 9f7d3a264..000000000
--- a/BSF/language/en_UK/help/cat_modify.html
+++ /dev/null
@@ -1,141 +0,0 @@
-<h2>Edit a category</h2>
-
-<h3>Informations</h3>
-
-<ul>
-
- <li><strong>name</strong>: rename the category (a virtual rename in case
- of physical category).</li>
-
- <li><strong>description</strong>: give a general idea of the content,
- this text will be display under the thumbnail page.</li>
-
-</ul>
-
-<h3>Move</h3>
-
-<p>If the category is virtual, you can move it. Moving a category means
-changing its parent category.</p>
-
-<h3>Options</h3>
-
-<ul>
-
- <li><strong>Access type</strong>: Permission management. If you make a
- category private, all its child categories becomes private. If you make a
- category public, all its parent categories becomes public.</li>
-
- <li><strong>Lock</strong>: The category and its sub-categories will
- temporary been disabled for maintenance.</li>
-
- <li><strong>Comments</strong>: Authorize users to comment elements of this
- category.</li>
-
- <li><strong>Authorize upload</strong>: Authorize users to upload
- files. This option is available only if category is physical (not
- virtual).</li>
-
-</ul>
-
-<p>You can also manage these options with "Properties"
-management screen (screens <span class="pwgScreen">Upload</span>, <span
-class="pwgScreen">Comments</span>, <span class="pwgScreen">Lock</span>,
-<span class="pwgScreen">Public/Private</span>, <span
-class="pwgScreen">Representative</span> available from <span
-class="pwgScreen">Administration, Categories, Properties</span>).</p>
-
-<h3>Sort order</h3>
-
-<p>Choose if the default sort order will be used.</p>
-
-<p>Indicate if this sort order will be applied to subcategories.</p>
-
-<p>Select specific sort by columns to use with this category.</p>
-<ul>
-<li><strong>Creation date</strong>: Picture creation date</li>
-<li><strong>Post date</strong>: Synchronization date</li>
-<li><strong>Average rate (*)</strong>: Average rate could be changed by the visitor</li>
-<li><strong>Most visited (*)</strong>: The current visit change the most visited order</li>
-<li><strong>File name</strong>: Given name in informations field</li>
-<li><strong>Id</strong>: Internal Id (recent categories have an higher id than previous ones.</li>
-
-</ul>
-<p><strong>(*)</strong>Take care and test it for your self since it can give unpredictable results.</p>
-
-
-<h3>Representant</h3>
-
-<p>The representant of the category is the thumbnail displayed to represent
-the category on main page (<span class="pwgScreen">category.php</span>) when
-a category contains only sub-categories (just as the root category).</p>
-
-<p>There are 4 ways to set the representative picture of a category :</p>
-
-<ul>
-
- <li><span class="pwgScreen">Picture page</span>: in the action buttons bar,
- one of them let you set the displayed picture as representative for the
- displayed category. This button is available only for administrators.</li>
-
- <li><span class="pwgScreen">Modify informations about a picture</span> in
- administration. This screen can be reach from <span
- class="pwgScreen">picture.php</span> or <span class="pwgScreen">Batch
- management</span> in <em>unit mode</em>. See the help of this screen for
- details.</li>
-
- <li><span class="pwgScreen">Administration, Categories, Properties,
- Representative</span>. See the help of this screen for details.</li>
-
- <li><span class="pwgScreen">Edit a category</span> (this screen).</li>
-
-</ul>
-
-<p>The representation depends on configuration parameter
-<code>allow_random_representative</code> (see <span
-class="filename">include/config_default.inc.php</span>).</p>
-
-<p>In default mode (<code>allow_random_representative</code> set to false)
-each category containing at least one element is represented by a fixed
-element. Once set (at category creation), the representative changes only
-when an administrator ask for it. If the representant is not appropriate,
-you can ask to <strong>Find a new representant by random</strong>.</p>
-
-<p>If configuration parameter <code>allow_random_representative</code> is
-set to true, a category containing elements can have no fixed
-representant. Just use <strong>Delete representant</strong> button.</p>
-
-<p>If the category contains no element (but only sub-categories) it can be
-represented by any element thanks to screen <span class="pwgScreen">Modify
-informations about a picture</span>. The only option on the current screen
-is to <strong>Delete representant</strong> button, after using this button,
-no representant option to set anymore.</p>
-
-<h3>Link all category elements to a new category</h3>
-
-<ul>
-
-<li><strong>Virtual category name</strong>: New category name to be created,
-all pictures of the current category will be linked to the new one.</li>
-
-<li><strong>Parent category</strong>: Where the new category will be,
-leave empty to create it from home.</li>
-
-</ul>
-
-<h3>Link all category elements to some existing categories</h3>
-
-<ul>
-
-<li><strong>Categories</strong>: Choose the destination category.</li>
-
-</ul>
-
-<h3>Send an information email to group members</h3>
-
-<ul>
-
-<li><strong>Group</strong>: addressees group</li>
-
-<li><strong>Mail content</strong>: Free text to be sent to them.</li>
-
-</ul> \ No newline at end of file
diff --git a/BSF/language/en_UK/help/cat_move.html b/BSF/language/en_UK/help/cat_move.html
deleted file mode 100644
index 8674f6149..000000000
--- a/BSF/language/en_UK/help/cat_move.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<h2>Moving virtual categories</h2>
-
-<p>Only virtual categories can have a new parent category.</p>
-
-<h3>Virtual categories to move</h3>
-
-<p>Select any virtual categories you want to move.
-If the list is empty, that mean you didn't create one.</p>
-
-<h3>New parent category</h3>
-
-<p>Select the new parent (virtual or physical).
-If you don't, virtual selected categories will be moved to the root.
-You can't move a category to itself or to one of its child.</p> \ No newline at end of file
diff --git a/BSF/language/en_UK/help/cat_options.html b/BSF/language/en_UK/help/cat_options.html
deleted file mode 100644
index c79d3aac3..000000000
--- a/BSF/language/en_UK/help/cat_options.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<h2>Category options</h2>
-
-<p>This screen lets the administrator manage categories option for many
-categories at once.</p>
-
-<dl>
-
- <dt>Upload</dt>
- <dd>Make categories uploadable for gallery visitors. Only non virtual and
- non remote categories are shown.</dd>
-
- <dt>Comments</dt>
- <dd>Authorize users to add comments on selected categories.
-Selects the categories which are commentable.
-An image is commentable if it belongs to at least one category that is commentable.</dd>
-
- <dt>Lock</dt>
- <dd>Selected categories will temporary been disabled for maintenance. If
- you lock a category, all its child categories become locked. If you unlock
- a category, all its parent categories become unlocked.</dd>
-
- <dt>Public / private</dt>
- <dd>Manage authorizations for selected categories. Selected categories are
- private : you will need to authorize users and/or groups to access to
- them. If you make a category private, all its child categories becomes
- private. If you make a category public, all its parent categories becomes
- public</dd>
-
- <dt>Representative</dt>
- <dd>This option can be managed only if you set configuration parameter
- <code>allow_random_representative</code> (see <span
- class="filename">include/config_defaults.inc.php</span>) to
- <em>true</em>. Each category can be randomly represented or singly
- represented (by a unique picture).</dd>
-
-</dl>
diff --git a/BSF/language/en_UK/help/cat_perm.html b/BSF/language/en_UK/help/cat_perm.html
deleted file mode 100644
index 3b3471fb9..000000000
--- a/BSF/language/en_UK/help/cat_perm.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<h2>Manage permissions for a category</h2>
-
-<p>This screen is available only for a private category. Here you can select
-users and groups authorized for this category.</p>
-
-<h3>Groups</h3>
-
-<p>You can deny or grant groups for the current category. By modifying
-groups authorizations, you'll probably modify the list of users granted to
-the category thanks to group belongings.</p>
-
-<h3>Users</h3>
-
-<p>You can deny or grant individual users. Users granted thanks to group
-belongings can be denied or granted specifically.</p>
diff --git a/BSF/language/en_UK/help/configuration.html b/BSF/language/en_UK/help/configuration.html
deleted file mode 100644
index de685058a..000000000
--- a/BSF/language/en_UK/help/configuration.html
+++ /dev/null
@@ -1,135 +0,0 @@
-<h2>Configuration</h2>
-
-<p>This screen let the administrator do basic configuration. Indeed, this
-screen only shows simple configuration parameters that should be enough for
-the vast majority of administrators. If you want to see other numerous (and
-advanced) configuration parameters, read file <span
-cass="filename">include/config_default.inc.php</span>.</p>
-
-<p>This screen is divided in several sections, regrouping configuration
-parameters by theme.</p>
-
-
-<h3>Main</h3>
-<ul>
- <li><strong>Gallery title</strong>: used in RSS feed and notifications by
-email.</li>
-
- <li><strong>Page banner</strong>: displayed on top of each public
-page.</li>
-
- <li><strong>Gallery URL</strong>: used for the RSS feed.</li>
-
- <li><strong>Lock gallery</strong>: Lock the entire gallery for
- maintenance. Only administrator users will be able to reach the
- gallery.</li>
-
- <li><strong>Rating</strong>: Picture rating feature is enabled.</li>
-
- <li><strong>Rating by guests</strong>: Even non registered users can rate images.</li>
-
- <li><strong>Allow user registration</strong>: Registration is free for all.</li>
-
- <li><strong>Mail address is obligatory for all users</strong>: Mail address will checked on registration or profile update except if the action is done on administration part.</li>
-
- <li><strong>Email admins when a new user registers</strong>: Administrators will be received mail for each registration.</li>
-
-</ul>
-
-<h3>History</h3>
-<ul>
- <p>Visits on pages <span
- class="pwgScreen">category.php</span> and <span
- class="pwgScreen">picture.php</span> will be saved in the
- <code>history</code> table.</p>
-
- <p>Visits will be shown in <span
- class="pwgScreen">Administration, Specials, History</span>.</p>
-
- <li><strong>Save page visits by guests</strong>: page visits by guests will be saved.</li>
-
- <li><strong>Save page visits by users</strong>: visits by registrered users will be saved.</li>
-
- <li><strong>Save page visits by administrators</strong>: page visits by administrators will be saved.</li>
-
-</ul>
-
-<h3>Comments</h3>
-<ul>
-
- <li><strong>Comments for all</strong>: Even guest not registered can post
- comments.</li>
-
- <li><strong>Number of comments per page</strong>.</li>
-
- <li><strong>Validation</strong>: an administrator validate users posted
- comments before they become visible on the site. User comments validation
- takes place in screen <span class="pwgScreen">Administration, Pictures,
- Comments</span>.</li>
-
- <li><strong>Email admins when a valid comment is entered</strong>:
-Sends an email to the administrators when a user enters a comment and this comment is validated.</li>
-
- <li><strong>Email admins when a comment requires validation</strong>:
-Sends an email to the administrators when a user enters a comment that requires validation by the admin.
-User comments validation takes place in the screen <span class="pwgScreen">Administration, Pictures, Comments</span>.</li>
-
-</ul>
-
-<!--TODO --><h3>Upload</h3>
-<ul>
-<!--TODO --> <li><strong>Show upload link every time</strong>: If exists uploadeable categories, add link will be show for each categoy.</li>
-<!--TODO --> <li><strong>User access level to upload</strong>: Allows to restrict upload by users</li>
- <li><strong>Email adminis when a picture is uploaded</strong>: Administrators will be received mail for each picture uploaded by a user.</li>
-</ul>
-
-<h3>Default display</h3>
-
-<p>Here you can change display options used by default, when guest is not
-connected. Once connected, these options are overloaded by user own options
-(modifiable in <span class="pwgScreen">profile</span>).</p>
-
-<p>It is possible to change display options for all existing users, but the
-screen to consider is <span class="pwgScreen">Administration,
-Identification, Users</span>, where you can options for a selected list of
-users.</p>
-
-<ul>
-
- <li><strong>Language</strong>: concerns only Piwigo
- labels. Category names, picture names and all descriptions are not
- localized.</li>
-
- <li><strong>Number of images per row</strong></li>
-
- <li><strong>Number of rows per page</strong></li>
-
- <li><strong>Interface theme</strong></li>
-
- <li><strong>Recent period</strong>: By days. Period within a picture is
- shown as new. Must be superior to 1 day.</li>
-
- <li><strong>Expand all categories</strong>: Expand all categories by
- default in the menu? <em>Warning</em>: this option is resources consuming
- and may generate a huge menu if your category tree is contains many
- categories.</li>
-
- <li><strong>Show number of comments</strong>: show the number of comments
- for each picture on the thumbnails page. Resource consuming.</li>
-
- <li><strong>Show hits count</strong>: display hits observed on picture
- just under its thumbnail on the thumbnails page.
- Only when advanced configuration parameter is: <br />
- $conf['show_nb_hits'] = true; <br />
- Notice: it is false by default.</li>
-
- <li><strong>Maximum width of the pictures</strong>: maximum displayed
- width. If pictures are larger than this setting, they will be resized on
- display. If you consider filling this option, you'd better consider
- modifying the width of your pictures instead.</li>
-
- <li><strong>Maximum height of the pictures</strong>: same remarks as for
- previous setting.</li>
-
-</ul>
-
diff --git a/BSF/language/en_UK/help/group_list.html b/BSF/language/en_UK/help/group_list.html
deleted file mode 100644
index e918f2e5a..000000000
--- a/BSF/language/en_UK/help/group_list.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<h2>Groups list</h2>
-
-<p>This is the place where you can manage defined groups.</p>
-
-<h3>Add a group</h3>
-
-<p>Administrator can add groups.</p>
-
-<h3>Groupes list</h3>
-
-<p>The list allows for each element to:</p>
-
-
-<ul>
- <li>go to members list</li>
- <li>go to permissions</li>
- <li>delete the group (require a confirmation checkbox)</li>
- <li>toggle status "default" (require a confirmation checkbox)</li>
-</ul>
-
-<h3>Default groups</h3>
-<p>Default groups are groups associated automatically to new user.</p> \ No newline at end of file
diff --git a/BSF/language/en_UK/help/history.html b/BSF/language/en_UK/help/history.html
deleted file mode 100644
index 5ad9f5f76..000000000
--- a/BSF/language/en_UK/help/history.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<h2>History</h2>
-
-<p>These screens allows you to follow the historical navigation en Piwigo
-according to the options yo have chosen in - Administration - General - History index.</p>
-
-<h3>Statistics</h3>
-<ul>
- <p>If you have chosen to keep the pages visited (<span
-class="pwgScreen">index.php</span> and <span
-class="pwgScreen">picture.php</span>) in the table <code>history. </code>
-This index allow you to follow the pages visited.</p>
-
- <li><strong>Global statistics</strong> : you can visualize per year. </li>
-
- <li><strong>Yearly statistics</strong> : you can visualize per month in the year selected.</li>
-
- <li><strong>Monthly statistics</strong> : you can visualize per days in the month selected.</li>
-
- <li><strong>Dayly statistics</strong> : you can visualize per hours in the day selected.</li>
-
-</ul>
-
-<h3>Search</h3>
-<ul>
- <p>If you have chosen to keep the pages visited (<span
-class="pwgScreen">index.php</span> and <span
-class="pwgScreen">picture.php</span>) in the table <code>history. </code>
-This index allow to follow en details the pages visited on the site with
-the help of different filters.</p>
-
- <li><strong>Filter per date</strong> : chose interval of date you wisk
- to observe the activity.</li>
-
- <li><strong>Filter per type of element</strong> : chose the type
- of element you wisk to observe the activity.</li>
-
- <li><strong>Filter per user</strong> : chose user you wisk to
- observe the activity.</li>
-
- <li><strong>Filter per name of the file</strong> : chose name of the file
- you wisk to observe the activity.</li>
-
- <li><strong>Filter per identifying image</strong> : chose identifying image
- you wisk to observe the activity.</li>
-</ul> \ No newline at end of file
diff --git a/BSF/language/en_UK/help/index.php b/BSF/language/en_UK/help/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/language/en_UK/help/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/language/en_UK/help/maintenance.html b/BSF/language/en_UK/help/maintenance.html
deleted file mode 100644
index d33074063..000000000
--- a/BSF/language/en_UK/help/maintenance.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<h2>Maintenance</h2>
-
-<p>To optimize page generation time, Piwigo uses cached
-information. For example, instead of counting the number of pictures
-contained in each category at each page reload, this information is stored
-in the database. In theory, this information should always be correct, but
-sometimes an error can occur and cached information becomes wrong.</p>
-
-<p>Some informations become useless with time. Deleting this useless
-information from database make you save disk space.</p>
-
-<ul>
-
- <li><strong>Update categories informations:</strong> For each category,
- informations to update or control are the following : list of parent
- categories, number of pictures, date of the last picture, position among
- brother categories, position among all categories. This action also checks
- the coherence of representative picture.</li>
-
- <li><strong>Update images informations:</strong> For each picture,
- informations to update are : full path to file, average
- rate. <em>Warning</em>: do not get confuse with metadata informations
- which can be synchronized from <span class="pwgScreen">Administration,
- Categories, Synchronize</span> or by reaching the modification screen of a
- single picture (through <span class="pwgScreen">Picture</span> for
- example).</li>
-
- <li><strong>Repair and optimize database:</strong>
- For each table, re-odrer, repair and optimize operations are done.
- </li>
-</ul>
-
-<ul>
- <li><strong>Purge history detail:</strong> Delete all lines from
- <code>history</code> table. Screen <span class="pwgScreen">Administration,
- Specials, History</span> shows no informations anymore on past
- history. <em>Warning</em>: all data will be lost and there is no way to
- get informations back.</li>
-
- <li><strong>Purge history summary:</strong> Delete all the summary information about visit history. This summary is calculated from the history detail.</li>
-
- <li><strong>Purge sessions:</strong> Delete expired user sessions.</li>
-
- <li><strong>Purge never used notification feeds</strong></li>
-
-</ul>
diff --git a/BSF/language/en_UK/help/notification_by_mail.html b/BSF/language/en_UK/help/notification_by_mail.html
deleted file mode 100644
index 076bb7b34..000000000
--- a/BSF/language/en_UK/help/notification_by_mail.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<h2>Notification by mail</h2>
-
-<p>This screen allows to configure and manage email notifications to users of news on your site.</p>
-
-<p>This screen is composed of 3 tabs:</p>
-
-<h3>Parameters</h3>
-<p>Available only for webmasters, this tab sets parameters of the notification by mail.</p>
-
-<h3>Subscribe</h3>
-<p>Available only for webmasters, this tab manages subscription/unsubscription of users to email notifications.</p>
-
-<h3>Envoi</h3>
-<p>Available only for webmasters and administrators, this tab allows to send mails to notify news.</p>
-
diff --git a/BSF/language/en_UK/help/permalinks.html b/BSF/language/en_UK/help/permalinks.html
deleted file mode 100644
index d5261c94d..000000000
--- a/BSF/language/en_UK/help/permalinks.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<h2>Permalinks</h2>
-
-<p>Permalinks are used to make category urls nicer. When a category has a permalink defined, the id of the category is not required anymore in the url.</p>
-
-<p>When a permalink is deleted, you have the ability to save it to the permalink history, so that external links to PWG pages still work. In the permalink history table you can see the date when the permalink has been deleted as well as the last time when it was used and the number of times this permalink has been used.</p>
-
-<p>Note that permalinks must be unique per category. Also in the permalink history you cannot have the same permalink defined more than once.</p>
diff --git a/BSF/language/en_UK/help/search.html b/BSF/language/en_UK/help/search.html
deleted file mode 100644
index c98038b2b..000000000
--- a/BSF/language/en_UK/help/search.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<h2>Search</h2>
-
-<p>This page let you search pictures among the whole gallery.</p>
-
-<dl>
-
- <dt>Search for words</dt>
- <dd>Search for entered words in all the attributes related to the pictures
- displayed in the gallery. Use * as a wildcard for partial matches.</dd>
-
- <dt>Search for Author</dt>
- <dd>Use * as a wildcard for partial matches.</dd>
-
- <dt>Search by Date</dt>
- <dd>Select a date and/or an ending date for your query. Leave date empty
- if you want to make a "before" query. The year must be entered in the last
- field in the following format : 0000 (i.e. 2004)</dd>
-
- <dt>Search in Categories</dt>
- <dd>Select the category or categories you wish to search in. For speed all
- subcategories can be searched by selecting the parent and setting enable
- search subcategories below.</dd>
-
-</dl>
diff --git a/BSF/language/en_UK/help/site_manager.html b/BSF/language/en_UK/help/site_manager.html
deleted file mode 100644
index cd333d43a..000000000
--- a/BSF/language/en_UK/help/site_manager.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<h2>Remote sites</h2>
-
-<p>Piwigo offers the possibility to use several servers to store the
-images which will compose your gallery. It can be useful if your gallery is
-installed on one limited space and that you have a big quantity of images to
-be shown.</p>
-
-<ol>
-
- <li>edit file <span class="filename">tools/create_listing_file.php</span>,
- by modifying parameters section such as
- <code>$conf['prefix_thumbnail']</code> or
- <code>$conf['use_exif']</code>.</li>
-
- <li>place file <span class="filename">tools/create_listing_file.php</span>
- modified on your distant website, in the same directory than your category
- directories (as the directory <span class="filename">galleries</span> of
- this website) by ftp. For the example, let's say that you can access <span
- class="filename">http://example.com/galleries/create_listing_file.php</span>.</li>
-
- <li>go to <span class="pwgScreen">administration panel, Categories, Site
- manager</span>. Ask to create a new site, for example <span
- class="filename">http://example.com/galleries</span>.</li>
-
- <li>a new remote site is registered. You can perform 4 actions :
-
- <ol>
-
- <li><strong>generate listing</strong> : launches a distant request to
- generate a distant file listing</li>
-
- <li><strong>synchronize</strong> : reads the distant <span
- class="filename">listing.xml</span> file and synchronizes with
- database informations.</li>
-
- <li><strong>clean</strong> : removes distant <span
- class="filename">listing.xml</span> file.</li>
-
- <li><strong>delete</strong> : deletes the site (and all related
- categories and elements) in the database.</li>
-
- </ol>
- </li>
-</ol>
-
-<!-- <p>You can do all this by hand by generating yourself the <span
-class="filename">listing.xml</span> file, moving it from your distant server
-to you local Piwigo root directory and opening the remote site
-management screen : Piwigo will propose you to use the found
-listing.xml file.</p>-->
-
diff --git a/BSF/language/en_UK/help/synchronize.html b/BSF/language/en_UK/help/synchronize.html
deleted file mode 100644
index c1ae424f8..000000000
--- a/BSF/language/en_UK/help/synchronize.html
+++ /dev/null
@@ -1,13 +0,0 @@
-<h2>Synchronize</h2>
-
-<p>There are 2 synchronizations possible : directories/files and file
-metadata. directories/files is about synchronizing your directories tree
-with the category tree in the database. metadata is about updating elements
-informations such as filesize, dimensions in pixels, EXIF or IPTC
-informations.</p>
-
-<p>The first synchronization must be the directories/files one.</p>
-
-<p>Synchronization process may take long (depending on your server load and
-quantity of elements to manage) so it is possible to progress by step:
-category by category.</p>
diff --git a/BSF/language/en_UK/help/thumbnail.html b/BSF/language/en_UK/help/thumbnail.html
deleted file mode 100644
index aaaf255a9..000000000
--- a/BSF/language/en_UK/help/thumbnail.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<h2>Thumbnails creation</h2>
-
-<p>This page let you create missing thumbnails.</p>
-
-<dl>
-
- <dt>GD version</dt>
-
- <dd>GD is the picture manipulating library for PHP. Choose the version
- installed on your server. If you choose the wrong, you'll just have errors
- messages, come back with your browser and choose the other version. If no
- version works, it means your server doesn't support GD.</dd>
-
- <dt>Width and height</dt>
-
- <dd>Maximum dimensions that thumbnails can take. Aspect ratio is
- maintained.</dd>
-
- <dt>Number of thumbnails to create</dt>
-
- <dd>Do not try to miniaturize too many pictures in the same time. Indeed, miniaturization uses a lot of CPU. If you installed Piwigo on a free provider, a too high CPU load can sometime lead to the deletion of your website.</dd>
-
- <dt>File format</dt>
-
- <dd>Only JPEG file format is supported for thumbnail creation. Thumbnails
- can be created only from PNG and JPEG pictures.</dd>
-
-</dl>
diff --git a/BSF/language/en_UK/help/user_list.html b/BSF/language/en_UK/help/user_list.html
deleted file mode 100644
index b09110537..000000000
--- a/BSF/language/en_UK/help/user_list.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<h2>Users list</h2>
-
-<p>This is the place where you can manage registered users. Only permissions
-are managed in different several screens.</p>
-
-<h3>Add a user</h3>
-
-<p>Administrator can manually add users.</p>
-
-<h3>Users list</h3>
-
-<p>The list can be filtered on username (use * as wildcard), group or
-status. The list can be order by registration date or username, in ascending
-or descending order.</p>
-
-<p>This screen works be managing several users at once on different actions
-:</p>
-
-<ul>
-
- <li>delete users (require a confirmation checkbox)</li>
-
- <li>change status</li>
-
- <li>associate or dissociate from groups</li>
-
- <li>modify display properties</li>
-
- <li>modify additional properties</li>
-
-</ul>
-
-<p>The target is the set users selected (by default) or all users is
-asked.</p>
-<h3>Adviser</h3>
-<p>Definition of adviser user:</p>
-<ul>
- <li>allow access of all screens permitted by this status</li>
- <li>read-only or simulate-only access</li>
-</ul>
-
-<p>It's possible to assign adviser mode with variable $conf['allow_adviser'].</p>
-<p>If this variable is 'true', it's possible to define user like an adviser</p>
diff --git a/BSF/language/en_UK/help/web_service.html b/BSF/language/en_UK/help/web_service.html
deleted file mode 100644
index e106a35cb..000000000
--- a/BSF/language/en_UK/help/web_service.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<h2>Web Service Checker</h2>
-
-<p>This page let you define all parameters for your web service.</p>
-
-<dl>
-
- <dt>Environment setting</dt>
-
- <dd>If Web Service access control is active (Advanced configuration => $conf['ws_access_control'])
- you will see there all Advanced configuration related to Web Service.</dd>
-
- <dt>Confidential partner key (Mandatory)</dt>
-
- <dd>Unique key to share with your partner. Keep that one long enough (e.g. 8 characters).
- Keep it as complex enough (mixed figures, upper and lower case characters, special characters).
- For example: "P!e2r!k Le G@2l".
-
- <strong>Hidden to anyone in adviser mode.</strong>
-
- <dt>Target (Optional)</dt>
-
- <dd>Can be an image id list like that:<ul><li>
- list/277,275,142,235,178,190,204,236-238,253,268,276,285,41,73</li><li>
- a category id list as : cat/16,32,21</li><li>
- or a tag id list as: tag/22,61,36 </li></ul>
- all id list will be reduced to the min list as:<ul><li>
- list/41,73,142,178,190,204,<strong>235-238</strong>,253,268,<strong>275-277</strong>,285</li></ul>
- </dd>
-
- <dt>Restrict access (Optional)</dt>
-
- <dd>If you want to limit your partner to a specific request.</dd>
-
- <dt>Returned images limit </dt>
-
- <dd>Images limit count: to return to your partner for each request.</dd>
-
- <dt>Duration </dt>
-
- <dd>From now, set availability in days. If you postpone over the duration, the service would never be available.</dd>
-
- <dt>Comment </dt>
-
- <dd>Let you describe who's behind this Web Service, be clear enough.
- Don't forget that if someone is Admin and Adviser on your website. He can read this comment zone.</dd>
-
-</dl>
diff --git a/BSF/language/en_UK/index.php b/BSF/language/en_UK/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/language/en_UK/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/language/en_UK/install.lang.php b/BSF/language/en_UK/install.lang.php
deleted file mode 100644
index 5e67d9a33..000000000
--- a/BSF/language/en_UK/install.lang.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-$lang['install_message'] = 'Message';
-$lang['Initial_config'] = 'Basic configuration';
-$lang['Default_lang'] = 'Default gallery language';
-$lang['step1_title'] = 'Database configuration';
-$lang['step2_title'] = 'Admin configuration';
-$lang['Start_Install'] = 'Start Install';
-$lang['reg_err_mail_address'] = 'mail address must be like xxx@yyy.eee (example : jack@altern.org)';
-
-$lang['install_webmaster'] = 'Webmaster login';
-$lang['install_webmaster_info'] = 'It will be shown to the visitors. It is necessary for website administration';
-
-$lang['step1_confirmation'] = 'Parameters are correct';
-$lang['step1_err_db'] = 'Connection to server succeed, but it was impossible to connect to database';
-$lang['step1_err_server'] = 'Can\'t connect to server';
-$lang['step1_err_copy_2'] = 'The next step of the installation is now possible';
-$lang['step1_err_copy_next'] = 'next step';
-$lang['step1_err_copy'] = 'Copy the text in red between hyphens and paste it into the file "include/mysql.inc.php"(Warning : mysql.inc.php must only contain what is in blue, no line return or space character)';
-
-$lang['step1_host'] = 'MySQL host';
-$lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';
-$lang['step1_user'] = 'User';
-$lang['step1_user_info'] = 'user login given by your host provider';
-$lang['step1_pass'] = 'Password';
-$lang['step1_pass_info'] = 'user password given by your host provider';
-$lang['step1_database'] = 'Database name';
-$lang['step1_database_info'] = 'also given by your host provider';
-$lang['step1_prefix'] = 'Database table prefix';
-$lang['step1_prefix_info'] = 'database tables names will be prefixed with it (enables you to manage better your tables)';
-$lang['step2_err_login1'] = 'enter a login for webmaster';
-$lang['step2_err_login3'] = 'webmaster login can\'t contain characters \' or "';
-$lang['step2_err_pass'] = 'please enter your password again';
-$lang['install_end_title'] = 'Installation finished';
-$lang['step2_pwd'] = 'Webmaster password';
-$lang['step2_pwd_info'] = 'Keep it confidential, it enables you to access administration panel';
-$lang['step2_pwd_conf'] = 'Password [confirm]';
-$lang['step2_pwd_conf_info'] = 'verification';
-$lang['install_help'] = 'Need help ? Ask your question on <a href="%s">Piwigo message board</a>.';
-$lang['install_end_message'] = 'The configuration of Piwigo is finished, here is the next step<br /><br />
-For security reason, please delete file "install.php"<br />
-Once this file deleted , follow this instructions :
-<ul>
-<li>go to the identification page : [ <a href="identification.php">identification</a> ] and use the login/password given for webmaster</li>
-<li>this login will enable you to access to the administration panel and to the instructions in order to place pictures in your directories</li>
-</ul>';
-$lang['conf_mail_webmaster'] = 'Webmaster mail address';
-$lang['conf_mail_webmaster_info'] = 'Visitors will be able to contact site administrator with this mail';
-?> \ No newline at end of file
diff --git a/BSF/language/en_UK/iso.txt b/BSF/language/en_UK/iso.txt
deleted file mode 100644
index 043ea105e..000000000
--- a/BSF/language/en_UK/iso.txt
+++ /dev/null
@@ -1 +0,0 @@
-English [UK] \ No newline at end of file
diff --git a/BSF/language/es_ES/about.html b/BSF/language/es_ES/about.html
deleted file mode 100644
index 2725bd512..000000000
--- a/BSF/language/es_ES/about.html
+++ /dev/null
@@ -1,8 +0,0 @@
- <li>Piwigo es una aplicaciĂłn web que permite crear fĂĄcilmente una galerĂ­a de imĂĄgenes en lĂ­nea.</li>
-
- <li>TĂŠcnicamente, Piwigo es desarrollado en PHP con una base de datos MySQL.</li>
-
- <li>Si usted tiene sugerencias o comentarios, visita <a
- href="http://piwigo.org">sitio oficial</a>.</li>
-
- \ No newline at end of file
diff --git a/BSF/language/es_ES/admin.lang.php b/BSF/language/es_ES/admin.lang.php
deleted file mode 100644
index dec740529..000000000
--- a/BSF/language/es_ES/admin.lang.php
+++ /dev/null
@@ -1,655 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-$lang['%d association'] = '%d asociaciĂłn';
-$lang['%d associations'] = '%d asociaciones';
-$lang['cat_inclu_part1_S'] = '%d categorĂ­a entre las cuales ';
-$lang['cat_inclu_part1_P'] = '%d categorĂ­as entre las cuates ';
-$lang['cat_inclu_part2_S'] = '%d fĂ­sico';
-$lang['cat_inclu_part2_P'] = '%d fĂ­sicos';
-$lang['cat_inclu_part3_S'] = ' et %d virtual';
-$lang['cat_inclu_part3_P'] = ' et %d virtuales';
-$lang['%d category moved'] = '%d categorĂ­a trasladada';
-$lang['%d categories moved'] = '%d categorĂ­as trasladadas';
-$lang['%d group'] = '%d grupo';
-$lang['%d groups'] = '%d grupos';
-$lang['%d member'] = '%d miembro';
-$lang['%d members'] = '%d miembros';
-$lang['%d tag'] = '%d tag';
-$lang['%d tags'] = '%d tags';
-$lang['%d user comment rejected'] = '%d comentario de utilizador rechazado';
-$lang['%d user comments rejected'] = '%d comentarios de utilizadores rechazados';
-$lang['%d user comment validated'] = '%d comentario de utilizador validado';
-$lang['%d user comments validated'] = '%d comentarios de utilizadores validados';
-$lang['%d user deleted'] = '%d utilizador suprimido';
-$lang['%d users deleted'] = '%d utilizadores suprimidos';
-$lang['%d user'] = '%d utilizador';
-$lang['%d users'] = '%d utilizadores';
-$lang['%d waiting for validation'] = '%d en espera de validaciĂłn';
-$lang['%d waiting pictures rejected'] = '%d imĂĄgenes en espera rechazadas';
-$lang['%d waiting pictures validated'] = '%d imĂĄgenes en espera validadas';
-$lang['Actions'] = 'Acciones';
-$lang['Activate'] = 'Acelerar';
-$lang['Add/delete a permalink'] = 'AĂąadir / borrar un lazo permanente';
-$lang['Add a tag'] = 'AĂąadir un tag';
-$lang['Add a user'] = 'AĂąadir un utilizador';
-$lang['Add group'] = 'AĂąadir un grupo';
-$lang['Add selected elements to caddie'] = 'AĂąadir los elementos seleccionados a la cesta';
-$lang['Add'] = 'AĂąadir';
-$lang['Allow user registration'] = 'Permitir el registro de los utilizadores';
-$lang['Apply to subcategories'] = 'Aplicar a subcategorĂ­as';
-$lang['Are you sure?'] = 'Âż Seguro?';
-$lang['Associated'] = 'Asociada a';
-$lang['Association to categories'] = 'AsociaciĂłn a las categorĂ­as';
-$lang['Batch management'] = 'GestiĂłn por premio';
-$lang['Caddie management'] = 'GestiĂłn de la cesta';
-$lang['Caddie'] = 'Cesta';
-$lang['Categories authorized thanks to group associations'] = 'CategorĂ­as accesibles gracias a la pertenencia a los grupos';
-$lang['Categories manual order was saved'] = 'La orden manual de las categorĂ­as ha sido salvaguardada';
-$lang['Categories ordered alphanumerically'] = 'CategorĂ­as ordenadas alfabĂŠtico - numĂŠricamente';
-$lang['Category elements associated to the following categories: %s'] = 'Los elementos de la categorĂ­a han sido asociados con las categorĂ­as siguientes : %s';
-$lang['Check for upgrade failed for unknown reasons.'] = 'La comprobaciĂłn de la Ăşltima versiĂłn sobre el servidor fue suspendida por una razĂłn desconocida.';
-$lang['Check for upgrade'] = 'Última versión';
-$lang['Comments for all'] = 'Comentarios para todos';
-$lang['Controversy'] = 'Controversia';
-$lang['Current name'] = 'Nombre corriente';
-$lang['Database'] = 'Base de datos';
-$lang['Deactivate'] = 'Desactivar';
-$lang['Delete Representant'] = 'Suprimir al representante';
-$lang['Delete selected tags'] = 'Suprimir los tags seleccionados';
-$lang['Delete selected users'] = 'Suprimir los utilizadores seleccionados';
-$lang['Deletions'] = 'Supresiones';
-$lang['Deny selected groups'] = 'Prohibir el acceso a los grupos seleccionados';
-$lang['Deny selected users'] = 'Prohibirles el acceso a los utilizadores seleccionados';
-$lang['Description'] = 'DescripciĂłn';
-$lang['Display options'] = 'Opciones de fijaciĂłn';
-$lang['Dissociated'] = 'Separada de';
-$lang['Does not represent'] = 'No representes';
-$lang['Edit all picture informations'] = 'Modificar todas las informaciones atadas(vinculadas) a esta imagen';
-$lang['Edit selected tags'] = 'Editar los tags seleccionadas';
-$lang['Edit tags'] = 'Editar los tags';
-$lang['Elements'] = 'Elementos';
-$lang['Email administrators when a new user registers'] = 'Notificar a los administradores en el momento de la inscripciĂłn de un utilizador';
-$lang['Email administrators when a valid comment is entered'] = 'Notificar a los administradores cuando un comentario es registrado';
-$lang['Email administrators when a comment requires validation'] = 'Notificar a los administradores cuando un comentario requiere su validaciĂłn';
-$lang['Email administrators when a picture is uploaded'] = 'Notificar a los administradores cuando una imagen es cargada';
-$lang['Empty caddie'] = 'Vaciar la cesta';
-$lang['Environment'] = 'Medio ambiente';
-$lang['Form'] = 'Formulario';
-$lang['Gallery URL'] = 'URL de la galerĂ­a';
-$lang['Gallery description'] = 'DescripciĂłn de la galerĂ­a';
-$lang['Gallery title'] = 'TĂ­tulo de la galerĂ­a';
-$lang['Grant selected groups'] = 'Dar el acceso a los grupos seleccionados';
-$lang['Grant selected users'] = 'Darles el acceso a los utilizadores seleccionados';
-$lang['Group name'] = 'Nombre del grupo';
-$lang['Groups'] = 'Grupos';
-$lang['Guests'] = 'Invitados';
-$lang['History'] = 'histĂłrico';
-$lang['Informations'] = 'Informaciones';
-$lang['Install'] = 'Instalar';
-$lang['Link all category elements to a new category'] = 'Vincular todos los elementos de la categorĂ­a con una nueva categorĂ­a';
-$lang['Link all category elements to some existing categories'] = 'Vincular odos los elementos de la categorĂ­a existentes';
-$lang['Linked categories'] = 'CategorĂ­as asociadas';
-$lang['Lock gallery'] = 'Encerrar la galerĂ­a';
-$lang['Maintenance'] = 'Mantenimiento';
-$lang['Manage permissions for a category'] = 'Administrar las autorizaciones para una categorĂ­a';
-$lang['Manage permissions for group "%s"'] = 'Administrar las autorizaciones para el grupo "%s"';
-$lang['Manage permissions for user "%s"'] = 'Administrar las autorizaciones para el utilizador "%s"';
-$lang['Manage tags'] = 'Administrar los tags';
-$lang['Members'] = 'Miembros';
-$lang['Metadata synchronized from file'] = 'Meta-datos sincronizadas a partir del fichero';
-$lang['Move categories'] = 'Desplazar las categorĂ­as';
-$lang['Move'] = 'Desplazar';
-$lang['Name'] = 'Nombre';
-$lang['New name'] = 'Nuevo nombre';
-$lang['New parent category'] = 'Nueva categorĂ­a allegada';
-$lang['New tag'] = 'Nuevo tag';
-$lang['No tag defined. Use Administration>Pictures>Tags'] = 'Ninguna tag definida. Utilizar la pantalla Adminstration> ImĂĄgenes> tags';
-$lang['Number of comments per page'] = 'NĂşmero de comentarios por pĂĄgina';
-$lang['Number of rates'] = 'NĂşmero de notas';
-$lang['Number of thumbnails to create'] = 'NĂşmero de miniaturas que hay que crear';
-$lang['Only private categories are listed'] = 'SĂłlo las categorĂ­as particulares son puestas en una lista';
-$lang['Operating system'] = 'Systema de explotaciĂłn';
-$lang['Options'] = 'Opciones';
-$lang['Order alphanumerically'] = 'Ordenar alfabĂŠtico - numĂŠricamente';
-$lang['Other private categories'] = 'Otras categorĂ­as particulares';
-$lang['Page banner'] = 'Bandera de las pĂĄginas';
-$lang['Parent category'] = 'CategorĂ­a allegada';
-$lang['Path'] = 'Camino';
-$lang['Permalink'] = 'Lazo permanente';
-$lang['Permalink_%s_histo_used_by_%s'] = 'El lazo permanente %s ha sido utilizado anteriormente por la categorĂ­a %s. Por favor, bĂłrrelo de la reseĂąa histĂłrica de los lazos permanentes';
-$lang['Permalink_name_rule'] = 'El lazo permanente debe contener carĂĄcteres sĂłlo entre " Tiene - zA-Z0-9 ", "-" o "_". No debe ser numĂŠrico o comenzar con un nĂşmero seguido por "-"';
-$lang['Permalink %s is already used by category %s'] = 'El lazo permanente %s es ya utilizado por la categorĂ­a %s';
-$lang['Permalink history'] = 'ReseĂąa histĂłrica de los lazos permanentes';
-$lang['Permalinks'] = 'Lazos permanentes';
-$lang['Permission denied'] = 'Acceso prohibido';
-$lang['Permission granted thanks to a group'] = 'Acceso autorizado gracias a la pertenencia a los grupos';
-$lang['Permission granted'] = 'Acceso autorizado';
-$lang['Picture informations updated'] = 'Informaciones puestas al dĂ­a de la imagen';
-$lang['Plugins'] = 'Plugins';
-$lang['Position'] = 'PosiciĂłn';
-$lang['Preferences'] = 'Preferencias';
-$lang['Properties'] = 'Propiedades';
-$lang['Random picture'] = 'Al azar';
-$lang['Rate date'] = 'Data de notaciĂłn';
-$lang['Rating by guests'] = 'NotaciĂłn por los visitadores';
-$lang['Rating'] = 'NotaciĂłn';
-$lang['Reject All'] = 'Rechazar todo';
-$lang['Reject'] = 'Rechazar';
-$lang['Representant'] = 'Representante';
-$lang['Representation of categories'] = 'RepresentaciĂłn de las categorĂ­as';
-$lang['Representative'] = 'Representante';
-$lang['Represents'] = 'Representa';
-$lang['Save order'] = 'Salvaguardar la orden';
-$lang['Save to permalink history'] = 'Salvaguardar en la reseĂąa histĂłrica de los lazos permanentes';
-$lang['Select at least one category'] = 'Seleccionar por lo menos una categorĂ­a';
-$lang['Select at least one picture'] = 'Seleccionar por lo menos una imagen';
-$lang['Select at least one user'] = 'Seleccionar por lo menos a un utilizador';
-$lang['Show info'] = 'Mostrar las informaciones';
-$lang['Site manager'] = 'Gerente de los sitios';
-$lang['Status'] = 'Estatuto';
-$lang['Statistics'] = 'EstadĂ­sticas';
-$lang['Storage category'] = 'CategorĂ­a de almacenamiento';
-$lang['Sum of rates'] = 'Suma notas';
-$lang['Tag "%s" already exists'] = 'El tag "%s" ya existe';
-$lang['Tag "%s" was added'] = 'El tag "%s" ha sido aĂąadida';
-$lang['Tag selection'] = 'SelecciĂłn de tags';
-$lang['Take selected elements out of caddie'] = 'Sacar los elementos seleccionados de la cesta';
-$lang['The %d following tag were deleted'] = 'El tag siguiente ha sido suprimido';
-$lang['The %d following tags were deleted'] = 'Los %d tags siguientes han sido suprimidos';
-$lang['Unable to check for upgrade since allow_url_fopen is disabled.'] = 'Imposible conocer la Ăşltima versiĂłn cat la funciĂłn allow_url_fopen es desactivada.';
-$lang['Uninstall'] = 'Desinstalar';
-$lang['Use default sort order']='Utilizar la orden de selecciĂłn de las imĂĄgenes por defecto (definido en el fichero de configuraciĂłn)';
-$lang['User comments validation'] = 'ValidaciĂłn de los comentarios de utilizadores';
-$lang['Users'] = 'Utilizadores';
-$lang['Validate All'] = 'Validar todo';
-$lang['Validate'] = 'Validar';
-$lang['Validation'] = 'ValidaciĂłn';
-$lang['Version'] = 'VersiĂłn';
-$lang['Virtual categories movement'] = 'Desplazamiento de categorĂ­as virtuales';
-$lang['Virtual categories to move'] = 'CategorĂ­as virtuales que hay que desplazar';
-$lang['Virtual category name'] = 'Nombre de la categorĂ­a virtual';
-$lang['Webmaster cannot be deleted'] = 'El webmestre no puede ser suprimido';
-$lang['You are running on development sources, no check possible.'] = 'Usted trabaja con las fuentes de desarrollo, imposible verificar la Ăşltima versiĂłn.';
-$lang['You cannot delete your account'] = "Usted no puede suprimir su cuenta";
-$lang['You cannot move a category in its own sub category'] = 'Usted no puede desplazar una categorĂ­a en su propia subcategorĂ­a';
-$lang['You need to confirm deletion'] = 'Usted debe confirmar la supresiĂłn';
-$lang['add tags'] = 'AĂąadir los tags';
-$lang['adviser'] = 'Consejero';
-$lang['associate to category'] = 'asociar con la categorĂ­a';
-$lang['associate to group'] = 'asociar con grupo';
-$lang['authorized'] = 'Autorizados';
-$lang['cat_add'] = 'AĂąadir una categorĂ­a virtual';
-$lang['cat_comments_title'] = 'Autorizar a los utilizadores a aĂąadir comentarios en las categorĂ­as seleccionadas';
-$lang['cat_error_name'] = 'El nombre de la categorĂ­a no debe estar vacĂ­o';
-$lang['cat_lock_title'] = 'Encerrar las categorĂ­as';
-$lang['cat_private'] = 'CategorĂ­a particular';
-$lang['cat_public'] = 'CategorĂ­a pĂşblica';
-$lang['cat_representant'] = 'Encontrar a un nuevo representante al azar';
-$lang['cat_security'] = 'PĂşblica / Particular';
-$lang['cat_status_title'] = 'Administrar el tipo de acceso para las categorĂ­as seleccionadas';
-$lang['cat_upload_title'] = 'Seleccionar las categorĂ­as autorizadas al aĂąadido';
-$lang['cat_virtual_added'] = 'CategorĂ­a virtual aĂąadida';
-$lang['cat_virtual_deleted'] = 'CategorĂ­a virtual suprimida';
-$lang['category'] = 'CategorĂ­a';
-$lang['conf_access'] = 'Tipo de acceso';
-$lang['conf_comments_title'] = 'Comentarios';
-$lang['conf_confirmation'] = 'Informaciones registradas en la base de datos';
-$lang['conf_display'] = 'FijaciĂłn por defecto';
-$lang['conf_history_title'] = 'ReseĂąa histĂłrica';
-$lang['conf_gallery_url_error'] = 'La direcciĂłn de la galerĂ­a no es vĂĄlida.';
-$lang['conf_main_title'] = 'Directora de colegio';
-$lang['conf_nb_comment_page_error'] = 'El nĂşmero de comentarios de utilizadores por pĂĄgina debe ser comprendido entre 5 y 50.';
-$lang['config'] = 'ConfiguraciĂłn';
-$lang['confirm'] = 'Confirmar';
-$lang['Date'] = 'Fecha';
-$lang['delete category'] = 'Suprimir la categorĂ­a';
-$lang['description'] = 'DescripciĂłn';
-$lang['dissociate from category'] = 'Disociar la categorĂ­a';
-$lang['dissociate from group'] = 'Disociar el grupo';
-$lang['edit category permissions'] = 'Modificar los permisos de la categorĂ­a';
-$lang['editcat_confirm'] = 'Las informaciones de la categorĂ­a han sido puestas al dĂ­a con ĂŠxito.';
-$lang['editcat_uploadable'] = 'Autorizar el aĂąadido de imĂĄgenes';
-$lang['elements per page'] = 'Elementos por pĂĄgina';
-$lang['elements'] = 'Elementos';
-$lang['enabled_high'] = 'Alta definiciĂłn activo';
-$lang['file'] = 'Fichero';
-$lang['filesize'] = 'Peso';
-$lang['first element added on %s'] = 'el primer elemento aĂąadido %s';
-$lang['forbidden'] = 'entredicho';
-$lang['conf_general'] = 'Ensayo general';
-$lang['global mode'] = 'modo global';
-$lang['group "%s" added'] = 'grupo "%s" aĂąadido';
-$lang['group "%s" deleted'] = 'grupo "%s" suprimido';
-$lang['group "%s" updated'] = 'grupo "%s" puestos al dĂ­a';
-$lang['group'] = 'grupo';
-$lang['group_add_error1'] = 'El nombre del grupo no debe contener "or \' y no debe estar vacĂ­o.';
-$lang['group_add_error2'] = 'Este nombre es ya utilizado por otro grupo.';
-$lang['groups'] = 'Grupos';
-$lang['instructions'] = 'Instrucciones';
-$lang['is_high_disabled'] = '';
-$lang['is_high_enabled'] = 'Alta definiciĂłn';
-$lang['jump to category'] = 'Ir en la categorĂ­a';
-$lang['jump to image'] = 'Ir a la imagen';
-$lang['leave'] = 'dejar';
-$lang['lock'] = 'Encerrar';
-$lang['locked'] = 'Encerrado';
-$lang['manage category elements'] = 'administrar los elementos de la categorĂ­a';
-$lang['manage sub-categories'] = 'administrar las subcategorĂ­as';
-$lang['manage'] = 'Administrar';
-$lang['maximum height'] = 'Altura mĂĄxima';
-$lang['maximum width'] = 'Anchura mĂĄxima';
-$lang['name'] = 'nombre';
-$lang['nbm_background_treatment_redirect_second'] = 'Ser sobrepasado el tiempo de ejecuciĂłn, el tratamiento debe continuar [el Tiempo estimado: %d el segundo].';
-$lang['nbm_background_treatment_redirect_seconds'] = 'Ser sobrepasado el tiempo de ejecuciĂłn, el tratamiento debe continuar [el Tiempo estimado: %d secundas].';
-$lang['nbm_break_timeout_list_user'] = 'El tiempo de preparaciĂłn de la lista de los utilizadores para el envĂ­o es limitado. Otros utilizadores no son puestos en una lista.';
-$lang['nbm_break_timeout_send_mail'] = 'El tiempo de envĂ­o del mails es limitado. Otros envĂ­os de mail han sido ignorados.';
-$lang['nbm_col_check_user_send_mail'] = 'Âż Enviar?';
-$lang['nbm_col_last_send'] = 'Último envío';
-$lang['nbm_col_mail'] = 'e-mail';
-$lang['nbm_col_user'] = 'Utilizador';
-$lang['nbm_complementary_mail_content'] = 'Contenido complementario en el mail';
-$lang['nbm_content_byebye'] = 'Hasta pronto,';
-$lang['nbm_content_goto_1'] = 'Cita sobre ';
-$lang['nbm_content_goto_2'] = '.';
-$lang['nbm_content_hello_1'] = 'Buenos dĂ­as ';
-$lang['nbm_content_hello_2'] = ',';
-$lang['nbm_content_new_elements'] = 'Los nuevos elementos han sido aĂąadidos ';
-$lang['nbm_content_new_elements_single'] = ' el ';
-$lang['nbm_content_new_elements_between_1'] = 'entre ĂŠl ';
-$lang['nbm_content_new_elements_between_2'] = ' y ĂŠl ';
-$lang['nbm_content_subscribe_by_admin'] = 'Usted acaba de ser inscrito por el webmaster del sitio para recibir la notificaciĂłn por mail.';
-$lang['nbm_content_subscribe_by_himself'] = 'Usted acaba de inscribirse para recibir la notificaciĂłn por mail.';
-$lang['nbm_content_subscribe_link'] = 'Para inscribirse';
-$lang['nbm_content_problem_contact'] = 'En caso de problemas o en caso de cuestiones, enviar un mail a ';
-$lang['nbm_content_pb_contact_object'] = '[NBM] Problemas o de cuestiones';
-$lang['nbm_content_unsubscribe_by_admin'] = 'Usted acaba de ser dĂŠsinscrit por el webmaster del sitio para recibir la notificaciĂłn por mail.';
-$lang['nbm_content_unsubscribe_by_himself'] = 'Usted viene de usted dĂŠsinscrire para recibir la notificaciĂłn por mail.';
-$lang['nbm_content_click_on'] = ', Haga clic sobre ';
-$lang['nbm_content_unsubscribe_link'] = 'Para usted desinscribirse';
-$lang['nbm_info_send_mail_as'] = 'Sin valor, el tĂ­tulo de la galerĂ­a serĂĄ utilizado';
-$lang['nbm_item_notification'] = 'NotificaciĂłn';
-$lang['nbm_msg_error_sending_email_to'] = 'Error en el momento del envĂ­o del mail a %s [%s].';
-$lang['nbm_msg_mail_sent_to'] = 'Mail enviado a %s [%s].';
-$lang['nbm_msg_n_mail_sent'] = '%s mail ha sido enviado.';
-$lang['nbm_msg_n_mails_sent'] = '%s mails han sido enviados.';
-$lang['nbm_msg_n_mail_not_send'] = '%s mail no ha sido enviado.';
-$lang['nbm_msg_n_mails_not_send'] = '%s mails no han sido enviados.';
-$lang['nbm_no_mail_to_send'] = 'No de mail a enviar.';
-$lang['nbm_no_user_available_to_send_L1'] = 'No hay utilizador que notifica por mail.';
-$lang['nbm_no_user_available_to_send_L2'] = 'Un utilizador tiene que notificar si los nuevos elementos estĂĄn disponibles para este utilizador.';
-$lang['nbm_no_user_available_to_send_L3'] = 'Puede asĂ­ como ĂŠl no tengo allĂ­ ningĂşn utilizador inscrito (sĂłlo el webmaster tiene acceso a este inglete).';
-$lang['nbm_no_user_to send_notifications_by_mail'] = 'NingĂşn utilizador para enviar notificaciones por mails.';
-$lang['nbm_object_news'] = 'Nuevos elementos aĂąadidos';
-$lang['nbm_object_subscribe'] = 'InscripciĂłn a la notificaciĂłn por mail';
-$lang['nbm_object_unsubscribe'] = 'DĂŠsinscription a la notificaciĂłn por mail';
-$lang['nbm_param_mode'] = 'Parametraje';
-$lang['nbm_redirect_msg'] = 'Tratamiento corriente.'."\n".'Por favor, espere...';
-$lang['nbm_repost_submit'] = 'Continuar el tratamiento corriente...';
-$lang['nbm_send_complementary_mail_content'] = 'Contenido complementario del mail';
-$lang['nbm_send_detailed_content'] = 'AĂąadido de un contenido detallado';
-$lang['nbm_send_mail_as'] = 'Enviar el mail como';
-$lang['nbm_send_mail_to_users'] = 'EnvĂ­o de mail a los utilizadores';
-$lang['nbm_send_mode'] = 'EnvĂ­o';
-$lang['nbm_send_options'] = 'Opciones';
-$lang['nbm_send_submit'] = 'Enviar';
-$lang['nbm_subscribe_col'] = 'Inscritos';
-$lang['nbm_subscribe_mode'] = 'InscripciĂłn';
-$lang['nbm_title_param'] = 'ParĂĄmetros';
-$lang['nbm_title_send'] = 'SelecciĂłn de los envĂ­os';
-$lang['nbm_title_subscribe'] = 'Inscribir / desinscribir a los utilizadores';
-$lang['nbm_unsubscribe_col'] = 'Inscritos';
-$lang['nbm_updated_param_count'] = '%d parĂĄmetro ha sido puesto al dĂ­a.';
-$lang['nbm_updated_params_count'] = '%d parĂĄmetros han sido puestos al dĂ­a.';
-$lang['nbm_user_change_enabled_error_on_updated_data_count'] = '%d utilizador no ha sido puesto al dĂ­a.';
-$lang['nbm_users_change_enabled_error_on_updated_data_count'] = '%d Utilizadores no han sido puestos al dĂ­a.';
-$lang['nbm_user_change_enabled_false'] = 'El utilizador %s [%s] ha sido suprimido por la lista de los inscritos.';
-$lang['nbm_user_change_enabled_true'] = 'El utilizador %s [%s] ha sido aĂąadido a la lista de los inscritos.';
-$lang['nbm_user_change_enabled_updated_data_count'] = '%d utilizador ha sido puesto al dĂ­a.';
-$lang['nbm_users_change_enabled_updated_data_count'] = '%d utilizadores han sido puestos al dĂ­a.';
-$lang['nbm_user_not_change_enabled_false'] = 'El utilizador %s [%s] no ha sido suprimido por la lista de los inscritos.';
-$lang['nbm_user_not_change_enabled_true'] = 'El utilizador %s [%s] no ha sido aĂąadido a la lista de los inscritos.';
-$lang['nbm_user_x_added'] = 'Utilizador %s [%s] aĂąadido.';
-$lang['nbm_warning_subscribe_unsubscribe'] = 'Cuidado, la inscripciĂłn o anaulaciĂłn de inscripciĂłn lleve del envĂ­o de mails a los utilizadores concernidos';
-$lang['nbm_send_html_mail'] = 'Enviar el mail al tamaĂąo HTML';
-$lang['nbm_send_recent_post_dates'] = 'Incluir la fijaciĂłn de las Ăşltimas imĂĄgenes agrupadas por fechas';
-$lang['nbm_info_send_recent_post_dates'] = 'Disponible Ăşnicamente con tamaĂąo HTML';
-$lang['no_write_access'] = 'ningĂşn acceso en escritura';
-$lang['path'] = 'camino';
-$lang['permissions'] = 'Permisos';
-$lang['private'] = 'intimidad';
-$lang['properties'] = 'Propiedades';
-$lang['public'] = 'pĂşblico';
-$lang['purge history'] = 'purgar la reseĂąa histĂłrica';
-$lang['purge never used notification feeds'] = 'Purgar los flujos jamĂĄs utilizados de notificaciĂłn';
-$lang['purge sessions'] = 'Purgar las sesiones';
-$lang['randomly represented'] = 'Representando al azar';
-$lang['registration_date'] = 'Data de registro';
-$lang['remote_site'] = 'Sitio distante';
-$lang['remote_site_clean'] = 'limpiar';
-$lang['remote_site_clean_hint'] = 'Suprimir el fichero listing.xml distante';
-$lang['remote_site_generate'] = 'generar el listado';
-$lang['remote_site_generate_hint'] = 'generar el fichero listing.xml sobre el sitio distante';
-$lang['remote_site_local_create'] = 'Crear este sitio';
-$lang['remote_site_local_found'] = 'Un fichero listing.xml local ha sido encontrado para ';
-$lang['remote_site_local_update'] = 'Leer el listing.xml local y poner al dĂ­a';
-$lang['remote_site_test'] = 'testar';
-$lang['remote_site_test_hint'] = 'testar este sitio distante';
-$lang['remote_site_uncorrect_url'] = 'EL URL del sitio distante debe comenzar por "http " o "https" y debe contener carĂĄcteres sĂłlo entre "/", " a- zA-Z0-9 ", "-" o "_"';
-$lang['remove tags'] = 'suprimir los tags';
-$lang['repair and optimize database'] = 'Reparar y optimizar la base de datos';
-$lang['selection'] = 'SelecciĂłn';
-$lang['set to'] = 'Cambiarlo';
-$lang['singly represented'] = 'representante fijo';
-$lang['site_already_exists'] = 'Este sitio ya existe';
-$lang['site_create'] = 'Crear un nuevo sitio distante: (dar su URL hacia create_listing_file.php)';
-$lang['site_created'] = 'Creado';
-$lang['site_delete'] = 'suprimir';
-$lang['site_delete_hint'] = 'suprimir este sitio y todas las informaciones asociadas';
-$lang['site_deleted'] = 'suprimido';
-$lang['site_err'] = 'Un error sobrevino';
-$lang['site_err_remote_file_not_found'] = 'el fichero create_listing_file.php es imposible de encontrar sobre el sitio distante';
-$lang['site_local'] = 'Local';
-$lang['site_remote'] = 'Distante';
-$lang['site_synchronize'] = 'Sincronizar';
-$lang['site_synchronize_hint'] = 'pone al dĂ­a la base de datos a partir de los ficheros';
-$lang['status'] = 'Estatuto';
-$lang['storage'] = 'Repertorio';
-$lang['sub-categories'] = 'subcategorĂ­as';
-$lang['synchronize metadata'] = 'Sincronizar los mĂŠta-datos';
-$lang['synchronize'] = 'sincronizar';
-$lang['target'] = 'blanco';
-$lang['thumbnail'] = 'miniatura';
-$lang['title'] = 'tĂ­tulo';
-$lang['title_categories'] = 'GestiĂłn de las categorĂ­as';
-$lang['title_configuration'] = 'ConfiguraciĂłn de Piwigo';
-$lang['title_default'] = 'AdministraciĂłn de Piwigo';
-$lang['title_edit_cat'] = 'Modificar una categorĂ­a';
-$lang['title_groups'] = 'GestiĂłn de los grupos';
-$lang['title_liste_users'] = 'Lista utilizadores';
-$lang['title_picmod'] = 'Modificar las informaciones de una imagen';
-$lang['title_thumbnails'] = 'CreaciĂłn de las miniaturas';
-$lang['title_update'] = 'SincronizaciĂłn de la base de datos a partir de los ficheros';
-$lang['title_upload'] = 'ImĂĄgenes en espera de validaciĂłn';
-$lang['tn_all'] = 'todo';
-$lang['tn_alone_title'] = 'imagen sin miniatura (jpeg y png Ăşnicamente)';
-$lang['tn_err_height'] = 'La altura debe un entero superior a';
-$lang['tn_err_width'] = 'La anchura debe ser un entero superior a';
-$lang['tn_format'] = 'para el tamaĂąo de fichero';
-$lang['tn_no_missing'] = 'Ninguna miniatura falta';
-$lang['tn_no_support'] = 'Imagen inaccesible o no sostenida';
-$lang['tn_params_GD'] = 'versiĂłn de GD';
-$lang['tn_params_title'] = 'ParĂĄmetro de miniaturizaciĂłn';
-$lang['tn_results_gen_time'] = 'generada de allĂ­';
-$lang['tn_results_title'] = 'Los resultados de la miniaturizaciĂłn';
-$lang['tn_stats'] = 'EstadĂ­sticas generales';
-$lang['tn_stats_max'] = 'El tiempo mĂĄximo';
-$lang['tn_stats_mean'] = 'El tiempo medio';
-$lang['tn_stats_min'] = 'El tiempo mĂ­nimo';
-$lang['tn_stats_nb'] = 'nĂşmero de miniaturas creadas';
-$lang['tn_stats_total'] = 'el tiempo total';
-$lang['tn_thisformat'] = 'para este tamaĂąo de fichero';
-$lang['unit mode'] = 'modo unitario';
-$lang['unlocked'] = 'quitada el cierre';
-$lang['unset'] = 'Vaciar';
-$lang['up'] = 'Desplazar hacia arriba';
-$lang['update categories informations'] = 'Poner al dĂ­a las informaciones de las categorĂ­as';
-$lang['update images informations'] = 'Poner al dĂ­a las informaciones de las imĂĄgenes';
-$lang['update'] = 'Sincronizar';
-$lang['update_cats_subset'] = 'Únicamente tratar una categoría';
-$lang['update_default_title'] = 'Escoger una opciĂłn';
-$lang['update_display_info'] = 'Fijar un mĂĄximo de informaciones (categorĂ­as aĂąadidas, elementos aĂąadidos, categorĂ­as y elementos suprimidos)';
-$lang['update_err_pwg_version_differs'] = 'La versiĂłn Piwigo sobre el sitio distante es diferente';
-$lang['update_err_pwg_version_differs_info'] = 'La versiĂłn de create_listing_file.php sobre la sitio distante y Piwigo debe ser lo mismo';
-$lang['update_err_remote_listing_not_found'] = 'El fichero listing.xml es imposible de encontrar';
-$lang['update_err_remote_listing_not_found_info'] = 'el fichero listing.xml es imposible de encontrar sobre el sitio distante. Este fichero estĂĄ generado escogiendo el encargo " generar el listado " en el gerente de sitios';
-$lang['update_error_list_title'] = 'Lista errores';
-$lang['update_errors_caption'] = 'Leyenda de los errores';
-$lang['update_infos_title'] = 'Informaciones detalladas';
-$lang['update_missing_file_or_dir'] = 'Error de abertura fichero / repertorio';
-$lang['update_missing_file_or_dir_info'] = 'El fichero o el repertorio no puede ser accesible (o sea no existe, o sea el acceso es negado)';
-$lang['update_missing_tn_info'] = 'Cada fichero lleno de imĂĄgenes requiere una miniatura. La miniatura debe estar presente en el subdirectorio " thumbnail " del repertorio de la categorĂ­a. El nombre del fichero de la miniatura debe comenzar con parĂĄmetro de configuraciĂłn "prefix_thumbnail" y la extensiĂłn del nombre del fichero debe estar entre la lista siguiente:';
-$lang['update_missing_tn_short'] = 'falta la miniatura ';
-$lang['update_nb_del_categories'] = 'categorĂ­as suprimidas de la base de datos';
-$lang['update_nb_del_elements'] = 'Elementos suprimidos de la base de datos';
-$lang['update_nb_elements_metadata_available'] = 'Llena de imĂĄgenes a candidatas a la sincronizaciĂłn con los mĂŠta-datos';
-$lang['update_nb_elements_metadata_sync'] = 'Informaciones de las imĂĄgenes sincronizadas con los mĂŠta-datos';
-$lang['update_nb_errors'] = 'errores sobrevenidos durante la sincronizaciĂłn';
-$lang['update_nb_new_categories'] = 'categorĂ­as aĂąadidas a la base de datos';
-$lang['update_nb_new_elements'] = 'elementos aĂąadidos a la base de datos';
-$lang['update_nb_upd_elements'] = 'elementos puestos al dĂ­a en la base de datos';
-$lang['update_part_research'] = 'Buscar las nuevas imĂĄgenes en los repertorios';
-$lang['update_research_added'] = 'aĂąadido';
-$lang['update_research_deleted'] = 'suprimido';
-$lang['update_result_metadata'] = 'El resultado de la sincronizaciĂłn de los mĂŠta-datos';
-$lang['update_simulate'] = 'Únicamente simular (ningún cambio en la base de datos será efectuado)';
-$lang['update_simulation_title'] = '[Simulation]';
-$lang['update_sync_all'] = 'repertorios + ficheros';
-$lang['update_sync_dirs'] = 'repertorios Ăşnicamente';
-$lang['update_sync_files'] = 'sincronizar la estructura de los ficheros con la base de datos';
-$lang['update_sync_metadata'] = 'sincronizar las informaciones de los elementos en la base de datos a partir de los mĂŠta-datos de los ficheros';
-$lang['update_sync_metadata_all'] = 'hasta los elementos ya sincronizados';
-$lang['update_sync_metadata_new'] = 'unicamente los elementos jamĂĄs sincronizados';
-$lang['update_used_metadata'] = 'MĂŠta-datos empleadas';
-$lang['update_wrong_dirname_info'] = 'El nombre de los repertorios y de los ficheros debe estar constituido sĂłlo por letras, por cifras, de "-", "_" y "."';
-$lang['update_wrong_dirname_short'] = 'nombre de fichero errĂłneo';
-$lang['upload'] = 'AĂąadido';
-$lang['user "%s" added'] = 'utilizador "%s" aĂąadido';
-$lang['user_status'] = 'Estatuto del utilizador';
-$lang['user_status_admin'] = 'Administrador';
-$lang['user_status_generic'] = 'GenĂŠrico';
-$lang['user_status_guest'] = 'Invitado';
-$lang['user_status_normal'] = 'Visitador';
-$lang['user_status_webmaster'] = 'Webmestre';
-$lang['username'] = 'nombre utilizador';
-$lang['users'] = 'Utilizadores';
-$lang['virtual_category'] = 'CategorĂ­a virtual';
-$lang['waiting'] = 'En espera';
-$lang['is_default_group'] = 'por defecto';
-$lang['toggle_is_default_group'] = 'Invertir la propiedad \'grupo por defecto\'';
-$lang['Advanced_features'] = 'Funciones avanzadas';
-$lang['Elements_not_linked'] = 'Elementos no atados';
-$lang['web_services'] = 'Servicios Web ';
-$lang['title_wscheck'] = ' GestiĂłn de los accesos ';
-$lang['ws_failed_upd'] = ' -> <strong>OperaciĂłn no realizada</strong> ';
-$lang['ws_success_upd'] = ' -> AcciĂłn realizada correctamente ';
-$lang['ws_adding_legend'] = ' AĂąadido de un acceso compaĂąero a los Servicios Web ';
-$lang['ws_update_legend'] = ' Suprimir / Modificar el acceso del compaĂąero seleccionado ';
-$lang['ws_delete_legend'] = ' Suprimir definitivamente el acceso del compaĂąero seleccionado ';
-$lang['ws_Methods'] = ' MĂŠtodos ';
-$lang['ws_KeyName'] = ' CompaĂąero ';
-$lang['ws_Access'] = ' Accesso ';
-$lang['ws_Start'] = ' Principio ';
-$lang['ws_End'] = ' Fin ';
-$lang['ws_Request'] = 'Demanda';
-$lang['ws_Limit'] = ' LĂ­mite ';
-$lang['ws_Comment'] = ' Comentario ';
-$lang['Modify End from Now +'] = 'Modificar el Fin por este instante + ';
-$lang['Delete'] = ' Retirada ';
-$lang['Confidential partner key'] = 'Llave confidencial';
-$lang['Basis of access key calculation'] = 'Base de cĂĄlculo de la llave';
-$lang['Target'] = 'Blanco';
-$lang['Access: see help text for more'] = 'Acceso : ver la ayuda en lĂ­nea';
-$lang['Facultative and restrictive option'] = 'OpciĂłn facultativa y restrictiva';
-$lang['Postponed availability in days'] = 'Saldo de disponibilidad en dĂ­as';
-$lang['Duration in days'] = 'Durada en dĂ­as';
-$lang['Restrict access to'] = 'Acceso restringindo a';
-$lang['Returned images limit'] = 'LĂ­mite de transmision';
-$lang['Comment to identify your partner clearly'] = 'Comentario que le permite identificar a su compaĂąero fĂĄcilmente';
-$lang['Add this access definition']= 'AĂąadir esta definiciĂłn de acceso';
-$lang['Web Services availability duration in days'] = 'DuraciĂłn de abertura de los Servicios Web en dĂ­as';
-$lang['Web Services under control'] = 'Los Servicios Web de Piwigo totalmente son operativos y todas las demandas son controladas.';
-$lang['special_admin_menu'] = 'Clases de matemĂĄticas superiores';
-$lang['note_check_exif'] = '%s debe ser puesto a "false" en su fichero config_local.inc.php porque el extejo no es sostenido.';
-$lang['note_check_more_info'] = 'Vaya sobre %s or %s para mĂĄs informaciones.';
-$lang['note_check_more_info_forum'] = 'el foro';
-$lang['note_check_more_info_wiki'] = 'el wiki';
-$lang['Duplicates'] = 'Ficheros que llevan el mismo nombre en varias categorĂ­as fĂ­sicas';
-
-$lang['Export data'] = 'Exportar los datos';
-$lang['Overall'] = 'Vista global';
-$lang['Year'] = 'AĂąo';
-$lang['Month'] = 'Mes';
-$lang['Day'] = 'DĂ­a';
-$lang['Pages seen'] = 'PĂĄginas vistas';
-$lang['Pictures'] = 'ImĂĄgenes';
-$lang['time'] = 'Hora';
-$lang['user'] = 'utilizador';
-$lang['IP'] = 'IP';
-$lang['image'] = 'ImĂĄgenes';
-$lang['section'] = 'secciĂłn';
-$lang['tags'] = 'tags';
-$lang['conf_history_guest'] = 'Registrar las pĂĄginas visitadas por los invitados';
-$lang['conf_history_user'] = 'Registrar las pĂĄginas visitadas por los utilizadores';
-$lang['conf_history_admin'] = 'Registrar las pĂĄginas visitadas por los administradores';
-$lang['cat_options_title'] = 'Propiedades';
-$lang['An information email was sent to group "%s"'] = 'Un mail de informaciones ha sido enviado a los miembros del grupo';
-$lang['Send an information email to group members'] = 'Enviarles un mail de informaciones a los miembros de un grupo';
-$lang['Group'] = 'Groupe';
-$lang['[%s] Come to visit the category %s'] = '[%s] Venga para visitar la categorĂ­a %s';
-$lang['Hello,'] = 'Buenos dĂ­as,';
-$lang['See you soon.'] = 'Hasta pronto.';
-$lang['Come to discover the category:'] = 'Venga para descubrir la categorĂ­a:';
-$lang['mail_content'] = 'Contenido del mail';
-$lang['none'] = 'Ninguno';
-$lang['high'] = 'alto';
-$lang['other'] = 'Otro';
-$lang['Element type'] = "Tipo de elemento";
-$lang['User'] = 'Utilizador';
-$lang['Image id'] = 'Identificando imagen';
-$lang['Summary'] = 'Resumen';
-$lang['%d line filtered'] = '%d lĂ­nea filtrada';
-$lang['%d lines filtered'] = '%d LĂ­neas filtradas';
-$lang['%d guest'] = '%d invitado';
-$lang['%d guests'] = '%d Invitados';
-$lang['Hour'] = 'Hora';
-$lang['is_the_guest'] = 'Invitado';
-$lang['is_the_default'] = 'valores por defecto';
-$lang['High filesize'] = 'Talla del fichero HR';
-// --------- Starting below: New or revised $lang ---- from version 1.7.1
-$lang['Guest cannot be deleted'] = 'No se puede suprimir el invitado';
-$lang['Default user cannot be deleted'] = 'No se puede suprimie al usuario por defecto';
-$lang['purge history detail'] = 'Vaciar el histĂłrico';
-$lang['purge history summary'] = 'Vaciar el sumario del histĂłrico';
-$lang['c13y_title'] = 'Control de integridad';
-$lang['c13y_Anomaly'] = 'AnomalĂ­a';
-$lang['c13y_Correction'] = 'CorrecciĂłn';
-$lang['c13y_Automatic_correction'] = 'CorrecciĂłn automĂĄtica';
-$lang['c13y_Impossible_automatic_correction'] = 'CorrecciĂłn automĂĄtica imposible';
-$lang['c13y_Correction_applied_success'] = 'CorrecciĂłn lograda';
-$lang['c13y_Correction_applied_error'] = 'CorrecciĂłn erronea';
-$lang['c13y_anomaly_count'] = '%d anomalĂ­a ha sido detectada.';
-$lang['c13y_anomalies_count'] = '%d anomalĂ­as han sido detectadas.';
-$lang['c13y_anomaly_corrected_count'] = '%d anomalĂ­a ha sido corregida.';
-$lang['c13y_anomalies_corrected_count'] = '%d anomalĂ­as han sido corregidas.';
-$lang['c13y_anomaly_not_corrected_count'] = '%d anomalĂ­a no pudo ser corregida.';
-$lang['c13y_anomalies_not_corrected_count'] = '%d anomalĂ­as no pudieron ser corregidas.';
-$lang['c13y_more_info'] = 'Vaya sobre %s o %s para mĂĄs informaciones';
-$lang['c13y_more_info_forum'] = 'El foro';
-$lang['c13y_more_info_wiki'] = 'El wiki';
-$lang['c13y_exif_anomaly'] = 'El valor de %s no es correcto porque el extejo no es sostenido';
-$lang['c13y_exif_correction'] = '%s debe ser puesto a "false" en su fichero config_local.inc.php';
-$lang['c13y_guest_non_existent'] = 'El utilizador "invitado" principal no existe mĂĄs';
-$lang['c13y_bad_guest_status'] = 'El estatuto del utilizador "invitado" principal es incorrecto';
-$lang['c13y_default_non_existent'] = 'El utilizador por defecto no existe mĂĄs';
-$lang['c13y_webmaster_non_existent'] = 'El utilizador " webmestre " principal no existe mĂĄs';
-$lang['c13y_bad_webmaster_status'] = 'El estatuto del utilizador " webmestre " principal es incorrecto';
-$lang['c13y_user_created'] = 'Utilizador "%s" creado con como palabra de paso "%s"';
-$lang['c13y_user_status_updated'] = 'Estatuto del utilizador "%s" puesto al dĂ­a';
-$lang['add new elements to caddie'] = 'aĂąadir los nuevos elementos a la cesta';
-// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
-$lang['no_display_thumbnail'] = 'Ninguna fijaciĂłn';
-$lang['display_thumbnail_classic'] = 'FijaciĂłn clĂĄsica';
-$lang['display_thumbnail_hoverbox'] = 'FijaciĂłn en el momento del sobrevuelo';
-$lang['Thumbnails'] = 'Miniaturas';
-$lang['obligatory_user_mail_address'] = 'La direcciĂłn mail es obligatoria para todos los utilizadores';
-$lang['Minimum privacy level'] = 'Nivel mĂ­nimo de carĂĄcter confidencial';
-$lang['Privacy level'] = 'Nivel de carĂĄcter confidencial';
-$lang['Level 0'] = '---';
-$lang['Level 1'] = 'Contactos';
-$lang['Level 2'] = 'Amigos';
-$lang['Level 4'] = 'Familia';
-$lang['Level 8'] = 'Admins';
-$lang['c13y_maintenance'] = 'Reinicializar los controles de integridad';
-$lang['Check all'] = 'Todo verificado';
-$lang['Uncheck all'] = 'Soltar todo';
-$lang['c13y_check_auto'] = 'Puntear las correcciones automĂĄticas';
-$lang['c13y_submit_correction'] = 'Aplicar las correcciones seleccionadas';
-$lang['c13y_submit_ignore'] = 'Ignorar las anomalĂ­as seleccionadas';
-$lang['c13y_submit_refresh'] = 'Refrescar';
-$lang['c13y_ignore_msg1'] = 'La anomalĂ­a serĂĄ ignorada hasta la versiĂłn prĂłxima de la aplicaciĂłn';
-$lang['c13y_ignore_msg2'] = 'La correcciĂłn de la anomalĂ­a anularĂĄ el hecho de que sea ignorada';
-$lang['c13y_anomaly_ignored_count'] = '%d anomalĂ­a ha sido ignorada.';
-$lang['c13y_anomalies_ignored_count'] = '%d anomalĂ­as han sido ignoradas.';
-$lang['plugins_need_update'] = 'Plugins que necesita una postura al dĂ­a ';
-$lang['plugins_dontneed_update'] = 'Plugins al dĂ­a';
-$lang['plugins_cant_check'] = 'Imposible verificar el plugins siguiente';
-$lang['plugins_actual_version'] = 'VersiĂłn<br>actual';
-$lang['plugins_new_version'] = 'VersiĂłn<br>disponible';
-$lang['plugins_auto_update'] = 'Puesta al dĂ­a automĂĄtico';
-$lang['plugins_auto_install'] = 'InstalaciĂłn automĂĄtica';
-$lang['plugins_download'] = 'Descargar el fichero';
-$lang['plugins_description'] = '<b>VersiĂłn :</b> %s<br><br><b>Fecha :</b> %s<br><br>%s';
-$lang['plugins_tab_list'] = 'Lista plugins';
-$lang['plugins_tab_update'] = 'Verificar las puestas al dĂ­a';
-$lang['plugins_tab_new'] = 'Otro plugins disponible';
-$lang['plugins_revisions'] = 'Últimas revisiones';
-$lang['plugins_delete'] = 'Suprimir';
-$lang['plugins_confirm_install'] = 'Âż Es seguro de querer instalar este plugin?';
-$lang['plugins_confirm_delete'] = 'Âż Es seguro de querer suprimir este plugin?';
-$lang['plugins_confirm_upgrade'] = ' Âż Es sobre querer instalar esta postura al dĂ­a? Usted debe verifique que esta postura al dĂ­a no necesita de dĂŠsinstalaciĂłn.';
-$lang['plugins_upgrade_ok'] = '%s ha sido puesto al dĂ­a con ĂŠxito.';
-$lang['plugins_install_ok'] = 'El plugin ha sido copiado con ĂŠxito';
-$lang['plugins_install_need_activate'] = 'Cita en la lista del plugins para instalarlo y acelerarlo.';
-$lang['plugins_temp_path_error'] = 'Imposible crear un fichero temporal.';
-$lang['plugins_dl_archive_error'] = 'Imposible recuperar el archivo.';
-$lang['plugins_archive_error'] = 'Imposible leer o extraer el archivo.';
-$lang['plugins_extract_error'] = 'Un error sobrevino durante la extracciĂłn de los ficheros (%s).';
-$lang['plugins_check_chmod'] = 'Verifique los autorizaciones del expediente " plugins " y de sus subexpedientes (CHMOD).';
-$lang['plugins_server_error'] = 'Imposible conectarse al servidor.';
-/* TODO */
-$lang['Purge compiled templates'] = 'Purgar el templates compilado';
-/* TODO */ $lang['Caddie is currently empty'] = 'Caddie is currently empty';
-/* TODO */ $lang['conf_upload_title'] = 'Upload';
-/* TODO */ $lang['Show upload link every time'] = 'Show upload link every time';
-/* TODO */ $lang['User access level to upload'] = 'User access level to upload';
-/* TODO */ $lang['ACCESS_0'] = 'Free access';
-/* TODO */ $lang['ACCESS_1'] = 'Access to all';
-/* TODO */ $lang['ACCESS_2'] = 'Access to subscribed';
-/* TODO */ $lang['ACCESS_3'] = 'Access to administrators';
-/* TODO */ $lang['ACCESS_4'] = 'Access to webmasters';
-/* TODO */ $lang['ACCESS_5'] = 'No access';
-$lang['DEMO'] = 'Demo';
-$lang['HOME'] = 'Acogida Piwigo';
-$lang['FORUM'] = 'Ayuda';
-$lang['BUGS'] = 'Bugs';
-$lang['EXTENSIONS'] = 'Extensiones';
-$lang['WIKI / DOC'] = 'DocumentaciĂłn';
-$lang['A new version of Piwigo is available.'] = 'Una nueva versiĂłn de Piwigo estĂĄ disponible.';
-$lang['Piwigo Administration'] = 'AdministraciĂłn de Piwigo';
-$lang['Piwigo version'] = 'VersiĂłn de Piwigo';
-$lang['You are running the latest version of Piwigo.'] = 'Usted utiliza la Ăşltima versiĂłn de Piwigo.';
-/* TODO */ $lang['c13y_version_anomaly'] = 'The version of %s [%s] installed is not compatible with the version required [%s]';
-/* TODO */ $lang['c13y_version_correction'] = 'You need to upgrade your system to take full advantage of the application else the application will not work correctly, or not at all';
-
-?>
diff --git a/BSF/language/es_ES/common.lang.php b/BSF/language/es_ES/common.lang.php
deleted file mode 100644
index 93c23b2ac..000000000
--- a/BSF/language/es_ES/common.lang.php
+++ /dev/null
@@ -1,368 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Langage informations
-$lang_info['language_name'] = 'EspaĂąol';
-$lang_info['country'] = 'EspaĂąa';
-$lang_info['direction'] = 'ltr';
-$lang_info['code'] = 'es';
-$lang_info['zero_plural'] = false;
-
-$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (notĂŠ %d fois, ĂŠcart type = %.2f)';
-$lang['%d Kb'] = '%d Ko';
-$lang['%d category updated'] = '%d CategorĂ­a actualizada';
-$lang['%d categories updated'] = '%d ActualizaciĂłn categorĂ­as';
-$lang['%d comment to validate'] = '%d Comentario usuario que hay que validar';
-$lang['%d comments to validate'] = '%d Validar comentarios del usuario';
-$lang['%d new comment'] = '%d Nuevo comentario usuario';
-$lang['%d new comments'] = '%d nuevos comentarios del usuario';
-$lang['%d comment'] = '%d Comentario';
-$lang['%d comments'] = '%d Comentarios';
-$lang['%d hit'] = 'Vista %d Veces';
-$lang['%d hits'] = 'Vista %d Veces';
-$lang['%d new element'] = '%d nuevo elemento';
-$lang['%d new elements'] = '%d nuevos Elementos';
-$lang['%d new user'] = '%d nuevo usuario';
-$lang['%d new users'] = '%d nuevos usuarios';
-$lang['%d waiting element'] = '%d elemento en espera';
-$lang['%d waiting elements'] = '%d elementos en espera';
-$lang['About'] = 'Acerca de';
-$lang['All tags must match'] = 'Todos los tags deben corresponder';
-$lang['All tags'] = 'Todos los tags';
-$lang['Any tag'] = 'Cualquier tag';
-$lang['At least one listed rule must be satisfied.'] = 'Por lo menos una regla enumerada debe ser correcta.';
-$lang['At least one tag must match'] = 'Por lo menos uno de los tags debe corresponder';
-$lang['Author'] = 'Autor';
-$lang['Average rate'] = 'Nota media';
-$lang['Categories'] = 'CategorĂ­as';
-$lang['Category'] = 'CategorĂ­a';
-$lang['Close this window'] = 'Cerrar la ventana';
-$lang['Complete RSS feed'] = 'Flujo RSS completo (imĂĄgenes, comentarios)';
-$lang['Confirm Password'] = 'Confirmar la contraseĂąa';
-$lang['Connection settings'] = 'ParĂĄmetros de la conexiĂłn';
-$lang['Connection'] = 'ConexiĂłn';
-$lang['Contact webmaster'] = 'Contactar el webmastre';
-$lang['Create a new account'] = 'Crear una nueva cuenta';
-$lang['Created on'] = 'Creada el';
-$lang['Creation date'] = 'Fecha de creaciĂłn';
-$lang['Current password is wrong'] = 'La contraseĂąa actual es incorrecta';
-$lang['Dimensions'] = 'Dimensiones';
-$lang['Display'] = 'Monstrar';
-$lang['Each listed rule must be satisfied.'] = 'Cada regla mencionada debe ser correcta';
-$lang['Email address is missing'] = 'Falta su direcciĂłn electrĂłnica';
-$lang['Email address'] = 'DirecciĂłn electrĂłnica';
-$lang['Enter your personnal informations'] = 'Sus datos personales';
-$lang['Error sending email'] = 'Error de envĂ­o';
-$lang['File name'] = 'Nombre del fichero';
-$lang['File'] = 'Fichero';
-$lang['Filesize'] = 'TamaĂąo';
-$lang['Filter and display'] = 'Filtrar y mostrar';
-$lang['Filter'] = 'Filtro';
-$lang['Forgot your password?'] = 'ContraseĂąa olvidada ?';
-$lang['Go through the gallery as a visitor'] = 'Recorrer la galerĂ­a como visitante';
-$lang['Help'] = 'Ayuda';
-$lang['Identification'] = 'IdentificaciĂłn';
-$lang['Image only RSS feed'] = 'Flujo RSS de las imĂĄgenes';
-$lang['Keyword'] = 'Palabra clave';
-$lang['Links'] = 'Enlaces';
-$lang['Mail address'] = $lang['Email address'];
-$lang['N/A'] = 'no disponible';
-$lang['New on %s'] = 'Nuevo el %s';
-$lang['New password confirmation does not correspond'] = 'La nueva confirmaciĂłn de la contraseĂąa no corresponde';
-$lang['New password sent by email'] = 'Nueva contraseĂąa enviada por correo electrĂłnico';
-$lang['No email address'] = 'Ninguna direcciĂłn electrĂłnica';
-$lang['No user matches this email address'] = 'Esta direcciĂłn electrĂłnica no corresponde a ningĂşn usuario';
-$lang['Notification'] = 'NotificaciĂłn';
-$lang['Number of items'] = 'NĂşmero de artĂ­culos';
-$lang['Original dimensions'] = 'Dimensiones originales';
-$lang['Password forgotten'] = 'ContraseĂąa olvidada';
-$lang['Password'] = 'ContraseĂąa';
-$lang['Post date'] = 'AĂąadido el dĂ­a';
-$lang['Posted on'] = 'AĂąadido el';
-$lang['Profile'] = 'Perfil';
-$lang['Quick connect'] = 'ConexiĂłn rĂĄpida';
-$lang['RSS feed'] = 'flux RSS';
-$lang['Rate'] = 'Nota';
-$lang['Register'] = 'RegĂ­strese';
-$lang['Registration'] = 'Registro';
-$lang['Related tags'] = 'Tags relacionados';
-$lang['Reset'] = 'Anular';
-$lang['Retrieve password'] = 'Recuperar la contraseĂąa';
-$lang['Search rules'] = 'Criterios de bĂşsqueda';
-$lang['Search tags'] = 'Buscar tags';
-$lang['Search'] = 'Buscar';
-$lang['See available tags'] = 'Ver los tags disponibles';
-$lang['Send new password'] = 'Enviar una nueva contraseĂąa';
-$lang['Since'] = 'Desde';
-$lang['Sort by'] = 'Clasificar segĂşn';
-$lang['Sort order'] = 'Orden de ClasificaciĂłn';
-$lang['Tag'] = 'Tag';
-$lang['Tags'] = 'Tags';
-$lang['The RSS notification feed provides notification on news from this website : new pictures, updated categories, new comments. Use a RSS feed reader.'] = 'El flujo RSS notifica los eventos de la galerĂ­a : nuevas imĂĄgenes, categorĂ­as actualizadas, nuevos comentarios del usuario. Lo debe utilizar con un lector de flujo RSS.';
-$lang['Unknown feed identifier'] = 'Identificador del flujo RSS desconocido';
-$lang['User comments'] = 'Comentarios del usuario';
-$lang['Username'] = 'Nombre del usuario';
-$lang['Visits'] = 'Visitas';
-$lang['Webmaster'] = 'Webmastre';
-$lang['Week %d'] = 'Semana %d';
-$lang['about_page_title'] = 'Acerca de Piwigo';
-$lang['access_forbiden'] = 'Usted no esta autorizado a ver la pagina pedida';
-$lang['add to caddie'] = 'Agregar al carrito';
-$lang['add_favorites_hint'] = 'agregar esta imagen en sus favoritos';
-$lang['admin'] = 'AdministraciĂłn';
-$lang['adviser_mode_enabled'] = 'Modo consejero activo';
-$lang['all'] = 'todo';
-$lang['ascending'] = 'ascendiente';
-$lang['author(s) : %s'] = 'autor(es) : %s';
-$lang['auto_expand'] = 'Desarrollar todas las categorĂ­as';
-$lang['became available after %s (%s)'] = 'puesto a disposiciĂłn del %s (%s)';
-$lang['became available before %s (%s)'] = 'puesto a disposiciĂłn despuĂŠs %s (%s)';
-$lang['became available between %s (%s) and %s (%s)'] = 'puesto a disposiciĂłn entre ĂŠl %s (%s) y el %s (%s)';
-$lang['became available on %s'] = 'disponible el %s';
-$lang['best_rated_cat'] = 'Mejores notas';
-$lang['best_rated_cat_hint'] = 'mostrar las imagenes con las mejores notas';
-$lang['caddie'] = 'Carrito';
-$lang['calendar'] = 'Calendario';
-$lang['calendar_any'] = 'Todo';
-$lang['calendar_hint'] = 'Mostrar aĂąo por aĂąo, mes por mes, dĂ­a por dĂ­a';
-$lang['calendar_picture_hint'] = 'Mostrar las imĂĄgenes desde ';
-$lang['calendar_view'] = 'Vista';
-$lang['chronology_monthly_calendar'] = 'Calendario mensual';
-$lang['chronology_monthly_list'] = 'Lista mensual';
-$lang['chronology_weekly_list'] = 'Lista semanal';
-$lang['click_to_redirect'] = 'Pulse aquĂ­ si su navegador no lo envĂ­a a la pĂĄgina requerida.';
-$lang['comment date'] = 'Fecha del comentario';
-$lang['comment'] = 'Comentario';
-$lang['comment_added'] = 'Su comentario ha sido inscripto';
-$lang['comment_anti-flood'] = 'Systema anti-abuso : gracias de esperar antes de agregar un nuevo comentario';
-$lang['comment_not_added'] = 'Su comentario no ha sido registrado porque no verifica las reglas de validaciĂłn';
-$lang['comment_to_validate'] = 'El administrador debe activar su comentario para que sea visible.';
-$lang['comment_user_exists'] = 'Este nombre de usuario ya existe, pruebe otro';
-$lang['comments'] = 'Comentarios';
-$lang['comments_add'] = 'Agregar comentario';
-$lang['comments_del'] = 'Borrar este comentario';
-$lang['comments_title'] = 'Comentarios de usuarios';
-$lang['created after %s (%s)'] = 'Creado despuĂŠs del %s (%s)';
-$lang['created before %s (%s)'] = 'creado antes del %s (%s)';
-$lang['created between %s (%s) and %s (%s)'] = 'creado entre el %s (%s) y el %s (%s)';
-$lang['created on %s'] = 'creado el %s';
-$lang['customize'] = 'Personalizar';
-$lang['customize_page_title'] = 'PersonalizaciĂłn de su pantalla ';
-$lang['day'][0] = 'Domingo';
-$lang['day'][1] = 'Lunes';
-$lang['day'][2] = 'Martes';
-$lang['day'][3] = 'MiĂŠrcoles';
-$lang['day'][4] = 'Jueves';
-$lang['day'][5] = 'Viernes';
-$lang['day'][6] = 'SĂĄbado';
-$lang['default_sort'] = 'Por defecto';
-$lang['del_favorites_hint'] = 'borrar esta imĂĄgen de sus favoritos';
-$lang['delete'] = 'Suprimir';
-$lang['descending'] = 'Descendiente';
-$lang['download'] = 'descargar';
-$lang['download_hint'] = 'descargar este fichero';
-$lang['edit category informations'] = 'editar las informaciones de esta categorĂ­a';
-$lang['edit'] = 'Editar';
-$lang['err_date'] = 'Fecha errĂłnea';
-$lang['excluded'] = 'Excluidos';
-$lang['favorite_cat'] = 'Mis favoritos';
-$lang['favorite_cat_hint'] = 'Mostrar mis imĂĄgenes favoritas';
-$lang['favorites'] = 'Favoritas';
-$lang['first_page'] = 'Primera';
-$lang['gallery_locked_message'] = 'La galerĂ­a esta en manutenciĂłn. Vuelva mĂĄs tarde.';
-$lang['generation_time'] = 'PĂĄgina generada en';
-$lang['guest'] = 'Visitante';
-$lang['hello'] = 'Hola';
-$lang['hint_admin'] = 'disponible solamente para los administradores';
-$lang['hint_category'] = 'mostrar las imĂĄgenes a la raĂ­ces de esta categorĂ­a';
-$lang['hint_comments'] = 'Ver los Ăşltimos comentarios de los usuarios';
-$lang['hint_customize'] = 'personalizar aspecto de la galerĂ­a';
-$lang['hint_search'] = 'Buscar';
-$lang['home'] = 'Inicio';
-$lang['identification'] = 'IdentificaciĂłn';
-$lang['images_available_cpl'] = 'en esta categorĂ­a';
-$lang['images_available_cat'] = 'en %d subcategorĂ­a';
-$lang['images_available_cats'] = 'en %d subcategorĂ­as';
-$lang['included'] = 'incluidos';
-$lang['invalid_pwd'] = 'ContraseĂąa incorrecta !';
-$lang['language'] = 'Lengua';
-$lang['last %d days'] = '%d Ăşltimos dĂ­as';
-$lang['last_page'] = 'Último';
-$lang['link_info_image'] = 'Modificar las informaciones';
-$lang['logout'] = 'DesconexiĂłn';
-$lang['mail_address'] = $lang['Email address'];
-$lang['mandatory'] = 'obligatorio';
-$lang['maxheight'] = 'Altura mĂĄxima de las imĂĄgenes';
-$lang['maxheight_error'] = 'La altura mĂĄxima de las imĂĄgenes no debe ser superiora 50';
-$lang['maxwidth'] = 'Ancho mĂĄximo de las imĂĄgenes';
-$lang['maxwidth_error'] = 'El ancho mĂĄximo de las imĂĄgenes no debe ser superior Ă  50';
-$lang['mode_created_hint'] = 'mostrar el calendario por fecha de creaciĂłn';
-$lang['mode_flat_hint'] = 'Fijar a plato los elementos de las categorĂ­as y de las subcategorĂ­as';
-$lang['mode_normal_hint'] = 'vuelve a la vista normal';
-$lang['mode_posted_hint'] = 'mostrar el calendario por fecha de agregaciĂłn';
-$lang['month'][10] = 'Octubre';
-$lang['month'][11] = 'Noviembre';
-$lang['month'][12] = 'Diciembre';
-$lang['month'][1] = 'Enero';
-$lang['month'][2] = 'Febrero';
-$lang['month'][3] = 'Marzo';
-$lang['month'][4] = 'Abril';
-$lang['month'][5] = 'Mayo';
-$lang['month'][6] = 'Junio';
-$lang['month'][7] = 'Julio';
-$lang['month'][8] = 'Agosto';
-$lang['month'][9] = 'Septiembre';
-$lang['most_visited_cat'] = 'ImĂĄgenes mĂĄs vistas';
-$lang['most_visited_cat_hint'] = 'mostrar las imĂĄgenes mĂĄs vistas';
-$lang['nb_image_line_error'] = 'La cantidad de imĂĄgenes por lĂ­nea debe ser un nĂşmero entero no nulo';
-$lang['nb_image_per_row'] = 'Cantidad de miniaturas por lĂ­nea';
-$lang['nb_line_page_error'] = 'La cantidad de lĂ­neas por pagina debe ser un numero entero no nulo';
-$lang['nb_row_per_page'] = 'Cantidad de lĂ­neas por pagina';
-$lang['nbm_unknown_identifier'] = 'Usuario desconocido';
-$lang['new_password'] = 'Nueva contraseĂąa';
-$lang['new_rate'] = 'Vote por esta imagen';
-$lang['next_page'] = 'Siguiente';
-$lang['no_category'] = 'Inicio';
-$lang['no_rate'] = 'sin nota';
-$lang['note_filter_day'] = 'El conjunto de los elementos es filtrado para fijar sĂłlo los elementos recientes por lo menos de %d dia.';
-$lang['note_filter_days'] = 'El conjunto de los elementos es filtrado para fijar sĂłlo los elementos recientes de menos de %d dias.';
-$lang['password updated'] = 'contraseĂąa actualizada';
-$lang['periods_error'] = 'El perĂ­odo de novedad debe ser un numero entero positivo';
-$lang['picture'] = 'imagen';
-$lang['picture_high'] = 'Pulse sobre la imagen para ver en alta resoluciĂłn';
-$lang['picture_show_metadata'] = 'Muestre los meta-datos del fichero';
-$lang['powered_by'] = 'Distribuido por';
-$lang['preferences'] = 'Preferencias';
-$lang['previous_page'] = 'Precedente';
-$lang['random_cat'] = 'ImĂĄgenes aleatorias';
-$lang['random_cat_hint'] = 'mostrar un grupo aleatorio de imĂĄgenes';
-$lang['recent_cats_cat'] = 'Últimas categorías';
-$lang['recent_cats_cat_hint'] = 'mostrar las categorĂ­as recientement actualizadas o creadas';
-$lang['recent_period'] = 'PerĂ­odo reciente';
-$lang['recent_pics_cat'] = 'Últimas imágenes';
-$lang['recent_pics_cat_hint'] = 'Mostrar las imĂĄgenes mĂĄs recientes';
-$lang['redirect_msg'] = 'RedirecciĂłn...';
-$lang['reg_err_login1'] = 'Por favor, ponga un nombre de usuario';
-$lang['reg_err_login2'] = 'el nombre de usuario no debe terminar por un espacio';
-$lang['reg_err_login3'] = 'el nombre de usuario no debe empezar por un espacio';
-$lang['reg_err_login5'] = 'Este nombre de usuario ya estĂĄ utilizado';
-$lang['reg_err_mail_address'] = 'Su direcciĂłn electrĂłnica debe ser del formato xxx@yyy.eee (ejemplo : jack@altern.org)';
-$lang['reg_err_pass'] = 'Por favor, escriba nuevamente su contraseĂąa';
-$lang['remember_me'] = 'ConexiĂłn automĂĄtica';
-$lang['remove this tag'] = 'quitar este tag de la lista';
-$lang['representative'] = 'representante';
-$lang['return to homepage'] = 'Volver a la pĂĄgina de inicio';
-$lang['search_author'] = 'Buscar por autor';
-$lang['search_categories'] = 'Buscar bajo categorĂ­as';
-$lang['search_date'] = 'Buscar por fecha';
-$lang['search_date_from'] = 'Fecha';
-$lang['search_date_to'] = 'Hasta la fecha';
-$lang['search_date_type'] = 'Tipo de fecha';
-$lang['search_keywords'] = 'Buscar por palabra';
-$lang['search_mode_and'] = 'Buscar todas las palabras';
-$lang['search_mode_or'] = 'Buscar una de las palabras';
-$lang['search_one_clause_at_least'] = 'Demanda vacĂ­a. NingĂşn criterio surtido..';
-$lang['search_options'] = 'Opciones de bĂşsqueda';
-$lang['search_result'] = 'Resultados de la bĂşsqueda';
-$lang['search_subcats_included'] = 'Buscar en las subcategorĂ­as';
-$lang['search_title'] = 'BĂşsqueda';
-$lang['searched words : %s'] = 'buscar palabras : %s';
-$lang['send_mail'] = 'Contactar';
-$lang['set as category representative'] = 'elegir como representante de esta categorĂ­a';
-$lang['show_nb_comments'] = 'Mostrar la cantidad de comentarios';
-$lang['show_nb_hits'] = 'Mostrar el nĂşmero de visualizaciones';
-$lang['slideshow'] = 'diaporama';
-$lang['slideshow_stop'] = 'parar el diaporama';
-$lang['special_categories'] = 'Herramientas';
-$lang['sql_queries_in'] = 'pedidos SQL en';
-$lang['start_filter_hint'] = 'Fijar sĂłlo los elementos recientes';
-$lang['stop_filter_hint'] = 'Regresar a la fijaciĂłn de todos los elementos';
-$lang['the beginning'] = 'el principio';
-$lang['theme'] = 'Tema';
-$lang['thumbnails'] = 'Miniaturas';
-$lang['title_menu'] = 'MenĂş';
-$lang['title_send_mail'] = 'Una opiniĂłn sobre esta pagina';
-$lang['today'] = 'hoy';
-$lang['update_rate'] = 'Actualizar nota';
-$lang['update_wrong_dirname'] = 'Mal nombre de repertorio';
-$lang['upload_advise_filesize'] = 'El peso de la imagen debe sobrepasar : ';
-$lang['upload_advise_filetype'] = 'El tamaĂąo de la imagen debe ser jpg, png ou gif';
-$lang['upload_advise_height'] = 'La altura de la imagen no debe sobrepasar : ';
-$lang['upload_advise_thumbnail'] = 'Opcional, pero recomendado: escoger una miniatura que hay que asociar ';
-$lang['upload_advise_width'] = 'La anchura de la imagen no debe sobrepasar : ';
-$lang['upload_author'] = 'Autor';
-$lang['upload_cannot_upload'] = 'Imposible trasladar el fichero sobre el camarero(servidor)';
-$lang['upload_err_username'] = 'Falta el nombre de usuario';
-$lang['upload_file_exists'] = 'este fichero ya existe';
-$lang['upload_filenotfound'] = 'el formato del fichero no es valido';
-$lang['upload_forbidden'] = 'imposible de agregar la imagen en esta categorĂ­a';
-$lang['upload_name'] = 'Nombre de la imagen';
-$lang['upload_picture'] = 'Agregar una imagen';
-$lang['upload_successful'] = 'Imagen agregada , un administrador la debe controlar para que esta sea visible';
-$lang['upload_title'] = 'Agregar una imagen';
-$lang['useful when password forgotten'] = 'Útil en caso de perdida de contraseña';
-$lang['qsearch'] = 'BĂşsqueda rĂĄpida';
-$lang['Connected user: %s'] = 'Utilizador conectado: %s';
-$lang['IP: %s'] = 'IP: %s';
-$lang['Browser: %s'] = 'Navegante: %s';
-$lang['Author: %s'] = 'Autor: %s';
-$lang['Comment: %s'] = 'Comentario: %s';
-$lang['Delete: %s'] = 'SupresiĂłn: %s';
-$lang['Validate: %s'] = 'ValidaciĂłn: %s';
-$lang['Comment by %s'] = 'Comentario por %s';
-$lang['User: %s'] = 'Utilizador: %s';
-$lang['Email: %s'] = 'Email: %s';
-$lang['Admin: %s'] = 'AdministraciĂłn: %s';
-$lang['Registration of %s'] = 'Registro de %s';
-$lang['Category: %s'] = 'CategorĂ­a: %s';
-$lang['Picture name: %s'] = 'Nombre de la imagen: %s';
-$lang['Creation date: %s'] = 'Data de creaciĂłn: %d';
-$lang['Waiting page: %s'] = 'PĂĄgina en espera: %s';
-$lang['Picture uploaded by %s'] = 'Imagen cargada por %s';
-// --------- Starting below: New or revised $lang ---- from version 1.7.1
-$lang['guest_must_be_guest'] = 'Estatuto del utilizador " guest " no conforme, la utilizaciĂłn del estatuto por defecto. Por favor, prevenga el webmestre.';
-// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
-$lang['Administrator, webmaster and special user cannot use this method'] = 'Administrador, webmestre y utilizador especial no pueden utilizar este mĂŠtodo';
-$lang['reg_err_mail_address_dbl'] = 'Un utilizador ya utiliza esta direcciĂłn e-mail';
-$lang['Category results for'] = 'Los resultados de las categorĂ­as para';
-$lang['Tag results for'] = 'Los resultados de los tags para';
-$lang['from %s to %s'] = 'de %s a %s';
-$lang['start_play'] = 'Lectura del diaporama';
-$lang['stop_play'] = 'Pausa del diaporama';
-$lang['start_repeat'] = 'Repetir el diaporama';
-$lang['stop_repeat'] = 'No repetir el diaporama ';
-$lang['inc_period'] = 'Disminuir la velocidad del diaporama';
-$lang['dec_period'] = 'Acelerar la velocidad del diaporama';
-$lang['Submit'] = 'Validar';
-$lang['Yes'] = 'Si';
-$lang['No'] = 'No';
-$lang['%d element']='%d imĂĄgen';
-$lang['%d elements']='%d imĂĄgenes';
-$lang['%d element are also linked to current tags'] = '%d imagen es tambiĂŠn vinculada a los tags corrientes';
-$lang['%d elements are also linked to current tags'] = '%d imagenes son igualmente vinculadas a los tags corrientes';
-$lang['See elements linked to this tag only'] = 'Ver las imĂĄgenes relacionadas Ăşnicamente a este tag';
-$lang['elements posted during the last %d days'] = 'esta imagen tiene menos de %d dias';
-$lang['Choose an image'] = 'Elegir una imagen';
-$lang['Piwigo Help'] = 'Ayuda de Piwigo';
-
-?>
diff --git a/BSF/language/es_ES/help.html b/BSF/language/es_ES/help.html
deleted file mode 100644
index c23ab51b0..000000000
--- a/BSF/language/es_ES/help.html
+++ /dev/null
@@ -1,183 +0,0 @@
-<h2>Ayudante</h2>
-
-<h3>Comienzo rĂĄpido</h3>
-
-<ol>
-
- <li>Crear un repertorio local "Categorie_prueba".</li>
-
- <li>Cumplir el rĂŠpetoire "Categorie_prueba" con fotos.</li>
-
- <li>Abrir una conexiĂłn FTP hacia la galerĂ­a distante.</li>
-
- <li>Cargar el repertorio local "Categorie_prueba" en el repertorio distante "galleries". Dar todos los derechos (777) al nuevo repertorio
-"galleries/Categorie_prueba".</li>
-
- <li>Conectarse a su instalaciĂłn de Piwigo como administrador.</li>
-
- <li>Ir sobre <span class="pwgScreen">Administrador, ImĂĄgenes,
-Miniaturas</span>. Pedir crear las miniaturas ausentes segĂşn el anĂĄlisis de Piwigo.</li>
-
- <li>Ir sobre <span class="pwgScreen">Administrador, CategorĂ­as,
- Sincronizar</span>. Puntear " repertorios + ficheros ", soltar " Ăşnicamente Simular " y validar la sincronizaciĂłn.</li>
-
- <li>Y he aquĂ­. Usted tiene crear la categorĂ­a "Categorie_prueba" a la raĂ­z de su galerĂ­a.</li>
-
-</ol>
-
-<h3>AĂąadidos de elementos</h3>
-
-<ul>
-
- <li>
-
- <p>Los repertorios que representan las categorĂ­as estĂĄn en el repertorio " galleries ". MĂĄs abajo el ĂĄrbol de los repertorios de una galerĂ­a muy pequeĂąa (pero utilizando numerosos carĂĄcteres funcionales): </p>
-
-<pre>
-.
-|-- admin
-|-- doc
-|-- galleries
-| |-- categorĂ­a-1
-| | |-- categorĂ­a-1.1
-| | | |-- categorĂ­a-1.1.1
-| | | | |-- categorĂ­a-1.1.1.1
-| | | | | |-- pwg_high
-| | | | | | +-- mariage.jpg
-| | | | | |-- thumbnail
-| | | | | | +-- TN-mariage.jpg
-| | | | | +-- mariage.jpg
-| | | | +-- categorĂ­a-1.1.1.2
-| | | +-- categorĂ­a-1.1.2
-| | |-- categorĂ­a-1.2
-| | | |-- pookie.jpg
-| | | +-- thumbnail
-| | | +-- TN-pookie.jpg
-| | +-- categorĂ­a-1.3
-| +-- categorĂ­a-2
-| |-- porcinet.gif
-| |-- pwg_representative
-| | +-- video.jpg
-| |-- thumbnail
-| | +-- TN-porcinet.jpg
-| +-- video.avi
-|-- include
-|-- install
-|-- language
-|-- template
-+-- tool</pre>
-
- </li>
-
- <li>Fundamentalmente, una categorĂ­a es representada por un repertorio a cualquier nivel bajo el repertorio " galleries " de su instalaciĂłn de Piwigo. Cada categorĂ­a puede contener tantos subniveles como deseado. En el ejemplo mĂĄs arriba, categorĂ­a-1.1.1.1 estĂĄ en un nivel 4 de profundidad.</li>
-
- <li>Fundamentalmente, un elemento es representado por un fichero. Un fichero puede ser un elemento para Piwigo si la extensiĂłn del nombre del fichero estĂĄ entre la lista del parĂĄmetro de configuraciĂłn <code>file_ext</code> (Ver
- fichero <span class="filename">include/config.inc.php</span>). Un fichero puede ser una imagen si su extensiĂłn estĂĄ entre el parĂĄmetro de configuraciĂłn
-<code>picture_ext</code>.</li>
-
- <li>Los elementos de tipo llena de imĂĄgenes deben tener una miniatura asociada (ver la secciĂłn siguiente a propĂłsito de las miniaturas).</li>
-
- <li>Los elementos de tipo llena de imĂĄgenes pueden tener uno llena de imĂĄgenes en gran tamaĂąo asociado. AsĂ­ como para el fichero <span class="filename">mariage.jpg</span>
-En el ejemplo mĂĄs arriba. NingĂşn prefijo es necesario sobre el nombre del fichero.</li>
-
- <li>Los elementos no imagen (vĂ­deos, sonidos, archivos de texto, todo lo que usted quiere) por defecto han representado por icono que corresponde a la extensiĂłn del nombre del fichero. Optionnellement, una miniatura y un representante pueden ser asociados (ver el fichero <span
-class="filename">video.avi</span> en el ejemplo).</li>
-
- <li><em>AtenciĂłn</em> : El nombre de un repertorio o de un fichero debe ser constado sĂłlo por cartas(letras), por cifras, de "-", "_" o ".". NingĂşn espacio o de carĂĄcteres acentuados.</li>
-
- <li><em>Consejo</em> : Una categorĂ­a puede contener elementos y subcategorĂ­as a la vez. Sin embargo, es fuertemente aconsejado para cada categorĂ­a escoger contener elementos <strong>Entonces</strong>
-SubcategorĂ­as.</li>
-
- <li>En cuanto los ficheros, las miniaturas y los representantes estĂĄn correctamente colocados en los repertorios, ir(rendirse) sobre la pantalla <span
-class="pwgScreen">AdministraciĂłn, CategorĂ­as, Sincronizar</span>.</li>
-
-</ul>
-
-<h3>Miniaturas</h3>
-
-<ul>
-
- <li>AsĂ­ como mencionado anteriormente, cada elemento de tipo llena de imĂĄgenes debe ser asociado con una miniatura.</li>
-
- <li>Las miniaturas son almacenadas en el subdirectorio " thumbnail " de cada repertorio que representa una categorĂ­a. Una miniatura es un fichero de tipo llena de imĂĄgenes (la misma extensiĂłn del nombre del fichero) cuyo nombre de fichero es prefijado por el parĂĄmetro de configuraciĂłn <code>prefix_thumbnail</code>
-(ver <span class="filename">include/config.inc.php</span>).</li>
-
- <li>Las miniaturas no necesitan tener la misma extensiĂłn que les llena de imĂĄgenes asociada (una imagen con ".jpg" como extensiĂłn puede tener una miniatura .GIF " por ejemplo).</li>
-
- <li>Es aconsejado utilizar un instrumento(utensilio) externo para la creaciĂłn de las miniaturas (como ThumbClic o PhpMyVignettes, ver la ubicaciĂłn(sitio) de presentaciĂłn de Piwigo).</li>
-
- <li>Usted tambiĂŠn puede utilizar el instrumento(utensilio) de creaciĂłn de miniatura integrado en Piwigo pero esto es desaconsejado porque la calidad corre peligro de ser decepcionante y esto utiliza inĂştilmente los recursos del camarero(servidor) (lo que puede ser un problema grave sobre un camarero(servidor) mutualisĂŠ).</li>
-
- <li>Si usted escoge utilizar al camarero(servidor) web para generar las miniaturas, usted debe dar los derechos en escritura a todos los repertorios que representan las categorĂ­as para todos los utilizadores (propietario, agrupar, otro).</li>
-
-</ul>
-
-<h3>Autorizaciones</h3>
-
-<ul>
-
- <li>Usted puede prohibir el acceso a las categorĂ­as. Las categorĂ­as pueden ser pĂşblicas o particulares. Las autorizaciones (vĂĄlidos para los grupos y los utilizadores) son gĂŠrables Ăşnicamente para las categorĂ­as particulares.</li>
-
- <li>Usted puede devolver una categorĂ­a particular editĂĄndolo (<span
-class="pwgScreen">AdministraciĂłn, CategorĂ­as, Administrar, Editar</span>) O en gerente las opciones para su ĂĄrbol completo de las categorĂ­as (<span
-class="pwgScreen">AdministraciĂłn, CategorĂ­as, Propiedades, PĂşblica / particular</span>).</li>
-
- <li>En cuanto ciertas categorĂ­as son privadas, usted puede administrar las autorizaciones para los grupos y los utilizadores (<span
-class="pwgScreen">AdministraciĂłn, IdentificaciĂłn</span>).</li>
-
-</ul>
-
-<h3>Grupos de utilizadores</h3>
-
-<ul>
-
- <li>Piwigo puede administrar grupos de utilizadores. Muy prĂĄctico para administrar autorizaciones comĂşnes sobre las categorĂ­as particulares.</li>
-
- <li>Usted puede crear grupos y aĂąadir a eso a utilizadores en ello
-<span class="pwgScreen">AdministraciĂłn, IdentificaciĂłn, Grupos</span>.</li>
-
- <li>Un utilizador puede pertenecer a varios grupos. La autorizaciĂłn es mĂĄs fuerte que la interdicciĂłn: si el utilizador "piedra" pertenece a los grupos "familia" y "los amigos", y si sĂłlo el grupo "familia" puede visitar la categorĂ­a " Navidad 2003 ", entonces "piedra" puede visitar esta categorĂ­a.</li>
-
-</ul>
-
-<h3>AĂąadido de ficheros por los utilizadores</h3>
-
-<p>Para permitirles a los utilizadores aĂąadir ficheros:</p>
-
-<ol>
-
- <li>Autorizar el aĂąadido de imĂĄgenes sobre cualquier categorĂ­a (<span
-class="pwgScreen">Administation, CategorĂ­as, GestiĂłn, Edicto</span> ou <span
-class="pwgScreen">AdministraciĂłn, CategorĂ­as, Propiedades, AĂąadido de imĂĄgenes</span>).</li>
-
- <li>Dar los derechos en escritura (para todos los utilizadores) a los repertorios que corresponden a las categorĂ­as que son autorizadas al aĂąadido.</li>
-</ol>
- <p>Los ficheros aĂąadidos por los utilizadores no son directamente visibles sobre la ubicaciĂłn(sitio), deben ser validados por un administrador. Para eso, un administrador debe hacerse en zona administraciĂłn, ImĂĄgenes, A espera con el fin de validar o rechazar(echar de nuevo) los ficheros propuestos. Luego es necesario sincronizar el sistema de fichero con la base de datos.</p>
-
-
-
-<h3>Lazos entre los elementos y las categorĂ­as, las categorĂ­as virtuales</h3>
-
-<ul>
-
- <li>Piwigo disocia las categorĂ­as que almacenan los elementos y las categorĂ­as donde los elementos son mostrados.</li>
-
- <li>Por defecto, el ĂŠlement son mostrados sĂłlo en sus categorĂ­as efectivas: las que corresponden a sus repertorios sobre el camarero(servidor).</li>
-
- <li>Para atar(vincular) un elemento a una categorĂ­a, basta con hacer una asociaciĂłn sobre la pĂĄgina de ediciĂłn del elemento (un lazo existe hacia esta pĂĄgina cuando eres conectado como administrador), sobre la pĂĄgina que reagrupa las informaciones sobre todos los elementos de una categorĂ­a o bien todavĂ­a con la ayuda del carrito.</li>
-
- <li>Por lo tanto de este principio, es posible crear categorĂ­as virtuales: ningĂşn repertorio corresponde a estas categorĂ­as. Usted puede crear categorĂ­as virtuales sobre <span class = pwgScreen "> AdministraciĂłn, CategorĂ­a, Administrar</span>.</li>
-
-</ul>
-
-<h3>Informations diverses</h3>
-
-<ul>
-
- <li>Una vez creado su galerĂ­a, configure la fijaciĂłn por defecto tal como deseado en <span class="pwgScreen">Administation, ConfiguraciĂłn, FijaciĂłn por defecto</span>. En efecto, cada nuevo utilizador heredarĂĄ de estas propiedades de fijaciĂłn.</li>
-
- <li>Totalmente para cuestiĂłn, no vacile en visitar el foro o en plantear allĂ­ una cuestiĂłn si su bĂşsqueda es infructuosa.
-<a href="http://forum.phpwebgallery.net">foro</a> EstĂĄ disponible para la sitio de Piwigo. TambiĂŠn consultar
-<a href="http://phpwebgallery.net/doc">documentaciĂłn oficial de Piwigo</a> Para obtener mĂĄs detalles.</li>
-
-</ul>
diff --git a/BSF/language/es_ES/help/advanced_feature.html b/BSF/language/es_ES/help/advanced_feature.html
deleted file mode 100644
index 9c14a3c13..000000000
--- a/BSF/language/es_ES/help/advanced_feature.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<h2>Funciones avanzadas</h2>
-
-<p>Lista carĂĄcteres funcionales especiales para los administradores expertos de PWG:</p>
-
-<ul>
-
- <li>
- <strong>Elementos no atados :</strong>
- Fija las imĂĄgenes que no son asociadas con una categorĂ­a virtual
- </li>
- <li>
- <strong>Ficheros que llevan el mismo nombre en varias categorĂ­as fĂ­sicas :</strong>
- Fija las imĂĄgenes o los ficheros eventuales que podrĂ­an estar encontrados en varias categorĂ­as.
- </li>
-
-</ul>
diff --git a/BSF/language/es_ES/help/cat_modify.html b/BSF/language/es_ES/help/cat_modify.html
deleted file mode 100644
index 919dcaa31..000000000
--- a/BSF/language/es_ES/help/cat_modify.html
+++ /dev/null
@@ -1,117 +0,0 @@
-<h2>Modificar una categorĂ­a</h2>
-
-<h3>Informaciones</h3>
-
-<ul>
-
- <li><strong>nombre</strong>: renombrar la categorĂ­a (virtualmente para una categorĂ­a fĂ­sica).</li>
-
- <li><strong>descripciĂłn</strong>: dar una idea del contenido de la categorĂ­a, esta indicaciĂłn figurarĂĄ bajo la pĂĄgina de las miniaturas.</li>
-
-</ul>
-
-<h3>Desplazar</h3>
-
-<p>Si la categorĂ­a es virtual, usted puede desplazarlo. Desplazar una categorĂ­a significa cambiar su categorĂ­a allegada.</p>
-
-<h3>Opciones</h3>
-
-<ul>
-
- <li><strong>Tipo de acceso</strong>: gestiĂłn de los permisos. Si usted devuelve una categorĂ­a particular, todas sus categorĂ­as chicas se vuelven particulares. Si usted devuelve una categorĂ­a pĂşblica, todas sus categorĂ­as madres se vuelven pĂşblicas.</li>
-
- <li><strong>Encerrar</strong>: la categorĂ­a y todas sus categorĂ­as chicas se vuelven temporalmente inaccesibles para mantenimiento.</li>
-
- <li><strong>Comentarios</strong>: autoriza a los utilizadores a comentar los elementos de esta categorĂ­a.</li>
-
- <li><strong>Autorizar el aĂąadido de imĂĄgenes</strong>: autoriza a los utilizadores a cargar ficheros. Esta opciĂłn estĂĄ disponible sĂłlo si la categorĂ­a es fĂ­sica (y no virtual).</li>
-
-</ul>
-
-<p>Usted puede tambiĂŠn administrar estas opciones por la gestiĂłn de las "Propiedades"
-(pantallas <span class="pwgScreen">AĂąadido</span>, <span
-class="pwgScreen">Comentarios</span>, <span
-class="pwgScreen">Encerrar</span>, <span
-class="pwgScreen">PĂşblica / particular</span>, <span
-class="pwgScreen">Representante</span> Disponibles a partir de <span
-class="pwgScreen">AdministraciĂłn, CategorĂ­as, Propiedades</span>).</p>
-
-<h3>Orden de selecciĂłn</h3>
-
-<p>Utilizar la orden de selecciĂłn de las imĂĄgenes por defecto.</p>
-
-<p>Indicar si la selecciĂłn tambiĂŠn se aplica las subcategorĂ­as.</p>
-
-<p>Seleccionar las columnas de la selecciĂłn que hay que utilizar para esta categorĂ­a.</p>
-<ul>
-<li><strong>Data de creaciĂłn</strong>: data de grabaciĂłn</li>
-<li><strong>Data de aĂąadido</strong>: data de la sincronizaciĂłn</li>
-<li><strong>Nota media (*)</strong>: la cual logra por mediaciĂłn podrĂ­a ser modificada por el visitador</li>
-<li><strong>MĂĄs vistas (*)</strong>: La visita corriente puede cambiar la orden de los mĂĄs vistos</li>
-<li><strong>Nombre del fichero</strong>: Nombre del fichero dado en los campos de informaciones mĂĄs arriba</li>
-<li><strong>Id</strong>: Id Interna (las categorĂ­as recientes tienen la una "Id" mĂĄs grande que las precedentes).</li>
-
-</ul>
-<p><strong>(*)</strong>AtenciĂłn: usted hasta somete a un test estas selecciones que pueden dar los resultados imprevisibles.</p>
-
-
-<h3>Representante</h3>
-
-<p>El representante de una categorĂ­a es la miniatura fijada para representar la categorĂ­a sobre la pĂĄgina principal (<span
-class="pwgScreen">category.php</span>) Cuando una categorĂ­a Ăşnicamente contiene subcategorĂ­as y ningunos elementos directos (como a la raĂ­z)</p>
-
-<p>Existen 4 medios de escoger al representante de una categorĂ­a:</p>
-
-<ul>
-
- <li><span class="pwgScreen">PĂĄgina de fijaciĂłn de las imĂĄgenes</span>: En la barra de los botones de acciĂłn, uno de ellos permite escoger el elemento fijado como representante de la categorĂ­a fijada. Este botĂłn de acciĂłn estĂĄ disponible sĂłlo para los administradores</li>
-
- <li><span class="pwgScreen">Modificar las informaciones de una imagen</span>
-en la administraciĂłn. Esta pantalla puede padecer despuĂŠs <span
-class="pwgScreen">picture.php</span> o <span class="pwgScreen">GestiĂłn por lote</span> en ĂŠl <em>Modo unitario</em>. Ver el ayudante de esta pantalla para los detalles.</li>
-
- <li><span class="pwgScreen">AdministraciĂłn, CategorĂ­as, Propiedades, Representante</span>. Ver el ayudante de esta pantalla para los detalles.</li>
-
- <li><span class="pwgScreen">Modificar una categorĂ­a</span> ( La pantalla presente).</li>
-
-</ul>
-
-<p>La representaciĂłn depende del parĂĄmetro de configuraciĂłn
-<code>allow_random_representative</code> (ver <span
-class="filename">include/config_default.inc.php</span>).</p>
-
-<p>Por defecto (<code>allow_random_representative</code> Ă  false) cada categorĂ­a que contiene por lo menos un elemento es representada por un elemento fijo. Una vez fijado (a la creaciĂłn de la categorĂ­a), el representante Ăşnicamente cambia cuando el administrador lo pide. Si el representante no conviene, usted puede pedir a <strong>Encontrar a un nuevo representante al azar</strong>.</p>
-
-<p>Si el parĂĄmetro de configuraciĂłn <code>allow_random_representative</code>
-es a true, una categorĂ­a que contiene elementos puede no tener representante fijo. Simplemente utilizar el botĂłn <strong>Suprimir al representante</strong>.</p>
-
-<p>Si la categorĂ­a no contiene ningĂşn elemento (sino Ăşnicamente subcategorĂ­as) puede ser representada a pesar de todo por cualquier elemento gracias a la pantalla <span class="pwgScreen">Modificar las informaciones de una imagen</span>. La sola opciĂłn de la pantalla presente es el botĂłn
-<strong>Suprimir al representante</strong>.</p>
-
-<h3>Asociar todos los elementos de la categorĂ­a con una nueva categorĂ­a</h3>
-
-<ul>
-
-<li><strong>Nombre de la categorĂ­a virtual</strong>: Nombre de la nueva categorĂ­a que hay que crear, todas las imĂĄgenes de la categorĂ­a corriente serĂĄn atadas a la noticia.</li>
-
-<li><strong>CategorĂ­a allegada</strong>: Donde la nueva categorĂ­a debe estar, dejar vacĂ­o para crearle sobre la pĂĄgina inicial.</li>
-
-</ul>
-
-<h3>Asociar todos los elementos de la categorĂ­a con categorĂ­as existentes</h3>
-
-<ul>
-
-<li><strong>CategorĂ­as</strong>: Escoger la categorĂ­a de destino.</li>
-
-</ul>
-
-<h3>Enviarles un mail de informaciones a los miembros de un grupo</h3>
-
-<ul>
-
-<li><strong>Grupo</strong>: Grupo de destinatarios</li>
-
-<li><strong>Contenido del mail</strong>: Texto libre de enviarles.</li>
-
-</ul> \ No newline at end of file
diff --git a/BSF/language/es_ES/help/cat_move.html b/BSF/language/es_ES/help/cat_move.html
deleted file mode 100644
index e16d19372..000000000
--- a/BSF/language/es_ES/help/cat_move.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<h2>Desplazamiento de categorĂ­as virtuales</h2>
-
-<p>Usted puede cambiar al pariente de una categorĂ­a virtual.</p>
-
-<h3>CategorĂ­as virtuales que hay que desplazar</h3>
-
-<p>Seleccione una o varias categorĂ­as virtual a desplazar. Si la lista estĂĄ vacĂ­a, es porque usted todavĂ­a no lo creĂł.</p>
-
-<h3>Nueva categorĂ­a allegada</h3>
-
-<p>Seleccione la nueva categorĂ­a allegada (virtual o fĂ­sica). Si usted no selecciona ninguno, las categorĂ­as que hay que desplazar habrĂĄn subido a la raĂ­z de las categorĂ­as.
-Usted no puede desplazar una categorĂ­a en ĂŠl misma o sus niĂąos.</p>
diff --git a/BSF/language/es_ES/help/cat_options.html b/BSF/language/es_ES/help/cat_options.html
deleted file mode 100644
index 704a5f98e..000000000
--- a/BSF/language/es_ES/help/cat_options.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<h2>Opciones de las categorĂ­as</h2>
-
-<p>GestiĂłn de las opciones para varias categorĂ­as a la vez.</p>
-
-<dl>
-
- <dt>AutorizaciĂłn al aĂąadido</dt>
-
- <dd>Devolver las categorĂ­as autorizadas al aĂąadido por los visitadores. Esta opciĂłn no estĂĄ disponible para las categorĂ­as virtuales y distantes.</dd>
-
- <dt>Comentarios utilizador</dt>
-
- <dd>Autorizar a los utilizadores a aĂąadir comentarios en las categorĂ­as seleccionada.
-Por herencia, una imagen es commentable si pertenece por lo menos a una categorĂ­a commentable.</dd>
-
- <dt>Encerrar</dt>
-
- <dd>Las categorĂ­as seleccionadas se vuelven temporalmente inactivas para mantenimiento. Cuando una categorĂ­a es encerrada, todas las categorĂ­as niĂąo son encerradas. Cuando una categorĂ­a es quitada el cierre, todas las categorĂ­as allegadas son quitadas el cierre.</dd>
-
- <dt>PĂşblica / Particular</dt>
-
- <dd>GestiĂłn del estatuto de las categorĂ­as. Los permisos son posibles sĂłlo para las categorĂ­as particulares. En cuanto una categorĂ­a es privada, usted explĂ­citamente debe autorizar a los utilizadores o los grupos a acceder a eso. Cuando una categorĂ­a se vuelve particular, todas las categorĂ­as niĂąo se vuelven particulares. Cuando una categorĂ­a se vuelve pĂşblica, todas las categorĂ­as allegadas se vuelven pĂşblicas.</dd>
-
- <dt>Representante</dt>
-
- <dd>Esta opciĂłn Ăşnicamente estĂĄ disponible si el parĂĄmetro de configuraciĂłn <code>allow_random_representative</code> (Ver <span
-class="filename">include/config_default.inc.php</span>) es
-<em>true</em>. Cada categorĂ­a posiblemente representada al azar o por una miniatura fija Ăşnica.</dd>
-
-</dl>
diff --git a/BSF/language/es_ES/help/cat_perm.html b/BSF/language/es_ES/help/cat_perm.html
deleted file mode 100644
index 456f6baa0..000000000
--- a/BSF/language/es_ES/help/cat_perm.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<h2>Administrar los permisos para una categorĂ­a</h2>
-
-<p>Esta pantalla estĂĄ disponible sĂłlo para las categorĂ­as particulares. AquĂ­ usted podrĂĄ seleccionar a los utilizadores y los grupos autorizados para esta categorĂ­a.</p>
-
-<h3>Grupos</h3>
-
-<p>Usted puede autorizar o prohibir el acceso a los grupos. Modificando las autorizaciones de los grupos, usted probablemente modificarĂĄ la lista de los utilizadores autorizados gracias a la pertenencia a los grupos.</p>
-
-<h3>Utilizadores</h3>
-
-<p>Usted puede autorizar o prohibirles el acceso a los utilizadores individualmente.</p>
diff --git a/BSF/language/es_ES/help/configuration.html b/BSF/language/es_ES/help/configuration.html
deleted file mode 100644
index 9aa5e6b2f..000000000
--- a/BSF/language/es_ES/help/configuration.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<h2>ConfiguraciĂłn</h2>
-
-<p>Esta pantalla permite administrar la configuraciĂłn bĂĄsica. En efecto, sĂłlo son mostrados los parĂĄmetros de configuraciĂłn que deben bastar para la mayorĂ­a de los administradores. Si usted desea ver la lista de los numerosos (y acercados) parĂĄmetros, leer el fichero <span
-cass="filename">include/config_default.inc.php</span></p>
-
-<p>Esta pantalla es divisiĂŠ en varias secciones, reagrupando los parĂĄmetros por tema.</p>
-
-<h3>Directora de colegio</h3>
-<ul>
-
- <li><strong>TĂ­tulo de la galerĂ­a</strong>: utilizado para el flujo RSS y la notificaciĂłn por e-mail.</li>
-
- <li><strong>Bandera de las pĂĄginas</strong>: cĂłdigo html fijado en lo alto de las pĂĄginas.</li>
-
- <li><strong>URL de la galerĂ­a</strong>: utilizado para el flujo RSS.</li>
-
- <li><strong>Encerrar la galerĂ­a</strong>: Encerrar el conjunto de la galerĂ­a para mantenimiento. SĂłlo los administradores podrĂĄn acceder a la galerĂ­a.</li>
-
- <li><strong>NotaciĂłn</strong>: La notaciĂłn de las fotos es posible.</li>
-
- <li><strong>NotaciĂłn por los visitadores</strong>: Hasta los utilizadores no registrados pueden anotar las imĂĄgenes.</li>
-
- <li><strong>Notificar a los administradores en el momento de la inscripciĂłn de un utilizador</strong>: Los administradores recibirĂĄn un courriel a cada inscripciĂłn.</li>
-
- <li><strong>Permitir el registro de los utilizadores</strong>: La inscripciĂłn es libre para ellos todos.</li>
-
-</ul>
-
-<h3>ReseĂąa histĂłrica</h3>
-<ul>
- <p>Las visitas de las pĂĄginas <span
-class="pwgScreen">index.php</span> et <span
-class="pwgScreen">picture.php</span> Son registrados en la mesa <code>history</code>.</p>
-
- <p>Las visitas son fijadas en la pantalla <span class="pwgScreen">AdministraciĂłn, Classes de matemĂĄticas superiores, ReseĂąa histĂłrica</span>.</p>
-
- <li><strong>Registrar las pĂĄginas visitadas por los invitados</strong>: las visitas de las pĂĄginas por los invitados son registradas.</li>
-
- <li><strong>Registrar las pĂĄginas visitadas por los utilizadores</strong>: las visitas del pagespar los utilizadores registrados son registrados.</li>
-
- <li><strong>Registrar las pĂĄginas visitadas por los administradores</strong>: Las visitas de las pĂĄginas por los administradores son registradas.</li>
-
-</ul>
-
-<h3>Comentarios</h3>
-<ul>
-
- <li><strong>Comentarios utilizador para ellos todos</strong>: hasta los utilizadores no registrados pueden registrar comentarios.</li>
-
- <li><strong>NĂşmero utilizador de comentarios por pĂĄgina</strong>.</li>
-
- <li><strong>ValidaciĂłn</strong>: Un administrador debe validar los comentarios utilizadores antes de que puedan volverse visibles en la partida pĂşblica. La validaciĂłn de los comentarios utilizadores se efectua en la pantalla <span class="pwgScreen">AdministraciĂłn, ImĂĄgenes, Comentarios</span>.</li>
-
- <li><strong>Notificar a los administradores cuando un comentario es registrado</strong>:
-EnvĂ­o un courriel a los administradores cuando un utilizador registra un comentario que es validado.</li>
-
- <li><strong>Notificar a los administradores cuando un comentario requiere su validaciĂłn </strong>:
-EnvĂ­o un courriel a los administradores cuando un tilisateur registra un comentario que pide una validaciĂłn por parte de los administradores.
-La validaciĂłn de los comentarios utilizadores se efectua en la pantalla <span class="pwgScreen">AdministraciĂłn, ImĂĄgenes, Comentarios</span>.</li>
-
-</ul>
-
-<!--TODO --><h3>Upload</h3>
-<ul>
-<!--TODO --> <li><strong>Show upload link every time</strong>: If exists uploadeable categories, add link will be show for each categoy.</li>
-<!--TODO --> <li><strong>User access level to upload</strong>: Allows to restrict upload by users</li>
- <li><strong>Notificar a los administradores cuando una imagen es cargada</strong>: Los administradores recibirĂĄn un courriel a cada imagen puesto en disposiciĂłn por un utilizador.</li>
-</ul>
-
-<h3>FijaciĂłn por defecto</h3>
-<p>Modificar las opciones de fijaciĂłn por defecto: para los visitadores no conectados. Una vez conectado, estas opciones son sobrecargadas por las del utilizador, a las que puede modificar en la pantalla <span
-class="pwgScreen">perfila</span>.</p>
-
-<p>Es posible cambiar estas opciones para los utilizadores existentes, pero se trata de una otra pantalla : <span class="pwgScreen">AdministraciĂłn, IdentificaciĂłn, Utilizadores</span>, en el cual usted puede modificar estas opciones para una lista de utilizadores seleccionados.</p>
-
-<ul>
-
- <li><strong>Lengua</strong>: Concierne sĂłlo a las redacciones de Piwigo. Los nombres de categorĂ­as, de imagen y las descripciones no son localizados (ie multilingĂźe).</li>
-
- <li><strong>NĂşmero de miniaturas por lĂ­nea</strong></li>
-
- <li><strong>NĂşmero de lĂ­neas por pĂĄgina</strong></li>
-
- <li><strong>Tema de la interfaz</strong></li>
-
- <li><strong>PerĂ­odo reciente</strong>: En dĂ­as. El perĂ­odo durante el cual una imagen es considerada cĂłmo noticia. Este perĂ­odo debe ser superior a 1 dĂ­a.</li>
-
- <li><strong>Desarrollar todas las categorĂ­as</strong>: Âż Desarrollar todas las categorĂ­as en el menĂş? <em>Attention</em>: Esta opciĂłn es susceptible de consumir inĂştilmente recursos si su ĂĄrbol de categorĂ­as contiene numerosos elementos.</li>
-
- <li><strong>Mostrar el nĂşmero de comentarios</strong>: Mostrar nĂşmero utilizador de comentarios debajo de cada miniatura. Consume recursos.</li>
-
- <li><strong>Mostrar el nĂşmero de visualizaciones </strong>: Fija los "hits" rehechos sobre una imagen bajo su miniatura en la pĂĄgina de miniaturas.
- Únicamente válido si el parámetro de configuración avanzada es:<br />
- $conf['show_nb_hits'] = true; <br />
- N.B.: por defaut es a false.</li>
-
- <li><strong>Anchura mĂĄxima de las imĂĄgenes</strong>: A la fijaciĂłn. Si la imagen es mĂĄs ancha que este parĂĄmetro, entonces serĂĄ redimensionnĂŠe a la fijaciĂłn. Si usted piensa en neceser de modificar este parametraje (pues para una fijaciĂłn por defecto), serĂ­a pertinente de directamente redimensionner sus imĂĄgenes almacenadas.</li>
-
- <li><strong>Altura mĂĄxima de las imĂĄgenes</strong>: hasta observa que por la anchura.</li>
-
-</ul>
diff --git a/BSF/language/es_ES/help/group_list.html b/BSF/language/es_ES/help/group_list.html
deleted file mode 100644
index 360283794..000000000
--- a/BSF/language/es_ES/help/group_list.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<h2>Lista grupos</h2>
-
-<p> ManipulaciĂłn de las propiedades de los grupos definidos.</p>
-
-<h3>AĂąadir un grupo</h3>
-
-<p>El administrador puede aĂąadir grupos.</p>
-
-<h3>Lista grupos</h3>
-
-<p>La lista permite para cada grupo:</p>
-
-<ul>
- <li>de acceder a la lista de los miembros</li>
- <li>de acceder a los permisos</li>
- <li>de suprimir el grupo (necesita una confirmaciĂłn)</li>
- <li>de invertir el estatuto " por defecto " (necesita una confirmaciĂłn)</li>
-</ul>
-
-<h3>Grupos por defecto</h3>
-<p>Los grupos por defecto son los grupos asociados automĂĄticamente con cada nuevo utilizador.</p> \ No newline at end of file
diff --git a/BSF/language/es_ES/help/history.html b/BSF/language/es_ES/help/history.html
deleted file mode 100644
index 00702efdf..000000000
--- a/BSF/language/es_ES/help/history.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<h2>HistĂłrico</h2>
-
-<p>Estas pantallas permiten seguir el histĂłrico de navegaciĂłn en Piwigo
- en funciĂłn de las opciones que ha determinado en
-AdministraciĂłn - Ensayo general - seĂąal ReseĂąa histĂłrica.</p>
-
-<h3>EstadĂ­sticas</h3>
-<ul>
- <p>Si quiere que las visitas de las pĂĄginas <span
-class="pwgScreen">index.php</span> y <span
-class="pwgScreen">picture.php</span> sean
-registradas en el cuadro <code>history</code>,
-esta seĂąal permite seguir el nĂşmero de pĂĄginas visitadas</p>
-
- <li><strong>EstadĂ­sticas totales</strong> : ve las estadĂ­sticas por aĂąo.</li>
-
- <li><strong>EstadĂ­sticas de un aĂąo</strong> : ve las estadĂ­sticas de los
- meses del aĂąo seleccionado.</li>
-
- <li><strong>EstadĂ­sticas de un mes</strong> : ve las estadĂ­sticas
- de los dĂ­as del mes seleccionado.</li>
-
- <li><strong>EstadĂ­sticas de un dĂ­a</strong> : ve las estadĂ­sticas
- de las horas del dĂ­a seleccionado.</li>
-
-</ul>
-
-<h3>Buscar</h3>
-<ul>
- <p>Si quiere que las visitas de las pĂĄginas <span
-class="pwgScreen">index.php</span> y <span
-class="pwgScreen">picture.php</span> sean
-registradas en el cuadro <code>history</code>, esta seĂąal permite
-seguir mĂĄs detalladamente las pĂĄginas exploradas en su sitio con ayuda
-de distintos filtros..</p>
-
- <li><strong>Filtrar por fecha</strong> : seleccionar la zona de observaciĂłn cuya
- actividad quiere observar.</li>
-
- <li><strong>Filtrar por tipo de elemento</strong> : seleccionar el tipo de
- elemento cuya actividad quiere observar .</li>
-
- <li><strong>Filtrar por usuario</strong> : seleccionar el usuario cuya actividad
- quiere observar.</li>
-
- <li><strong>Filtrar por nombre del fichero</strong> : seleccionar el nombre del
- fichero cuya actividad quiere observar.</li>
-
- <li><strong>Filtrar por identificador de la imagen</strong> : seleccionar el
- identificador de la imagen cuya actividad quiere observar.</li>
-</ul> \ No newline at end of file
diff --git a/BSF/language/es_ES/help/index.php b/BSF/language/es_ES/help/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/language/es_ES/help/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/language/es_ES/help/maintenance.html b/BSF/language/es_ES/help/maintenance.html
deleted file mode 100644
index 6d82c8c17..000000000
--- a/BSF/language/es_ES/help/maintenance.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<h2>Mantenimiento</h2>
-
-<p>Para optimizar el tiempo de generaciĂłn de las pĂĄginas, Piwigo utiliza informaciones en viĂąeta. Por ejemplo, en lugar de contar el nĂşmero de elementos contenidos en cada categorĂ­a a cada nueva carga de pĂĄgina, esta informaciĂłn es almacenada en la base de datos. TeĂłricamente, esta informaciĂłn debe siempre ser correcta, pero a veces un error puede sobrevenir y la informaciĂłn en viĂąeta se vuelve falsa.</p>
-
-<p>Informaciones se vuelven inĂştiles con tiempo. Suprimirlos de la base de datos libera del espacio disco.</p>
-
-<ul>
-
- <li><strong>Poner al dĂ­a las informaciones de las categorĂ­as:</strong> Para cada categorĂ­a, las informaciones a controller y\o poner al dĂ­a son las siguientes: lista de las categorĂ­as madres, nĂşmero de elementos, fecha del Ăşltimo elemento, la posiciĂłn entre las categorĂ­as hermana, posiciĂłn en el ĂĄrbol completo de las categorĂ­as. Esta acciĂłn tambiĂŠn verifica la coherencia de los representantes.</li>
-
- <li><strong>Poner al dĂ­a las informaciones de las imĂĄgenes:</strong> Para cada imagen, las informaciones que hay que poner al dĂ­a son: camino completo hacia el fichero, la nota media. <em>AtenciĂłn</em>: No confundir con los mĂŠta-datos que son sincronizados sobre la pantalla <span
-class="pwgScreen">AdministraciĂłn, CategorĂ­as, Sincronizar</span> O sobre la pantalla <span class="pwgScreen">Modificar las informaciones de una imagen</span>
-(accesible desde la pĂĄgina de visualizaciĂłn de una imagen <span
-class="pwgScreen">picture.php</span>).</li>
-
- <li><strong>Purgar la reseĂąa histĂłrica:</strong> Suprime todas las lĂ­neas de la mesa <code>history</code>. La pantalla <span
-class="pwgScreen">AdministraciĂłn, Classes de matemĂĄticas superiores, ReseĂąa histĂłrica</span> no muestres entonces ninguna informaciĂłn sobre el pasado. <em>AtenciĂłn</em>: todos los datos estarĂĄn perdidos y no existe ningĂşn medio de recuperarlas.</li>
-
- <li><strong>Purgar las sesiones:</strong> Suprimir las sesiones espiradas..</li>
-
- <li><strong>Purgar los flujos jamĂĄs utilizados de notificaciĂłn</strong></li>
-
- <li><strong>Reparar y optimizar la base de datos:</strong>
-Para cada mesas de la base de datos PhpWegGallery, las operaciones de rĂŠ-planificaciĂłn, de reparaciĂłn y de optimizaciĂłn son efectuadas.
- </li>
-
-</ul>
diff --git a/BSF/language/es_ES/help/notification_by_mail.html b/BSF/language/es_ES/help/notification_by_mail.html
deleted file mode 100644
index a65b3e08f..000000000
--- a/BSF/language/es_ES/help/notification_by_mail.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<h2>NotificaciĂłn por mail</h2>
-
-<p>Esta pantalla permite configurar, administrarles la notificaciĂłn a los utilizadores de cambios por el envĂ­o de un mail.</p>
-
-<p>Esta pantalla es constada por 3 ingletes:</p>
-
-<h3>Paramètrage</h3>
-<p>AccĂŠsible Ăşnicamente en el webmestres, este inglete permite situar los parĂĄmetros de la notificaciĂłn por mail.</p>
-
-<h3>InscripciĂłn</h3>
-<p>AccĂŠsible Ăşnicamente en el webmestres, este inglete permite administrar las inscripciones / dĂŠsinscriptions a la notificaciĂłn por mail.</p>
-
-<h3>EnvĂ­o</h3>
-<p>AccĂŠsible en el webmestres y a los administradores, este inglete permite efectuar los envĂ­os del mails para notificar los cambios.</p>
-
diff --git a/BSF/language/es_ES/help/permalinks.html b/BSF/language/es_ES/help/permalinks.html
deleted file mode 100644
index c94e7cc92..000000000
--- a/BSF/language/es_ES/help/permalinks.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<h2>Lazos permanentes</h2>
-
-<p>Los lazos permanentes son utilizados para devolver el urls mĂĄs hermoso de las categorĂ­as. Cuando una categorĂ­a tiene un lazo permanente asociada, identificĂĄndolo de la categorĂ­a no es necesario mĂĄs en el url.</p>
-
-<p>Cuando un lazo permanente es borrado, usted puede salvaguardarlo en la reseĂąa histĂłrica de los lazos permanentes, de modo que los lazos externos tienen PWG todavĂ­a funcionan. En la reseĂąa histĂłrica de los lazos permanentes usted puede ver la fecha de borradura del lazo, asĂ­ como fecha de la Ăşltima utilizaciĂłn y el nĂşmero de utilizaciones de este lazo.</p>
-
-<p>Por favor, anote que los lazos permanentes deben ser Ăşnicos. Deben tambiĂŠn ser Ăşnicos en la reseĂąa histĂłrica de los lazos permanentes.</p>
diff --git a/BSF/language/es_ES/help/search.html b/BSF/language/es_ES/help/search.html
deleted file mode 100644
index aebb98aae..000000000
--- a/BSF/language/es_ES/help/search.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<h2>BĂşsqueda</h2>
-
-<p>BĂşsqueda de imĂĄgenes a travĂŠs del conjunto de la galerĂ­a.</p>
-
-<dl>
-
- <dt>Buscar una palabra</dt>
-
- <dd>BĂşsqueda una o varias palabras en todos los atributos atados a las imĂĄgenes. Utilizar * como mono para las bĂşsquedas parciales.</dd>
-
- <dt>BĂşsqueda de un autor</dt>
-
- <dd>Utilizar * como mono para las bĂşsquedas parciales.</dd>
-
- <dt>BĂşsqueda por fecha</dt>
-
- <dd>Seleccionar una fecha y/o una fecha de fin. Dejar la fecha vacĂ­a si desearle hacer una bĂşsqueda "delantera". El aĂąo debe haber entrado en el Ăşltimo campo en forma de 4 cifras (2005 por ejemplo).</dd>
-
- <dt>BĂşsqueda en las categorĂ­as</dt>
-
- <dd>Seleccionar las categorĂ­as sobre las cuales restringir la bĂşsqueda.</dd>
-
-</dl>
diff --git a/BSF/language/es_ES/help/site_manager.html b/BSF/language/es_ES/help/site_manager.html
deleted file mode 100644
index 6c90392a4..000000000
--- a/BSF/language/es_ES/help/site_manager.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<h2>Sitios distante</h2>
-
-<p>Piwigo ofrece la posibilidad de utilizar varias sitios para almacenar los ficheros que compondrĂĄn su galerĂ­a. Esto puede ser Ăştil si su galerĂ­a estĂĄ instalada sobre un espacio de almacenamiento limitado y si usted tiene numerosos ficheros que hay que mostrar.</p>
-
-
-<ol>
-
- <li>editar el fichero <span
-class="filename">tools/create_listing_file.php</span> modificando la secciĂłn de los parĂĄmetros como <code>$conf['prefix_thumbnail']</code> or
-<code>$conf['use_exif']</code>.</li>
-
- <li>colocar el fichero <span
-class="filename">tools/create_listing_file.php</span> modificado sobre su sitio distante, en el mismo repertorio que los repertorios que representan sus categorĂ­as (como el repertorio <span class="filename">galleries</span> de
-ce site) para FTP. Por ejemplo, digamos que usted puede acceder a <span
-class="filename">http://exemple.com/galleries/create_listing_file.php</span>.</li>
-
- <li>Ir sobre <span class="pwgScreen">AdministraciĂłn, CategorĂ­as, Gerente de las sitios</span>. Pedir crear una nueva sitio, por ejemplo <span
-class="filename">http://exemple.com/galleries</span>.</li>
-
- <li>
-
- <p>Una nueva sitio distante es registrada. 4 acciones posibles :</p>
-
- <ol>
-
- <li><strong>generar la lista</strong> : lanza una demanda distante para generar el fichero de listado distante</li>
-
- <li><strong>sincronizar</strong> : lee el fichero distante <span
-class="filename">listing.xml</span> y sincroniza con la base de datos local</li>
-
- <li><strong>limpiar</strong> : Suprime el fichero distante de listado</li>
-
- <li><strong>destruir</strong> : suprime la sitio (y todos los elementos que son asociados con eso) en la base de datos</li>
-
- </ol>
-
- </li>
-
-</ol>
-
-<!--<p>Usted tambiĂŠn puede efectuar estas operaciones manualmente editando el fichero <span class = filename "> listing.xml </span> en la mano y desplazĂĄndolo hacia su repertorio raĂ­z. Hacerse sobre <span class = pwgScreen "> AdministraciĂłn, CategorĂ­as, Ubicaciones(Sitios) distante </span>:
-Piwigo detecta el fichero y propone servirse de eso.</p>-->
diff --git a/BSF/language/es_ES/help/synchronize.html b/BSF/language/es_ES/help/synchronize.html
deleted file mode 100644
index 02dbb9e07..000000000
--- a/BSF/language/es_ES/help/synchronize.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<h2>Sincronizar</h2>
-
-<ul>
-
- <li>Existen 2 tipos de sincronizaciones: estructura y meta-datos. Sincronizar la estructura vuelve a sincronizar su ĂĄrbol de los repertorios y los ficheros con la representaciĂłn de la estructura en la base de datos. Sincronizar los mĂŠta-datos permite poner al dĂ­a las informaciones como el peso del fichero, las dimensiones, los datos EXIF o IPTC.</li>
-
- <li>La première synchronisation à effectuer doit être celle sur la
-structure.</li>
-
- <li>El proceso de sincronizaciĂłn puede llevar tiempo (con arreglo a la carga del servidor y de la cantidad de ficheros administrando), pues es posible avanzar paso a paso: categorĂ­a por categorĂ­a.</li>
-
-</ul>
diff --git a/BSF/language/es_ES/help/thumbnail.html b/BSF/language/es_ES/help/thumbnail.html
deleted file mode 100644
index 414741183..000000000
--- a/BSF/language/es_ES/help/thumbnail.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<h2>CreaciĂłn de las miniaturas</h2>
-
-<p>CreaciĂłn de las miniaturas faltantes. La utilizaciĂłn de este carĂĄcter funcional no es aconsejada si su galerĂ­a es albergada sobre un servidor mutualisĂŠ (resources mĂĄquina compartidas).</p>
-
-<dl>
-
- <dt>VersiĂłn de GD</dt>
-
- <dd>GD es una librerĂ­a grĂĄfica de manipulaciĂłn de imĂĄgenes para PHP. Escoja la versiĂłn instalada sobre su servidor. Si usted escoge al mal, mensajes de errores aparecerĂĄn, vuelva sobre la pĂĄgina precedente y escoja la otra versiĂłn. Si ninguna versiĂłn marcha, esto significa que GD no estĂĄ disponible.</dd>
-
- <dt>Anchura y altura</dt>
-
- <dd>Dimensiones mĂĄximo que las miniaturas pueden tomar. El ratio anchura / altura original es conservado. Los valores por defecto son modificables gracias a los parĂĄmetros de configuraciĂłn <code>tn_width</code> y
-<code>tn_height</code> (ver el fichero <span
-class="filename">include/config_default.inc.php</span>).</dd>
-
- <dt>NĂşmero de miniaturas que hay que crear</dt>
-
- <dd>No hĂŠsayez de miniaturizar un nĂşmero demasiado grande de imĂĄgenes a la vez. En efecto, la miniaturizaciĂłn requiere una utilizaciĂłn relativamente gruesa procesador.</dd>
-
- <dt>TamaĂąo de fichero</dt>
-
- <dd>Las miniaturas son creadas al tamaĂąo JPEG. SĂłlo el tamaĂąo PNG y JPEG pueden ser miniaturizados.</dd>
-
-</dl>
diff --git a/BSF/language/es_ES/help/user_list.html b/BSF/language/es_ES/help/user_list.html
deleted file mode 100644
index 3cea66069..000000000
--- a/BSF/language/es_ES/help/user_list.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<h2>Lista utilizadores</h2>
-
-<p>ManipulaciĂłn de las propiedades de los utilizadores registrados. Las Ăşnicas los permisos son administrados en una pantalla diferente.</p>
-
-<h3>AĂąadir a un utilizador</h3>
-
-<p>El administrador puede aĂąadir manualmente a utilizadores.</p>
-
-<h3>Lista utilizadores</h3>
-
-<p>La lista puede ser filtrada con nombre de utilizador (* = mono), con grupo o todavĂ­a el estatuto. La lista puede ser ordenada segĂşn la fecha de registro o el nombre de utilizador, por orden ascendente al desminuir.</p>
-
-<p>Esta pantalla funciona por modificaciĂłn de varios utilizadores simultĂĄneamente:</p>
-
-<ul>
- <li>suprimir a utilizadores (necesita una confirmaciĂłn)</li>
- <li>cambiar el estatuto</li>
- <li>asociar o disociar grupos</li>
- <li>modificar las propiedades de fijaciĂłn</li>
- <li>modificar las propiedades anexos</li>
-</ul>
-
-<p>El blanco es la lista de los utilizadores seleccionados (por defecto) o bien todos los utilizadores de la lista filtrada.</p>
-
-<h3>Consejero</h3>
-<p>DefiniciĂłn de un utilizador aconsejar:</p>
-<ul>
- <li>permite acceder a todas las pantallas permitidas por su estatuto</li>
- <li>acceso Ăşnicamente en consulta o en simulaciĂłn</li>
-</ul>
-
-<p>Es posible permitir el asignaciĂłn del modo aconsejar con la variable $conf['allow_adviser'].</p>
-<p>Si esta variable estĂĄ a 'true', serĂĄ posible definir al utilizador como un consejero</p>
diff --git a/BSF/language/es_ES/help/web_service.html b/BSF/language/es_ES/help/web_service.html
deleted file mode 100644
index 7f532f7a8..000000000
--- a/BSF/language/es_ES/help/web_service.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<h2>Web Servicio Checker</h2>
-
-<p>Esta pĂĄgina permite definir los parĂĄmetros de su web servicio.</p>
-
-<dl>
-
- <dt>Condiciones de funcionamiento</dt>
-
- <dd>Si el acceso a Web Servicios es controlado (ConfiguraciĂłn avanzada => $conf [' ws_access_control ']) usted encuentra aquĂ­ todos los valores de la configuraciĂłn avanzada relativa a Web Servicios.</dd>
-
- <dt>Llave confidencial (Obligatoria)</dt>
-
- <dd>Llave Ăşnica que hay que compartir con su compaĂąero. Debe ser bastante largo (8 carĂĄcteres por ejemplo), debe ser bastante complejo (con cifras, mayĂşsculas y minĂşsculas, y carĂĄcteres especiales).
- Por ejemplo: "P!e2r!k Le G@2l".
-
- <strong>Este campo es enmascarado en modo aconsejado.</strong>
-
- <dt>Blanco (Facultativo)</dt>
-
- <dd>Sea una lista de identifiants de imĂĄgenes esto:<ul><li>
- list/277,275,142,235,178,190,204,236-238,253,268,276,285,41,73</li><li>
- Una lista de categorĂ­as como : cat/16,32,21</li><li>
- ou encore une liste de tags : tag/22,61,36 </li></ul>
- Todo pone en una lista de identifiants serĂĄ reducido tiene su expresiĂłn mĂĄs simple:<ul><li>
- list/41,73,142,178,190,204,<strong>235-238</strong>,253,268,<strong>275-277</strong>,285</li></ul>
-
- </dd>
-
- <dt>Acceso limitado (Facultativo)</dt>
-
- <dd>Si usted desea limitar a su compaĂąero a un tipo particular de demanda.</dd>
-
- <dt>LĂ­mite de transmision </dt>
-
- <dd>NĂşmero mĂĄximo de imĂĄgenes enviadas a su compaĂąero a cada una de sus demandas.</dd>
-
- <dt>DuraciĂłn </dt>
-
- <dd>A partir de ahora, indique la disponibilidad en dĂ­as. Si usted traslada la disponibilidad mĂĄs allĂĄ de su duraciĂłn, el servicio no deberĂ­a jamĂĄs ser devuelto.</dd>
-
- <dt>Comentario </dt>
-
- <dd>Le permite describir quiĂŠn se encuentra detrĂĄs de este Servicio Web, de modo mĂĄs claro para usted.
- No olvide que un Administrador en modo aconsejar puede leer el contenido de este comentario.</dd>
-
-</dl>
diff --git a/BSF/language/es_ES/index.php b/BSF/language/es_ES/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/language/es_ES/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/language/es_ES/install.lang.php b/BSF/language/es_ES/install.lang.php
deleted file mode 100644
index 9eca984e2..000000000
--- a/BSF/language/es_ES/install.lang.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-$lang['install_message'] = 'Mensaje';
-$lang['Initial_config'] = 'ConfiguraciĂłn de Base';
-$lang['Default_lang'] = 'Lengua por defecto de la galerĂ­a';
-$lang['step1_title'] = 'ConfiguraciĂłn de la Base de datos';
-$lang['step2_title'] = 'ConfiguraciĂłn de la cuenta Administrador';
-$lang['Start_Install'] = 'Empezar la instalaciĂłn';
-$lang['reg_err_mail_address'] = 'La direcciĂłn mail debe ser la forma xxx@yyy.eee (ejemplo: jack@altern.org)';
-
-$lang['install_webmaster'] = 'Administrador';
-$lang['install_webmaster_info'] = 'Este identificado aparecerĂĄ en todos sus visitadores. Le sirve para administrar la sitio';
-
-$lang['step1_confirmation'] = 'Los parĂĄmetros entrados son correctos';
-$lang['step1_err_db'] = 'La conexiĂłn al camarero(servidor) es O.K., pero imposible conectarse a esta base de datos';
-$lang['step1_err_server'] = 'Imposible conectarse al servidor';
-
-$lang['step1_host'] = 'HuĂŠsped MySQL';
-$lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';
-$lang['step1_user'] = 'Utilizador';
-$lang['step1_user_info'] = 'Nombre de utilizador para su hĂŠbergeur';
-$lang['step1_pass'] = 'Palabra de paso';
-$lang['step1_pass_info'] = 'El abastecido por su hĂŠbergeur';
-$lang['step1_database'] = 'Nombre de la base';
-$lang['step1_database_info'] = 'El abastecido por su hĂŠbergeur';
-$lang['step1_prefix'] = 'Prefijo nombres de mesa';
-$lang['step1_prefix_info'] = 'El nombre de las mesas aparecerĂĄ con este prefijo (permite administrar mejor su base de datos)';
-$lang['step2_err_login1'] = 'Por favor, recoja un pseudo para el webmaster';
-$lang['step2_err_login3'] = 'El pseudo del webmaster no debe contener carĂĄcter " y \'';
-$lang['step2_err_pass'] = 'Por favor, arregle su palabra de paso';
-$lang['install_end_title'] = 'InstalaciĂłn acabada';
-$lang['step2_pwd'] = 'Palabra de paso';
-$lang['step2_pwd_info'] = 'Debe quedar confidencial, permite acceder al tabla de administraciĂłn.';
-$lang['step2_pwd_conf'] = 'Palabra de paso [Confirmar]';
-$lang['step2_pwd_conf_info'] = 'ComprobaciĂłn';
-$lang['step1_err_copy'] = 'Copie el texto en rojo entre las rayas y pegúelo en el fichero mysql.inc.php que se encuentra en el repertorio " include " a la base del lugar donde usted instaló a Piwigo (el fichero mysql.inc.php debe contener SÓLO lo que está en azul entre las rayas, ninguna vuelta a la línea o espacio es autorizado)';
-$lang['install_help'] = 'Âż Necesidad de ayudante? Plantee su cuestiĂłn sobre ĂŠl <a href="%s">foro de Piwigo</a>.';
-$lang['install_end_message'] = 'La configuraciĂłn de la aplicaciĂłn correctamente se celebrĂł, coloca en la etapa prĂłxima<br /><br />
-Por medida de seguridad, gracias por suprimir el fichero "install.php"<br />
-La vez suprimido este fichero, por favor seguir estas indicaciones:
-<ul>
-<li>Vaya sobre la pĂĄgina de identificaciĂłn : [ <a href="./identification.php">identificaciĂłn</a> ] Y conĂŠctese con pseudo dado para el webmaster</li>
-<li>Éste le permite acceder a la parte administración y a las instrucciones para colocar las imágenes en los repertorios.</li>
-</ul>';
-$lang['conf_mail_webmaster'] = 'Dirige e-mail del Administrador';
-$lang['conf_mail_webmaster_info'] = 'Los visitadores podrĂĄn ponerse en contacto con usted por este mail';
-?> \ No newline at end of file
diff --git a/BSF/language/es_ES/iso.txt b/BSF/language/es_ES/iso.txt
deleted file mode 100644
index 41d97645c..000000000
--- a/BSF/language/es_ES/iso.txt
+++ /dev/null
@@ -1 +0,0 @@
-EspaĂąol [ES] \ No newline at end of file
diff --git a/BSF/language/fr_FR/about.html b/BSF/language/fr_FR/about.html
deleted file mode 100644
index 15cf5e8bd..000000000
--- a/BSF/language/fr_FR/about.html
+++ /dev/null
@@ -1,8 +0,0 @@
- <li>Piwigo est une application web permettant de crĂŠer facilement
-une galerie d'images en ligne.</li>
-
- <li>Techniquement, Piwigo est dĂŠveloppĂŠe en PHP avec une base de
-donnĂŠes MySQL.</li>
-
- <li>Si vous avez des suggestions ou des commentaires, visitez le <a
- href="http://piwigo.org">site officiel</a>.</li>
diff --git a/BSF/language/fr_FR/admin.lang.php b/BSF/language/fr_FR/admin.lang.php
deleted file mode 100644
index 5d7c6c505..000000000
--- a/BSF/language/fr_FR/admin.lang.php
+++ /dev/null
@@ -1,649 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-$lang['%d association'] = '%d association';
-$lang['%d associations'] = '%d associations';
-$lang['cat_inclu_part1_S'] = '%d catĂŠgorie dont ';
-$lang['cat_inclu_part1_P'] = '%d catĂŠgories dont ';
-$lang['cat_inclu_part2_S'] = '%d physique';
-$lang['cat_inclu_part2_P'] = '%d physiques';
-$lang['cat_inclu_part3_S'] = ' et %d virtuelle';
-$lang['cat_inclu_part3_P'] = ' et %d virtuelles';
-$lang['%d category moved'] = '%d catĂŠgorie dĂŠplacĂŠe';
-$lang['%d categories moved'] = '%d catĂŠgories dĂŠplacĂŠes';
-$lang['%d group'] = '%d groupe';
-$lang['%d groups'] = '%d groupes';
-$lang['%d member'] = '%d membre';
-$lang['%d members'] = '%d membres';
-$lang['%d tag'] = '%d tag';
-$lang['%d tags'] = '%d tags';
-$lang['%d user comment rejected'] = '%d commentaire d\'utilisateur rejetĂŠ';
-$lang['%d user comments rejected'] = '%d commentaires d\'utilisateurs rejetĂŠs';
-$lang['%d user comment validated'] = '%d commentaire d\'utilisateur validĂŠ';
-$lang['%d user comments validated'] = '%d commentaires d\'utilisateurs validĂŠs';
-$lang['%d user deleted'] = '%d utilisateur supprimĂŠ';
-$lang['%d users deleted'] = '%d utilisateurs supprimĂŠs';
-$lang['%d user'] = '%d utilisateur';
-$lang['%d users'] = '%d utilisateurs';
-$lang['%d waiting for validation'] = '%d en attente de validation';
-$lang['%d waiting pictures rejected'] = '%d images en attente rejetĂŠes';
-$lang['%d waiting pictures validated'] = '%d images en attente validĂŠes';
-$lang['Actions'] = 'Actions';
-$lang['Activate'] = 'Activer';
-$lang['Add/delete a permalink'] = 'Ajouter/effacer un lien permanent';
-$lang['Add a tag'] = 'Ajouter un tag';
-$lang['Add a user'] = 'Ajouter un utilisateur';
-$lang['Add group'] = 'Ajouter un groupe';
-$lang['Add selected elements to caddie'] = 'Ajouter les ĂŠlĂŠments sĂŠlectionnĂŠs au panier';
-$lang['Add'] = 'Ajouter';
-$lang['Allow user registration'] = 'Permettre l\'enregistrement des utilisateurs';
-$lang['Apply to subcategories'] = 'Appliquer aux sous-catĂŠgories';
-$lang['Are you sure?'] = 'Etes-vous sur?';
-$lang['Associated'] = 'AssociĂŠe Ă ';
-$lang['Association to categories'] = 'Association aux catĂŠgories';
-$lang['Batch management'] = 'Gestion par lot';
-$lang['Caddie management'] = 'Gestion du panier';
-$lang['Caddie'] = 'Panier';
-$lang['Categories authorized thanks to group associations'] = 'CatÊgories accessibles grâce à l\'appartenance aux groupes';
-$lang['Categories manual order was saved'] = 'L\'ordre manuel des catĂŠgories a ĂŠtĂŠ sauvegardĂŠ';
-$lang['Categories ordered alphanumerically'] = 'CatĂŠgories ordonnĂŠes alphabĂŠtico-numĂŠriquement';
-$lang['Category elements associated to the following categories: %s'] = 'Les ĂŠlĂŠments de la catĂŠgorie ont ĂŠtĂŠ associĂŠs aux catĂŠgories suivantes : %s';
-$lang['Check for upgrade failed for unknown reasons.'] = 'La vÊrification de la dernière version sur le serveur a ÊchouÊe pour une raison inconnue.';
-$lang['Check for upgrade'] = 'Dernière version ?';
-$lang['Comments for all'] = 'Commentaires pour tous';
-$lang['Controversy'] = 'Controverse';
-$lang['Current name'] = 'Nom courant';
-$lang['Database'] = 'Base de donnĂŠes';
-$lang['Deactivate'] = 'DĂŠsactiver';
-$lang['Delete Representant'] = 'Supprimer le reprĂŠsentant';
-$lang['Delete selected tags'] = 'Supprimer les tags sĂŠlectionnĂŠs';
-$lang['Delete selected users'] = 'Supprimer les utilisateurs sĂŠlectionnĂŠs';
-$lang['Deletions'] = 'Suppressions';
-$lang['Deny selected groups'] = 'Interdire l\'accès aux groupes sÊlectionnÊs';
-$lang['Deny selected users'] = 'Interdire l\'accès aux utilisateurs sÊlectionnÊs';
-$lang['Description'] = 'Description';
-$lang['Display options'] = 'Options d\'affichage';
-$lang['Dissociated'] = 'DissociĂŠe de';
-$lang['Does not represent'] = 'Ne reprĂŠsente pas';
-$lang['Edit all picture informations'] = 'Modifier toutes les informations liĂŠes Ă  cette image';
-$lang['Edit selected tags'] = 'Editer les tags sĂŠlectionnĂŠs';
-$lang['Edit tags'] = 'Editer les tags';
-$lang['Elements'] = 'Éléments';
-$lang['Email administrators when a new user registers'] = 'Notifier les administrateurs lors de l\'inscription d\'un utilisateur';
-$lang['Email administrators when a valid comment is entered'] = 'Notifier les administrateurs quand un commentaire est enregistrĂŠ';
-$lang['Email administrators when a comment requires validation'] = 'Notifier les administrateurs quand un commentaire requiert sa validation';
-$lang['Email administrators when a picture is uploaded'] = 'Notifier les administrateurs quand une image est tĂŠlĂŠchargĂŠe';
-$lang['Empty caddie'] = 'Vider le panier';
-$lang['Environment'] = 'Environnement';
-$lang['Form'] = 'Formulaire';
-$lang['Gallery URL'] = 'URL de la galerie';
-$lang['Gallery description'] = 'Description de la galerie';
-$lang['Gallery title'] = 'Titre de la galerie';
-$lang['Grant selected groups'] = 'Donner l\'accès aux groupes sÊlectionnÊs';
-$lang['Grant selected users'] = 'Donner l\'accès aux utilisateurs sÊlectionnÊs';
-$lang['Group name'] = 'Nom du groupe';
-$lang['Groups'] = 'Groupes';
-$lang['Guests'] = 'InvitĂŠs';
-$lang['History'] = 'Historique';
-$lang['Informations'] = 'Informations';
-$lang['Install'] = 'Installer';
-$lang['Link all category elements to a new category'] = 'Associer tous les ĂŠlĂŠments de la catĂŠgorie Ă  une nouvelle catĂŠgorie';
-$lang['Link all category elements to some existing categories'] = 'Associer tous les ĂŠlĂŠments de la catĂŠgorie Ă  des catĂŠgories existantes';
-$lang['Linked categories'] = 'CatĂŠgories associĂŠes';
-$lang['Lock gallery'] = 'Verrouiller la galerie';
-$lang['Maintenance'] = 'Maintenance';
-$lang['Manage permissions for a category'] = 'GĂŠrer les permissions pour une catĂŠgorie';
-$lang['Manage permissions for group "%s"'] = 'GĂŠrer les permissions pour le groupe "%s"';
-$lang['Manage permissions for user "%s"'] = 'GĂŠrer les permissions pour l\'utilisateur "%s"';
-$lang['Manage tags'] = 'GĂŠrer les tags';
-$lang['Members'] = 'Membres';
-$lang['Metadata synchronized from file'] = 'Meta-donnĂŠes synchronisĂŠes Ă  partir du fichier';
-$lang['Move categories'] = 'DĂŠplacer les catĂŠgories';
-$lang['Move'] = 'DĂŠplacer';
-$lang['Name'] = 'Nom';
-$lang['New name'] = 'Nouveau nom';
-$lang['New parent category'] = 'Nouvelle catĂŠgorie parente';
-$lang['New tag'] = 'Nouveau tag';
-$lang['No tag defined. Use Administration>Pictures>Tags'] = 'Aucun tag dĂŠfini. Utiliser l\'ĂŠcran Adminstration>Images>Tags';
-$lang['Number of comments per page'] = 'Nombre de commentaires par page';
-$lang['Number of rates'] = 'Nombre de notes';
-$lang['Number of thumbnails to create'] = 'Nombre de miniatures Ă  crĂŠer';
-$lang['Only private categories are listed'] = 'Seules les catĂŠgories privĂŠes sont listĂŠes';
-$lang['Operating system'] = 'System d\'exploitation';
-$lang['Options'] = 'Options';
-$lang['Order alphanumerically'] = 'Ordonner alphabĂŠtico-numĂŠriquement';
-$lang['Other private categories'] = 'Autres catĂŠgories privĂŠes';
-$lang['Page banner'] = 'Bannière des pages';
-$lang['Parent category'] = 'CatĂŠgorie parente';
-$lang['Path'] = 'Chemin';
-$lang['Permalink'] = 'Lien permanent';
-$lang['Permalink_%s_histo_used_by_%s'] = 'Le lien permanent %s a ĂŠtĂŠ utilisĂŠ prĂŠcĂŠdemment par la catĂŠgorie %s. Veuillez l\'effacer de l\'historique des liens permanents';
-$lang['Permalink_name_rule'] = 'Le lien permanent ne doit contenir des caractères que parmi "a-zA-Z0-9", "-", "_" ou "/". Il ne doit pas être numÊrique ou commencer par un nombre suivi par "-"';
-$lang['Permalink %s is already used by category %s'] = 'Le lien permanent %s est dèja utilisÊ par la catÊgorie %s';
-$lang['Permalink history'] = 'Historique des liens permanents';
-$lang['Permalinks'] = 'Liens permanents';
-$lang['Permission denied'] = 'Accès interdit';
-$lang['Permission granted thanks to a group'] = 'Accès autorisÊ grâce à l\'appartenance aux groupes';
-$lang['Permission granted'] = 'Accès autorisÊ';
-$lang['Picture informations updated'] = 'Informations de l\'image mises Ă  jour';
-$lang['Plugins'] = 'Plugins';
-$lang['Position'] = 'Position';
-$lang['Preferences'] = 'PrĂŠfĂŠrences';
-$lang['Properties'] = 'PropriĂŠtĂŠs';
-$lang['Random picture'] = 'Au hasard';
-$lang['Rate date'] = 'Date de notation';
-$lang['Rating by guests'] = 'Notation par les invitĂŠs';
-$lang['Rating'] = 'Notation';
-$lang['Reject All'] = 'Tout rejeter';
-$lang['Reject'] = 'Rejeter';
-$lang['Representant'] = 'ReprĂŠsentant';
-$lang['Representation of categories'] = 'ReprĂŠsentation des catĂŠgories';
-$lang['Representative'] = 'ReprĂŠsentant';
-$lang['Represents'] = 'ReprĂŠsente';
-$lang['Save order'] = 'Sauvegarder l\'ordre';
-$lang['Save to permalink history'] = 'Sauvegarder dans l\'historique des liens permanents';
-$lang['Select at least one category'] = 'SĂŠlectionner au moins une catĂŠgorie';
-$lang['Select at least one picture'] = 'SĂŠlectionner au moins une image';
-$lang['Select at least one user'] = 'SĂŠlectionner au moins un utilisateur';
-$lang['Show info'] = 'Montrer les informations';
-$lang['Site manager'] = 'Gestionnaire des sites';
-$lang['Status'] = 'Statut';
-$lang['Statistics'] = 'Statistiques';
-$lang['Storage category'] = 'CatĂŠgorie de stockage';
-$lang['Sum of rates'] = 'Somme des notes';
-$lang['Tag "%s" already exists'] = 'Le tag "%s" existe dĂŠjĂ ';
-$lang['Tag "%s" was added'] = 'Le tag "%s" a ĂŠtĂŠ ajoutĂŠ';
-$lang['Tag selection'] = 'SĂŠlection de tags';
-$lang['Take selected elements out of caddie'] = 'Sortir les ĂŠlĂŠments sĂŠlectionnĂŠs du panier';
-$lang['The %d following tag were deleted'] = 'Le tag suivant a ĂŠtĂŠ supprimĂŠ';
-$lang['The %d following tags were deleted'] = 'Les %d tags suivants ont ĂŠtĂŠ supprimĂŠs';
-$lang['Unable to check for upgrade since allow_url_fopen is disabled.'] = 'Impossible de connaÎtre la dernière version car la fonction allow_url_fopen est dÊsactivÊe.';
-$lang['Uninstall'] = 'DĂŠsinstaller';
-$lang['Use default sort order']='Utiliser l\'ordre de tri des images par dĂŠfaut (dĂŠfini dans le fichier de configuration)';
-$lang['User comments validation'] = 'Validation des commentaires d\'utilisateurs';
-$lang['Users'] = 'Utilisateurs';
-$lang['Validate All'] = 'Tout valider';
-$lang['Validate'] = 'Valider';
-$lang['Validation'] = 'Validation';
-$lang['Version'] = 'Version';
-$lang['Virtual categories movement'] = 'DĂŠplacement de catĂŠgories virtuelles';
-$lang['Virtual categories to move'] = 'CatĂŠgories virtuelles Ă  dĂŠplacer';
-$lang['Virtual category name'] = 'Nom de la catĂŠgorie virtuelle';
-$lang['Webmaster cannot be deleted'] = 'Le webmestre ne peut pas ĂŞtre supprimĂŠ';
-$lang['You are running on development sources, no check possible.'] = 'Vous travaillez avec les sources de dÊveloppement, impossible de vÊrifier la dernière version.';
-$lang['You cannot delete your account'] = "Vous ne pouvez pas supprimer votre compte";
-$lang['You cannot move a category in its own sub category'] = 'Vous ne pouvez pas dĂŠplacer une catĂŠgorie dans sa propre sous-catĂŠgorie';
-$lang['You need to confirm deletion'] = 'Vous devez confirmer la suppression';
-$lang['add tags'] = 'ajouter les tags';
-$lang['adviser'] = 'Conseiller';
-$lang['associate to category'] = 'associer Ă  la catĂŠgorie';
-$lang['associate to group'] = 'associer au groupe';
-$lang['authorized'] = 'AutorisĂŠs';
-$lang['cat_add'] = 'Ajouter une catĂŠgorie virtuelle';
-$lang['cat_comments_title'] = 'Autoriser les utilisateurs Ă  ajouter des commentaires dans les catĂŠgories sĂŠlectionnĂŠes';
-$lang['cat_error_name'] = 'Le nom de la catĂŠgorie ne doit pas ĂŞtre vide';
-$lang['cat_lock_title'] = 'Verrouiller les catĂŠgories';
-$lang['cat_private'] = 'CatĂŠgorie privĂŠe';
-$lang['cat_public'] = 'CatĂŠgorie publique';
-$lang['cat_representant'] = 'Trouver un nouveau reprĂŠsentant au hasard';
-$lang['cat_security'] = 'Publique / PrivĂŠe';
-$lang['cat_status_title'] = 'GÊrer le type d\'accès pour les catÊgories sÊlectionnÊes';
-$lang['cat_upload_title'] = 'SĂŠlectionner les catĂŠgories autorisĂŠes Ă  l\'ajout';
-$lang['cat_virtual_added'] = 'CatĂŠgorie virtuelle ajoutĂŠe';
-$lang['cat_virtual_deleted'] = 'CatĂŠgorie virtuelle supprimĂŠe';
-$lang['category'] = 'catĂŠgorie';
-$lang['conf_access'] = 'Type d\'accès';
-$lang['conf_comments_title'] = 'Commentaires';
-$lang['conf_confirmation'] = 'Informations enregistrĂŠes dans la base de donnĂŠes';
-$lang['conf_display'] = 'Affichage par dĂŠfaut';
-$lang['conf_history_title'] = 'Historique';
-$lang['conf_gallery_url_error'] = 'L\'adresse de la galerie n\'est pas valide.';
-$lang['conf_main_title'] = 'Principale';
-$lang['conf_nb_comment_page_error'] = 'Le nombre de commentaires d\'utilisateurs par page doit ĂŞtre compris entre 5 et 50.';
-$lang['config'] = 'Configuration';
-$lang['confirm'] = 'confirmer';
-$lang['Date'] = 'Date';
-$lang['delete category'] = 'supprimer la catĂŠgorie';
-$lang['description'] = 'description';
-$lang['dissociate from category'] = 'dissocier de la catĂŠgorie';
-$lang['dissociate from group'] = 'dissocier du groupe';
-$lang['edit category permissions'] = 'Modifier les permissions de la catĂŠgorie';
-$lang['editcat_confirm'] = 'Les informations de la catÊgorie ont ÊtÊ mises à jour avec succès.';
-$lang['editcat_uploadable'] = 'Autoriser l\'ajout d\'images';
-$lang['elements per page'] = 'ĂŠlĂŠments par page';
-$lang['elements'] = 'ĂŠlĂŠments';
-$lang['enabled_high'] = 'Haute dĂŠfinition actif';
-$lang['file'] = 'fichier';
-$lang['filesize'] = 'poids';
-$lang['first element added on %s'] = 'premier ĂŠlĂŠment ajoutĂŠ le %s';
-$lang['forbidden'] = 'interdit';
-$lang['conf_general'] = 'GĂŠnĂŠrale';
-$lang['global mode'] = 'mode global';
-$lang['group "%s" added'] = 'groupe "%s" ajoutĂŠ';
-$lang['group "%s" deleted'] = 'groupe "%s" supprimĂŠ';
-$lang['group "%s" updated'] = 'groupe "%s" mis Ă  jour';
-$lang['group'] = 'groupe';
-$lang['group_add_error1'] = 'Le nom du groupe ne doit pas contenir " or \' et ne doit pas ĂŞtre vide.';
-$lang['group_add_error2'] = 'Ce nom est dĂŠjĂ  utilisĂŠ par un autre groupe.';
-$lang['groups'] = 'Groupes';
-$lang['instructions'] = 'Instructions';
-$lang['is_high_disabled'] = '';
-$lang['is_high_enabled'] = 'Haute dĂŠfinition';
-$lang['jump to category'] = 'se rendre dans la catĂŠgorie';
-$lang['jump to image'] = 'se rendre Ă  l\'image';
-$lang['leave'] = 'laisser';
-$lang['lock'] = 'Verrouiller';
-$lang['locked'] = 'VerrouillĂŠ';
-$lang['manage category elements'] = 'gĂŠrer les ĂŠlĂŠments de la catĂŠgorie';
-$lang['manage sub-categories'] = 'gĂŠrer les sous-catĂŠgories';
-$lang['manage'] = 'GĂŠrer';
-$lang['maximum height'] = 'hauteur maximum';
-$lang['maximum width'] = 'largeur maximum';
-$lang['name'] = 'nom';
-$lang['nbm_background_treatment_redirect_second'] = 'Le temps d\'exĂŠcution ĂŠtant dĂŠpassĂŠ, le traitement doit continuer [Temps estimĂŠ: %d second].';
-$lang['nbm_background_treatment_redirect_seconds'] = 'Le temps d\'exĂŠcution ĂŠtant dĂŠpassĂŠ, le traitement doit continuer [Temps estimĂŠ: %d secondes].';
-$lang['nbm_break_timeout_list_user'] = 'Le temps de prĂŠparation de la liste des utilisateurs pour l\'envoi est limitĂŠ. Les autres utilisateurs ne sont pas listĂŠs.';
-$lang['nbm_break_timeout_send_mail'] = 'Le temps d\'envoi des mails est limitĂŠ. Les autres envois de mail ont ĂŠtĂŠ ignorĂŠs.';
-$lang['nbm_col_check_user_send_mail'] = 'A envoyer ?';
-$lang['nbm_col_last_send'] = 'Dernier envoi';
-$lang['nbm_col_mail'] = 'email';
-$lang['nbm_col_user'] = 'Utilisateur';
-$lang['nbm_complementary_mail_content'] = 'Contenu complĂŠmentaire au mail';
-$lang['nbm_content_byebye'] = 'A bientĂ´t,';
-$lang['nbm_content_goto_1'] = 'Rendez-vous sur ';
-$lang['nbm_content_goto_2'] = '.';
-$lang['nbm_content_hello_1'] = 'Bonjour ';
-$lang['nbm_content_hello_2'] = ',';
-$lang['nbm_content_new_elements'] = 'De nouveaux ĂŠlĂŠments ont ĂŠtĂŠ ajoutĂŠs ';
-$lang['nbm_content_new_elements_single'] = ' le ';
-$lang['nbm_content_new_elements_between_1'] = 'entre le ';
-$lang['nbm_content_new_elements_between_2'] = ' et le ';
-$lang['nbm_content_subscribe_by_admin'] = 'Vous venez d\'ĂŞtre inscrit par le webmestre du site pour recevoir la notification par mail.';
-$lang['nbm_content_subscribe_by_himself'] = 'Vous venez de vous inscrire pour recevoir la notification par mail.';
-$lang['nbm_content_subscribe_link'] = 'Pour vous inscrire';
-$lang['nbm_content_problem_contact'] = 'En cas de problèmes ou de questions, envoyer un mail à ';
-$lang['nbm_content_pb_contact_object'] = '[NBM] Problèmes ou de questions';
-$lang['nbm_content_unsubscribe_by_admin'] = 'Vous venez d\'ĂŞtre dĂŠsinscrit par le webmestre du site pour ne plus recevoir la notification par mail.';
-$lang['nbm_content_unsubscribe_by_himself'] = 'Vous venez de vous dĂŠsinscrire pour ne plus recevoir la notification par mail.';
-$lang['nbm_content_click_on'] = ', cliquez sur ';
-$lang['nbm_content_unsubscribe_link'] = 'Pour vous dĂŠsinscrire';
-$lang['nbm_info_send_mail_as'] = 'Sans valeur, le titre de la galerie sera utilisĂŠ';
-$lang['nbm_item_notification'] = 'Notification';
-$lang['nbm_msg_error_sending_email_to'] = 'Erreur lors de l\'envoi du mail Ă  %s [%s].';
-$lang['nbm_msg_mail_sent_to'] = 'Mail envoyĂŠ Ă  %s [%s].';
-$lang['nbm_msg_n_mail_sent'] = '%s mail a ĂŠtĂŠ envoyĂŠ.';
-$lang['nbm_msg_n_mails_sent'] = '%s mails ont ĂŠtĂŠ envoyĂŠs.';
-$lang['nbm_msg_n_mail_not_send'] = '%s mail n\'a pas ĂŠtĂŠ envoyĂŠ.';
-$lang['nbm_msg_n_mails_not_send'] = '%s mails n\'ont pas ĂŠtĂŠ envoyĂŠs.';
-$lang['nbm_no_mail_to_send'] = 'Pas de mail Ă  envoyer.';
-$lang['nbm_no_user_available_to_send_L1'] = 'Il n\'y a pas d\'utilisateur Ă  notifier par mail.';
-$lang['nbm_no_user_available_to_send_L2'] = 'Un utilisateur est Ă  notifier si de nouveaux ĂŠlĂŠments sont disponibles pour cet utilisateur.';
-$lang['nbm_no_user_available_to_send_L3'] = 'Il se peut aussi qu\'il n\'y ait aucun utilisateur inscrit (seul le webmaster a accès à cet onglet).';
-$lang['nbm_no_user_to send_notifications_by_mail'] = 'Pas d\'utilisateur pour envoyer des notifications par mails.';
-$lang['nbm_object_news'] = 'Nouveaux ĂŠlĂŠments ajoutĂŠs';
-$lang['nbm_object_subscribe'] = 'Inscription Ă  la notification par mail';
-$lang['nbm_object_unsubscribe'] = 'DĂŠsinscription Ă  la notification par mail';
-$lang['nbm_param_mode'] = 'ParamĂŠtrage';
-$lang['nbm_redirect_msg'] = 'Traitement en cours.'."\n".'Veuillez patienter...';
-$lang['nbm_repost_submit'] = 'Continuer le traitement en cours...';
-$lang['nbm_send_complementary_mail_content'] = 'Contenu complĂŠmentaire du mail';
-$lang['nbm_send_detailed_content'] = 'Ajout d\'un contenu dĂŠtaillĂŠ';
-$lang['nbm_send_mail_as'] = 'Envoyer le mail en tant que';
-$lang['nbm_send_mail_to_users'] = 'Envoi de mail aux utilisateurs';
-$lang['nbm_send_mode'] = 'Envoi';
-$lang['nbm_send_options'] = 'Options';
-$lang['nbm_send_submit'] = 'Envoyer';
-$lang['nbm_subscribe_col'] = 'Inscrits';
-$lang['nbm_subscribe_mode'] = 'Inscription';
-$lang['nbm_title_param'] = 'Paramètres';
-$lang['nbm_title_send'] = 'SĂŠlection des envois';
-$lang['nbm_title_subscribe'] = 'Inscrire/dĂŠsinscrire les utilisateurs';
-$lang['nbm_unsubscribe_col'] = 'Non Inscrits';
-$lang['nbm_updated_param_count'] = '%d paramètre a ÊtÊ mis à jour.';
-$lang['nbm_updated_params_count'] = '%d paramètres ont ÊtÊ mis à jour.';
-$lang['nbm_user_change_enabled_error_on_updated_data_count'] = '%d utilisateur n\'a pas ĂŠtĂŠ mis Ă  jour.';
-$lang['nbm_users_change_enabled_error_on_updated_data_count'] = '%d utilisateurs n\'ont pas ĂŠtĂŠ mis Ă  jour.';
-$lang['nbm_user_change_enabled_false'] = 'L\'utilisateur %s [%s] a ĂŠtĂŠ supprimĂŠ de la liste des inscrits.';
-$lang['nbm_user_change_enabled_true'] = 'L\'utilisateur %s [%s] a ĂŠtĂŠ ajoutĂŠ Ă  la liste des inscrits.';
-$lang['nbm_user_change_enabled_updated_data_count'] = '%d utilisateur a ĂŠtĂŠ mis Ă  jour.';
-$lang['nbm_users_change_enabled_updated_data_count'] = '%d utilisateurs ont ĂŠtĂŠ mis Ă  jour.';
-$lang['nbm_user_not_change_enabled_false'] = 'L\'utilisateur %s [%s] n\'a pas ĂŠtĂŠ supprimĂŠ de la liste des inscrits.';
-$lang['nbm_user_not_change_enabled_true'] = 'L\'utilisateur %s [%s] n\'a pas ĂŠtĂŠ ajoutĂŠ Ă  la liste des inscrits.';
-$lang['nbm_user_x_added'] = 'Utilisateur %s [%s] ajoutĂŠ.';
-$lang['nbm_warning_subscribe_unsubscribe'] = 'Attention, l\'inscription ou la dĂŠsincription entraine l\'envoi de mails aux utilisateurs concernĂŠs';
-$lang['nbm_send_html_mail'] = 'Envoyer le mail au format HTML';
-$lang['nbm_send_recent_post_dates'] = 'Inclure l\'affichage des dernières images groupÊes par dates';
-$lang['nbm_info_send_recent_post_dates'] = 'Disponible uniquement avec le format HTML';
-$lang['no_write_access'] = 'pas d\'accès en Êcriture';
-$lang['path'] = 'chemin';
-$lang['permissions'] = 'Permissions';
-$lang['private'] = 'privĂŠ';
-$lang['properties'] = 'PropriĂŠtĂŠs';
-$lang['public'] = 'public';
-$lang['purge never used notification feeds'] = 'Purger les flux de notification jamais utilisĂŠs';
-$lang['purge sessions'] = 'Purger les sessions';
-$lang['randomly represented'] = 'reprĂŠsentant au hasard';
-$lang['registration_date'] = 'date d\'enregistrement';
-$lang['remote_site'] = 'Site distant';
-$lang['remote_site_clean'] = 'nettoyer';
-$lang['remote_site_clean_hint'] = 'supprimer le fichier listing.xml distant';
-$lang['remote_site_generate'] = 'gĂŠnĂŠrer le listing';
-$lang['remote_site_generate_hint'] = 'gĂŠnĂŠrer le fichier listing.xml sur le site distant';
-$lang['remote_site_local_create'] = 'CrĂŠer ce site';
-$lang['remote_site_local_found'] = 'Un fichier listing.xml local a ĂŠtĂŠ trouvĂŠ pour ';
-$lang['remote_site_local_update'] = 'lire le listing.xml local et mettre Ă  jour';
-$lang['remote_site_test'] = 'tester';
-$lang['remote_site_test_hint'] = 'tester ce site distant';
-$lang['remote_site_uncorrect_url'] = 'L\'URL d\'un site distant doit commencer par "http" ou "https" et ne doit contenir des caractères que parmi "/", "a-zA-Z0-9", "-" ou "_"';
-$lang['remove tags'] = 'supprimer les tags';
-$lang['repair and optimize database'] = 'RĂŠparer et optimiser la base de donnĂŠes';
-$lang['selection'] = 'sĂŠlection';
-$lang['set to'] = 'changer en';
-$lang['singly represented'] = 'reprĂŠsentant fixe';
-$lang['site_already_exists'] = 'Ce site existe dĂŠjĂ ';
-$lang['site_create'] = 'CrĂŠer un nouveau site distant : (donner son URL vers create_listing_file.php)';
-$lang['site_created'] = 'crĂŠĂŠ';
-$lang['site_delete'] = 'supprimer';
-$lang['site_delete_hint'] = 'supprimer ce site et toutes les informations associĂŠes';
-$lang['site_deleted'] = 'supprimĂŠ';
-$lang['site_err'] = 'une erreur est survenue';
-$lang['site_err_remote_file_not_found'] = 'le fichier create_listing_file.php est introuvable sur le site distant';
-$lang['site_local'] = 'Local';
-$lang['site_remote'] = 'Distant';
-$lang['site_synchronize'] = 'synchroniser';
-$lang['site_synchronize_hint'] = 'met Ă  jour la base de donnĂŠes Ă  partir des fichiers';
-$lang['status'] = 'statut';
-$lang['storage'] = 'RĂŠpertoire';
-$lang['sub-categories'] = 'sous-catĂŠgories';
-$lang['synchronize metadata'] = 'synchroniser les mĂŠta-donnĂŠes';
-$lang['synchronize'] = 'synchroniser';
-$lang['target'] = 'cible';
-$lang['thumbnail'] = 'miniature';
-$lang['title'] = 'titre';
-$lang['title_categories'] = 'Gestion des catĂŠgories';
-$lang['title_configuration'] = 'Configuration de Piwigo';
-$lang['title_default'] = 'Administration de Piwigo';
-$lang['title_edit_cat'] = 'Modifier une catĂŠgorie';
-$lang['title_groups'] = 'Gestion des groupes';
-$lang['title_liste_users'] = 'Liste des utilisateurs';
-$lang['title_picmod'] = 'Modifier les informations d\'une image';
-$lang['title_thumbnails'] = 'CrĂŠation des miniatures';
-$lang['title_update'] = 'Synchronisation de la base de donnĂŠes Ă  partir des fichiers';
-$lang['title_upload'] = 'Images en attente de validation';
-$lang['tn_all'] = 'tout';
-$lang['tn_alone_title'] = 'image sans miniature (jpeg et png uniquement)';
-$lang['tn_err_height'] = 'la hauteur doit un entier supĂŠrieur Ă ';
-$lang['tn_err_width'] = 'la largeur doit ĂŞtre un entier supĂŠrieur Ă ';
-$lang['tn_format'] = 'pour le format de fichier';
-$lang['tn_no_missing'] = 'Aucune miniature ne manque';
-$lang['tn_no_support'] = 'Image inaccessible ou non supportĂŠe';
-$lang['tn_params_GD'] = 'version de GD';
-$lang['tn_params_title'] = 'Paramètre de miniaturisation';
-$lang['tn_results_gen_time'] = 'gĂŠnĂŠrĂŠe en';
-$lang['tn_results_title'] = 'RĂŠsultats de la miniaturisation';
-$lang['tn_stats'] = 'Statistiques gĂŠnĂŠrales';
-$lang['tn_stats_max'] = 'temps maximal';
-$lang['tn_stats_mean'] = 'temps moyen';
-$lang['tn_stats_min'] = 'temps minimal';
-$lang['tn_stats_nb'] = 'nombre de miniatures crĂŠĂŠes';
-$lang['tn_stats_total'] = 'temps total';
-$lang['tn_thisformat'] = 'pour ce format de fichier';
-$lang['unit mode'] = 'mode unitaire';
-$lang['unlocked'] = 'dĂŠverrouillĂŠe';
-$lang['unset'] = 'vider';
-$lang['up'] = 'DĂŠplacer vers le haut';
-$lang['update categories informations'] = 'Mettre Ă  jour les informations des catĂŠgories';
-$lang['update images informations'] = 'Mettre Ă  jour les informations des images';
-$lang['update'] = 'Synchroniser';
-$lang['update_cats_subset'] = 'traiter uniquement une catĂŠgorie';
-$lang['update_default_title'] = 'Choisir une option';
-$lang['update_display_info'] = 'afficher un maximum d\'informations (catĂŠgories ajoutĂŠes, ĂŠlĂŠments ajoutĂŠs, catĂŠgories et ĂŠlĂŠments supprimĂŠs)';
-$lang['update_err_pwg_version_differs'] = 'La version Piwigo sur le site distant est differente';
-$lang['update_err_pwg_version_differs_info'] = 'La version de create_listing_file.php sur le site distant et Piwigo doit ĂŞtre la mĂŞme';
-$lang['update_err_remote_listing_not_found'] = 'le fichier listing.xml est introuvable';
-$lang['update_err_remote_listing_not_found_info'] = 'le fichier listing.xml est introuvable sur le site distant. Ce fichier est generĂŠ en choisissant la commande "gĂŠnĂŠrer le listing" dans le gestionnaire de sites';
-$lang['update_error_list_title'] = 'Liste des erreurs';
-$lang['update_errors_caption'] = 'LĂŠgende des erreurs';
-$lang['update_infos_title'] = 'Informations dĂŠtaillĂŠes';
-$lang['update_missing_file_or_dir'] = 'Erreur d\'ouverture fichier/rĂŠpertoire';
-$lang['update_missing_file_or_dir_info'] = 'Le fichier ou rÊpertoire ne peut pas être accessible (soit il n\'existe pas, soit l\'accès est refusÊ)';
-$lang['update_missing_tn_info'] = 'Chaque fichier image requiert une miniature. La miniature doit être prÊsente dans le sous-rÊpertoire "thumbnail" du rÊpertoire de la catÊgorie. Le nom du fichier de la miniature doit commencer avec le paramètre de configuration "prefix_thumbnail" et l\'extension du nom du fichier doit être parmi la liste suivante :';
-$lang['update_missing_tn_short'] = 'miniature manquante';
-$lang['update_nb_del_categories'] = 'catĂŠgories supprimĂŠes de la base de donnĂŠes';
-$lang['update_nb_del_elements'] = 'ĂŠlĂŠments supprimĂŠs de la base de donnĂŠes';
-$lang['update_nb_elements_metadata_available'] = 'images candidates Ă  la synchronisation avec les mĂŠta-donnĂŠes';
-$lang['update_nb_elements_metadata_sync'] = 'informations des images synchronisĂŠes avec les mĂŠta-donnĂŠes';
-$lang['update_nb_errors'] = 'erreurs survenues durant la synchronisation';
-$lang['update_nb_new_categories'] = 'catĂŠgories ajoutĂŠes dans la base de donnĂŠes';
-$lang['update_nb_new_elements'] = 'ĂŠlĂŠments ajoutĂŠs dans la base de donnĂŠes';
-$lang['update_nb_upd_elements'] = 'ĂŠlĂŠments mis Ă  jour dans la base de donnĂŠes';
-$lang['update_part_research'] = 'Chercher les nouvelles images dans les rĂŠpertoires';
-$lang['update_research_added'] = 'ajoutĂŠ';
-$lang['update_research_deleted'] = 'supprimĂŠ';
-$lang['update_result_metadata'] = 'RĂŠsultat de la synchronisation des mĂŠta-donnĂŠes';
-$lang['update_simulate'] = 'Simuler uniquement (aucun changement dans la base de donnĂŠes ne sera effectuĂŠ)';
-$lang['update_simulation_title'] = '[Simulation]';
-$lang['update_sync_all'] = 'rĂŠpertoires + fichiers';
-$lang['update_sync_dirs'] = 'rĂŠpertoires uniquement';
-$lang['update_sync_files'] = 'synchroniser la structure des fichiers avec la base de donnĂŠes';
-$lang['update_sync_metadata'] = 'synchroniser les informations des ĂŠlĂŠments dans la base de donnĂŠes Ă  partir des mĂŠta-donnĂŠes des fichiers';
-$lang['update_sync_metadata_all'] = 'mĂŞme les ĂŠlĂŠments dĂŠjĂ  synchronisĂŠs';
-$lang['update_sync_metadata_new'] = 'uniquement les ĂŠlĂŠments jamais synchronisĂŠs';
-$lang['update_used_metadata'] = 'MĂŠta-donnĂŠes employĂŠes';
-$lang['update_wrong_dirname_info'] = 'Le nom des rĂŠpertoires et des fichiers ne doit ĂŞtre constituĂŠ que de lettres, de chiffres, de "-", "_" et "."';
-$lang['update_wrong_dirname_short'] = 'nom de fichier erronĂŠ';
-$lang['upload'] = 'Ajout';
-$lang['user "%s" added'] = 'utilisateur "%s" ajoutĂŠ';
-$lang['user_status'] = 'Statut de l\'utilisateur';
-$lang['user_status_admin'] = 'Administrateur';
-$lang['user_status_generic'] = 'GĂŠnĂŠrique';
-$lang['user_status_guest'] = 'InvitĂŠ';
-$lang['user_status_normal'] = 'Visiteur';
-$lang['user_status_webmaster'] = 'Webmestre';
-$lang['username'] = 'nom utilisateur';
-$lang['users'] = 'Utilisateurs';
-$lang['virtual_category'] = 'CatĂŠgorie virtuelle';
-$lang['waiting'] = 'En attente';
-$lang['is_default_group'] = 'par dĂŠfaut';
-$lang['toggle_is_default_group'] = 'Inverser la propriĂŠtĂŠ \'groupe par dĂŠfaut\'';
-$lang['Advanced_features'] = 'Fonctions avancĂŠes';
-$lang['Elements_not_linked'] = 'ElĂŠments non liĂŠs';
-$lang['web_services'] = 'Services Web ';
-$lang['title_wscheck'] = ' Gestion des accès ';
-$lang['ws_failed_upd'] = ' -> <strong>OpĂŠration non rĂŠalisĂŠe</strong> ';
-$lang['ws_success_upd'] = ' -> Action rĂŠalisĂŠe correctement ';
-$lang['ws_adding_legend'] = ' Ajout d\'un accès partenaire aux Services Web ';
-$lang['ws_update_legend'] = ' Supprimer / Modifier l\'accès du partenaire sÊlectionnÊ ';
-$lang['ws_delete_legend'] = ' Supprimer dÊfinitivement l\'accès du partenaire sÊlectionnÊ ';
-$lang['ws_Methods'] = ' MĂŠthodes ';
-$lang['ws_KeyName'] = ' Partenaire ';
-$lang['ws_Access'] = ' Access ';
-$lang['ws_Start'] = ' DĂŠbut ';
-$lang['ws_End'] = ' Fin ';
-$lang['ws_Request'] = 'RequĂŞte';
-$lang['ws_Limit'] = ' Limite ';
-$lang['ws_Comment'] = ' Commentaire ';
-$lang['Modify End from Now +'] = 'Modifier la Fin par cet instant + ';
-$lang['Delete'] = ' Retrait ';
-$lang['Confidential partner key'] = 'ClĂŠ confidentielle';
-$lang['Basis of access key calculation'] = 'Base de calcul de la clĂŠ';
-$lang['Target'] = 'Cible';
-$lang['Access: see help text for more'] = 'Accès: voir l\'aide en ligne';
-$lang['Facultative and restrictive option'] = 'Option facultative et restrictive';
-$lang['Postponed availability in days'] = 'Report de disponibilitĂŠ en jours';
-$lang['Duration in days'] = 'DurĂŠe en jours';
-$lang['Restrict access to'] = 'Accès restreint à';
-$lang['Returned images limit'] = 'Limite de transmision';
-$lang['Comment to identify your partner clearly'] = 'Commentaire vous permettant d\'identifier votre partenaire facilement';
-$lang['Add this access definition']= 'Ajouter cette dÊfinition d\'accès';
-$lang['Web Services availability duration in days'] = 'DurĂŠe d\'ouverture des Services Web en jours';
-$lang['Web Services under control'] = 'Les Services Web de Piwigo sont totalement operationnels et toutes les requĂŞtes sont contrĂ´lĂŠes.';
-$lang['special_admin_menu'] = 'SpĂŠciales';
-$lang['Duplicates'] = 'Fichiers portant le mĂŞme nom dans plusieurs catĂŠgories physiques';
-
-$lang['Export data'] = 'Exporter les donnĂŠes';
-$lang['Overall'] = 'Vue globale';
-$lang['Year'] = 'AnnĂŠe';
-$lang['Month'] = 'Mois';
-$lang['Day'] = 'Jour';
-$lang['Pages seen'] = 'Pages vues';
-$lang['Pictures'] = 'Images';
-$lang['time'] = 'heure';
-$lang['user'] = 'utilisateur';
-$lang['IP'] = 'IP';
-$lang['image'] = 'images';
-$lang['section'] = 'section';
-$lang['tags'] = 'tags';
-$lang['conf_history_guest'] = 'Enregistrer les pages visitĂŠes par les invitĂŠs';
-$lang['conf_history_user'] = 'Enregistrer les pages visitĂŠes par les utilisateurs';
-$lang['conf_history_admin'] = 'Enregistrer les pages visitĂŠes par les administrateurs';
-$lang['cat_options_title'] = 'PropriĂŠtĂŠs';
-$lang['An information email was sent to group "%s"'] = 'Un mail d\'informations a ĂŠtĂŠ envoyĂŠ aux membres du groupe';
-$lang['Send an information email to group members'] = 'Envoyer un mail d\'informations aux membres d\'un groupe';
-$lang['Group'] = 'Groupe';
-$lang['[%s] Come to visit the category %s'] = '[%s] Venez visiter la catĂŠgorie %s';
-$lang['Hello,'] = 'Bonjour,';
-$lang['See you soon.'] = 'A bientĂ´t.';
-$lang['Come to discover the category:'] = 'Venez dĂŠcouvrir la catĂŠgorie:';
-$lang['mail_content'] = 'Contenu du mail';
-$lang['none'] = 'aucun';
-$lang['high'] = 'high';
-$lang['other'] = 'autre';
-$lang['Element type'] = "Type d'ĂŠlĂŠment";
-$lang['User'] = 'Utilisateur';
-$lang['Image id'] = 'Identifiant image';
-$lang['Summary'] = 'RĂŠsumĂŠ';
-$lang['%d line filtered'] = '%d ligne filtrĂŠe';
-$lang['%d lines filtered'] = '%d lignes filtrĂŠes';
-$lang['%d guest'] = '%d invitĂŠ';
-$lang['%d guests'] = '%d invitĂŠs';
-$lang['Hour'] = 'Heure';
-$lang['is_the_guest'] = 'invitĂŠ';
-$lang['is_the_default'] = 'valeurs par dĂŠfaut';
-$lang['High filesize'] = 'Taille du fichier HR';
-// --------- Starting below: New or revised $lang ---- from version 1.7.1
-$lang['Guest cannot be deleted'] = 'L\'invitĂŠ ne peut pas ĂŞtre supprimĂŠ';
-$lang['Default user cannot be deleted'] = 'L\'utilisateur par dĂŠfaut ne peut pas ĂŞtre supprimĂŠ';
-$lang['purge history detail'] = 'Purger le detail de l\'historique';
-$lang['purge history summary'] = 'Purger le sommaire de l\'historique';
-$lang['c13y_title'] = 'ContrĂ´le d\'intĂŠgritĂŠ';
-$lang['c13y_Anomaly'] = 'Anomalie';
-$lang['c13y_Correction'] = 'Correction';
-$lang['c13y_Automatic_correction'] = 'Correction automatique';
-$lang['c13y_Impossible_automatic_correction'] = 'Correction automatique impossible';
-$lang['c13y_Correction_applied_success'] = 'Correction appliquĂŠe avec succĂŠs';
-$lang['c13y_Correction_applied_error'] = 'Correction appliquĂŠe avec erreur';
-$lang['c13y_anomaly_count'] = '%d anomalie a ĂŠtĂŠ dĂŠtectĂŠe.';
-$lang['c13y_anomalies_count'] = '%d anomalies ont ĂŠtĂŠ dĂŠtectĂŠes.';
-$lang['c13y_anomaly_corrected_count'] = '%d anomalie a ĂŠtĂŠ corrigĂŠe.';
-$lang['c13y_anomalies_corrected_count'] = '%d anomalies ont ĂŠtĂŠ corrigĂŠes.';
-$lang['c13y_anomaly_not_corrected_count'] = '%d anomalie n\'a pas pu ĂŞtre corrigĂŠe.';
-$lang['c13y_anomalies_not_corrected_count'] = '%d anomalies n\'ont pu ĂŞtre corrigĂŠes.';
-$lang['c13y_more_info'] = 'Allez sur %s ou %s pour plus d\'informations';
-$lang['c13y_more_info_forum'] = 'le forum';
-$lang['c13y_more_info_wiki'] = 'le wiki';
-$lang['c13y_exif_anomaly'] = 'La valeur de %s n\'est pas correcte parce que l\'exif n\'est pas supportĂŠ';
-$lang['c13y_exif_correction'] = '%s doit ĂŞtre mis Ă  "false" dans votre fichier config_local.inc.php';
-$lang['c13y_guest_non_existent'] = 'L\'utilisateur "invitĂŠ" principal n\'existe plus';
-$lang['c13y_bad_guest_status'] = 'Le statut de l\'utilisateur "invitĂŠ" principal est incorrect';
-$lang['c13y_default_non_existent'] = 'L\'utilisateur par dĂŠfaut n\'existe plus';
-$lang['c13y_webmaster_non_existent'] = 'L\'utilisateur "webmestre" principal n\'existe plus';
-$lang['c13y_bad_webmaster_status'] = 'Le statut de l\'utilisateur "webmestre" principal est incorrect';
-$lang['c13y_user_created'] = 'Utilisateur "%s" crĂŠĂŠ avec comme mot de passe "%s"';
-$lang['c13y_user_status_updated'] = 'Statut de l\'utilisateur "%s" mis Ă  jour';
-$lang['add new elements to caddie'] = 'ajouter les nouveaux ĂŠlĂŠments au panier';
-// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
-$lang['no_display_thumbnail'] = 'Pas d\'affichage';
-$lang['display_thumbnail_classic'] = 'Affichage classique';
-$lang['display_thumbnail_hoverbox'] = 'Affichage lors du survol';
-$lang['Thumbnails'] = 'Miniatures';
-$lang['obligatory_user_mail_address'] = 'L\'adresse mail est obligatoire pour tous les utilisateurs';
-$lang['Minimum privacy level'] = 'Niveau minimal de confidentialitĂŠ';
-$lang['Privacy level'] = 'Niveau de confidentialitĂŠ';
-$lang['Level 0'] = '---';
-$lang['Level 1'] = 'Contacts';
-$lang['Level 2'] = 'Amis';
-$lang['Level 4'] = 'Famille';
-$lang['Level 8'] = 'Admins';
-$lang['c13y_maintenance'] = 'RĂŠinitialiser les contrĂ´les d\'intĂŠgritĂŠ';
-$lang['Check all'] = 'Tout cocher';
-$lang['Uncheck all'] = 'Tout dĂŠcocher';
-$lang['c13y_check_auto'] = 'Cocher les corrections automatiques';
-$lang['c13y_submit_correction'] = 'Appliquer les corrections sĂŠlectionnĂŠes';
-$lang['c13y_submit_ignore'] = 'Ignorer les anomalies sĂŠlectionnĂŠes';
-$lang['c13y_submit_refresh'] = 'RafraĂŽchir';
-$lang['c13y_ignore_msg1'] = 'L\'anomalie sera ignorĂŠe jusqu\'Ă  la prochaine version de l\'application';
-$lang['c13y_ignore_msg2'] = 'La correction de l\'anomalie annulera le fait qu\'elle soit ignorĂŠe';
-$lang['c13y_anomaly_ignored_count'] = '%d anomalie a ĂŠtĂŠ ignorĂŠe.';
-$lang['c13y_anomalies_ignored_count'] = '%d anomalies ont ĂŠtĂŠ ignorĂŠes.';
-$lang['plugins_need_update'] = 'Plugins necessitant une mise Ă  jour';
-$lang['plugins_dontneed_update'] = 'Plugins Ă  jour';
-$lang['plugins_cant_check'] = 'Impossible de vĂŠrifier les plugins suivant';
-$lang['plugins_actual_version'] = 'Version<br>actuelle';
-$lang['plugins_new_version'] = 'Version<br>disponible';
-$lang['plugins_auto_update'] = 'Mise Ă  jour automatique';
-$lang['plugins_auto_install'] = 'Installation automatique';
-$lang['plugins_download'] = 'TĂŠlĂŠcharger le fichier';
-$lang['plugins_description'] = '<b>Version:</b> %s<br><br><b>Date:</b> %s<br><br>%s';
-$lang['plugins_tab_list'] = 'Liste des plugins';
-$lang['plugins_tab_update'] = 'VĂŠrifier les mises Ă  jour';
-$lang['plugins_tab_new'] = 'Autres plugins disponibles';
-$lang['plugins_revisions'] = 'Dernières rÊvisions';
-$lang['plugins_delete'] = 'Supprimer';
-$lang['plugins_confirm_install'] = 'Etes-vous sĂťr de vouloir installer ce plugin?';
-$lang['plugins_confirm_delete'] = 'Etes-vous sĂťr de vouloir supprimer ce plugin?';
-$lang['plugins_confirm_upgrade'] = 'Etes-vous sur de vouloir installer cette mise Ă  jour? Vous devez vĂŠrifiez que cette mise Ă  jour ne nĂŠcessite pas de dĂŠsinstallation.';
-$lang['plugins_upgrade_ok'] = '%s a ÊtÊ mis à jour avec succès.';
-$lang['plugins_install_ok'] = 'Le plugin a ÊtÊ copiÊ avec succès.';
-$lang['plugins_install_need_activate'] = 'Rendez-vous dans la liste des plugins pour l\'installer et l\'activer.';
-$lang['plugins_temp_path_error'] = 'Impossible de crĂŠer un fichier temporaire.';
-$lang['plugins_dl_archive_error'] = 'Impossible de rĂŠcupĂŠrer l\'archive.';
-$lang['plugins_archive_error'] = 'Impossible de lire ou d\'extraire l\'archive.';
-$lang['plugins_extract_error'] = 'Une erreur est survenue pendant l\'extraction des fichiers (%s).';
-$lang['plugins_check_chmod'] = 'VĂŠrifiez les permissions du dossier "plugins" et de ses sous-dossiers (CHMOD).';
-$lang['plugins_server_error'] = 'Impossible de se connecter au serveur.';
-$lang['Purge compiled templates'] = 'Purger les templates compilĂŠs';
-$lang['Caddie is currently empty'] = 'Le panier est actuellement vide.';
-$lang['DEMO'] = 'DĂŠmo';
-$lang['HOME'] = 'Accueil Piwigo';
-$lang['FORUM'] = 'Support';
-$lang['BUGS'] = 'Bogues';
-$lang['EXTENSIONS'] = 'Extensions';
-$lang['WIKI / DOC'] = 'Documentation';
-$lang['conf_upload_title'] = 'TĂŠlĂŠchargement';
-$lang['Show upload link every time'] = 'Afficher le lien d\'ajout d\'image tout le temps';
-$lang['User access level to upload'] = 'Niveau d\'accès utilisateur pour tÊlÊcharger';
-$lang['ACCESS_0'] = 'Accès libre';
-$lang['ACCESS_1'] = 'Accès à tous';
-$lang['ACCESS_2'] = 'Accès aux inscrits';
-$lang['ACCESS_3'] = 'Accès aux administrateurs';
-$lang['ACCESS_4'] = 'Accès aux webmestres';
-$lang['ACCESS_5'] = 'Pas d\'accès';
-$lang['A new version of Piwigo is available.'] = 'Une nouvelle version de Piwigo est disponible.';
-$lang['Piwigo Administration'] = 'Administration de Piwigo';
-$lang['Piwigo version'] = 'Version de Piwigo';
-$lang['You are running the latest version of Piwigo.'] = 'Vous utilisez la dernière version de Piwigo.';
-$lang['c13y_version_anomaly'] = 'La version de %s [%s] installĂŠe n\'est pas compatible avec la version requise [%s]';
-$lang['c13y_version_correction'] = 'Vous devez mettre à jour votre système pour profiter pleinement de l\'application sinon l\'application ne fonctionnera pas correctement, voire pas du tout';
-
-?> \ No newline at end of file
diff --git a/BSF/language/fr_FR/common.lang.php b/BSF/language/fr_FR/common.lang.php
deleted file mode 100644
index b98c0ac0d..000000000
--- a/BSF/language/fr_FR/common.lang.php
+++ /dev/null
@@ -1,368 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Langage informations
-$lang_info['language_name'] = 'Français';
-$lang_info['country'] = 'France';
-$lang_info['direction'] = 'ltr';
-$lang_info['code'] = 'fr';
-$lang_info['zero_plural'] = false;
-
-$lang['%.2f (rated %d times, standard deviation = %.2f)'] = '%.2f (notĂŠ %d fois, ĂŠcart type = %.2f)';
-$lang['%d Kb'] = '%d Ko';
-$lang['%d category updated'] = '%d catĂŠgorie mise Ă  jour';
-$lang['%d categories updated'] = '%d catĂŠgories mises Ă  jour';
-$lang['%d comment to validate'] = '%d commentaire utilisateur Ă  valider';
-$lang['%d comments to validate'] = '%d commentaires utilisateur Ă  valider';
-$lang['%d new comment'] = '%d nouveau commentaire utilisateur';
-$lang['%d new comments'] = '%d nouveaux commentaires utilisateur';
-$lang['%d comment'] = '%d commentaire';
-$lang['%d comments'] = '%d commentaires';
-$lang['%d hit'] = 'vue %d fois';
-$lang['%d hits'] = 'vue %d fois';
-$lang['%d new element'] = '%d nouvelle image';
-$lang['%d new elements'] = '%d nouvelles images';
-$lang['%d new user'] = '%d nouvel utilisateur';
-$lang['%d new users'] = '%d nouveaux utilisateurs';
-$lang['%d waiting element'] = '%d ĂŠlĂŠment en attente';
-$lang['%d waiting elements'] = '%d ĂŠlĂŠments en attente';
-$lang['About'] = 'À propos';
-$lang['All tags must match'] = 'Tous les tags doivent correspondre';
-$lang['All tags'] = 'Tous les tags';
-$lang['Any tag'] = 'N\'importe quel tag';
-$lang['At least one listed rule must be satisfied.'] = 'Au moins un des critères doit être satisfait.';
-$lang['At least one tag must match'] = 'Au moins un tag doit correspondre';
-$lang['Author'] = 'Auteur';
-$lang['Average rate'] = 'Note moyenne';
-$lang['Categories'] = 'CatĂŠgories';
-$lang['Category'] = 'CatĂŠgorie';
-$lang['Close this window'] = 'Fermer cette fenĂŞtre';
-$lang['Complete RSS feed'] = 'Flux RSS complet (images, commentaires)';
-$lang['Confirm Password'] = 'Confirmer le mot de passe';
-$lang['Connection settings'] = 'Paramètres de connexion';
-$lang['Connection'] = 'Connexion';
-$lang['Contact webmaster'] = 'Contacter le webmestre';
-$lang['Create a new account'] = 'CrĂŠer un nouveau compte';
-$lang['Created on'] = 'CrĂŠĂŠe le';
-$lang['Creation date'] = 'Date de crĂŠation';
-$lang['Current password is wrong'] = 'Erreur sur le mot de passe actuel';
-$lang['Dimensions'] = 'Dimensions';
-$lang['Display'] = 'Affichage';
-$lang['Each listed rule must be satisfied.'] = 'Chaque critère doit être satisfait';
-$lang['Email address is missing'] = 'L\'adresse e-mail manque';
-$lang['Email address'] = 'Adresse e-mail';
-$lang['Enter your personnal informations'] = 'Entrer vos informations personnelles';
-$lang['Error sending email'] = 'Erreur Ă  l\'envoi du mail';
-$lang['File name'] = 'Nom du fichier';
-$lang['File'] = 'Fichier';
-$lang['Filesize'] = 'Poids';
-$lang['Filter and display'] = 'Filtrer et afficher';
-$lang['Filter'] = 'Filtre';
-$lang['Forgot your password?'] = 'Mot de passe oubliĂŠ ?';
-$lang['Go through the gallery as a visitor'] = 'Parcourir la galerie en tant que visiteur';
-$lang['Help'] = 'Aide';
-$lang['Identification'] = 'Identification';
-$lang['Image only RSS feed'] = 'Flux RSS des images';
-$lang['Keyword'] = 'Mot-clef';
-$lang['Links'] = 'Liens';
-$lang['Mail address'] = $lang['Email address'];
-$lang['N/A'] = 'non disponible';
-$lang['New on %s'] = 'Nouveau le %s';
-$lang['New password confirmation does not correspond'] = 'Erreur de confirmation de mot de passe';
-$lang['New password sent by email'] = 'Nouveau mot de passe envoyĂŠ par e-mail';
-$lang['No email address'] = 'Pas d\'adresse e-mail';
-$lang['No user matches this email address'] = 'Cette adresse e-mail ne correspond Ă  aucun utilisateur classique';
-$lang['Notification'] = 'Notification';
-$lang['Number of items'] = 'Nombre d\'ĂŠlĂŠment';
-$lang['Original dimensions'] = 'Dimensions d\'origine';
-$lang['Password forgotten'] = 'Mot de passe oubliĂŠ';
-$lang['Password'] = 'Mot de passe';
-$lang['Post date'] = 'Date d\'ajout';
-$lang['Posted on'] = 'AjoutĂŠe le';
-$lang['Profile'] = 'Profil';
-$lang['Quick connect'] = 'Connexion rapide';
-$lang['RSS feed'] = 'flux RSS';
-$lang['Rate'] = 'Note';
-$lang['Register'] = 'S\'enregistrer';
-$lang['Registration'] = 'Enregistrement';
-$lang['Related tags'] = 'Tags liĂŠs';
-$lang['Reset'] = 'Annuler';
-$lang['Retrieve password'] = 'RĂŠcupĂŠrer un mot de passe';
-$lang['Search rules'] = 'Critères de recherche';
-$lang['Search tags'] = 'Rechercher les tags';
-$lang['Search'] = 'Rechercher';
-$lang['See available tags'] = 'Voir les tags disponibles';
-$lang['Send new password'] = 'Envoyer le nouveau mot de passe';
-$lang['Since'] = 'Depuis';
-$lang['Sort by'] = 'Trier selon';
-$lang['Sort order'] = 'Ordre de tri';
-$lang['Tag'] = 'Tag';
-$lang['Tags'] = 'Tags';
-$lang['The RSS notification feed provides notification on news from this website : new pictures, updated categories, new comments. Use a RSS feed reader.'] = 'Le flux RSS notifie les événements de la galerie : nouvelles images, catégories mises à jour, nouveaux commentaires utilisateur. À utiliser avec un lecteur de flux RSS.';
-$lang['Unknown feed identifier'] = 'Identifiant de flux inconnu';
-$lang['User comments'] = 'Commentaires utilisateur';
-$lang['Username'] = 'Nom d\'utilisateur';
-$lang['Visits'] = 'Visites';
-$lang['Webmaster'] = 'Webmestre';
-$lang['Week %d'] = 'Semaine %d';
-$lang['about_page_title'] = 'À propos de Piwigo';
-$lang['access_forbiden'] = 'Vous n\'ĂŞtes pas autorisĂŠ sur la page demandĂŠe';
-$lang['add to caddie'] = 'ajouter au panier';
-$lang['add_favorites_hint'] = 'ajouter cette image Ă  vos favoris';
-$lang['admin'] = 'Administration';
-$lang['adviser_mode_enabled'] = 'Mode conseiller actif';
-$lang['all'] = 'tout';
-$lang['ascending'] = 'croissant';
-$lang['author(s) : %s'] = 'auteur(s) : %s';
-$lang['auto_expand'] = 'DĂŠvelopper toutes les catĂŠgories';
-$lang['became available after %s (%s)'] = 'mis à disposition après le %s (%s)';
-$lang['became available before %s (%s)'] = 'mis Ă  disposition avant le %s (%s)';
-$lang['became available between %s (%s) and %s (%s)'] = 'mis Ă  disposition entre le %s (%s) et le %s (%s)';
-$lang['became available on %s'] = 'mis Ă  disposition le %s';
-$lang['best_rated_cat'] = 'Mieux notĂŠes';
-$lang['best_rated_cat_hint'] = 'afficher les images les mieux notĂŠes';
-$lang['caddie'] = 'Panier';
-$lang['calendar'] = 'Calendrier';
-$lang['calendar_any'] = 'Tout';
-$lang['calendar_hint'] = 'affichage annĂŠe par annĂŠe, mois par mois, jour par jour';
-$lang['calendar_picture_hint'] = 'afficher les images du ';
-$lang['calendar_view'] = 'Vue';
-$lang['chronology_monthly_calendar'] = 'Calendrier mensuel';
-$lang['chronology_monthly_list'] = 'Liste mensuelle';
-$lang['chronology_weekly_list'] = 'Liste hebdomadaire';
-$lang['click_to_redirect'] = 'Cliquez ici si votre navigateur ne vous redirige pas.';
-$lang['comment date'] = 'date du commentaire';
-$lang['comment'] = 'Commentaire';
-$lang['comment_added'] = 'Votre commentaire a ĂŠtĂŠ enregistrĂŠ';
-$lang['comment_anti-flood'] = 'Système anti-abus : merci de patienter avant d\'ajouter un nouveau commentaire';
-$lang['comment_not_added'] = 'Votre commentaire n\'a pas ÊtÊ enregistrÊ parce qu\'il ne vÊrifie pas les règles de validation';
-$lang['comment_to_validate'] = 'Un administrateur doit valider votre commentaire afin qu\'il soit visible.';
-$lang['comment_user_exists'] = 'Ce nom d\'utilisateur est dĂŠjĂ  pris';
-$lang['comments'] = 'Commentaires';
-$lang['comments_add'] = 'Ajouter un commentaire';
-$lang['comments_del'] = 'Supprimer ce commentaire';
-$lang['comments_title'] = 'Commentaires des utilisateurs';
-$lang['created after %s (%s)'] = 'crÊÊe après le %s (%s)';
-$lang['created before %s (%s)'] = 'crĂŠĂŠe avant le %s (%s)';
-$lang['created between %s (%s) and %s (%s)'] = 'crĂŠĂŠe entre le %s (%s) et le %s (%s)';
-$lang['created on %s'] = 'crĂŠĂŠe le %s';
-$lang['customize'] = 'Personnaliser';
-$lang['customize_page_title'] = 'Personnalisation de votre affichage ';
-$lang['day'][0] = 'Dimanche';
-$lang['day'][1] = 'Lundi';
-$lang['day'][2] = 'Mardi';
-$lang['day'][3] = 'Mercredi';
-$lang['day'][4] = 'Jeudi';
-$lang['day'][5] = 'Vendredi';
-$lang['day'][6] = 'Samedi';
-$lang['default_sort'] = 'Par dĂŠfaut';
-$lang['del_favorites_hint'] = 'supprimer cette image de vos favoris';
-$lang['delete'] = 'Supprimer';
-$lang['descending'] = 'dĂŠcroissant';
-$lang['download'] = 'tĂŠlĂŠcharger';
-$lang['download_hint'] = 'tĂŠlĂŠcharger ce fichier';
-$lang['edit category informations'] = 'ĂŠditer les informations de cette catĂŠgorie';
-$lang['edit'] = 'ĂŠditer';
-$lang['err_date'] = 'date erronĂŠe';
-$lang['excluded'] = 'exclus';
-$lang['favorite_cat'] = 'Mes favorites';
-$lang['favorite_cat_hint'] = 'afficher mes images favorites';
-$lang['favorites'] = 'Favoris';
-$lang['first_page'] = 'Première';
-$lang['gallery_locked_message'] = 'La galerie est verrouillĂŠe pour cause de maintenance. Revenir plus tard.';
-$lang['generation_time'] = 'Page fabriquĂŠe en';
-$lang['guest'] = 'visiteur';
-$lang['hello'] = 'Bonjour';
-$lang['hint_admin'] = 'disponible uniquement pour les administrateurs';
-$lang['hint_category'] = 'montre les images Ă  la racine de cette catĂŠgorie';
-$lang['hint_comments'] = 'Voir les derniers commentaires utilisateur';
-$lang['hint_customize'] = 'personnaliser l\'apparence de la galerie';
-$lang['hint_search'] = 'recherche';
-$lang['home'] = 'Accueil';
-$lang['identification'] = 'Identification';
-$lang['images_available_cpl'] = 'dans cette catĂŠgorie';
-$lang['images_available_cat'] = 'dans %d sous-catĂŠgorie';
-$lang['images_available_cats'] = 'dans %d sous-catĂŠgories';
-$lang['included'] = 'inclus';
-$lang['invalid_pwd'] = 'Mot de passe invalide !';
-$lang['language'] = 'Langue';
-$lang['last %d days'] = '%d derniers jours';
-$lang['last_page'] = 'Dernière';
-$lang['link_info_image'] = 'Modifier les informations';
-$lang['logout'] = 'DĂŠconnexion';
-$lang['mail_address'] = $lang['Email address'];
-$lang['mandatory'] = 'obligatoire';
-$lang['maxheight'] = 'Hauteur maximum des images';
-$lang['maxheight_error'] = 'La hauteur maximum des images doit ĂŞtre supĂŠrieure Ă  50';
-$lang['maxwidth'] = 'Largeur maximum des images';
-$lang['maxwidth_error'] = 'La largeur des images doit ĂŞtre supĂŠrieure Ă  50';
-$lang['mode_created_hint'] = 'afficher un calendrier par date de crĂŠation';
-$lang['mode_flat_hint'] = 'afficher Ă  plat les ĂŠlĂŠments des catĂŠgories et des sous-catĂŠgories';
-$lang['mode_normal_hint'] = 'retourner Ă  la vue normale';
-$lang['mode_posted_hint'] = 'afficher un calendrier par date d\'ajout';
-$lang['month'][10] = 'Octobre';
-$lang['month'][11] = 'Novembre';
-$lang['month'][12] = 'DĂŠcembre';
-$lang['month'][1] = 'Janvier';
-$lang['month'][2] = 'FĂŠvrier';
-$lang['month'][3] = 'Mars';
-$lang['month'][4] = 'Avril';
-$lang['month'][5] = 'Mai';
-$lang['month'][6] = 'Juin';
-$lang['month'][7] = 'Juillet';
-$lang['month'][8] = 'AoĂťt';
-$lang['month'][9] = 'Septembre';
-$lang['most_visited_cat'] = 'Plus vues';
-$lang['most_visited_cat_hint'] = 'afficher les images les plus vues';
-$lang['nb_image_line_error'] = 'Le nombre d\'images par ligne doit ĂŞtre un entier non nul';
-$lang['nb_image_per_row'] = 'Nombre de miniatures par ligne';
-$lang['nb_line_page_error'] = 'Le nombre de lignes par page doit ĂŞtre un entier non nul';
-$lang['nb_row_per_page'] = 'Nombre de lignes par page';
-$lang['nbm_unknown_identifier'] = 'Identifiants inconnus';
-$lang['new_password'] = 'Nouveau mot de passe';
-$lang['new_rate'] = 'Votez pour cette image';
-$lang['next_page'] = 'Suivante';
-$lang['no_category'] = 'Accueil';
-$lang['no_rate'] = 'pas de note';
-$lang['note_filter_day'] = 'L\'ensemble des ĂŠlĂŠments est filtrĂŠ pour n\'afficher que les ĂŠlĂŠments rĂŠcents de moins de %d jour.';
-$lang['note_filter_days'] = 'L\'ensemble des ĂŠlĂŠments est filtrĂŠ pour n\'afficher que les ĂŠlĂŠments rĂŠcents de moins de %d jours.';
-$lang['password updated'] = 'mot de passe mis Ă  jour';
-$lang['periods_error'] = 'La pĂŠriode de nouveautĂŠ doit ĂŞtre un entier positif';
-$lang['picture'] = 'image';
-$lang['picture_high'] = 'Cliquer sur l\'image pour la visualiser en haute dĂŠfinition';
-$lang['picture_show_metadata'] = 'Montrer les mĂŠta-donnĂŠes du fichier';
-$lang['powered_by'] = 'PropulsĂŠ par';
-$lang['preferences'] = 'PrĂŠfĂŠrences';
-$lang['previous_page'] = 'PrĂŠcĂŠdente';
-$lang['random_cat'] = 'Images au hasard';
-$lang['random_cat_hint'] = 'afficher un ensemble alĂŠatoire d\'images';
-$lang['recent_cats_cat'] = 'CatĂŠgories rĂŠcentes';
-$lang['recent_cats_cat_hint'] = 'afficher les catĂŠgories rĂŠcemment mises Ă  jour ou crĂŠĂŠes';
-$lang['recent_period'] = 'PĂŠriode rĂŠcente';
-$lang['recent_pics_cat'] = 'Images rĂŠcentes';
-$lang['recent_pics_cat_hint'] = 'afficher les images les plus rĂŠcentes';
-$lang['redirect_msg'] = 'Redirection...';
-$lang['reg_err_login1'] = 'S\'il vous plaĂŽt, entrer un nom utilisateur';
-$lang['reg_err_login2'] = 'le nom utilisateur ne doit pas se terminer par un espace';
-$lang['reg_err_login3'] = 'le nom utilisateur ne doit pas commencer par un espace';
-$lang['reg_err_login5'] = 'ce nom utilisateur est dĂŠjĂ  pris';
-$lang['reg_err_mail_address'] = 'l\'adresse e-mail doit ĂŞtre de la forme xxx@yyy.eee (exemple : jack@altern.org)';
-$lang['reg_err_pass'] = 'S\'il vous plaĂŽt, entrez Ă  nouveau votre mot de passe';
-$lang['remember_me'] = 'Connexion auto';
-$lang['remove this tag'] = 'enlever ce tag de la liste';
-$lang['representative'] = 'ReprĂŠsentante';
-$lang['return to homepage'] = 'retour Ă  la page d\'accueil';
-$lang['search_author'] = 'Rechercher un auteur';
-$lang['search_categories'] = 'Rechercher dans les catĂŠgories';
-$lang['search_date'] = 'Recherche par date';
-$lang['search_date_from'] = 'Date';
-$lang['search_date_to'] = 'Date de fin';
-$lang['search_date_type'] = 'Type de date';
-$lang['search_keywords'] = 'Recherche de mot';
-$lang['search_mode_and'] = 'Rechercher tous les mots';
-$lang['search_mode_or'] = 'Rechercher un des mots';
-$lang['search_one_clause_at_least'] = 'Requête vide. Aucun critère fourni.';
-$lang['search_options'] = 'Options de recherche';
-$lang['search_result'] = 'RĂŠsultats de recherche';
-$lang['search_subcats_included'] = 'Rechercher dans les sous-catĂŠgories';
-$lang['search_title'] = 'Recherche';
-$lang['searched words : %s'] = 'mots recherchĂŠs : %s';
-$lang['send_mail'] = 'Contacter';
-$lang['set as category representative'] = 'Choisir comme reprĂŠsentante de cette catĂŠgorie';
-$lang['show_nb_comments'] = 'Montrer le nombre de commentaires';
-$lang['show_nb_hits'] = 'Montrer le nombre de visualisations';
-$lang['slideshow'] = 'Diaporama';
-$lang['slideshow_stop'] = 'arrĂŞter le diaporama';
-$lang['special_categories'] = 'SpĂŠciales';
-$lang['sql_queries_in'] = 'requĂŞtes SQL en';
-$lang['start_filter_hint'] = 'n\'afficher que les ĂŠlĂŠments rĂŠcents';
-$lang['stop_filter_hint'] = 'retourner Ă  l\'affichage de tous les ĂŠlĂŠments';
-$lang['the beginning'] = 'le dĂŠbut';
-$lang['theme'] = 'Thème de l\'interface';
-$lang['thumbnails'] = 'Miniatures';
-$lang['title_menu'] = 'Menu';
-$lang['title_send_mail'] = 'Un commentaire sur le site';
-$lang['today'] = 'aujourd\'hui';
-$lang['update_rate'] = 'Mettre Ă  jour votre note';
-$lang['update_wrong_dirname'] = 'mauvais nom de rĂŠpertoire';
-$lang['upload_advise_filesize'] = 'le poids de l\'image ne doit dĂŠpasser : ';
-$lang['upload_advise_filetype'] = 'le format de l\'image doit ĂŞtre jpg, png ou gif';
-$lang['upload_advise_height'] = 'la hauteur de l\'image ne doit pas dĂŠpasser : ';
-$lang['upload_advise_thumbnail'] = 'Optionnel, mais recommandĂŠ : choisir une miniature Ă  associer ';
-$lang['upload_advise_width'] = 'la largeur de l\'image ne doit pas dĂŠpasser : ';
-$lang['upload_author'] = 'Auteur';
-$lang['upload_cannot_upload'] = 'impossible de transfĂŠrer le fichier sur le serveur';
-$lang['upload_err_username'] = 'nom d\'utilisateur manquant';
-$lang['upload_file_exists'] = 'ce fichier existe dĂŠjĂ ';
-$lang['upload_filenotfound'] = 'le format du fichier n\'est pas un format d\'image';
-$lang['upload_forbidden'] = 'impossible d\'ajouter une image dans cette catĂŠgorie';
-$lang['upload_name'] = 'Nom de l\'image';
-$lang['upload_picture'] = 'Ajouter une image';
-$lang['upload_successful'] = 'Image ajoutÊe avec succès, un administrateur doit valider l\'ajout pour le rendre visible';
-$lang['upload_title'] = 'Ajouter une image';
-$lang['useful when password forgotten'] = 'utile en cas d\'oubli de mot de passe';
-$lang['qsearch'] = 'Recherche rapide';
-$lang['Connected user: %s'] = 'Utilisateur connectĂŠ: %s';
-$lang['IP: %s'] = 'IP: %s';
-$lang['Browser: %s'] = 'Navigateur: %s';
-$lang['Author: %s'] = 'Auteur: %s';
-$lang['Comment: %s'] = 'Commentaire: %s';
-$lang['Delete: %s'] = 'Suppression: %s';
-$lang['Validate: %s'] = 'Validation: %s';
-$lang['Comment by %s'] = 'Commentaire par %s';
-$lang['User: %s'] = 'Utilisateur: %s';
-$lang['Email: %s'] = 'Email: %s';
-$lang['Admin: %s'] = 'Administration: %s';
-$lang['Registration of %s'] = 'Enregistrement de %s';
-$lang['Category: %s'] = 'CatĂŠgorie: %s';
-$lang['Picture name: %s'] = 'Nom de l\'image: %s';
-$lang['Creation date: %s'] = 'Date de crĂŠation: %d';
-$lang['Waiting page: %s'] = 'Page en attente: %s';
-$lang['Picture uploaded by %s'] = 'Image tĂŠlĂŠchargĂŠe par %s';
-// --------- Starting below: New or revised $lang ---- from version 1.7.1
-$lang['guest_must_be_guest'] = 'Statut de l\'utilisateur "guest" non conforme, utilisation du statut par dĂŠfaut. Veuillez prĂŠvenir le webmestre.';
-// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
-$lang['Administrator, webmaster and special user cannot use this method'] = 'Administrateur, webmestre et utilisateur spĂŠcial ne peuvent pas utiliser cette mĂŠthode';
-$lang['reg_err_mail_address_dbl'] = 'un utilisateur utilise dĂŠjĂ  cette adresse e-mail';
-$lang['Category results for'] = 'RĂŠsultats des catĂŠgories pour';
-$lang['Tag results for'] = 'RĂŠsultats des tags pour';
-$lang['from %s to %s'] = 'de %s Ă  %s';
-$lang['start_play'] = 'Lecture du diaporama';
-$lang['stop_play'] = 'Pause du diaporama';
-$lang['start_repeat'] = 'RĂŠpeter le diaporama';
-$lang['stop_repeat'] = 'Ne pas rĂŠpeter le diaporama';
-$lang['inc_period'] = 'Ralentir la vitesse du diaporama';
-$lang['dec_period'] = 'AccĂŠlerer la vitesse du diaporama';
-$lang['Submit'] = 'Valider';
-$lang['Yes'] = 'Oui';
-$lang['No'] = 'Non';
-$lang['%d element']='%d image';
-$lang['%d elements']='%d images';
-$lang['%d element are also linked to current tags'] = '%d image est ĂŠgalement liĂŠe aux tags courants';
-$lang['%d elements are also linked to current tags'] = '%d images sont ĂŠgalement liĂŠes aux tags courants';
-$lang['See elements linked to this tag only'] = 'Voir les images liĂŠes uniquement Ă  ce tag';
-$lang['elements posted during the last %d days'] = 'images ajoutĂŠes au cours de %d derniers jours';
-$lang['Choose an image'] = 'Choisir une image Ă  ajouter';
-$lang['Piwigo Help'] = 'Aide de Piwigo';
-
-?>
diff --git a/BSF/language/fr_FR/help.html b/BSF/language/fr_FR/help.html
deleted file mode 100644
index dd16a6cb2..000000000
--- a/BSF/language/fr_FR/help.html
+++ /dev/null
@@ -1,250 +0,0 @@
-<h2>Aide</h2>
-
-<h3>DĂŠmarrage rapide</h3>
-
-<ol>
-
- <li>CrĂŠer un rĂŠpertoire local "categorie_test".</li>
-
- <li>Remplir le rĂŠpetoire "categorie_test" avec des photos.</li>
-
- <li>Ouvrir une connexion FTP vers la galerie distante.</li>
-
- <li>TĂŠlĂŠcharger le rĂŠpertoire local "categorie_test" dans le rĂŠpertoire
-distant "galleries". Donner tous les droits (777) au nouveau rĂŠpertoire
-"galleries/categorie_test".</li>
-
- <li>Se connecter Ă  votre installation de Piwigo en tant
-qu'administrateur.</li>
-
- <li>Se rendre sur <span class="pwgScreen">Administration, Images,
-Miniatures</span>. Demander Ă  crĂŠer les miniatures absentes selon l'analyse
-de Piwigo.</li>
-
- <li>Se rendre sur <span class="pwgScreen">Administration, CatĂŠgories,
-Synchroniser</span>. Cocher "rĂŠpertoires + fichiers", dĂŠcocher "Simuler
-uniquement" et valider la synchronisation.</li>
-
- <li>Et voilĂ . Vous avez crĂŠer la catĂŠgorie "categorie_test" Ă  la racine de
-votre galerie.</li>
-
-</ol>
-
-<h3>Ajouts d'ĂŠlĂŠments</h3>
-
-<ul>
-
- <li>
-
- <p>Les rĂŠpertoires reprĂŠsentant les catĂŠgories sont dans le rĂŠpertoire
-"galleries". Ci-dessous l'arbre des rÊpertoires d'une très petite galerie
-(mais utilisant de nombreuses fonctionnalitĂŠs) : </p>
-
-<pre>
-.
-|-- admin
-|-- doc
-|-- galleries
-| |-- categorie-1
-| | |-- categorie-1.1
-| | | |-- categorie-1.1.1
-| | | | |-- categorie-1.1.1.1
-| | | | | |-- pwg_high
-| | | | | | +-- mariage.jpg
-| | | | | |-- thumbnail
-| | | | | | +-- TN-mariage.jpg
-| | | | | +-- mariage.jpg
-| | | | +-- categorie-1.1.1.2
-| | | +-- categorie-1.1.2
-| | |-- categorie-1.2
-| | | |-- pookie.jpg
-| | | +-- thumbnail
-| | | +-- TN-pookie.jpg
-| | +-- categorie-1.3
-| +-- categorie-2
-| |-- porcinet.gif
-| |-- pwg_representative
-| | +-- video.jpg
-| |-- thumbnail
-| | +-- TN-porcinet.jpg
-| +-- video.avi
-|-- include
-|-- install
-|-- language
-|-- template
-+-- tool</pre>
-
- </li>
-
- <li>Fondamentalement, une catĂŠgorie est reprĂŠsentĂŠe par un rĂŠpertoire Ă 
-n'importe quel niveau sous le rĂŠpertoire "galleries" de votre installation
-de Piwigo. Chaque catĂŠgorie peut contenir autant de sous-niveaux que
-dĂŠsirĂŠ. Dans l'exemple ci-dessus, categorie-1.1.1.1 est Ă  un niveau 4 de
-profondeur.</li>
-
- <li>Fondamentalement, un ĂŠlĂŠment est reprĂŠsentĂŠ par un fichier. Un fichier
-peut ĂŞtre un ĂŠlĂŠment pour Piwigo si l'extension du nom du fichier est
-parmi la liste du paramètre de configuration <code>file_ext</code> (voir
-fichier <span class="filename">include/config.inc.php</span>). Un fichier
-peut être une image si son extension est parmi le paramètre de configuration
-<code>picture_ext</code>.</li>
-
- <li>Les ĂŠlĂŠments de type image doivent avoir une miniature associĂŠe (voir la
-section suivante Ă  propos des miniatures).</li>
-
- <li>Les ĂŠlĂŠments de type image peuvent avoir un image en grand format
-associĂŠ. Comme pour le fichier <span class="filename">mariage.jpg</span>
-dans l'exemple ci-dessus. Aucun prĂŠfixe n'est nĂŠcessaire sur le nom du
-fichier.</li>
-
- <li>Les ĂŠlĂŠments non image (vidĂŠos, sons, fichiers texte, tout ce que vous
-voulez...) sont par dĂŠfaut reprĂŠsentĂŠs par un icĂ´ne correspondant Ă 
-l'extension du nom du fichier. Optionnellement, une miniature et un
-reprĂŠsentant peuvent ĂŞtre associĂŠs (voir le fichier <span
-class="filename">video.avi</span> dans l'exemple).</li>
-
- <li><em>Attention</em> : le nom d'un rĂŠpertoire ou d'un fichier ne doit
-ĂŞtre composĂŠ que de lettres, de chiffres, de "-", "_" ou ".". Pas d'espace
-ou de caractères accentuÊs.</li>
-
- <li><em>Conseil</em> : une catĂŠgorie peut contenir des ĂŠlĂŠments et des
-sous-catĂŠgories Ă  la fois. NĂŠanmoins, il est fortement conseillĂŠ pour chaque
-catĂŠgorie de choisir entre contenir des ĂŠlĂŠments <strong>ou bien</strong>
-des sous-catĂŠgories.</li>
-
- <li>Une fois que les fichiers, les miniatures et les reprĂŠsentants sont
-correctement placĂŠs dans les rĂŠpertoires, se rendre sur l'ĂŠcran <span
-class="pwgScreen">Administration, CatĂŠgories, Synchroniser</span>.</li>
-
-</ul>
-
-<h3>Miniatures</h3>
-
-<ul>
-
- <li>Comme mentionnĂŠ prĂŠcĂŠdemment, chaque ĂŠlĂŠment de type image doit ĂŞtre
-associĂŠ Ă  une miniature.</li>
-
- <li>Les miniatures sont stockĂŠes dans le sous-rĂŠpertoire "thumbnail" de
-chaque rĂŠpertoire reprĂŠsentant une catĂŠgorie. Une miniature est un fichier
-de type image (mĂŞme extension du nom du fichier) dont le nom de fichier est
-prÊfixÊ par le paramètre de configuration <code>prefix_thumbnail</code>
-(voir <span class="filename">include/config.inc.php</span>).</li>
-
- <li>Les miniatures n'ont pas besoin d'avoir la mĂŞme extension que leur
-image associĂŠe (une image avec ".jpg" comme extension peut avoir une
-miniature en ".GIF" par exemple).</li>
-
- <li>Il est conseillĂŠ d'utiliser un outil externe pour la crĂŠation des
-miniatures (comme ThumbClic ou PhpMyVignettes, voir le site de prĂŠsentation
-de Piwigo).</li>
-
- <li>Vous pouvez ĂŠgalement utiliser l'outil de crĂŠation de miniature
-intĂŠgrĂŠ Ă  Piwigo mais cela est dĂŠconseillĂŠ car la qualitĂŠ risque
-d'ĂŞtre dĂŠcevante et cela utilise inutilement les ressources du serveur (ce
-qui peut être un grave problème sur un serveur mutualisÊ).</li>
-
- <li>Si vous choisissez d'utiliser le serveur web pour gĂŠnĂŠrer les
-miniatures, vous devez donner les droits en ĂŠcriture sur tous les
-rĂŠpertoires reprĂŠsentant les catĂŠgories pour tous les utilisateurs
-(propriĂŠtaire, groupe, autre).</li>
-
-</ul>
-
-<h3>Autorisations</h3>
-
-<ul>
-
- <li>Vous pouvez interdire l'accès aux catÊgories. Les catÊgories peuvent
-ĂŞtre publiques ou privĂŠes. Les autorisations (valables pour les groupes et
-les utilisateurs) sont gĂŠrables uniquement pour les catĂŠgories privĂŠes.</li>
-
- <li>Vous pouvez rendre une catĂŠgorie privĂŠe en l'ĂŠditant (<span
-class="pwgScreen">Administration, CatĂŠgories, GĂŠrer, Editer</span>) ou en
-gĂŠrant les options pour votre arbre complet des catĂŠgories (<span
-class="pwgScreen">Administration, CatĂŠgories, PropriĂŠtĂŠs, Publique/PrivĂŠe</span>).</li>
-
- <li>Une fois que certaines catĂŠgories sont privĂŠes, vous pouvez gĂŠrer les
-autorisations pour les groupes et les utilisateurs (<span
-class="pwgScreen">Administration, Identification</span>).</li>
-
-</ul>
-
-<h3>Groupes d'utilisateurs</h3>
-
-<ul>
-
- <li>Piwigo peut gÊrer des groupes d'utilisateurs. Très pratique
-pour gĂŠrer des autorisations communes sur les catĂŠgories privĂŠes.</li>
-
- <li>Vous pouvez crĂŠer des groupes et y ajouter des utilisateurs dans la
-<span class="pwgScreen">Administration, Identification, Groupes</span>.</li>
-
- <li>Un utilisateur peut appartenir Ă  plusieurs groupes. L'autorisation est
-plus forte que l'interdiction : si l'utilisateur "pierre" appartient aux
-groupes "famille" et "amis", et que seul le groupe "famille" peut visiter la
-catĂŠgorie "NoĂŤl 2003", alors "pierre" peut visiter cette catĂŠgorie.</li>
-
-</ul>
-
-<h3>Ajout de fichiers par les utilisateurs</h3>
-
-<p>Pour permettre aux utilisateurs d'ajouter des fichiers :</p>
-
-<ol>
-
- <li>autoriser l'ajout d'images sur n'importe quelle catĂŠgorie (<span
-class="pwgScreen">Administation, CatĂŠgories, Gestion, Edit</span> ou <span
-class="pwgScreen">Administration, CatĂŠgories, PropriĂŠtĂŠs, Ajout d'images</span>).</li>
-
- <li>donner les droits en ĂŠcriture (pour tous les utilisateurs) sur les
-rĂŠpertoires correspondant aux catĂŠgories qui sont autorisĂŠes Ă  l'ajout.</li>
-</ol>
- <p>Les fichiers ajoutĂŠs par les utilisateurs ne sont pas directement
-visibles sur le site, ils doivent ĂŞtre validĂŠs par un administrateur. Pour
-cela, un administrateur doit se rendre dans zone administration, Images, En
-attente afin de valider ou rejeter les fichiers proposĂŠs. Il est ensuite
-nÊcessaire de synchroniser le système de fichier avec la base de donnÊes.</p>
-
-
-
-<h3>Liens entre les ĂŠlĂŠments et les catĂŠgories, catĂŠgories virtuelles</h3>
-
-<ul>
-
- <li>Piwigo dissocie les catĂŠgories qui stockent les ĂŠlĂŠments et les
-catĂŠgories oĂš les ĂŠlĂŠments sont montrĂŠs.</li>
-
- <li>Par dĂŠfaut, les ĂŠlement ne sont montrĂŠs que dans leurs catĂŠgories
-rĂŠelles : celles qui correspondent Ă  leurs rĂŠpertoires sur le serveur.</li>
-
- <li>Pour lier un ĂŠlĂŠment Ă  une catĂŠgorie, il suffit de faire une
-association sur la page d'ĂŠdition de l'ĂŠlĂŠment (un lien existe vers cette
-page lorsque vous ĂŞtes connectĂŠ en tant qu'administrateur), sur la page
-regroupant les informations sur tous les ĂŠlĂŠments d'une catĂŠgorie ou bien
-encore Ă  l'aide du caddie.</li>
-
- <li>En partant de ce principe, il est possible de crĂŠer des catĂŠgories
-virtuelles : aucun rĂŠpertoire ne correspond Ă  ces catĂŠgories. Vous pouvez
-crĂŠer des catĂŠgories virtuelles sur <span class="pwgScreen">Administration,
-CatĂŠgorie, GĂŠrer</span>.</li>
-
-</ul>
-
-<h3>Informations diverses</h3>
-
-<ul>
-
- <li>Une fois votre galerie crĂŠĂŠe, configurez l'affichage par
-dĂŠfaut tel que dĂŠsirĂŠ dans <span class="pwgScreen">Administation,
-Configuration, Affichage par dĂŠfaut</span>. En effet, chaque nouvel
-utilisateur hĂŠritera de ces propriĂŠtĂŠs d'affichage.</li>
-
- <li>Pour tout question, n'hĂŠsitez pas Ă  visiter le forum ou Ă  y poser une
-question si votre recherche est infructueuse. Le
-<a href="http://forum.phpwebgallery.net">forum</a> est disponible sur le site
- de Piwigo. Consulter ĂŠgalement la
-<a href="http://phpwebgallery.net/doc">documentation officielle de
-Piwigo</a> pour obtenir plus de dĂŠtails.</li>
-
-</ul>
diff --git a/BSF/language/fr_FR/help/advanced_feature.html b/BSF/language/fr_FR/help/advanced_feature.html
deleted file mode 100644
index 3c6014012..000000000
--- a/BSF/language/fr_FR/help/advanced_feature.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<h2>Fonctions avancĂŠes</h2>
-
-<p>Liste des fonctionnalitĂŠs spĂŠciales pour les administrateurs experts de PWG:</p>
-
-<ul>
-
- <li>
- <strong>ElĂŠments non liĂŠs:</strong>
- Affiche les images qui ne sont pas associĂŠes Ă  une catĂŠgorie virtuelle
- </li>
- <li>
- <strong>Fichiers portant le mĂŞme nom dans plusieurs catĂŠgories physiques:</strong>
- Affiche les images ou les ĂŠventuels fichiers qui pourraient ĂŞtre trouvĂŠs dans plusieurs catĂŠgories.
- </li>
-
-</ul>
diff --git a/BSF/language/fr_FR/help/cat_modify.html b/BSF/language/fr_FR/help/cat_modify.html
deleted file mode 100644
index f6caa5faa..000000000
--- a/BSF/language/fr_FR/help/cat_modify.html
+++ /dev/null
@@ -1,149 +0,0 @@
-<h2>Modifier une catĂŠgorie</h2>
-
-<h3>Informations</h3>
-
-<ul>
-
- <li><strong>nom</strong>: renommer la catĂŠgorie (virtuellement pour
- une catĂŠgorie physique).</li>
-
- <li><strong>description</strong>: donner une idĂŠe du contenu de la catĂŠgorie,
- cette indication figurera sous la page des miniatures.</li>
-
-</ul>
-
-<h3>DĂŠplacer</h3>
-
-<p>Si la catĂŠgorie est virtuelle, vous pouvez la dĂŠplacer. DĂŠplacer une
-catĂŠgorie signifie changer sa catĂŠgorie parente.</p>
-
-<h3>Options</h3>
-
-<ul>
-
- <li><strong>Type d'accès</strong>: gestion des permissions. Si vous rendez
-une catĂŠgorie privĂŠe, toutes ses catĂŠgories filles deviennent privĂŠes. Si
-vous rendez une catÊgorie publique, toutes ses catÊgories mères deviennent
-publiques.</li>
-
- <li><strong>Verrouiller</strong>: la catĂŠgorie et toutes ses catĂŠgories
-filles deviennent temporairement inaccessibles pour maintenance.</li>
-
- <li><strong>Commentaires</strong>: autorise les utilisateurs Ă  commenter
-les ĂŠlĂŠments de cette catĂŠgorie.</li>
-
- <li><strong>Autoriser l'ajout d'images</strong>: autorise les utilisateurs
-Ă  tĂŠlĂŠcharger des fichiers. Cette option n'est disponible que si la
-catĂŠgorie est physique (et non virtuelle).</li>
-
-</ul>
-
-<p>Vous pouvez aussi gĂŠrer ces options par la gestion des "PropriĂŠtĂŠs"
-(ĂŠcrans <span class="pwgScreen">Ajout</span>, <span
-class="pwgScreen">Commentaires</span>, <span
-class="pwgScreen">Verrouiller</span>, <span
-class="pwgScreen">Publique/PrivĂŠe</span>, <span
-class="pwgScreen">ReprĂŠsentant</span> disponibles Ă  partir d' <span
-class="pwgScreen">Administration, CatĂŠgories, PropriĂŠtĂŠs</span>).</p>
-
-<h3>Ordre de tri</h3>
-
-<p>Utiliser l'ordre de tri des images par dĂŠfaut.</p>
-
-<p>Indiquer si le tri s'applique ĂŠgalement aux sous-catĂŠgories.</p>
-
-<p>SĂŠlectionner les colonnes du tri Ă  utiliser pour cette catĂŠgorie.</p>
-<ul>
-<li><strong>Date de crĂŠation</strong>: Date de prise de vue</li>
-<li><strong>Date d'ajout</strong>: Date de la synchronisation</li>
-<li><strong>Note moyenne (*)</strong>: laquelle moyenne pourrait ĂŞtre modifiĂŠe par le visiteur</li>
-<li><strong>Plus vues (*)</strong>: La visite en cours peut changer l'ordre des plus vues</li>
-<li><strong>Nom du fichier</strong>: Nom du fichier donnĂŠ dans les champs d'informations ci-dessus</li>
-<li><strong>Id</strong>: Id interne (les catĂŠgories rĂŠcentes ont un "Id" plus grand que les prĂŠcĂŠdentes).</li>
-
-</ul>
-<p><strong>(*)</strong>Attention: testez-vous mĂŞme ces tris qui peuvent donner des rĂŠsultats imprĂŠvisibles.</p>
-
-
-<h3>ReprĂŠsentant</h3>
-
-<p>Le reprĂŠsentant d'une catĂŠgorie est la miniature affichĂŠe pour
-reprĂŠsenter la catĂŠgorie sur la page principale (<span
-class="pwgScreen">category.php</span>) lorsqu'une catĂŠgorie contient
-uniquement des sous-catĂŠgories et pas d'ĂŠlĂŠments directs (comme Ă  la
-racine)</p>
-
-<p>Il existe 4 moyens de choisir le reprĂŠsentant d'une catĂŠgorie:</p>
-
-<ul>
-
- <li><span class="pwgScreen">Page d'affichage des images</span>: dans la barre des boutons
-d'action, l'un d'eux permet de choisir l'ĂŠlĂŠment affichĂŠ comme reprĂŠsentant
-de la catĂŠgorie affichĂŠe. Ce bouton d'action n'est disponible que pour les
-administrateurs.</li>
-
- <li><span class="pwgScreen">Modifier les informations d'une image</span>
-dans l'administration. Cet ĂŠcran peut ĂŞtre atteint depuis <span
-class="pwgScreen">picture.php</span> ou <span class="pwgScreen">Gestion par
-lot</span> dans le <em>mode unitaire</em>. Voir l'aide de cet ĂŠcran pour les
-dĂŠtails.</li>
-
- <li><span class="pwgScreen">Administration, CatĂŠgories, PropriĂŠtĂŠs,
-ReprĂŠsentant</span>. Voir l'aide de cet ĂŠcran pour les dĂŠtails.</li>
-
- <li><span class="pwgScreen">Modifier une catĂŠgorie</span> (le prĂŠsent
-ĂŠcran).</li>
-
-</ul>
-
-<p>La reprÊsentation dÊpend du paramètre de configuration
-<code>allow_random_representative</code> (voir <span
-class="filename">include/config_default.inc.php</span>).</p>
-
-<p>Par dĂŠfaut (<code>allow_random_representative</code> Ă  false) chaque
-catĂŠgorie contenant au moins un ĂŠlĂŠment est reprĂŠsentĂŠ par un ĂŠlĂŠment
-fixe. Une fois fixĂŠ (Ă  la crĂŠation de la catĂŠgorie), le reprĂŠsentant change
-uniquement lorsque l'administrateur le demande. Si le reprĂŠsentant ne
-convient pas, vous pouvez demander Ă  <strong>Trouver un nouveau reprĂŠsentant
-au hasard</strong>.</p>
-
-<p>Si le paramètre de configuration <code>allow_random_representative</code>
-est Ă  true, une catĂŠgorie contenant des ĂŠlĂŠments peut ne pas avoir de
-reprĂŠsentant fixe. Utiliser simplement le bouton <strong>Supprimer le
-reprĂŠsentant</strong>.</p>
-
-<p>Si la catĂŠgorie ne contient aucun ĂŠlĂŠment (mais uniquement des
-sous-catĂŠgories) elle peut quand mĂŞme ĂŞtre reprĂŠsentĂŠe par n'importe quel
-ÊlÊment grâce à l'Êcran <span class="pwgScreen">Modifier les informations
-d'une image</span>. La seule option du prĂŠsent ĂŠcran est le bouton
-<strong>Supprimer le reprĂŠsentant</strong>.</p>
-
-<h3>Associer tous les ĂŠlĂŠments de la catĂŠgorie Ă  une nouvelle catĂŠgorie</h3>
-
-<ul>
-
-<li><strong>Nom de la catĂŠgorie virtuelle</strong>: Nom de la nouvelle catĂŠgorie Ă  crĂŠer,
-toutes les images de la catĂŠgorie en cours seront liĂŠes Ă  la nouvelle.</li>
-
-<li><strong>CatĂŠgorie parente</strong>: OĂš la nouvelle catĂŠgorie doit ĂŞtre,
-laisser vide pour la crĂŠer sur la page d'accueil.</li>
-
-</ul>
-
-<h3>Associer tous les ĂŠlĂŠments de la catĂŠgorie Ă  des catĂŠgories existantes</h3>
-
-<ul>
-
-<li><strong>CatĂŠgories</strong>: Choisir la catĂŠgorie de destination.</li>
-
-</ul>
-
-<h3>Envoyer un mail d'informations aux membres d'un groupe</h3>
-
-<ul>
-
-<li><strong>Groupe</strong>: Groupe de destinataires</li>
-
-<li><strong>Contenu du mail</strong>: Texte libre Ă  leur envoyer.</li>
-
-</ul> \ No newline at end of file
diff --git a/BSF/language/fr_FR/help/cat_move.html b/BSF/language/fr_FR/help/cat_move.html
deleted file mode 100644
index 658427e6d..000000000
--- a/BSF/language/fr_FR/help/cat_move.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<h2>DĂŠplacement de catĂŠgories virtuelles</h2>
-
-<p>Vous pouvez changer le parent d'une catĂŠgorie virtuelle.</p>
-
-<h3>CatĂŠgories virtuelles Ă  dĂŠplacer</h3>
-
-<p>SĂŠlectionnez une ou plusieurs catĂŠgories virtuelle Ă  dĂŠplacer.
-Si la liste est vide, c'est que vous n'en avez pas encore crĂŠĂŠ.</p>
-
-<h3>Nouvelle catĂŠgorie parente</h3>
-
-<p>SĂŠlectionnez la nouvelle catĂŠgorie parente (virtuelle ou physique).
-Si vous n'en sĂŠlectionnez aucune,
-les catĂŠgories Ă  dĂŠplacer seront remontĂŠe Ă  la racine des catĂŠgories.
-Vous ne pouvez dĂŠplacer une catĂŠgorie dans elle-mĂŞme ou ses enfants.</p>
diff --git a/BSF/language/fr_FR/help/cat_options.html b/BSF/language/fr_FR/help/cat_options.html
deleted file mode 100644
index 4ac25d9ed..000000000
--- a/BSF/language/fr_FR/help/cat_options.html
+++ /dev/null
@@ -1,42 +0,0 @@
-<h2>Options des catĂŠgories</h2>
-
-<p>Gestion des options pour plusieurs catĂŠgories Ă  la fois.</p>
-
-<dl>
-
- <dt>Autorisation Ă  l'ajout</dt>
-
- <dd>Rendre les catĂŠgories autorisĂŠes Ă  l'ajout par les visiteurs. Cette
-option n'est pas disponible pour les catĂŠgories virtuelles et
-distantes.</dd>
-
- <dt>Commentaires utilisateur</dt>
-
- <dd>Autoriser les utilisateurs Ă  ajouter des commentaires dans les catĂŠgories sĂŠlectionnĂŠe.
-Par hĂŠritage, une image est commentable si elle appartient Ă  au moins une catĂŠgorie commentable.</dd>
-
- <dt>Verrouiller</dt>
-
- <dd>Les catĂŠgories sĂŠlectionnĂŠes deviennent temporairement inactives pour
-maintenance. Lorsqu'une catĂŠgorie est verrouillĂŠe, toutes les catĂŠgories
-enfant sont verrouillĂŠes. Lorsqu'une catĂŠgorie est dĂŠverrouillĂŠe, toutes les
-catĂŠgories parentes sont dĂŠverrouillĂŠes.</dd>
-
- <dt>Publique / PrivĂŠe</dt>
-
- <dd>Gestion du statut des catĂŠgories. Les permissions ne sont possibles
-que pour les catĂŠgories privĂŠes. Une fois qu'une catĂŠgorie est privĂŠe, vous
-devez explicitement autoriser les utilisateurs ou les groupes Ă  y
-accĂŠder. Lorsqu'une catĂŠgorie devient privĂŠe, toutes les catĂŠgories enfant
-deviennent privĂŠes. Lorsqu'une catĂŠgorie devient publique, toutes les
-catĂŠgories parentes deviennent publiques.</dd>
-
- <dt>ReprĂŠsentant</dt>
-
- <dd>Cette option est disponible uniquement si le paramètre de
-configuration <code>allow_random_representative</code> (voir <span
-class="filename">include/config_default.inc.php</span>) est
-<em>true</em>. Chaque catĂŠgorie peut-ĂŞtre reprĂŠsentĂŠe au hasard ou par une
-miniature fixe unique.</dd>
-
-</dl>
diff --git a/BSF/language/fr_FR/help/cat_perm.html b/BSF/language/fr_FR/help/cat_perm.html
deleted file mode 100644
index ea6bf9858..000000000
--- a/BSF/language/fr_FR/help/cat_perm.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<h2>GĂŠrer les permissions pour une catĂŠgorie</h2>
-
-<p>Cet ĂŠcran n'est disponible que pour les catĂŠgories privĂŠes. Ici vous
-pourrez sĂŠlectionner les utilisateurs et les groupes autorisĂŠs pour cette
-catĂŠgorie.</p>
-
-<h3>Groupes</h3>
-
-<p>Vous pouvez autoriser ou interdire l'accès aux groupes. En modifiant les
-autorisations des groupes, vous modifierez probablement la liste des
-utilisateurs autorisÊs grâce à l'appartenance aux groupes.</p>
-
-<h3>Utilisateurs</h3>
-
-<p>Vous pouvez autoriser ou interdire l'accès aux utilisateurs
-individuellement.</p>
diff --git a/BSF/language/fr_FR/help/configuration.html b/BSF/language/fr_FR/help/configuration.html
deleted file mode 100644
index 5f4b274ee..000000000
--- a/BSF/language/fr_FR/help/configuration.html
+++ /dev/null
@@ -1,137 +0,0 @@
-<h2>Configuration</h2>
-
-<p>Cet ĂŠcran permet de gĂŠrer la configuration basique. En effet, seuls sont
-montrÊs les paramètres de configuration qui doivent suffire à la majoritÊ
-des administrateurs. Si vous souhaitez voir la liste des nombreux (et
-avancÊs) paramètres, lire le fichier <span
-cass="filename">include/config_default.inc.php</span></p>
-
-<p>Cet Êcran est divisiÊ en plusieurs sections, regroupant les paramètres
-par thème.</p>
-
-<h3>Principale</h3>
-<ul>
-
- <li><strong>Titre de la galerie</strong>: utilisĂŠ pour le flux RSS et
-la notification par email.</li>
-
- <li><strong>Bannière des pages</strong>: code html affichÊ en haut des
-pages.</li>
-
- <li><strong>URL de la galerie</strong>: utilisĂŠ pour le flux RSS.</li>
-
- <li><strong>Verrouiller la galerie</strong>: Verrouiller l'ensemble de la
-galerie pour maintenance. Seul les administrateurs pourront accĂŠder Ă  la
-galerie.</li>
-
- <li><strong>Notation</strong>: La notation des photos est possible.</li>
-
- <li><strong>Notation par les visiteurs</strong>: MĂŞme les utilisateurs non enregistrĂŠs peuvent noter les images.</li>
-
- <li><strong>Permettre l'enregistrement des utilisateurs</strong>: L'inscription est libre pour tous.</li>
-
- <li><strong>L'adresse mail est obligatoire pour tous les utilisateurs</strong>: L'adresse mail sera vĂŠrifiĂŠ lors des inscriptions ou de la mise Ă  jour des profils sauf si l'action est effectuĂŠe dans la partie administration.</li>
-
- <li><strong>Notifier les administrateurs lors de l'inscription d'un utilisateur</strong>: Les administrateurs recevront un courriel Ă  chaque inscription.</li>
-
-</ul>
-
-<h3>Historique</h3>
-<ul>
- <p>les visites des pages <span
-class="pwgScreen">index.php</span> et <span
-class="pwgScreen">picture.php</span> sont
-enregistrĂŠes dans la table <code>history</code>.</p>
-
- <p>Les visites sont affichĂŠes dans l'ĂŠcran <span class="pwgScreen">Administration, SpĂŠciales, Historique</span>.</p>
-
- <li><strong>Enregistrer les pages visitĂŠes par les invitĂŠs</strong>: les visites des pages par les invitĂŠs sont enregistrĂŠes.</li>
-
- <li><strong>Enregistrer les pages visitĂŠes par les utilisateurs</strong>: les visites des pagespar les utilisateurs enregistrĂŠs sont enregistrĂŠes.</li>
-
- <li><strong>Enregistrer les pages visitĂŠes par les administrateurs</strong>: les visites des pages par les administrateurs sont enregistrĂŠes.</li>
-
-</ul>
-
-<h3>Commentaires</h3>
-<ul>
-
- <li><strong>Commentaires utilisateur pour tous</strong>: mĂŞme les
-utilisateurs non enregistrĂŠs peuvent enregistrer des commentaires.</li>
-
- <li><strong>Nombre de commentaires utilisateur par page</strong>.</li>
-
- <li><strong>Validation</strong>: un administrateur doit valider les
-commentaires utilisateurs avant qu'ils puissent devenir visibles dans la
-partie publique. La validation des commentaires utilisateurs a lieu dans
-l'ĂŠcran <span class="pwgScreen">Administration, Images,
-Commentaires</span>.</li>
-
- <li><strong>Notifier les administrateurs quand un commentaire est enregistrĂŠ</strong>:
-Envoi un courriel aux administrateurs lorsqu'un utilisateur enregistre un commentaire qui est validĂŠ.</li>
-
- <li><strong>Notifier les administrateurs quand un commentaire requiert sa validation </strong>:
-Envoi un courriel aux administrateurs lorsqu'un utilisateur enregistre un commentaire qui demande une validation de la part des administrateurs.
-La validation des commentaires utilisateurs a lieu dans l'ĂŠcran <span class="pwgScreen">Administration, Images, Commentaires</span>.</li>
-
-</ul>
-
-<h3>TĂŠlĂŠchargement</h3>
-<ul>
- <li><strong>Afficher le lien d'ajout d'image tout le temps</strong>: S'il existe des catĂŠgories permettant le tĂŠlĂŠchargement, le lien d'ajout d'image sera affichĂŠ quelque soit la catĂŠgorie.</li>
- <li><strong>Niveau d'accès utilisateur pour tÊlÊcharger</strong>: Permet de restreindre l'ajout à certains utilisateurs</li>
- <li><strong>Notifier les administrateurs quand une image est tĂŠlĂŠchargĂŠe</strong>: Les administrateurs recevront un courriel Ă  chaque image mis Ă  disposition par un utilisateur.</li>
-</ul>
-
-<h3>Affichage par dĂŠfaut</h3>
-<p>Modifier les options d'affichage par dĂŠfaut: pour les visiteurs non
-connectĂŠs. Une fois connectĂŠ, ces options sont surchargĂŠes par celles de
-l'utilisateur, qu'il peut modifier dans l'ĂŠcran <span
-class="pwgScreen">profile</span>.</p>
-
-<p>Il est possible de changer ces options pour les utilisateurs existants,
-mais il s'agit d'un autre ĂŠcran : <span class="pwgScreen">Administration,
-Identification, Utilisateurs</span>, dans lequel vous pouvez modifier ces
-options pour une liste d'utilisateurs sĂŠlectionnĂŠs.</p>
-
-<ul>
-
- <li><strong>Langue</strong>: ne concerne que les libellĂŠs de
-Piwigo. Les noms de catĂŠgories, d'image et les descriptions ne sont
-pas localisĂŠs (ie multilingue).</li>
-
- <li><strong>Nombre de miniatures par ligne</strong></li>
-
- <li><strong>Nombre de lignes par page</strong></li>
-
- <li><strong>Thème de l'interface</strong></li>
-
- <li><strong>PĂŠriode rĂŠcente</strong>: en jours. PĂŠriode pendant laquelle
-une image est considĂŠrĂŠe comment nouvelle. Cette pĂŠriode doit ĂŞtre
-supĂŠrieure Ă  1 jour.</li>
-
- <li><strong>DĂŠvelopper toutes les catĂŠgories</strong>: dĂŠvelopper toutes
-les catĂŠgories dans le menu? <em>Attention</em>: cette option est
-susceptible de consommer inutilement des ressources si votre arbre de
-catĂŠgories contient de nombreux ĂŠlĂŠments.</li>
-
- <li><strong>Montrer le nombre de commentaires</strong>: montrer les nombre
-de commentaires utilisateur en dessous de chaque miniature. Consomme des
-ressources.</li>
-
- <li><strong>Montrer le nombre de visualisations </strong>: affiche les
- ÂŤ hits Âť relevĂŠs sur une image sous sa miniature dans la page de miniatures.
- Uniquement valable si le paramètre de configuration avancÊe est :<br />
- $conf['show_nb_hits'] = true; <br />
- N.B.: par defaut il est Ă  false.</li>
-
- <li><strong>Largeur maximum des images</strong>: Ă  l'affichage. Si l'image
-est plus large que ce paramètre, alors elle sera redimensionnÊe à
-l'affichage. Si vous pensez nĂŠcessaire de modifier ce paramĂŠtrage (donc pour
-un affichage par dĂŠfaut), il serait pertinent de redimensionner directement
-vos images stockĂŠes.</li>
-
- <li><strong>Hauteur maximum des images</strong>: mĂŞme remarque que pour la
-largeur.</li>
-
-</ul>
diff --git a/BSF/language/fr_FR/help/group_list.html b/BSF/language/fr_FR/help/group_list.html
deleted file mode 100644
index fc08b0408..000000000
--- a/BSF/language/fr_FR/help/group_list.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<h2>Liste des groupes</h2>
-
-<p>Manipulation des propriĂŠtĂŠs des groupes dĂŠfinis.</p>
-
-<h3>Ajouter un groupe</h3>
-
-<p>L'administrateur peut ajouter des groupes.</p>
-
-<h3>Liste des groupes</h3>
-
-<p>La liste permet pour chaque groupe:</p>
-
-<ul>
- <li>d'accĂŠder Ă  la liste des membres</li>
- <li>d'accĂŠder aux permissions</li>
- <li>de supprimer le groupe (nĂŠcessite une confirmation)</li>
- <li>d'inverser le statut "par dĂŠfaut" (nĂŠcessite une confirmation)</li>
-</ul>
-
-<h3>Groupes par dĂŠfaut</h3>
-<p>Les groupes par dĂŠfaut sont les groupes associĂŠs automatiquement Ă  chaque nouvel utilisateur.</p> \ No newline at end of file
diff --git a/BSF/language/fr_FR/help/history.html b/BSF/language/fr_FR/help/history.html
deleted file mode 100644
index 2940321ad..000000000
--- a/BSF/language/fr_FR/help/history.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<h2>Historique</h2>
-
-<p>Ces ĂŠcrans permettent de suivre l'historique de navigation dans Piwigo
- suivant les options que vous avez dĂŠterminĂŠes dans - Administration - GĂŠnĂŠrale
- - Onglet "Historique".</p>
-
-<h3>Statistiques</h3>
-<ul>
- <p>Si vous avez choisi que les visites des pages <span
-class="pwgScreen">index.php</span> et <span
-class="pwgScreen">picture.php</span> soient
-enregistrĂŠes dans la table <code>history</code>,
-cet onglet permet de suivre le nombre de pages visitĂŠes</p>
-
- <li><strong>Statistiques totales</strong> : vous visualisez les statistiques
- par annĂŠe</li>
-
- <li><strong>Statistiques d'une annĂŠe</strong> : vous visualisez les statistiques
- des mois de l’année sélectionnée.</li>
-
- <li><strong>Statistiques d'un mois</strong> : vous visualisez les statistiques
- des jours du mois sĂŠlectionnĂŠ.</li>
-
- <li><strong>Statistiques d'une journĂŠe</strong> : vous visualisez les statistiques
- des heures de la journĂŠe sĂŠlectionnĂŠe.</li>
-
-</ul>
-
-<h3>Rechercher</h3>
-<ul>
- <p>Si vous avez choisi que les visites des pages <span
-class="pwgScreen">index.php</span> et <span
-class="pwgScreen">picture.php</span> soient
-enregistrĂŠes dans la table <code>history</code>.
- Cet onglet permet de suivre plus en dĂŠtail les pages explorĂŠes
- sur votre site avec l'aide de diffĂŠrents filtres.</p>
-
- <li><strong>Filtrer par date</strong> : sĂŠlectionner la plage
- d'observation dont vous souhaitez observer l’activité.</li>
-
- <li><strong>Filtrer par type d'ĂŠlĂŠment</strong> : sĂŠlectionner le
-type d'élément dont vous souhaitez observer l’activité.</li>
-
- <li><strong>Filtrer par utilisateur</strong> : sĂŠlectionner l'utilisateur dont vous
- souhaitez observer l’activité.</li>
-
- <li><strong>Filtrer par nom du fichier</strong> : sĂŠlectionner le nom du fichier dont vous
- souhaitez observer l’activité.</li>
-
- <li><strong>Filtrer par identifiant image</strong> : sĂŠlectionner l'identifiant image dont vous
- souhaitez observer l’activité.</li>
-</ul> \ No newline at end of file
diff --git a/BSF/language/fr_FR/help/index.php b/BSF/language/fr_FR/help/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/language/fr_FR/help/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/language/fr_FR/help/maintenance.html b/BSF/language/fr_FR/help/maintenance.html
deleted file mode 100644
index 06fe13fa2..000000000
--- a/BSF/language/fr_FR/help/maintenance.html
+++ /dev/null
@@ -1,51 +0,0 @@
-<h2>Maintenance</h2>
-
-<p>Pour optimiser le temps de gĂŠnĂŠration des pages, Piwigo utilise
-des informations en cache. Par exemple, au lieu de compter le nombre
-d'ĂŠlĂŠments contenus dans chaque catĂŠgorie Ă  chaque rechargement de page,
-cette information est stockĂŠe dans la base de donnĂŠes. En thĂŠorie, cette
-information doit toujours ĂŞtre correcte, mais parfois une erreur peut
-survenir et l'information en cache devient fausse.</p>
-
-<p>Des informations deviennent inutiles avec le temps. Les supprimer de la
-base de donnÊes libère de l'espace disque.</p>
-
-<ul>
-
- <li><strong>Mettre Ă  jour les informations des catĂŠgories:</strong> Pour
-chaque catĂŠgorie, les informations Ă  controller et/ou mettre Ă  jour sont les
-suivantes: liste des catÊgories mères, nombre d'ÊlÊments, date du dernier
-ĂŠlĂŠment, position parmi les catĂŠgories soeur, position dans l'arbre complet
-des catĂŠgories. Cette action vĂŠrifie ĂŠgalement la cohĂŠrence des
-reprĂŠsentants.</li>
-
- <li><strong>Mettre Ă  jour les informations des images:</strong> Pour
-chaque image, les informations Ă  mettre Ă  jour sont: chemin complet vers le
-fichier, note moyenne. <em>Attention</em>: ne pas confondre avec les
-mĂŠta-donnĂŠes qui sont synchronisĂŠes sur l'ĂŠcran <span
-class="pwgScreen">Administration, CatĂŠgories, Synchroniser</span> ou sur
-l'ĂŠcran <span class="pwgScreen">Modifier les informations d'une image</span>
-(accessible depuis la page de visualisation d'une image <span
-class="pwgScreen">picture.php</span>).</li>
-
- <li><strong>RĂŠparer et optimiser la base de donnĂŠes:</strong>
-Pour chaque tables de la base de donnĂŠes PhpWegGallery, les opĂŠrations de rĂŠ-ordonnancement, de rĂŠparation et d'optimisation sont effectuĂŠes.
- </li>
-
-</ul>
-
-<ul>
- <li><strong>Purger le detail de l'historique:</strong> Supprime toutes les lignes de
-la table <code>history</code>. L'ĂŠcran <span
-class="pwgScreen">Administration, SpĂŠciales, Historique</span> ne montre alors
-plus aucune information sur le passĂŠ. <em>Attention</em>: toutes les donnĂŠes
-seront perdues et il n'existe aucun moyen de les rĂŠcupĂŠrer.</li>
-
- <li><strong>Purger le sommaire de l'historique:</strong> Supprime toutes les informations sommaires (obtenues Ă  partir de detail de l'historique) .</li>
-
- <li><strong>Purger les sessions:</strong> Supprimer les sessions
-expirĂŠes..</li>
-
- <li><strong>Purger les flux de notification jamais utilisĂŠs</strong></li>
-
-</ul>
diff --git a/BSF/language/fr_FR/help/notification_by_mail.html b/BSF/language/fr_FR/help/notification_by_mail.html
deleted file mode 100644
index 444af5883..000000000
--- a/BSF/language/fr_FR/help/notification_by_mail.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<h2>Notification par mail</h2>
-
-<p>Cet ĂŠcran permet de configurer, de gĂŠrer la notification aux utilisateurs de changements par l'envoi d'un mail.</p>
-
-<p>Cet ĂŠcran est composĂŠ de 3 onglets:</p>
-
-<h3>Paramètrage</h3>
-<p>AccÊsible uniquement aux webmestres, cet onglet permet de positionner les paramètres de la notification par mail.</p>
-
-<h3>Inscription</h3>
-<p>AccĂŠsible uniquement aux webmestres, cet onglet permet de gĂŠrer les inscriptions/dĂŠsinscriptions Ă  la notification par mail.</p>
-
-<h3>Envoi</h3>
-<p>AccĂŠsible aux webmestres et aux administrateurs, cet onglet permet d'effectuer les envois des mails pour notifier les changements.</p>
-
diff --git a/BSF/language/fr_FR/help/permalinks.html b/BSF/language/fr_FR/help/permalinks.html
deleted file mode 100644
index de7291331..000000000
--- a/BSF/language/fr_FR/help/permalinks.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<h2>Liens permanents</h2>
-
-<p>Les liens permanents sont utilisĂŠs pour rendre les urls des catĂŠgories plus jolis. Quand une catĂŠgorie a un lien permanent associĂŠe, l'identifiant de la catĂŠgorie n'est plus nĂŠcessaire dans l'url.</p>
-
-<p>Quand un lien permanent est effacÊ, vous pouvez le sauvegarder dans l'historique des liens permanents, de sorte que les liens externes a PWG fonctionnent encore. Dans l'historique des liens permanents vous pouvez voir la date d'effacement du lien, ainsi que la date de la dernière utilisation et le nombre d'utilisations de ce lien.</p>
-
-<p>Veuillez noter que les liens permanents doivent ĂŞtre uniques. Ils doivent aussi ĂŞtre uniques dans l'historique des liens permanents.</p>
diff --git a/BSF/language/fr_FR/help/search.html b/BSF/language/fr_FR/help/search.html
deleted file mode 100644
index 3e1ce2c17..000000000
--- a/BSF/language/fr_FR/help/search.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<h2>Recherche</h2>
-
-<p>Recherche d'images Ă  travers l'ensemble de la galerie.</p>
-
-<dl>
-
- <dt>Rechercher un mot</dt>
-
- <dd>Recherche un ou plusieurs mots dans tous les attributs liĂŠs aux
-images. Utiliser * comme joker pour les recherches partielles.</dd>
-
- <dt>Recherche d'un auteur</dt>
-
- <dd>Utiliser * comme joker pour les recherches partielles.</dd>
-
- <dt>Recherche par date</dt>
-
- <dd>SĂŠlectionner une date et/ou une date de fin. Laisser la date vide si
-vous souhaiter faire une recherche "avant". L'annĂŠe doit ĂŞtre entrĂŠe dans le
-dernier champ sous forme de 4 chiffres (2005 par exemple).</dd>
-
- <dt>Recherche dans les catĂŠgories</dt>
-
- <dd>SĂŠlectionner les catĂŠgories sur lesquelles restreindre la
-recherche.</dd>
-
-</dl>
diff --git a/BSF/language/fr_FR/help/site_manager.html b/BSF/language/fr_FR/help/site_manager.html
deleted file mode 100644
index 7d5eb094a..000000000
--- a/BSF/language/fr_FR/help/site_manager.html
+++ /dev/null
@@ -1,56 +0,0 @@
-<h2>Sites distant</h2>
-
-<p>Piwigo offre la possibilitĂŠ d'utiliser plusieurs sites pour
-stocker les fichiers qui composeront votre galerie. Cela peut ĂŞtre utile si
-votre galerie est installĂŠe sur un espace de stockage limitĂŠ et que vous
-avez de nombreux fichiers Ă  montrer.</p>
-
-
-<ol>
-
- <li>ĂŠditer le fichier <span
-class="filename">tools/create_listing_file.php</span> en modifiant la
-section des paramètres comme <code>$conf['prefix_thumbnail']</code> ou
-<code>$conf['use_exif']</code>.</li>
-
- <li>placer le fichier <span
-class="filename">tools/create_listing_file.php</span> modifiĂŠ sur votre site
-distant, dans le mĂŞme rĂŠpertoire que les rĂŠpertoires reprĂŠsentant vos
-catĂŠgories (comme le rĂŠpertoire <span class="filename">galleries</span> de
-ce site) par FTP. Par exemple, disons que vous pouvez accĂŠder Ă  <span
-class="filename">http://exemple.com/galleries/create_listing_file.php</span>.</li>
-
- <li>Se rendre sur <span class="pwgScreen">Administration, CatĂŠgories,
-Gestionnaire des sites</span>. Demander Ă  crĂŠer un nouveau site, par exemple <span
-class="filename">http://exemple.com/galleries</span>.</li>
-
- <li>
-
- <p>un nouveau site distant est enregistrĂŠ. 4 actions possibles :</p>
-
- <ol>
-
- <li><strong>gĂŠnĂŠrer la liste</strong> : lance une requĂŞte distante pour
-gĂŠnĂŠrer le fichier de listing distant</li>
-
- <li><strong>synchroniser</strong> : lit le fichier distant <span
-class="filename">listing.xml</span> et synchronise avec la base de donnĂŠes
-locale</li>
-
- <li><strong>nettoyer</strong> : supprime le fichier distant de
-listing</li>
-
- <li><strong>dĂŠtruire</strong> : supprime le site (et tous les ĂŠlĂŠments
-qui y sont associĂŠs) dans la base de donnĂŠes</li>
-
- </ol>
-
- </li>
-
-</ol>
-
-<!--<p>Vous pouvez ĂŠgalement effectuer ces opĂŠrations manuellement en ĂŠditant
-le fichier <span class="filename">listing.xml</span> Ă  la main et en le
-dÊplaçant vers votre rÊpertoire racine. Se rendre sur <span
-class="pwgScreen">Administration, CatĂŠgories, Sites distant</span> :
-Piwigo dĂŠtecte le fichier et propose de s'en servir.</p>-->
diff --git a/BSF/language/fr_FR/help/synchronize.html b/BSF/language/fr_FR/help/synchronize.html
deleted file mode 100644
index 52b3d41e6..000000000
--- a/BSF/language/fr_FR/help/synchronize.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<h2>Synchroniser</h2>
-
-<ul>
-
- <li>Il existe 2 types de synchronisations : structure et
-meta-donnĂŠes. Synchroniser la structure revient Ă  synchroniser votre arbre
-des rĂŠpertoires et fichiers avec la reprĂŠsentation de la structure dans la
-base de donnĂŠes. Synchroniser les mĂŠta-donnĂŠes permet de mettre Ă  jour les
-informations comme le poids du fichier, les dimensions, les donnĂŠes EXIF ou
-IPTC.</li>
-
- <li>La première synchronisation à effectuer doit être celle sur la
-structure.</li>
-
- <li>Le processus de synchronisation peut prendre du temps (en fonction de
-la charge du serveur et de la quantitĂŠ de fichiers Ă  gĂŠrer), il est donc
-possible d'avancer pas Ă  pas : catĂŠgorie par catĂŠgorie.</li>
-
-</ul>
diff --git a/BSF/language/fr_FR/help/thumbnail.html b/BSF/language/fr_FR/help/thumbnail.html
deleted file mode 100644
index f959e72ec..000000000
--- a/BSF/language/fr_FR/help/thumbnail.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<h2>CrĂŠation des miniatures</h2>
-
-<p>CrĂŠation des miniatures manquantes. L'utilisation de cette fonctionnalitĂŠ
-n'est pas conseillĂŠ si votre galerie est hĂŠbergĂŠe sur un serveur
-mutualisĂŠ (resources machine partagĂŠes).</p>
-
-<dl>
-
- <dt>Version de GD</dt>
-
- <dd>GD est une librairie graphique de manipulation d'images pour
-PHP. Choisissez la version installĂŠe sur votre serveur. Si vous choisissez
-la mauvaise, des messages d'erreurs apparaĂŽtront, revenez sur la page
-prĂŠcĂŠdente et choisissez l'autre version. Si aucune version ne marche, cela
-signifie que GD n'est pas disponible.</dd>
-
- <dt>Largeur et hauteur</dt>
-
- <dd>Dimensions maximum que les miniatures peuvent prendre. Le ratio
-largeur/hauteur original est conservĂŠe. Les valeurs par dĂŠfaut sont
-modifiables grâce aux paramètres de configuration <code>tn_width</code> et
-<code>tn_height</code> (voir le fichier <span
-class="filename">include/config_default.inc.php</span>).</dd>
-
- <dt>Nombre de miniatures Ă  crĂŠer</dt>
-
- <dd>N'hĂŠsayez pas de miniaturiser un trop grand nombre d'images Ă  la
-fois. En effet, la miniaturisation requiert une relativement grosse
-utilisation processeur.</dd>
-
- <dt>Format de fichier</dt>
-
- <dd>Les miniatures sont crĂŠĂŠes au format JPEG. Seuls les formats PNG et
-JPEG peuvent ĂŞtre miniaturisĂŠs.</dd>
-
-</dl>
diff --git a/BSF/language/fr_FR/help/user_list.html b/BSF/language/fr_FR/help/user_list.html
deleted file mode 100644
index 711a2c998..000000000
--- a/BSF/language/fr_FR/help/user_list.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<h2>Liste des utilisateurs</h2>
-
-<p>Manipulation des propriĂŠtĂŠs des utilisateurs enregistrĂŠs. Seules les
-permissions sont gĂŠrĂŠes dans un ĂŠcran diffĂŠrent.</p>
-
-<h3>Ajouter un utilisateur</h3>
-
-<p>L'administrateur peut ajouter manuellement des utilisateurs.</p>
-
-<h3>Liste des utilisateurs</h3>
-
-<p>La liste peut ĂŞtre filtrĂŠe avec le nom d'utilisateur (* = joker), avec le
-groupe ou encore le statut. La liste peut ĂŞtre ordonnĂŠe selon la date
-d'enregistrement ou le nom d'utilisateur, par ordre croissant on
-dĂŠcroissant.</p>
-
-<p>Cet ĂŠcran fonctionne par modification de plusieurs utilisateurs
-simultanĂŠment:</p>
-
-<ul>
- <li>supprimer des utilisateurs (nĂŠcessite une confirmation)</li>
- <li>changer le statut</li>
- <li>associer ou dissocier des groupes</li>
- <li>modifier les propriĂŠtĂŠs d'affichage</li>
- <li>modifier les propriĂŠtĂŠs annexes</li>
-</ul>
-
-<p>La cible est la liste des utilisateurs sĂŠlectionnĂŠs (par dĂŠfaut) ou bien
-tous les utilisateurs de la liste filtrĂŠe.</p>
-
-<h3>Conseiller</h3>
-<p>DĂŠfinition d'un utilisateur conseiller:</p>
-<ul>
- <li>permet d'accĂŠder Ă  tous les ĂŠcrans permis par son statut</li>
- <li>accès uniquement en consultation ou en simulation</li>
-</ul>
-
-<p>Il est possible de permettre l'assignation du mode conseiller avec la variable $conf['allow_adviser'].</p>
-<p>Si cette variable est Ă  'true', il sera possible de dĂŠfinir l'utilisateur comme un conseiller</p>
diff --git a/BSF/language/fr_FR/help/web_service.html b/BSF/language/fr_FR/help/web_service.html
deleted file mode 100644
index acb537d73..000000000
--- a/BSF/language/fr_FR/help/web_service.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<h2>Web Service Checker</h2>
-
-<p>Cette page permet de dÊfinir les paramètres de votre web service.</p>
-
-<dl>
-
- <dt>Conditions de fonctionnement</dt>
-
- <dd>Si l'accès aux Web Services est contrôlÊ (Configuration avancÊe => $conf['ws_access_control'])
- vous trouverez ici toutes les valeurs de la configuration avancĂŠe relative aux Web Services.</dd>
-
- <dt>ClĂŠ confidentielle (Obligatoire)</dt>
-
- <dd>ClÊ unique à partager avec votre partenaire. Doit être assez longue ( 8 caractères par exemple),
- doit être assez complexe (avec des chiffres, des majuscules et minuscules, et des caractères spÊciaux).
- Par exemple: "P!e2r!k Le G@2l".
-
- <strong>Ce champ est masquĂŠ en mode conseillĂŠ.</strong>
-
- <dt>Cible (Facultatif)</dt>
-
- <dd>Soit une liste d'identifiants d'images ceci:<ul><li>
- list/277,275,142,235,178,190,204,236-238,253,268,276,285,41,73</li><li>
- une liste de catĂŠgories comme : cat/16,32,21</li><li>
- ou encore une liste de tags : tag/22,61,36 </li></ul>
- Tout liste d'identifiants sera rĂŠduite a sa plus simple expression:<ul><li>
- list/41,73,142,178,190,204,<strong>235-238</strong>,253,268,<strong>275-277</strong>,285</li></ul>
-
- </dd>
-
- <dt>Accès restreint (Facultatif)</dt>
-
- <dd>Si vous souhaitez limiter votre partenaire Ă  un type de requĂŞte particulier.</dd>
-
- <dt>Limite de transmision </dt>
-
- <dd>Nombre d'images maximum adressĂŠes Ă  votre partenaire Ă  chacune de ses requĂŞtes.</dd>
-
- <dt>DurĂŠe </dt>
-
- <dd>A partir de maintenant, indiquez la disponibilitĂŠ en jours. Si vous reportez la disponibilitĂŠ au delĂ  de sa durĂŠe, le service ne devrait jamais ĂŞtre rendu.</dd>
-
- <dt>Commentaire </dt>
-
- <dd>Vous permet de dÊcrire qui se trouve derrière ce Service Web, de façon plus claire pour vous.
- N'oubliez pas qu'un Administrateur en mode conseiller peut lire le contenu de ce commentaire.</dd>
-
-</dl>
diff --git a/BSF/language/fr_FR/index.php b/BSF/language/fr_FR/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/language/fr_FR/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/language/fr_FR/install.lang.php b/BSF/language/fr_FR/install.lang.php
deleted file mode 100644
index a08fa9cc4..000000000
--- a/BSF/language/fr_FR/install.lang.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-$lang['install_message'] = 'Message';
-$lang['Initial_config'] = 'Configuration de Base';
-$lang['Default_lang'] = 'Langue par dĂŠfaut de la galerie';
-$lang['step1_title'] = 'Configuration de la Base de donnĂŠes';
-$lang['step2_title'] = 'Configuration du compte Administrateur';
-$lang['Start_Install'] = 'DĂŠmarrer l\'installation';
-$lang['reg_err_mail_address'] = 'L\'adresse mail doit ĂŞtre de la forme xxx@yyy.eee (exemple : jack@altern.org)';
-
-$lang['install_webmaster'] = 'Administrateur';
-$lang['install_webmaster_info'] = 'Cet identifiant apparaĂŽtra Ă  tous vos visiteurs. Il vous sert pour administrer le site';
-
-$lang['step1_confirmation'] = 'Les paramètres rentrÊs sont corrects';
-$lang['step1_err_db'] = 'La connexion au serveur est OK, mais impossible de se connecter Ă  cette base de donnĂŠes';
-$lang['step1_err_server'] = 'Impossible de se connecter au serveur';
-
-$lang['step1_host'] = 'HĂ´te MySQL';
-$lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';
-$lang['step1_user'] = 'Utilisateur';
-$lang['step1_user_info'] = 'nom d\'utilisateur pour votre hĂŠbergeur';
-$lang['step1_pass'] = 'Mot de passe';
-$lang['step1_pass_info'] = 'celui fourni par votre hĂŠbergeur';
-$lang['step1_database'] = 'Nom de la base';
-$lang['step1_database_info'] = 'celui fourni par votre hĂŠbergeur';
-$lang['step1_prefix'] = 'PrĂŠfixe des noms de table';
-$lang['step1_prefix_info'] = 'le nom des tables apparaĂŽtra avec ce prĂŠfixe (permet de mieux gĂŠrer sa base de donnĂŠes)';
-$lang['step2_err_login1'] = 'veuillez rentrer un pseudo pour le webmaster';
-$lang['step2_err_login3'] = 'le pseudo du webmaster ne doit pas comporter les caractère " et \'';
-$lang['step2_err_pass'] = 'veuillez retaper votre mot de passe';
-$lang['install_end_title'] = 'Installation terminĂŠe';
-$lang['step2_pwd'] = 'Mot de passe';
-$lang['step2_pwd_info'] = 'Il doit rester confidentiel, il permet d\'accĂŠder au panneau d\'administration.';
-$lang['step2_pwd_conf'] = 'Mot de passe [ Confirmer ]';
-$lang['step2_pwd_conf_info'] = 'VĂŠrification';
-$lang['step1_err_copy'] = 'Copiez le texte en rouge entre les tirets et collez-le dans le fichier mysql.inc.php qui se trouve dans le rĂŠpertoire "include" Ă  la base de l\'endroit oĂš vous avez installĂŠ Piwigo (le fichier mysql.inc.php ne doit comporter QUE ce qui est en bleu entre les tirets, aucun retour Ă  la ligne ou espace n\'est autorisĂŠ)';
-$lang['install_help'] = 'Besoin d\'aide ? Posez votre question sur le <a href="%s">forum de Piwigo</a>.';
-$lang['install_end_message'] = 'La configuration de l\'application s\'est correctement dĂŠroulĂŠe, place Ă  la prochaine ĂŠtape<br /><br />
-Par mesure de sĂŠcuritĂŠ, merci de supprimer le fichier "install.php"<br />
-Un fois ce fichier supprimĂŠ, veuillez suivre ces indications :
-<ul>
-<li>allez sur la page d\'identification : [ <a href="./identification.php">identification</a> ] et connectez-vous avec le pseudo donnĂŠ pour le webmaster</li>
-<li>celui-ci vous permet d\'accĂŠder Ă  la partie administration et aux instructions pour placer les images dans les rĂŠpertoires.</li>
-</ul>';
-$lang['conf_mail_webmaster'] = 'Adresse e-mail de l\'Administrateur';
-$lang['conf_mail_webmaster_info'] = 'Les visiteurs pourront vous contacter par ce mail';
-?> \ No newline at end of file
diff --git a/BSF/language/fr_FR/iso.txt b/BSF/language/fr_FR/iso.txt
deleted file mode 100644
index 636577ee0..000000000
--- a/BSF/language/fr_FR/iso.txt
+++ /dev/null
@@ -1 +0,0 @@
-Français [FR] \ No newline at end of file
diff --git a/BSF/language/index.php b/BSF/language/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/language/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/language/nl_NL/about.html b/BSF/language/nl_NL/about.html
deleted file mode 100644
index b7dd21a51..000000000
--- a/BSF/language/nl_NL/about.html
+++ /dev/null
@@ -1,10 +0,0 @@
- <li>Piwigo is een web applicatie die je de mogelijkheid geeft
- om makkelijk een online foto gallerie te maken.</li>
-
- <li>Technisch, Piwigo is volledig ontwikkeld in PHP (the elePHPant)
- met een MySQL database (the SQuirreL).</li>
-
- <li>Heb je suggesties of commentaar, bezoek dan de <a
- href="http://piwigo.org">Piwigo</a> officiele site, en
- zijn <a href="http://forum.phpwebgallery.net">forum</a>.</li>
-
diff --git a/BSF/language/nl_NL/admin.lang.php b/BSF/language/nl_NL/admin.lang.php
deleted file mode 100644
index 4d15eae99..000000000
--- a/BSF/language/nl_NL/admin.lang.php
+++ /dev/null
@@ -1,655 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-$lang['%d association'] = '%d associatie';
-$lang['%d associations'] = '%d associaties';
-$lang['cat_inclu_part1_S'] = '%d categorie inclusief ';
-$lang['cat_inclu_part1_P'] = '%d categories inclusief ';
-$lang['cat_inclu_part2_S'] = '%d physiek';
-$lang['cat_inclu_part2_P'] = '%d physieke';
-$lang['cat_inclu_part3_S'] = ' en %d virtueel';
-$lang['cat_inclu_part3_P'] = ' en %d virtueel';
-$lang['%d category moved'] = '%d categorie verplaatst';
-$lang['%d categories moved'] = '%d categorieĂŤn verplaatst';
-$lang['%d group'] = '%d groep';
-$lang['%d groups'] = '%d groepen';
-$lang['%d member'] = '%d lid';
-$lang['%d members'] = '%d leden';
-$lang['%d tag'] = '%d tag';
-$lang['%d tags'] = '%d tags';
-$lang['%d user comment rejected'] = '%d gebruikers commentaar afgewezen';
-$lang['%d user comments rejected'] = '%d gebruikers commentaren afgewezen';
-$lang['%d user comment validated'] = '%d gebruikers commentaar bevestigd';
-$lang['%d user comments validated'] = '%d gebruikers commentaren bevestigd';
-$lang['%d user deleted'] = '%d gebruiker verwijderd';
-$lang['%d users deleted'] = '%d gebruikers verwijderd';
-$lang['%d user'] = '%d gebruiker';
-$lang['%d users'] = '%d gebruikers';
-$lang['%d waiting for validation'] = '%d wachten op bevestiging';
-$lang['%d waiting pictures rejected'] = '%d plaatje\'s afgewezen';
-$lang['%d waiting pictures validated'] = '%d plaatje\'s toegestaan';
-$lang['Actions'] = 'Acties';
-$lang['Activate'] = 'Activatie';
-$lang['Add/delete a permalink'] = 'toevoegen/verwijderen van een permalink';
-$lang['Add a tag'] = 'Voeg een tag toe';
-$lang['Add a user'] = 'Voeg een gebruiker toe';
-$lang['Add group'] = 'Voeg een groep toe';
-$lang['Add selected elements to caddie'] = 'Voeg geselecteerde elementen toe aan caddie';
-$lang['Add'] = 'Toevoegen';
-$lang['Allow user registration'] = 'Sta gebruikersregistratie toe';
-$lang['Apply to subcategories'] = 'Toestaan op subcategorieen';
-$lang['Are you sure?'] = 'Weet je het zeker?';
-$lang['Associated'] = 'Gelinkt';
-$lang['Association to categories'] = 'Gelinkt aan categorie';
-$lang['Batch management'] = 'Batch management';
-$lang['Caddie management'] = 'Caddie management';
-$lang['Caddie'] = 'Caddie';
-$lang['Categories authorized thanks to group associations'] = 'Categories authorized thanks to group associations';
-$lang['Categories manual order was saved'] = 'CategorieĂŤn handmatig gesorteerd is opgeslagen';
-$lang['Categories ordered alphanumerically'] = 'CategorieĂŤn alphanumeriek gesorteerd';
-$lang['Category elements associated to the following categories: %s'] = 'Categorie elementen gelinkt aan de volgende categorieen: %s';
-$lang['Check for upgrade failed for unknown reasons.'] = 'Controle voor upgrade is niet geslaagt door onbekende reden.';
-$lang['Check for upgrade'] = 'Controleer voor een upgrade';
-$lang['Comments for all'] = 'Commentaar voor alles';
-$lang['Controversy'] = 'Controversieel';
-$lang['Current name'] = 'Huidige naam';
-$lang['Database'] = 'Database';
-$lang['Deactivate'] = 'Deactiveer';
-$lang['Delete Representant'] = 'Verwijder Representant';
-$lang['Delete selected tags'] = 'Verwijder geselecteerde tags';
-$lang['Delete selected users'] = 'Verwijder geselecteerde gebruikers';
-$lang['Deletions'] = 'Verwijderde';
-$lang['Deny selected groups'] = 'Verbied geselecteerde groepen';
-$lang['Deny selected users'] = 'Verbied geselecteerde gebruikers';
-$lang['Description'] = 'Omschrijving';
-$lang['Display options'] = 'Toon opties';
-$lang['Dissociated'] = 'Niet gelinkt';
-$lang['Does not represent'] = 'Is niet aanwezig';
-$lang['Edit all picture informations'] = 'Bewerk afbeeldings informatie';
-$lang['Edit selected tags'] = 'Bewerk geselecteerde tags';
-$lang['Edit tags'] = 'Bewerk tags';
-$lang['Elements'] = 'Elementen';
-$lang['Email administrators when a new user registers'] = 'Email beheerders wanneer een nieuwe gebruiker zich registreerd';
-$lang['Email administrators when a valid comment is entered'] = 'Email beheerder wannneer een geldig commentaar is ingevuld';
-$lang['Email administrators when a comment requires validation'] = 'Email beheerder wanneer een commantaart validatie nodig heeft';
-$lang['Email administrators when a picture is uploaded'] = 'Email beheerder wanneer er een plaatje is ge-upload';
-$lang['Empty caddie'] = 'Leeg caddie';
-$lang['Environment'] = 'Omgeving';
-$lang['Form'] = 'Formulier';
-$lang['Gallery URL'] = 'Gallerie URL';
-$lang['Gallery description'] = 'Gallerie omschrijving';
-$lang['Gallery title'] = 'Gallerie titel';
-$lang['Grant selected groups'] = 'Toegang geselecteerde groepen';
-$lang['Grant selected users'] = 'Toegang geselecteerde gebruikers';
-$lang['Group name'] = 'Groep naam';
-$lang['Groups'] = 'Groepen';
-$lang['Guests'] = 'Gasten';
-$lang['History'] = 'Geschiedenis';
-$lang['Informations'] = 'Informatie';
-$lang['Install'] = 'Installatie';
-$lang['Link all category elements to a new category'] = 'Link alle categorie elementen aan een nieuwe categorie';
-$lang['Link all category elements to some existing categories'] = 'Link alle categorie elementen aan bestaande categorieen';
-$lang['Linked categories'] = 'Gelinkte categorieĂŤn';
-$lang['Lock gallery'] = 'Sluit gallerie';
-$lang['Maintenance'] = 'Onderhoud';
-$lang['Manage permissions for a category'] = 'Beheer rechten voor een categorie';
-$lang['Manage permissions for group "%s"'] = 'Beheer rechten voor een groep "%s"';
-$lang['Manage permissions for user "%s"'] = 'Beheer rechten voor een gebruiker "%s"';
-$lang['Manage tags'] = 'Beheer tags';
-$lang['Members'] = 'Leden';
-$lang['Metadata synchronized from file'] = 'Metadata gesynchronizeerd van een bestand';
-$lang['Move categories'] = 'Verplaats categorie';
-$lang['Move'] = 'Verplaatsen';
-$lang['Name'] = 'Naam';
-$lang['New name'] = 'Nieuwe naam';
-$lang['New parent category'] = 'Nieuwe hoofd categorie';
-$lang['New tag'] = 'Nieuwe tag';
-$lang['No tag defined. Use Administration>Pictures>Tags'] = 'Geen tag gedefineerd. Gebruik beheer>afbeeldingen>Tags';
-$lang['Number of comments per page'] = 'Aantal commentaren per pagina';
-$lang['Number of rates'] = 'Aantal beoordelingen';
-$lang['Number of thumbnails to create'] = 'Aantal thumbnails om te maken';
-$lang['Only private categories are listed'] = 'Alleen private categorieen worden getoond';
-$lang['Operating system'] = 'Besturingssysteem';
-$lang['Options'] = 'Opties';
-$lang['Order alphanumerically'] = 'sorteer alphanumeriek';
-$lang['Other private categories'] = 'Andere private categorieĂŤn';
-$lang['Page banner'] = 'Pagina banner';
-$lang['Parent category'] = 'Hoofd categorie';
-$lang['Path'] = 'Path';
-$lang['Permalink'] = 'Permalink';
-$lang['Permalink_%s_histo_used_by_%s'] = 'Permalink %s is eerder gebruikt door categorie %s. Verwijder de permalink geschiedenis eerst';
-$lang['Permalink_name_rule'] = 'De permalink naam moet bstaan uit a-z, A-Z, 0-9, "-" of "_". Het mag geen getal zijn of starten met een "-"';
-$lang['Permalink %s is already used by category %s'] = 'Permalink %s is al in gebruik door een categorie %s';
-$lang['Permalink history'] = 'Permalink geschiedenis';
-$lang['Permalinks'] = 'Permalinks';
-$lang['Permission denied'] = 'Toegang gewijgerd';
-$lang['Permission granted thanks to a group'] = 'Rechten toegekend door een groep';
-$lang['Permission granted'] = 'Toegang toegestaan';
-$lang['Picture informations updated'] = 'afbeeldings informatie bijgewerkt';
-$lang['Plugins'] = 'Plugins';
-$lang['Position'] = 'Positie';
-$lang['Preferences'] = 'Voorkeuren';
-$lang['Properties'] = 'Eigenschappen';
-$lang['Random picture'] = 'Willekeurig plaatje';
-$lang['Rate date'] = 'Beoordelings datum';
-$lang['Rating by guests'] = 'Beoordeling van gasten';
-$lang['Rating'] = 'Beoordeling';
-$lang['Reject All'] = 'Alles afwijzen';
-$lang['Reject'] = 'Afwijzen';
-$lang['Representant'] = 'Representatief';
-$lang['Representation of categories'] = 'Representatieve categorieĂŤn';
-$lang['Representative'] = 'Representatief';
-$lang['Represents'] = 'Represents';
-$lang['Save order'] = 'Bewaar sortering';
-$lang['Save to permalink history'] = 'Opslaan in permalink geschiedenis';
-$lang['Select at least one category'] = 'Selecteer minstens 1 categorie';
-$lang['Select at least one picture'] = 'Selecteer minstens 1 plaatje';
-$lang['Select at least one user'] = 'Selecteer minstens 1 gebruiker';
-$lang['Show info'] = 'Toon info';
-$lang['Site manager'] = 'Site manager';
-$lang['Status'] = 'Status';
-$lang['Statistics'] = 'Statistieken';
-$lang['Storage category'] = 'Storage category';
-$lang['Sum of rates'] = 'Eind oordeel';
-$lang['Tag "%s" already exists'] = 'Tag "%s" bestaat al';
-$lang['Tag "%s" was added'] = 'Tag "%s" is toegevoegd';
-$lang['Tag selection'] = 'Tag selectie';
-$lang['Take selected elements out of caddie'] = 'Neem geselecteerde elementen uit de caddie';
-$lang['The %d following tag were deleted'] = 'De volgende tag is verwijderd';
-$lang['The %d following tags were deleted'] = 'De %d volgende tags zijn verwijderd';
-$lang['Unable to check for upgrade since allow_url_fopen is disabled.'] = 'Onnmoglijk om een controlle te doen voor een upgrade omdat allow_url_fopen is uitgeschakeld.';
-$lang['Uninstall'] = 'Deinstalleren';
-$lang['Use default sort order']='Gebruik de standaard sortering (defineerd in de configuratie file)';
-$lang['User comments validation'] = 'Gebruikers commentaar valideren';
-$lang['Users'] = 'Gebruikers';
-$lang['Validate All'] = 'Valideer Alles';
-$lang['Validate'] = 'Valideren';
-$lang['Validation'] = 'Validatie';
-$lang['Version'] = 'Versie';
-$lang['Virtual categories movement'] = 'Virtuele categorie verplaatsing';
-$lang['Virtual categories to move'] = 'Virtuele categorien om te verplaatsen';
-$lang['Virtual category name'] = 'Virtuele categorie naam';
-$lang['Webmaster cannot be deleted'] = 'Webmaster kan niet verwijderd worden';
-$lang['You are running on development sources, no check possible.'] = 'Je werkt op basis van ontwikkelins bronnen, geen controle mogelijk.';
-$lang['You cannot delete your account'] = "Je kan je account niet verwijderen";
-$lang['You cannot move a category in its own sub category'] = 'Je kan een categorie niet verplaatsen in zijn eigen sub categorie';
-$lang['You need to confirm deletion'] = 'Je moet de verwijdering bevestigen';
-$lang['add tags'] = 'Toevoegen tags';
-$lang['adviser'] = 'Adviseer';
-$lang['associate to category'] = 'link aan categorie';
-$lang['associate to group'] = 'link aan een groep';
-$lang['authorized'] = 'Toegestaan';
-$lang['cat_add'] = 'Voeg een virtuele categorie toe';
-$lang['cat_comments_title'] = 'Gebruikers toestaan commentaar te geven op geselecteerde categorieen';
-$lang['cat_error_name'] = 'De naam van een categorie mag niet leeg zijn';
-$lang['cat_lock_title'] = 'Sluit categorieĂŤn';
-$lang['cat_private'] = 'Private categorie';
-$lang['cat_public'] = 'Publieke categorie';
-$lang['cat_representant'] = 'Vind een nieuw representant bij willekeur';
-$lang['cat_security'] = 'Publiek / Private';
-$lang['cat_status_title'] = 'Beheer toegang voor geselecteerde categorieĂŤn';
-$lang['cat_upload_title'] = 'Selecteer uploadable categorieeĂŤn';
-$lang['cat_virtual_added'] = 'Virtuele categorie toegevoegd';
-$lang['cat_virtual_deleted'] = 'Virtuele categorie verwijderd';
-$lang['category'] = 'categorie';
-$lang['conf_access'] = 'Toegangs type';
-$lang['conf_comments_title'] = 'Commentaar';
-$lang['conf_confirmation'] = 'Informatie data geregistereerd in de database';
-$lang['conf_display'] = 'Standaard weergave';
-$lang['conf_history_title'] = 'Geschiedenis';
-$lang['conf_gallery_url_error'] = 'The gallerie URL is niet correct.';
-$lang['conf_main_title'] = 'Index';
-$lang['conf_nb_comment_page_error'] = 'Het aantal commentaren moet tussen 5 and 50 liggen.';
-$lang['config'] = 'Configuratie';
-$lang['confirm'] = 'bevestig';
-$lang['Date'] = 'Datum';
-$lang['delete category'] = 'verwijder categorie';
-$lang['description'] = 'omschrijving';
-$lang['dissociate from category'] = 'verwijder link naar categorie';
-$lang['dissociate from group'] = 'verwijder link naar groep';
-$lang['edit category permissions'] = 'bewerk categorie rechten';
-$lang['editcat_confirm'] = 'Categorie informatie is met succes bijgewerkt.';
-$lang['editcat_uploadable'] = 'Toestaan van upload';
-$lang['elements per page'] = 'elementen per pagina';
-$lang['elements'] = 'elementen';
-$lang['enabled_high'] = 'Hoge weergaven ingeschakeld';
-$lang['file'] = 'bestand';
-$lang['filesize'] = 'bestandsgrote';
-$lang['first element added on %s'] = 'eerste element toegevoegd op %s';
-$lang['forbidden'] = 'Geweigerd';
-$lang['conf_general'] = 'Algemeen';
-$lang['global mode'] = 'global mode';
-$lang['group "%s" added'] = 'groep "%s" toegevoegd';
-$lang['group "%s" deleted'] = 'groep "%s" verwijderd';
-$lang['group "%s" updated'] = 'groep "%s" bijgewerkt';
-$lang['group'] = 'groep';
-$lang['group_add_error1'] = 'De naam van de groep mag geen spatie bevatten of leeg zijn.';
-$lang['group_add_error2'] = 'Deze naam is al in gebruik door een andere groep.';
-$lang['groups'] = 'Groepen';
-$lang['instructions'] = 'Instructies';
-$lang['is_high_disabled'] = '';
-$lang['is_high_enabled'] = 'Hoge kwaliteit';
-$lang['jump to category'] = 'ga naar categorie';
-$lang['jump to image'] = 'ga naar afbeelding';
-$lang['leave'] = 'verlaten';
-$lang['lock'] = 'Sluiten';
-$lang['locked'] = 'Gesloten';
-$lang['manage category elements'] = 'beheer categorie elementen';
-$lang['manage sub-categories'] = 'beheer sub-categorie';
-$lang['manage'] = 'Beheren';
-$lang['maximum height'] = 'maximale hoogte';
-$lang['maximum width'] = 'maximale breedte';
-$lang['name'] = 'naam';
-$lang['nbm_background_treatment_redirect_second'] = 'Executie tijd is om, treatment moet verder gaan [Verwachte tijd: %d seconden].';
-$lang['nbm_background_treatment_redirect_seconds'] = 'Executie tijd is om, treatment moet verder gaan [Verwachte tijd: %d seconden].';
-$lang['nbm_break_timeout_list_user'] = 'Verwachte tijd voor de gebruikerslijst voor een mailing is gelimiteerd. Andere gebruikers staan niet op de lijst.';
-$lang['nbm_break_timeout_send_mail'] = 'Tijd om mail te sturen is gelimiteerd. Andere mailtjes worden overgeslagen.';
-$lang['nbm_col_check_user_send_mail'] = 'aan sturen ?';
-$lang['nbm_col_last_send'] = 'Laatst sturen';
-$lang['nbm_col_mail'] = 'email';
-$lang['nbm_col_user'] = 'Gebruiker';
-$lang['nbm_complementary_mail_content'] = 'Inhoud mail';
-$lang['nbm_content_byebye'] = 'Zie je snel,';
-$lang['nbm_content_goto_1'] = 'Ga naar ';
-$lang['nbm_content_goto_2'] = 'http://www.terwolde.net';
-$lang['nbm_content_hello_1'] = 'Hallo ';
-$lang['nbm_content_hello_2'] = ',';
-$lang['nbm_content_new_elements'] = 'Nieuwe elementen toegevoegd ';
-$lang['nbm_content_new_elements_single'] = ' op ';
-$lang['nbm_content_new_elements_between_1'] = 'tussen ';
-$lang['nbm_content_new_elements_between_2'] = ' en ';
-$lang['nbm_content_subscribe_by_admin'] = 'De webmaster heeft je ingeschreven om melding per mail te ontvangen.';
-$lang['nbm_content_subscribe_by_himself'] = 'Je hebt je ingeschreven voor meldingen per email.';
-$lang['nbm_content_subscribe_link'] = 'Inschrijven';
-$lang['nbm_content_problem_contact'] = 'Als je problemen of een vraag hebt, stuur een bericht aan: ';
-$lang['nbm_content_pb_contact_object'] = '[NBM] Problemen of vragen';
-$lang['nbm_content_unsubscribe_by_admin'] = 'De webmaster heeft je uitgeschreven van de meldingen lijst per email.';
-$lang['nbm_content_unsubscribe_by_himself'] = 'Je hebt jezelf uitgeschreven om meldingen per mail te ontvangen.';
-$lang['nbm_content_click_on'] = ', Klik op ';
-$lang['nbm_content_unsubscribe_link'] = 'Uitschrijven';
-$lang['nbm_info_send_mail_as'] = 'Wanneer niet ingevuld, zal de gallerie titel worden gebruikt';
-$lang['nbm_item_notification'] = 'Melding';
-$lang['nbm_msg_error_sending_email_to'] = 'Fout bij het versturen van email aan %s [%s].';
-$lang['nbm_msg_mail_sent_to'] = 'Mail verstuuurd aan %s [%s].';
-$lang['nbm_msg_n_mail_sent'] = '%d mail is verstuurd.';
-$lang['nbm_msg_n_mails_sent'] = '%d mails zijn verstuurd.';
-$lang['nbm_msg_n_mail_not_send'] = '%d mail is niet verstuurd.';
-$lang['nbm_msg_n_mails_not_send'] = '%d mails zijn niet verstuurd.';
-$lang['nbm_no_mail_to_send'] = 'Geen mail om te versturen.';
-$lang['nbm_no_user_available_to_send_L1'] = 'Geen gebruikers om mail te sturen.';
-$lang['nbm_no_user_available_to_send_L2'] = 'Een gebruiker is beschikbaar, er zijn nieuwe elementen te melden.';
-$lang['nbm_no_user_available_to_send_L3'] = 'Het is mogelijk dat er geen ingeschreven gebruikers zijn (alleen de webmaster kan deze tab zien).';
-$lang['nbm_no_user_to send_notifications_by_mail'] = 'Geen gebruikers om meldingen te versturen per mail.';
-$lang['nbm_object_news'] = 'Nieuwe elementen toegevoegd';
-$lang['nbm_object_subscribe'] = 'Inschrijven om een melding te ontvangen per mail';
-$lang['nbm_object_unsubscribe'] = 'Uitschrijven van meldingen per mail';
-$lang['nbm_param_mode'] = 'Parameter';
-$lang['nbm_redirect_msg'] = 'Bezig met voltooien van de bewerking.'."\n\n".'Even wachten...';
-$lang['nbm_repost_submit'] = 'Verder gaan met de bewerking';
-$lang['nbm_send_complementary_mail_content'] = 'Bijkomende mailinhoud';
-$lang['nbm_send_detailed_content'] = 'Toevoegen gedetaileerde inhoud';
-$lang['nbm_send_mail_as'] = 'Stuur mail als';
-$lang['nbm_send_mail_to_users'] = 'Stuur mail aan gebruikers';
-$lang['nbm_send_mode'] = 'Sturen';
-$lang['nbm_send_options'] = 'Opties';
-$lang['nbm_send_submit'] = 'Stuur';
-$lang['nbm_subscribe_col'] = 'Ingeschreven';
-$lang['nbm_subscribe_mode'] = 'Inschrijven';
-$lang['nbm_title_param'] = 'Parameters';
-$lang['nbm_title_send'] = 'Selecteer ontvangers';
-$lang['nbm_title_subscribe'] = 'Inschrijven/Uitschrijven gebruikers';
-$lang['nbm_unsubscribe_col'] = 'Uitgeschreven';
-$lang['nbm_updated_param_count'] = '%d parameter is bijgewerkt.';
-$lang['nbm_updated_params_count'] = '%d parameters zijn bijgewerkt.';
-$lang['nbm_user_change_enabled_error_on_updated_data_count'] = '%d gebruiker is niet bijgewerkt.';
-$lang['nbm_users_change_enabled_error_on_updated_data_count'] = '%d gebruikers zijn niet bijgewerkt.';
-$lang['nbm_user_change_enabled_false'] = 'Gebruiker %s [%s] is verwijderd van de inschrijvingen lijst.';
-$lang['nbm_user_change_enabled_true'] = 'Gebruiker %s [%s] is toegevoegd aan de inschrijvingen lijst.';
-$lang['nbm_user_change_enabled_updated_data_count'] = '%d gebruiker is bijgewerkt.';
-$lang['nbm_users_change_enabled_updated_data_count'] = '%d gebruikers zijn bijgewerkt.';
-$lang['nbm_user_not_change_enabled_false'] = 'Gebruiker %s [%s] is niet verwijderd van de inschrijvingen lijst.';
-$lang['nbm_user_not_change_enabled_true'] = 'Gebruiker %s [%s] is niet toegevoegd aan de inschrijvingen lijst.';
-$lang['nbm_user_x_added'] = 'Gebruiker %s [%s] toegevoegd.';
-$lang['nbm_warning_subscribe_unsubscribe'] = 'Waarschuwing: in/uitschrijven zal een e-mail versturen aan de gebruiker';
-$lang['nbm_send_html_mail'] = 'Stuur mail in HTML formaat';
-$lang['nbm_send_recent_post_dates'] = 'Inclusief tonen van recente afbeeldingen op basis van datum';
-$lang['nbm_info_send_recent_post_dates'] = 'Alleen beschikbaar in HTML formaat';
-$lang['no_write_access'] = 'geen schrijftoegang';
-$lang['path'] = 'path';
-$lang['permissions'] = 'Rechten';
-$lang['private'] = 'private';
-$lang['properties'] = 'Eigenschappen';
-$lang['public'] = 'publiek';
-$lang['purge history'] = 'verwijder geschiedenis';
-$lang['purge never used notification feeds'] = 'verwijder nimmer gebruikte meldingen';
-$lang['purge sessions'] = 'verwijder sessies';
-$lang['randomly represented'] = 'willekeurig represented';
-$lang['registration_date'] = 'registratie datum';
-$lang['remote_site'] = 'Remote site';
-$lang['remote_site_clean'] = 'opschonen';
-$lang['remote_site_clean_hint'] = 'verwijder remote listing.xml bestand';
-$lang['remote_site_generate'] = 'genereer lijsten';
-$lang['remote_site_generate_hint'] = 'genereer bestand listing.xml op remote site';
-$lang['remote_site_local_create'] = 'maak deze site';
-$lang['remote_site_local_found'] = 'Een lokale listing.xml bestand is gevonden voor ';
-$lang['remote_site_local_update'] = 'lees locale listing.xml en werk bij';
-$lang['remote_site_test'] = 'test';
-$lang['remote_site_test_hint'] = 'test deze remote site';
-$lang['remote_site_uncorrect_url'] = 'Remote site url moet starten met http of https end moet allen bestaan uit characters met "/", "a-zA-Z0-9", "-" or "_"';
-$lang['remove tags'] = 'verwijder tags';
-$lang['repair and optimize database'] = 'repareer en optimaliseer de database';
-$lang['selection'] = 'selectie';
-$lang['set to'] = 'instellen op';
-$lang['singly represented'] = 'afzonderlijk vertegenwoordigd';
-$lang['site_already_exists'] = 'Deze site bestaat al';
-$lang['site_create'] = 'maak een nieuwe site : (geef de URL to create_listing_file.php)';
-$lang['site_created'] = 'gemaakt';
-$lang['site_delete'] = 'verwijderen';
-$lang['site_delete_hint'] = 'verwijder de site en alle bijbehorende elementen';
-$lang['site_deleted'] = 'verwijderd';
-$lang['site_err'] = 'er heeft zich een fout voorgedaan';
-$lang['site_err_remote_file_not_found'] = 'bestand create_listing_file.php op de remote site is niet gevonden';
-$lang['site_local'] = 'Lokaal';
-$lang['site_remote'] = 'Remote';
-$lang['site_synchronize'] = 'synchronizeer';
-$lang['site_synchronize_hint'] = 'werk de database bij vanuit bestanden';
-$lang['status'] = 'status';
-$lang['storage'] = 'Map';
-$lang['sub-categories'] = 'sub-categorie';
-$lang['synchronize metadata'] = 'synchronizeer metadata';
-$lang['synchronize'] = 'synchronizeer';
-$lang['target'] = 'doel';
-$lang['thumbnail'] = 'thumbnail';
-$lang['title'] = 'titel';
-$lang['title_categories'] = 'Categorie beheer';
-$lang['title_configuration'] = 'Piwigo configuratie';
-$lang['title_default'] = 'Piwigo beheer';
-$lang['title_edit_cat'] = 'Bewerk een categorie';
-$lang['title_groups'] = 'Groepsbeheer';
-$lang['title_liste_users'] = 'Gebruikerslijst';
-$lang['title_picmod'] = 'Verander de informatie van een plaatje';
-$lang['title_thumbnails'] = 'Thumbnails maken';
-$lang['title_update'] = 'Database synchronizatie met bestanden';
-$lang['title_upload'] = 'afbeeldingen wachten op bevestiging';
-$lang['tn_all'] = 'alles';
-$lang['tn_alone_title'] = 'afbeeldingen zonder thumbnail (alleen jpeg en png)';
-$lang['tn_err_height'] = 'Hoogte moet groter zijn dan';
-$lang['tn_err_width'] = 'Breedte moet groter zijn dan';
-$lang['tn_format'] = 'voor het bestandsformaat';
-$lang['tn_no_missing'] = 'Geen ontbrekende thumbnail';
-$lang['tn_no_support'] = 'Afbeelding is niet bereikbaar of er is geen support';
-$lang['tn_params_GD'] = 'GD versie';
-$lang['tn_params_title'] = 'Miniatuur parameters';
-$lang['tn_results_gen_time'] = 'genereerd in';
-$lang['tn_results_title'] = 'Resultaat van verkleinen';
-$lang['tn_stats'] = 'Algemen statistieken';
-$lang['tn_stats_max'] = 'maximale tijd';
-$lang['tn_stats_mean'] = 'gemiddelde tijd';
-$lang['tn_stats_min'] = 'minimale tijd';
-$lang['tn_stats_nb'] = 'aantal verkleinde afbeeldingen';
-$lang['tn_stats_total'] = 'totale tijd';
-$lang['tn_thisformat'] = 'voor dit bestandsformaat';
-$lang['unit mode'] = 'unit mode';
-$lang['unlocked'] = 'open';
-$lang['unset'] = 'niet ingesteld';
-$lang['up'] = 'verplaats naar boven';
-$lang['update categories informations'] = 'categorie informatie bijwerken';
-$lang['update images informations'] = 'afbeeldings informatie bijwerken';
-$lang['update'] = 'Synchronizeer';
-$lang['update_cats_subset'] = 'Alleen naar de bestaande categoriĂŤn terugbrengen';
-$lang['update_default_title'] = 'Kies een optie';
-$lang['update_display_info'] = 'toon maximale informatie (toegevoegde categoriĂŤn en elementen, verwijderde categoriĂŤn en elementen)';
-$lang['update_err_pwg_version_differs'] = 'Piwigo versie verschild op de remote site';
-$lang['update_err_pwg_version_differs_info'] = 'Versie van create_listing_file.php op de remote site en Piwigo moeten gelijk zijn';
-$lang['update_err_remote_listing_not_found'] = 'listing.xml file is niet gevonden';
-$lang['update_err_remote_listing_not_found_info'] = 'listing.xml file is niet gevonden op de remote site. Het bestand word gegenereerd door het commando "genereer listing" in de Site manager';
-$lang['update_error_list_title'] = 'Fouten lijst';
-$lang['update_errors_caption'] = 'Foutmeldingen afvangen';
-$lang['update_infos_title'] = 'Gedetaileerde informatie';
-$lang['update_missing_file_or_dir'] = 'Bestand/map lees fout';
-$lang['update_missing_file_or_dir_info'] = 'Het bestand of map kan niet worden benaderd (of het bestand of map bestaat niet of geen rechten)';
-$lang['update_missing_tn_info'] = 'Een afbeelding heeft een indexafbeelding nodig. De indexafbeeling moet in de subdirectorie "thumbnail" van de betreffende categorie aanwezig zijn. De indexafbeelding moet starten met het in de configuratie opgegeven voorvoegsel en mag alleen een extentie bevatten die voorkomt in de volgende lijst:';
-$lang['update_missing_tn_short'] = 'ontbrekende thumbnail';
-$lang['update_nb_del_categories'] = 'categoriĂŤn verwijderd uit de database';
-$lang['update_nb_del_elements'] = 'elementen verwijderd uit de database';
-$lang['update_nb_elements_metadata_available'] = 'elementen gesynchroniseerd met de metadata van de bij behorende bestanden';
-$lang['update_nb_elements_metadata_sync'] = 'element informatie gesynchronizeerd met bestands metadata';
-$lang['update_nb_errors'] = 'fouten tijdens synchronizatie';
-$lang['update_nb_new_categories'] = 'categoriĂŤn toegevoegd aan de database';
-$lang['update_nb_new_elements'] = 'elementen toegevoegd aan de database';
-$lang['update_nb_upd_elements'] = 'elementen bijgewerkt in de database';
-$lang['update_part_research'] = 'Zoek naar nieuwe afbeeldingen in mappen';
-$lang['update_research_added'] = 'toegevoegd';
-$lang['update_research_deleted'] = 'verwijderd';
-$lang['update_result_metadata'] = 'Metadata synchronizatie resultaten';
-$lang['update_simulate'] = 'alleen een simulatie uitvoeren (er worden geen veranderingen aangebracht in de database)';
-$lang['update_simulation_title'] = '[Simulatie]';
-$lang['update_sync_all'] = 'mappen + bestanden';
-$lang['update_sync_dirs'] = 'alleen mappen';
-$lang['update_sync_files'] = 'synchronizeer bestanden met de database';
-$lang['update_sync_metadata'] = 'synchronizeer bestands metadata met de database element informatie';
-$lang['update_sync_metadata_all'] = 'ook reeds synchronizeerde elementen';
-$lang['update_sync_metadata_new'] = 'alleen nooit gesynchronizeerde elementen';
-$lang['update_used_metadata'] = 'Gebruikte metadata';
-$lang['update_wrong_dirname_info'] = 'De naam van de mappen en bestanden moeten bestaan uit letters, "-", "_" of "."';
-$lang['update_wrong_dirname_short'] = 'verkeerde bestandsnaam';
-$lang['upload'] = 'Upload';
-$lang['user "%s" added'] = 'gebruiker "%s" toegevoegd';
-$lang['user_status'] = 'Gebruikers status';
-$lang['user_status_admin'] = 'Beheerder';
-$lang['user_status_generic'] = 'Generic';
-$lang['user_status_guest'] = 'Gast';
-$lang['user_status_normal'] = 'Gebruiker';
-$lang['user_status_webmaster'] = 'Webmaster';
-$lang['username'] = 'gebruikersnaam';
-$lang['users'] = 'Gebruikers';
-$lang['virtual_category'] = 'Virtuele categoriĂŤn';
-$lang['waiting'] = 'Wachten';
-$lang['is_default_group'] = 'standaard';
-$lang['toggle_is_default_group'] = 'Aanpassen \'standaard groep\' eigenschap';
-$lang['Advanced_features'] = 'Geavanceerde functies';
-$lang['Elements_not_linked'] = 'Niet gelinkte elementen';
-$lang['web_services'] = 'Web services ';
-$lang['title_wscheck'] = ' Toegangsbeheer';
-$lang['ws_failed_upd'] = ' -> <strong>Niet voltooide eis</strong> ';
-$lang['ws_success_upd'] = ' -> Succesvol afgerond ';
-$lang['ws_adding_legend'] = ' Voeg een nieuwe partner toegang toe aan Web Services ';
-$lang['ws_update_legend'] = ' Ongedaan maken / bijwerken geselecteerde partner toegangaccess ';
-$lang['ws_delete_legend'] = ' Maak geselecteerde partner toegang ongedaan';
-$lang['ws_Methods'] = ' Methode ';
-$lang['ws_KeyName'] = ' Partner ';
-$lang['ws_Access'] = ' Toegang ';
-$lang['ws_Start'] = ' Start ';
-$lang['ws_End'] = ' Eind ';
-$lang['ws_Request'] = ' Vraag ';
-$lang['ws_Limit'] = ' Limiet ';
-$lang['ws_Comment'] = ' Commentaar ';
-$lang['Modify End from Now +'] = 'Verander eind vanaf hier + ';
-$lang['Delete'] = ' Verwijderen ';
-$lang['Confidential partner key'] = 'Vertrouwelijke partner sleutel';
-$lang['Basis of access key calculation'] = 'Basis van de toegangssleutel berekening';
-$lang['Target'] = 'Doel';
-$lang['Access: see help text for more'] = 'Toegang: Zie help tekst voor meer info';
-$lang['Facultative and restrictive option'] = 'Facultatieve en restrictieve optie ';
-$lang['Postponed availability in days'] = 'Uitgestelde beschikbaarheid in dagen';
-$lang['Duration in days'] = 'Duur in dagen';
-$lang['Restrict access to'] = 'Beperk toegang tot';
-$lang['Returned images limit'] = 'Teruggekeerde beeldengrens';
-$lang['Comment to identify your partner clearly'] = 'Commentaar om je partner te identificeren';
-$lang['Add this access definition'] = 'Toevoegen toegangs defenitie';
-$lang['Web Services availability duration in days'] = 'Web Services beschikbaar in aantal dagen';
-$lang['Web Services under control'] = 'Piwigo Web Services zijn volledig operationeel en alle verzoeken worden uitgevoerd.';
-$lang['special_admin_menu'] = 'Speciaal';
-$lang['note_check_exif'] = '%s moet ingesteld zijn op false in je config_local.inc.php omdat exif niet ondersteund wordt.';
-$lang['note_check_more_info'] = 'Ga naar %s of %s voor meer informatie.';
-$lang['note_check_more_info_forum'] = 'het forum';
-$lang['note_check_more_info_wiki'] = 'de wiki';
-$lang['Duplicates'] = 'Bestanden met de zelfde naam in meer dan ĂŠĂŠn physieke categorie';
-
-$lang['Export data'] = 'Exporteer data';
-$lang['Overall'] = 'Totaal';
-$lang['Year'] = 'Jaar';
-$lang['Month'] = 'Maand';
-$lang['Day'] = 'Dag';
-$lang['Pages seen'] = 'Pagina\'s bekeken';
-$lang['Pictures'] = 'Afbeeldingen';
-$lang['time'] = 'tijd';
-$lang['user'] = 'gebruiker';
-$lang['IP'] = 'IP';
-$lang['image'] = '';
-$lang['section'] = 'sectie';
-$lang['tags'] = 'tags';
-$lang['conf_history_guest'] = 'Bewaar pagina bezoek van gasten';
-$lang['conf_history_user'] = 'Bewaar pagina bezoek van gebruikers';
-$lang['conf_history_admin'] = 'Bewaar pagina bezoek van beheerders';
-$lang['cat_options_title'] = 'Eigenschappen';
-$lang['An information email was sent to group "%s"'] = 'Een informatie email is verstuurd naar de groep "%s';
-$lang['Send an information email to group members'] = 'Stuur een informatie email to groep leden';
-$lang['Group'] = 'Groep';
-$lang['[%s] Come to visit the category %s'] = '[%s] Bezoek de categorie %s';
-$lang['Hello,'] = 'Hallo,';
-$lang['See you soon.'] = 'Zie je snel.';
-$lang['Come to discover the category:'] = 'Ondek de categorie:';
-$lang['mail_content'] = 'Mail inhoud';
-$lang['none'] = 'geen';
-$lang['high'] = 'hoog';
-$lang['other'] = 'anders';
-$lang['Element type'] = 'Element type';
-$lang['User'] = 'Gebruiker';
-$lang['Image id'] = 'Afbeeldings id';
-$lang['Summary'] = 'Overzicht';
-$lang['%d line filtered'] = '%d regel gefilterd';
-$lang['%d lines filtered'] = '%d regels filterd';
-$lang['%d guest'] = '%d gast';
-$lang['%d guests'] = '%d gasten';
-$lang['Hour'] = 'Uur';
-$lang['is_the_guest'] = 'gast';
-$lang['is_the_default'] = 'Standaard waarden';
-$lang['High filesize'] = 'Grote bestandsformaat';
-
-// --------- Starting below: New or revised $lang ---- from version 1.7.1
-$lang['Guest cannot be deleted'] = 'Gast kan niet verwijderd worden';
-$lang['Default user cannot be deleted'] = 'Standaart gebruiker kan niet verwijderd worden';
-$lang['purge history detail'] = 'details van de filtringsgeschiedenis';
-$lang['purge history summary'] = 'overzicht van de filtergeschiedenis';
-$lang['c13y_title'] = 'Controleer integriteit';
-$lang['c13y_Anomaly'] = 'Onregelmatigheid';
-$lang['c13y_Correction'] = 'Correctie';
-$lang['c13y_Automatic_correction'] = 'Automatische correctie';
-$lang['c13y_Impossible_automatic_correction'] = 'Onmogelijke automatische correctie';
-$lang['c13y_Correction_applied_success'] = 'Correctie die met succes is toegepast';
-$lang['c13y_Correction_applied_error'] = 'Correctie die met fout wordt toegepast';
-$lang['c13y_anomaly_count'] = '%d Onregelmatigheid ontdekt.';
-$lang['c13y_anomalies_count'] = '%d Onregelmatigheden ontdekt.';
-$lang['c13y_anomaly_corrected_count'] = '%d Onregelmatigheid is gecorrigeerd.';
-$lang['c13y_anomalies_corrected_count'] = '%d Onregelmatigheden die zijn gecorrigeerd.';
-$lang['c13y_anomaly_not_corrected_count'] = '%d Onregelmatigheid ontdekt is niet gecorrigeerd.';
-$lang['c13y_anomalies_not_corrected_count'] = '%d Onregelmatigheden zijn niet gecorrigeerd.';
-$lang['c13y_more_info'] = 'Gaa naar %s of %s voor meer informatie';
-$lang['c13y_more_info_forum'] = 'het forum';
-$lang['c13y_more_info_wiki'] = 'de wiki';
-$lang['c13y_exif_anomaly'] = '%s waarde is niet een correct bestand omdat exif niet ondersteund word';
-$lang['c13y_exif_correction'] = '%s moet aangepast worden naar false in je config_local.inc.php bestand';
-$lang['c13y_guest_non_existent'] = 'Hooft "gast" gebruiker bestaat niet meer';
-$lang['c13y_bad_guest_status'] = 'Hooft "gast" gebruikers status is niet correct';
-$lang['c13y_default_non_existent'] = 'Standaard gebruiker bestaat niet meer';
-$lang['c13y_webmaster_non_existent'] = 'Hoofd "webmaster" bestaat niet meer';
-$lang['c13y_bad_webmaster_status'] = 'Hoofd "webmaster" status is niet correct';
-$lang['c13y_user_created'] = 'Gebruiker "%s" gemaakt met wachtwoord "%s" ';
-$lang['c13y_user_status_updated'] = 'Status van de gebruiker "%s" is bijgewerkt';
-$lang['add new elements to caddie'] = 'Voeg nieuwe elementen toe ann caddie';
-// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
-$lang['no_display_thumbnail'] = 'Geen weergave';
-$lang['display_thumbnail_classic'] = 'Klassieke weergave';
-$lang['display_thumbnail_hoverbox'] = 'Hoverbox weergave';
-$lang['Thumbnails'] = 'Voorbeeldplaatjes';
-$lang['obligatory_user_mail_address'] = 'Email adres is verplicht voor alle gebruikers';
-$lang['Minimum privacy level'] = 'Minimale privacy nivo';
-$lang['Privacy level'] = 'Privacy nivo';
-$lang['Level 0'] = '---';
-$lang['Level 1'] = 'Contacten';
-$lang['Level 2'] = 'Vrienden';
-$lang['Level 4'] = 'Familie';
-$lang['Level 8'] = 'Admins';
-/* TODO */ $lang['c13y_maintenance'] = 'Reinitialize check integrity';
-$lang['Check all'] = 'Selecteer alles';
-$lang['Uncheck all'] = 'Deselecteer alles';
-/* TODO */ $lang['c13y_check_auto'] = 'Check automatic corrections';
-$lang['c13y_submit_correction'] = 'Pas geselecteerde correcties toe';
-/* TODO */ $lang['c13y_submit_ignore'] = 'Ignore selected anomalies';
-/* TODO */ $lang['c13y_submit_refresh'] = 'Refresh';
-/* TODO */ $lang['c13y_ignore_msg1'] = 'The anomaly will be ignored until next application version';
-/* TODO */ $lang['c13y_ignore_msg2'] = 'Correction the anomaly will cancel the fact that it\'s ignored';
-/* TODO */ $lang['c13y_anomaly_ignored_count'] = '%d anomaly has been ignored.';
-/* TODO */ $lang['c13y_anomalies_ignored_count'] = '%d anomalies has been ignored.';
-/* TODO */ $lang['plugins_need_update'] = 'Plugins which need upgrade';
-/* TODO */ $lang['plugins_dontneed_update'] = 'Plugins up to date';
-/* TODO */ $lang['plugins_cant_check'] = 'Plugin versions can\'t be checked';
-/* TODO */ $lang['plugins_actual_version'] = 'Current<br>version';
-/* TODO */ $lang['plugins_new_version'] = 'Available<br>version';
-/* TODO */ $lang['plugins_auto_update'] = 'Automatic upgrade';
-/* TODO */ $lang['plugins_auto_install'] = 'Automatic installation';
-/* TODO */ $lang['plugins_download'] = 'Download file';
-/* TODO */ $lang['plugins_description'] = '<b>Version:</b> %s<br><br><b>Date:</b> %s<br><br>%s';
-/* TODO */ $lang['plugins_tab_list'] = 'Plugin list';
-/* TODO */ $lang['plugins_tab_update'] = 'Check for updates';
-/* TODO */ $lang['plugins_tab_new'] = 'Other plugins';
-/* TODO */ $lang['plugins_revisions'] = 'Last revisions';
-/* TODO */ $lang['plugins_delete'] = 'Delete';
-/* TODO */ $lang['plugins_confirm_delete'] = 'Are you sure you want to delete this plugin?';
-/* TODO */ $lang['plugins_confirm_install'] = 'Are you sure you want to install this plugin?';
-/* TODO */ $lang['plugins_confirm_upgrade'] = 'Are you sur to install this upgrade? You must verify if this version does not need uninstallation.';
-/* TODO */ $lang['plugins_upgrade_ok'] = '%s has been successfully upgraded.';
-/* TODO */ $lang['plugins_install_ok'] = 'Plugin has been successfully copied';
-/* TODO */ $lang['plugins_install_need_activate'] = 'You might go to plugin list to install and activate it.';
-/* TODO */ $lang['plugins_temp_path_error'] = 'Can\'t create temporary file.';
-/* TODO */ $lang['plugins_dl_archive_error'] = 'Can\'t download archive.';
-/* TODO */ $lang['plugins_archive_error'] = 'Can\'t read or extract archive.';
-/* TODO */ $lang['plugins_extract_error'] = 'An error occured during extraction (%s).';
-/* TODO */ $lang['plugins_check_chmod'] = 'Please check "plugins" folder and sub-folders permissions (CHMOD).';
-/* TODO */ $lang['plugins_server_error'] = 'Can\'t connect to server.';
-/* TODO */ $lang['Purge compiled templates'] = 'Purge compiled templates';
-/* TODO */ $lang['Caddie is currently empty'] = 'Caddie is currently empty';
-/* TODO */ $lang['DEMO'] = 'Demo';
-/* TODO */ $lang['HOME'] = 'Piwigo Home';
-/* TODO */ $lang['FORUM'] = 'Bijstand';
-/* TODO */ $lang['BUGS'] = 'Fouten';
-/* TODO */ $lang['EXTENSIONS'] = 'Extensies';
-/* TODO */ $lang['WIKI / DOC'] = 'Documentatie';
-/* TODO */ $lang['conf_upload_title'] = 'Upload';
-/* TODO */ $lang['Show upload link every time'] = 'Show upload link every time';
-/* TODO */ $lang['User access level to upload'] = 'User access level to upload';
-/* TODO */ $lang['ACCESS_0'] = 'Free access';
-/* TODO */ $lang['ACCESS_1'] = 'Access to all';
-/* TODO */ $lang['ACCESS_2'] = 'Access to subscribed';
-/* TODO */ $lang['ACCESS_3'] = 'Access to administrators';
-/* TODO */ $lang['ACCESS_4'] = 'Access to webmasters';
-/* TODO */ $lang['ACCESS_5'] = 'No access';
-$lang['A new version of Piwigo is available.'] = 'Een nieuwere versie van Piwigo is beschikbaar.';
-$lang['Piwigo Administration'] = 'Piwigo Beheer';
-$lang['Piwigo version'] = 'Piwigo versie';
-$lang['You are running the latest version of Piwigo.'] = 'Je hebt de laatste versie van Piwigo.';
-/* TODO */ $lang['c13y_version_anomaly'] = 'The version of %s [%s] installed is not compatible with the version required [%s]';
-/* TODO */ $lang['c13y_version_correction'] = 'You need to upgrade your system to take full advantage of the application else the application will not work correctly, or not at all';
-
-?>
diff --git a/BSF/language/nl_NL/common.lang.php b/BSF/language/nl_NL/common.lang.php
deleted file mode 100644
index 063610cd2..000000000
--- a/BSF/language/nl_NL/common.lang.php
+++ /dev/null
@@ -1,368 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Langage informations
-$lang_info['language_name'] = 'Dutch';
-$lang_info['country'] = 'Nederland';
-$lang_info['direction'] = 'ltr';
-$lang_info['code'] = 'nl';
-$lang_info['zero_plural'] = true;
-
-$lang['%.2f (beoordeling %d aantal x, standaard deviation = %.2f)'] = '%.2f (beoordeling %d aantal x, standaard deviation = %.2f)';
-$lang['%d Kb'] = '%d Kb';
-$lang['%d category updated'] = '%d categorie bijgewerkt';
-$lang['%d categories updated'] = '%d categorieĂŤn bijgewerkt';
-$lang['%d comment to validate'] = '%d commentaar voor validatie';
-$lang['%d comments to validate'] = '%d commentaren voor validatie';
-$lang['%d new comment'] = '%d nieuw commentaar';
-$lang['%d new comments'] = '%d nieuw commentaar';
-$lang['%d comment'] = '%d commentaar';
-$lang['%d comments'] = '%d commentaren';
-$lang['%d hit'] = '%d bezoeker';
-$lang['%d hits'] = '%d bezoekers';
-$lang['%d new element'] = '%d nieuw element';
-$lang['%d new elements'] = '%d nieuwe elementen';
-$lang['%d new user'] = '%d nieuwe gebruiker';
-$lang['%d new users'] = '%d nieuwe gebruikers';
-$lang['%d waiting element'] = '%d wachtende element';
-$lang['%d waiting elements'] = '%d wachtende elementen';
-$lang['About'] = 'Over';
-$lang['All tags must match'] = 'Alle tags moeten kloppen';
-$lang['All tags'] = 'Alle tags';
-$lang['Any tag'] = 'Elke tag';
-$lang['At least one listed rule must be satisfied.'] = 'Op zijn minst moet aan ĂŠĂŠn regel worden voldaan.';
-$lang['At least one tag must match'] = 'Op zijn minst moet een tag kloppen';
-$lang['Author'] = 'Auteur';
-$lang['Average rate'] = 'Gemiddeld oordeel';
-$lang['Categories'] = 'CategorieĂŤn';
-$lang['Category'] = 'Categorie';
-$lang['Close this window'] = 'Sluit dit venster';
-$lang['Complete RSS feed'] = 'Complete RSS feed (afbeeldingen, commentaar)';
-$lang['Confirm Password'] = 'Bevestig wachtwoord';
-$lang['Connection settings'] = 'Verbindingsinstellingen';
-$lang['Connection'] = 'Verbinding';
-$lang['Contact webmaster'] = 'Contact de webmaster';
-$lang['Create a new account'] = 'Maak een nieuwe account';
-$lang['Created on'] = 'Gemaakt op';
-$lang['Creation date'] = 'Aanmaak datum';
-$lang['Current password is wrong'] = 'Huidige wachtwoord is niet juist';
-$lang['Dimensions'] = 'Dimenties';
-$lang['Display'] = 'Weergeven';
-$lang['Each listed rule must be satisfied.'] = 'Aan elke regel moet worden voldaan.';
-$lang['Email address is missing'] = 'Email adres is niet ingevuld';
-$lang['Email address'] = 'Email adres';
-$lang['Enter your personnal informations'] = 'Vul uw persoonlijke informatie in';
-$lang['Error sending email'] = 'Fout bij het versturen van email';
-$lang['File name'] = 'Bestandsnaam';
-$lang['File'] = 'Bestand';
-$lang['Filesize'] = 'Bestands grote';
-$lang['Filter and display'] = 'Filteren en tonen';
-$lang['Filter'] = 'Filter';
-$lang['Forgot your password?'] = 'Wachtwoord vergeten?';
-$lang['Go through the gallery as a visitor'] = 'Ga naar de gallerie als gast';
-$lang['Help'] = 'Help';
-$lang['Identification'] = 'Identificatie';
-$lang['Image only RSS feed'] = 'Image only RSS feed';
-$lang['Keyword'] = 'Keyword';
-$lang['Links'] = 'Links';
-$lang['Mail address'] = 'Mail adres';
-$lang['N/A'] = 'Niet bekend';
-$lang['New on %s'] = 'Nieuw op %s';
-$lang['New password confirmation does not correspond'] = 'Nieuw wachtwoord bevestiging komt niet overeen';
-$lang['New password sent by email'] = 'Nieuw wachtwoord is verzonden per email';
-$lang['No email address'] = 'Geen email adres';
-$lang['No user matches this email address'] = 'Geen gebruiker gevonden met dit email adres';
-$lang['Notification'] = 'Melding';
-$lang['Number of items'] = 'Aantal items';
-$lang['Original dimensions'] = 'Originele dimenties';
-$lang['Password forgotten'] = 'Wachtwoord vergeten';
-$lang['Password'] = 'Wachtwoord';
-$lang['Post date'] = 'Plaatsings datum';
-$lang['Posted on'] = 'Geplaatst op';
-$lang['Profile'] = 'Profiel';
-$lang['Quick connect'] = 'Snel inloggen';
-$lang['RSS feed'] = 'RSS feed';
-$lang['Rate'] = 'Beoordeling';
-$lang['Register'] = 'Registreren';
-$lang['Registration'] = 'Registratie';
-$lang['Related tags'] = 'Aanverwante tags';
-$lang['Reset'] = 'Reset';
-$lang['Retrieve password'] = 'Ontvang wachtwoord';
-$lang['Search rules'] = 'Zoek opties';
-$lang['Search tags'] = 'Zoek tags';
-$lang['Search'] = 'Zoeken';
-$lang['See available tags'] = 'Toon beschikbare tags';
-$lang['Send new password'] = 'Stuur nieuw wachtwoord';
-$lang['Since'] = 'Sinds';
-$lang['Sort by'] = 'Sorteren op';
-$lang['Sort order'] = 'Sorteer volgorde';
-$lang['Tag'] = 'Tag';
-$lang['Tags'] = 'Tags';
-$lang['The RSS notification feed provides notification on news from this website : new pictures, updated categories, new comments. Use a RSS feed reader.'] = 'De RSS feed geeft meldingen als er nieuws is op deze website: nieuwe afbeeldingen, bijgewerkte categorieĂŤn, nieuw commentaar. Gebruik hiervoor een rss lezer.';
-$lang['Unknown feed identifier'] = 'Onbekende feed identifier';
-$lang['User comments'] = 'Gebruikers commentaar';
-$lang['Username'] = 'Gebruikersnaam';
-$lang['Visits'] = 'Bezoeken';
-$lang['Webmaster'] = 'Webmaster';
-$lang['Week %d'] = 'Week %d';
-$lang['about_page_title'] = 'Over Piwigo';
-$lang['access_forbiden'] = 'Je hebt geen rechten tot de opgevraagde pagina';
-$lang['add to caddie'] = 'Toevoegen aan caddie';
-$lang['add_favorites_hint'] = 'voeg deze afbeelding toe aan jou favorieten';
-$lang['admin'] = 'Beheer';
-$lang['adviser_mode_enabled'] = 'Advies mode geactiveerd';
-$lang['all'] = 'alle';
-$lang['ascending'] = 'ascending';
-$lang['author(s) : %s'] = 'auteur(s) : %s';
-$lang['auto_expand'] = 'Toon alle categorieĂŤn';
-$lang['became available after %s (%s)'] = 'geplaatst na %s (%s)';
-$lang['became available before %s (%s)'] = 'geplaats voor %s (%s)';
-$lang['became available between %s (%s) and %s (%s)'] = 'geplaatst tussen %s (%s) en %s (%s)';
-$lang['became available on %s'] = 'geplaatst op %s';
-$lang['best_rated_cat'] = 'Best beoordeeld';
-$lang['best_rated_cat_hint'] = 'weergeven van de hoogste beoordeling';
-$lang['caddie'] = 'caddie';
-$lang['calendar'] = 'kalender';
-$lang['calendar_any'] = 'Alle';
-$lang['calendar_hint'] = 'weergeven elke dag met afbeelding, maand per maand';
-$lang['calendar_picture_hint'] = 'toon alle afbeelding toegevoegt op ';
-$lang['calendar_view'] = 'Bekijk';
-$lang['chronology_monthly_calendar'] = 'Maand kalender';
-$lang['chronology_monthly_list'] = 'Maand lijst';
-$lang['chronology_weekly_list'] = 'Week lijst';
-$lang['click_to_redirect'] = 'Klik hier als je browser je niet doorstuurt';
-$lang['comment date'] = 'commentaar datum';
-$lang['comment'] = 'Commentaar';
-$lang['comment_added'] = 'Je commentaar is geregistreerd';
-$lang['comment_anti-flood'] = 'Anti-flood systeem : je moet even wachten voordat je weer nieuw commentaar kunt plaatsen';
-$lang['comment_not_added'] = 'Je commentaar is NIET geregistreerd omdat de validatie regels de plaatsing voorkwam';
-$lang['comment_to_validate'] = 'Een beheerder moet je commentaar goedkeuren voordat het zichtbaar word.';
-$lang['comment_user_exists'] = 'Deze gebruikersnaam is al in gebruik';
-$lang['comments'] = 'Commentaar';
-$lang['comments_add'] = 'voeg commentaar toe';
-$lang['comments_del'] = 'verwijder dit commentaar';
-$lang['comments_title'] = 'Commentaar van gebruikers van deze website';
-$lang['created after %s (%s)'] = 'Gemaakt na %s (%s)';
-$lang['created before %s (%s)'] = 'Gemaakt voor %s (%s)';
-$lang['created between %s (%s) and %s (%s)'] = 'Gemaakt tussen %s (%s) en %s (%s)';
-$lang['created on %s'] = 'gemaakt op %s';
-$lang['customize'] = 'Aanpassen';
-$lang['customize_page_title'] = 'Je gallerie aanpassen ';
-$lang['day'][0] = 'Zondag';
-$lang['day'][1] = 'Maandag';
-$lang['day'][2] = 'Dinsdag';
-$lang['day'][3] = 'Woensdag';
-$lang['day'][4] = 'Donderdag';
-$lang['day'][5] = 'Vrijdag';
-$lang['day'][6] = 'Zaterdag';
-$lang['default_sort'] = 'Standaard';
-$lang['del_favorites_hint'] = 'verwijder deze foto van je favorieten';
-$lang['delete'] = 'Verwijderen';
-$lang['descending'] = 'descending';
-$lang['download'] = 'download';
-$lang['download_hint'] = 'download dit bestand';
-$lang['edit category informations'] = 'bewerk categorie informatie';
-$lang['edit'] = 'bewerk(en)';
-$lang['err_date'] = 'verkeerde datum';
-$lang['excluded'] = 'uitsluiten';
-$lang['favorite_cat'] = 'Mijn favorieten';
-$lang['favorite_cat_hint'] = 'toon mijn favoriete foto\'s';
-$lang['favorites'] = 'Favorieten';
-$lang['first_page'] = 'Eerste';
-$lang['gallery_locked_message'] = 'De gallerie is in onderhoud. Probeer het later nog eens.';
-$lang['generation_time'] = 'Pagina gegenereerd in';
-$lang['guest'] = 'gast';
-$lang['hello'] = 'Hallo';
-$lang['hint_admin'] = 'Alleen voor beheerders';
-$lang['hint_category'] = 'Toon afbeelding van het begin van de categorie';
-$lang['hint_comments'] = 'Bekijk de laatste gebruikerscommentaar';
-$lang['hint_customize'] = 'Verschijning van de gallerie aanpassen';
-$lang['hint_search'] = 'zoeken';
-$lang['home'] = 'Home';
-$lang['identification'] = 'Identificatie';
-$lang['images_available_cpl'] = 'in deze categorie';
-$lang['images_available_cat'] = 'in %d sub-categorie';
-$lang['images_available_cats'] = 'in %d sub-categorieĂŤn';
-$lang['included'] = 'inclusief';
-$lang['invalid_pwd'] = 'Verkeerd wachtwoord!';
-$lang['language']='Taal';
-$lang['last %d days'] = 'laaste %d dagen';
-$lang['last_page'] = 'Laatste';
-$lang['link_info_image'] = 'Aanpassen informatie';
-$lang['logout'] = 'Loguit';
-$lang['mail_address'] = 'E-mail adres';
-$lang['mandatory'] = 'verplicht';
-$lang['maxheight'] = 'Maximale hoogte van de afbeelding';
-$lang['maxheight_error'] = 'Maximale hoogte moet een veelvoud zijn van 50';
-$lang['maxwidth'] = 'Maximale breedte van het afbeelding';
-$lang['maxwidth_error'] = 'Maximale breedte moet een veelvoud zijn van 50';
-$lang['mode_created_hint'] = 'toon een kalender per aanmaak datum';
-$lang['mode_flat_hint'] = 'toont alle elementen in alle sub-categorieĂŤn';
-$lang['mode_normal_hint'] = 'terug naar normaal kijken';
-$lang['mode_posted_hint'] = 'toon een kalender met datums van plaatsen';
-$lang['month'][10] = 'Oktober';
-$lang['month'][11] = 'November';
-$lang['month'][12] = 'December';
-$lang['month'][1] = 'Januari';
-$lang['month'][2] = 'Februari';
-$lang['month'][3] = 'Maart';
-$lang['month'][4] = 'April';
-$lang['month'][5] = 'Mei';
-$lang['month'][6] = 'Juni';
-$lang['month'][7] = 'Juli';
-$lang['month'][8] = 'Augustus';
-$lang['month'][9] = 'September';
-$lang['most_visited_cat'] = 'Meest bekeken';
-$lang['most_visited_cat_hint'] = 'Toon de meest bekenen afbeelding';
-$lang['nb_image_line_error'] = 'Het aantal beelden per rij moet niet ongeldige deler zijn';
-$lang['nb_image_per_row'] = 'Aantal afbeeldingen per rij';
-$lang['nb_line_page_error'] = 'Het aantal rijen per pagina mag geen ongeldige deling zijn';
-$lang['nb_row_per_page'] = 'Aantal rijen per pagina';
-$lang['nbm_unknown_identifier'] = 'Onbekend herkenningsteken';
-$lang['new_password'] = 'Nieuw wachtwoord';
-$lang['new_rate'] = 'Beoordeel deze afbeelding';
-$lang['next_page'] = 'Volgende';
-$lang['no_category'] = 'Home';
-$lang['no_rate'] = 'geen beoordeling';
-$lang['note_filter_day'] = 'Toont alleen elementen geplaatst in de laatste %s dag.';
-$lang['note_filter_days'] = 'Toont alleen elementen geplaatst in de laatste %s dagen.';
-$lang['password updated'] = 'wachtwoord bijgewerkt';
-$lang['periods_error'] = 'Recente periode moet een positieve waarde zijn';
-$lang['picture'] = 'afbeelding';
-$lang['picture_high'] = 'Klik op de afbeelding om het te bekijken in een groter formaat';
-$lang['picture_show_metadata'] = 'Toon bestands metadata';
-$lang['powered_by'] = 'Powered by';
-$lang['preferences'] = 'Voorkeuren';
-$lang['previous_page'] = 'Vorige';
-$lang['random_cat'] = 'Random afbeelding';
-$lang['random_cat_hint'] = 'toon een set van willekeurige afbeelding';
-$lang['recent_cats_cat'] = 'Recente categorieĂŤn';
-$lang['recent_cats_cat_hint'] = 'toon recentelijk bijgewerkte categorieĂŤn';
-$lang['recent_period'] = 'Recente periode';
-$lang['recent_pics_cat'] = 'Recente afbeelding';
-$lang['recent_pics_cat_hint'] = 'toon meest recente afbeelding';
-$lang['redirect_msg'] = 'doorsturen...';
-$lang['reg_err_login1'] = 'Vul uw gebruikersnaam in AUB.';
-$lang['reg_err_login2'] = 'gebruikersnaam mag niet eindigen met een spatie';
-$lang['reg_err_login3'] = 'gebruikersnaam mag niet beginnen met een spatie';
-$lang['reg_err_login5'] = 'deze gebruikersnaam is al in gebruik';
-$lang['reg_err_mail_address'] = 'mail adres moet zijn xxx@yyy.eee (voorbeeld : jack@altern.org)';
-$lang['reg_err_pass'] = 'vul uw wachtwoord nogmaals in';
-$lang['remember_me'] = 'Auto login';
-$lang['remove this tag'] = 'verwijder de tag van de lijst';
-$lang['representative'] = 'representatief';
-$lang['return to homepage'] = 'terug naar de homepage';
-$lang['search_author'] = 'Zoek naar auteur';
-$lang['search_categories'] = 'Zoeken in CategorieĂŤn';
-$lang['search_date'] = 'Zoeken op Datum';
-$lang['search_date_from'] = 'Datum';
-$lang['search_date_to'] = 'Eind-Datum';
-$lang['search_date_type'] = 'Datum type';
-$lang['search_keywords'] = 'Zoek naar hele woorden';
-$lang['search_mode_and'] = 'Zoeken naar alle woorden';
-$lang['search_mode_or'] = 'Zoeken naar een woord';
-$lang['search_one_clause_at_least'] = 'Lege zoekopdracht. Er is niets ingevuld.';
-$lang['search_options'] = 'Zoek Opties';
-$lang['search_result'] = 'Zoekresultaten';
-$lang['search_subcats_included'] = 'Zoeken in subcategorieĂŤn';
-$lang['search_title'] = 'Zoeken';
-$lang['searched words : %s'] = 'zoekwoorden : %s';
-$lang['send_mail'] = 'Contact';
-$lang['set as category representative'] = 'Stel in als standaard categorie';
-$lang['show_nb_comments'] = 'Toon aantal commentaren';
-$lang['show_nb_hits'] = 'Toon aantal bezoekers';
-$lang['slideshow'] = 'slideshow';
-$lang['slideshow_stop'] = 'stop de slideshow';
-$lang['special_categories'] = 'Speciaal';
-$lang['sql_queries_in'] = 'SQL queries in';
-$lang['start_filter_hint'] = 'toon alleen de recent geplaatste elementen';
-$lang['stop_filter_hint'] = 'terug naar het tonen van alles';
-$lang['the beginning'] = 'het begin';
-$lang['theme'] = 'thema';
-$lang['thumbnails'] = 'Thumbnails';
-$lang['title_menu'] = 'Menu';
-$lang['title_send_mail'] = 'commentaar op je site';
-$lang['today'] = 'vandaag';
-$lang['update_rate'] = 'Werk je beoordeling bij';
-$lang['update_wrong_dirname'] = 'verkeerde bestandsnaam';
-$lang['upload_advise_filesize'] = 'het bestandsformaat mag niet te groot zijn : ';
-$lang['upload_advise_filetype'] = 'de afbeelding moet een extensie hebbben die eindigt op jpg, gif of png';
-$lang['upload_advise_height'] = 'de hoogte van de afbeelding mag niet te groot zijn : ';
-$lang['upload_advise_thumbnail'] = 'Optioneel, maar aanbevolen : kies een thumbnail voor associatie';
-$lang['upload_advise_width'] = 'de breedte van de afbeelding mag niet te groot zijn : ';
-$lang['upload_author'] = 'Auteur (eg "Pierrick LE GALL")';
-$lang['upload_cannot_upload'] = 'kan de afbeelding niet op de server plaatsen';
-$lang['upload_err_username'] = 'de gebruikersnaam moet ingevuld zijn';
-$lang['upload_file_exists'] = 'De naam is al in gebruik';
-$lang['upload_filenotfound'] = 'Je moet een afbeeldingsformaat opgeven voor de afbeelding';
-$lang['upload_forbidden'] = 'Je kan geen afbeelding plaatsen in deze categorie';
-$lang['upload_name'] = 'Naam van de afbeelding';
-$lang['upload_picture'] = 'Uploaden van een afbeelding';
-$lang['upload_successful'] = 'Afbeelding met succes ge-upload, een beheerder moet de afbeelding valideren, dit gebeurd zsm.';
-$lang['upload_title'] = 'Upload een afbeelding';
-$lang['useful when password forgotten'] = 'handig bij het vergeten van je wachtwoord';
-$lang['qsearch'] = 'Snel zoeken';
-$lang['Connected user: %s'] = 'Aangemeld als gebruiker: %s';
-$lang['IP: %s'] = 'IP: %s';
-$lang['Browser: %s'] = 'Browser: %s';
-$lang['Author: %s'] = 'Auteur: %s';
-$lang['Comment: %s'] = 'Commentaar: %s';
-$lang['Delete: %s'] = 'Verwijderen: %s';
-$lang['Validate: %s'] = 'Valideren: %s';
-$lang['Comment by %s'] = 'Commentaar van %s';
-$lang['User: %s'] = 'Gebruiker: %s';
-$lang['Email: %s'] = 'Email: %s';
-$lang['Admin: %s'] = 'Beheerder: %s';
-$lang['Registration of %s'] = 'Registratie van %s';
-$lang['Category: %s'] = 'Categorie: %s';
-$lang['Picture name: %s'] = 'Afbeeldings naam: %s';
-$lang['Creation date: %s'] = 'Aanmaak datum: %s';
-$lang['Waiting page: %s'] = 'Wacht pagina: %s';
-$lang['Picture uploaded by %s'] = 'Afbeelding ge-uploaded door %s';
-// --------- Starting below: New or revised $lang ---- from version 1.7.1
-$lang['guest_must_be_guest'] = 'Foutieve status voor gebruiker "guest", gebruik standaard status. Waarschuw de webmaster.';
-// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
-$lang['Administrator, webmaster and special user cannot use this method'] = 'Administrator, webmaster en speciale gebruiker kunnen deze methode niet gebruiken';
-$lang['reg_err_mail_address_dbl'] = 'Een andere gebruiker maakt al gebruik van dit email adres';
-$lang['Category results for'] = 'Categorie resultaten voor';
-$lang['Tag results for'] = 'Tag resultaten voor';
-$lang['from %s to %s'] = 'van %s tot %s';
-/* TODO */ $lang['start_play'] = 'Play of slideshow';
-/* TODO */ $lang['stop_play'] = 'Pause of slideshow';
-/* TODO */ $lang['start_repeat'] = 'Repeat the slideshow';
-/* TODO */ $lang['stop_repeat'] = 'Not repeat the slideshow';
-/* TODO */ $lang['inc_period'] = 'Reduce diaporama speed';
-/* TODO */ $lang['dec_period'] = 'Accelerate diaporama speed';
-$lang['Submit'] = 'Bevestig';
-$lang['Yes'] = 'Ja';
-$lang['No'] = 'Nee';
-$lang['%d element']='%d afbeelding';
-$lang['%d elements']='%d afbeeldingen';
-$lang['%d element are also linked to current tags'] = '%d image are also linked to current tags';
-$lang['%d elements are also linked to current tags'] = '%d images are also linked to current tags';
-$lang['See elements linked to this tag only'] = 'Toon afbeelding gelinkt met deze tag';
-$lang['elements posted during the last %d days'] = 'afbeelding binnen de %d dagen';
-$lang['Choose an image'] = 'Kies een afbeelding om';
-$lang['Piwigo Help'] = 'Piwigo Help';
-
-?>
diff --git a/BSF/language/nl_NL/help.html b/BSF/language/nl_NL/help.html
deleted file mode 100644
index 1c29510ed..000000000
--- a/BSF/language/nl_NL/help.html
+++ /dev/null
@@ -1,227 +0,0 @@
-<h2>Help</h2>
-
-<h3>Snelle start</h3>
-
-<ol>
-
- <li>Maak een lokale map "test_categorie".</li>
-
- <li>Kopieer de afbeeldingen maar "test_categorie".</li>
-
- <li>Open an FTP verbinding naar de gallerie.</li>
-
- <li>Upload lokale map "test_categorie" in de galleriemap de map heet
- "galleries". Stel de mapeigenschappen in op 777 on directory
- "galleries/test_categorie".</li>
-
- <li>Login op de Piwigo als een beheerder.</li>
-
- <li>Ga naar <span class="pwgScreen">Beheer, Afbeeldingen,
- Thumbnails</span>. Piwigo vind de afbeeldingen in de map "test_category"
- zonder thumbnails. Vraag om thumbnails te maken.</li>
-
- <li>Ga naar <span class="pwgScreen">Beheer, CategorieĂŤn,
- Synchronizeer</span>. vink aan "mappen + bestanden" optie, vink uit "alleen
- een simulatie uitvoeren" en bevestig de synchronizatie.</li>
-
- <li>Klus geklaard. Je hebt een categorie "test_categorie" in het begin van de gallerie gemaakt.</li>
-
-</ol>
-
-<h3>Toeveoegen elementen</h3>
-
-<ul>
-
- <li>
-
- <p>Categorie mappen zijn in de Piwigo map "galleries". Bekijk de mapstructuur van een kleine gallerie (maar met een hoop mogelijkheden) :</p>
-
- <pre>
-.
-|-- admin
-|-- doc
-|-- galleries
-| |-- categorie-1
-| | |-- categorie-1.1
-| | | |-- categorie-1.1.1
-| | | | |-- categorie-1.1.1.1
-| | | | | |-- pwg_high
-| | | | | | +-- wedding.jpg
-| | | | | |-- thumbnail
-| | | | | | +-- TN-wedding.jpg
-| | | | | +-- wedding.jpg
-| | | | +-- categorie-1.1.1.2
-| | | +-- categorie-1.1.2
-| | |-- categorie-1.2
-| | | |-- pookie.jpg
-| | | +-- thumbnail
-| | | +-- TN-pookie.jpg
-| | +-- categorie-1.3
-| +-- categorie-2
-| |-- piglet.gif
-| |-- pwg_representative
-| | +-- video.jpg
-| |-- thumbnail
-| | +-- TN-piglet.jpg
-| +-- video.avi
-|-- include
-|-- install
-|-- language
-|-- template
-+-- tool</pre>
-
- </li>
-
- <li>Eigenlijk, een categorie is gepresenteerd door een map op welke level in
- Piwigo map "galleries". Elke categorie kan zoveel submappen als jij wilt bevatten.
- In het voorbeeld hierboven, categorie-1.1.1.1 is op nivo 4 van de trap.</li>
-
- <li>Eigenlijk, een element is gepresenteerd door een bestand. Een bestand kan een
- Piwigo element zijn als de extenstie is <code>file_ext</code>
- configuration parameter mofenlijkheden (zie <span
- class="filename">include/config_default.inc.php</span> file). Een bestand kan
- een afbeelding zijn als de extensie gelijk is aan <code>picture_ext</code>
- configuration parameter possibilities.</li>
-
- <li>Afbeeldings elementen moeten een link naar een thumbnail hebben.(zie sectie hieronder
- over thumbnails)</li>
-
- <li>Afbeeldings elementen kunnen gekoppeld zijn aan hoge kwaliteit bestanden. Zoals
- in het voorbeeld wedding.jpg hierboven. Er is geen andere naamsaanpassing nodig voor de
- hoge kwaliteit afbeelding verplicht.
- </li>
-
- <li>Niet afbeeldings elementen (video, geluid, tekstbestanden, wat je wil...) worden
- standaard vertegenwoordigt door een ikoontje die overeenkomt met de bestandsextensie.
- Optioneel, je kan zelf een associatie met een thumbnail en een bestand opgeven (zie video.avi in het voorbeeld hierboven).</li>
-
- <li><em>Waarshuwing</em> : de naam van de mappen en bestanden moeten bestaan uit de letters en koppeltekens "-", "_" of ".". Geen spaties en geen accenten
- op de karakters</li>
-
- <li><em>Advies</em> : Een categorie kan elementen en sub-categorieĂŤn hebben
-op het zelfde moment. Desalnietemin, word je geadviseerd om te kiezen uit categorieĂŤn die elementen bevatten <strong>of</strong> categorieĂŤn
-die sub-categorieĂŤn bevatten.</li>
-
- <li>Als bestanden, thumbnails en representativev corrct zijn geplaatst in
- mappen ga dan naar: <span class="pwgScreen">Administratie, CategorieĂŤn,
- Synchronizeren</span></li>
-
-</ul>
-
-<h3>Thumbnails</h3>
-
-<ul>
-
- <li>Zoals eerde gemeld, elk element of afbeeldingstype moet geassociateerd worden met een thumbnail.</li>
-
- <li>Thumbnails worden opgeslagen in een sub-directory "thumbnail" of de categorie map. De thumbnail is een afbeelding (zelfde bestandsnaam extensies mogelijk
- als de afbeeldingbestanden) welke is prefixed met een geconfigureerde
- "Thumbnail prefix" (zie administratie paneel, Configuratie, Algemeen).</li>
-
- <li>Thumbnails hoeven niet de zelfde extensie te hebben als het geassocieerde
- afbeelding (een afbeelding met .jpg extensie kan een thumbnail hebben met .GIF
- extentie als voorbeeld).</li>
-
- <li>Advies: gebruik een ecterne module voor het maken van thumbnails.</li>
-
- <li>Je kunt ook de pagina thumbnail maken gebruiken (<span
- class="pwgScreen">Administratie, Afbeeldingen, Thumbnails</span>), maar dat word niet aangeraden.
- De thumbnail kwaliteit kan slecht zijn en het gebruikt een hoge CPU kracht welke een probleem kan zijn bij gratis webhost.</li>
-
- <li>Als je er voor kiest om de thumbnails te laten maken door de webhoster, dan dien je de rechten toe te wijzen op die mappen om de thumbnail te kunnen maken.
- De correcte rechten op de mappen en sub-mappen zijn gebruiker/goep/wereld (ook wel 777)
-</li>
-
-</ul>
-
-<h3>Toegangs authorizatie</h3>
-
-<ul>
-
- <li>U kunt toegang tot categorieĂŤn verbieden.
- De categorieĂŤn kunnen openbaar of private zijn. De toestemming (voor groepen en gebruikers)
- kunnen worden aangepast als de categorie private is.
-</li>
-
- <li>U kunt een categorie aan private maken door het aanpassen van een enkele categorie(<span
- class="pwgScreen">Administratie, CategorieĂŤn, Beheren, bewerken</span>) of bij het aanpassen van de opties op de hele categorie map (<span
- class="pwgScreen">Administratie, CategorieĂŤn, Eigenschappen, Publiek / Private</span>).</li>
-
- <li>
-
- <p>Als de categorie private is, dan kun je de rechten aanpassen voor de groepen en gebruikers via 3 schermen :</p>
-
- <ul>
-
- <li><span class="pwgScreen">Administratie, Identificatie, Gebruikers, rechten aanpassen (een link per gebruiker)</span></li>
-
- <li><span class="pwgScreen">Administratie, Identificatie, Groepen, rechten aanpassen (een link per groep)</span></li>
-
- <li><span class="pwgScreen">Administratie, CategorieĂŤn, Beheren, bewerk categorie rechten aanpassen (one link per categorie)</span></li>
-
- </ul>
-
- </li>
-
-</ul>
-
-<h3>Gebruikers en groepen</h3>
-
-<ul>
-
- <li>Piwigo heeft de mogelijkheid tot het beheren van gebruikers en groepen. Dit kan erg handig zijn als er gemeenschappelijk rechten zijn voor toegang tot private categorieĂŤn.</li>
-
- <li>Je kan groepen maken in <span class="pwgScreen">Administratie, Identificatie, Groepen</span> en voeg gebruikers toe aan de groep via <span class="pwgScreen">Administratie, Identicatie, Gebruikers</span>.</li>
-
- <li>Een gebruiker kan behoren tot verschillende groepen. De vergunning is sterker dan verbod : als gebruiker "jack" behoord tot de groep "familie" en "Vrienden", en alleen de groep "familie" kan de categorie "Christmas 2003" zien,
- "jack" zal de mogelijkheid hebben om de categorie "Christmas 2003" te zien.</li>
-
-</ul>
-
-<h3>Bestands upload door gebruikers</h3>
-
-<p>Piwigo geeft de mogelijkheid aan gebruikers om bestanden uploaden. Om het mogelijk te maken :</p>
-
-<ol>
-
- <li>authorizeer upload op een categorie (<span class="pwgScreen">Administratie, CategorieĂŤn, Beheren, bewerken</span> of <span class="pwgScreen">Administratie paneel, CategorieĂŤn, Eigenschappen, Upload</span>)</li>
-
- <li>geef rechten op de mappen 777 (gebruiker, groepen, wereld)</li>
-
-</ol>
-
-<p>Bestanden geupload door gebruikers zijn niet direct zichtbaar op de website, ze moeten gevalideerd worden door een beheerder.
- Voor dat doel moet de beheerder gaan naar <span class="pwgScreen">Administratie, Afbeeldingen, Wachten</span>
- om de bestanden te bevestigen of te weigeren, dan worden voorgesteld om te synchroniseren met de database.</p>
-
-
-<h3>Links tussen elementen en categorieĂŤn, virtuele categorieĂŤn</h3>
-
-<ul>
-
- <li>Piwigo scheidt categorieĂŤn waar de elementen en categorieĂŤn worden opgeslagen waar zij worden getoond.</li>
-
- <li>Standaard, de elementen worden getoond slechts in hun echte categorieĂŤn: de die aan mappen op de webserver beantwoorden.</li>
-
- <li>Om een element met een categorie te koppelen, moet u enkel de vereniging op de pagina van elementenuitgave maken (verbinding met dit scherm
- picture.php ingelogt zijn als beheerder) of op informatie van alle elementen van een categorie.</li>
-
- <li>Gebruik dit principe, is het mogelijk om virtuele categorieĂŤn tot stand te brengen: geen folder corespondeerd aan deze categorie.
- U kunt virtuele categorieĂŤn maken in <span class="pwgScreen">Administratie, CategorieĂŤ, Beheren</span>.</li>
-
-</ul>
-
-<h3>Diverse informatie</h3>
-
-<ul>
-
- <li>Als je je gallery-installatie hebt afgerond, verander dan het uiterlijk van de standaard weergave
- in <span class="pwgScreen">Administratie paneel, Configuratie,
- Standaard</span>. Elke nieuwe geregistreerde gebruiker zal dezelfde standaard vertoningseigenschappen hebben.</li>
-
- <li>Als je vragen hebt, twijfel niet en bezoek het forum om naar het antwoord te zoeken of stel zelf een vraag.
- Het <a href="http://forum.phpwebgallery.net">forum</a> (Berichtenbord) is beschikbaar op de website van
-Piwigo. Bekijk de <a href="http://phpwebgallery.net/doc/" target="blank">officiele Piwigo documentatie</a> voor meer informatie.</li>
-
-</ul>
-
diff --git a/BSF/language/nl_NL/help/advanced_feature.html b/BSF/language/nl_NL/help/advanced_feature.html
deleted file mode 100644
index 51673cb9f..000000000
--- a/BSF/language/nl_NL/help/advanced_feature.html
+++ /dev/null
@@ -1,16 +0,0 @@
-<h2>Geavanceerde mogelijkheden</h2>
-
-<p>Lijst met speciale functies voor een deskundig PWG administrator:</p>
-
-<ul>
-
- <li>
- <strong>Niet gelinkte elementen:</strong>
- Toon afbeeldingen die niet gekoppeld zijn aan enige virtuele categorie.
- </li>
- <li>
- <strong>Bestanden met dezelfde naam in meer dan ĂŠĂŠn physieke categorie:</strong>
- Toon afbeeldingen of bestanden met dezelfde naam in verschillende categorieĂŤn.
- </li>
-
-</ul>
diff --git a/BSF/language/nl_NL/help/cat_modify.html b/BSF/language/nl_NL/help/cat_modify.html
deleted file mode 100644
index 41a848ce1..000000000
--- a/BSF/language/nl_NL/help/cat_modify.html
+++ /dev/null
@@ -1,128 +0,0 @@
-<h2>Een categorie bewerken</h2>
-
-<h3>Informatie</h3>
-
-<ul>
-
- <li><strong>naam</strong>: hernoem de categorie (een virtuele hernoeming in het geval van een physieke categorie).</li>
-
- <li><strong>omschrijving</strong>: geef informatie over de inhoud die getoond word in de categorie,
- deze tekst word onder de thumbnail.</li>
-
-</ul>
-
-<h3>Verplaatsen</h3>
-
-<p>Als het een virtuele categorie is, dan kun je hem verplaatssen. Het verplaatsen van een categorie houd in dat je het ouderschap veranderd.</p>
-
-<h3>Opties</h3>
-
-<ul>
-
- <li><strong>Toegangs type</strong>: Rechten beheren. Als je een
- categorie private maakt, worden alle daaronderliggende (kinder)categorieĂŤn worden dan ook private.<br>
- Als je een categorie publiek maakt, worden alle ouder categorieĂŤn zullen dan ook publiek worden.</li>
-
- <li><strong>Sluiten</strong>: De categorie en zijn sub-categorieĂŤ zijn
- tijdelijk uitgeschakeld voor onderhoud.</li>
-
- <li><strong>Commentaar</strong>: Machtig gebruikers om commentaar te geven op de elementen in deze categorie.</li>
-
- <li><strong>Machtiging tot upload</strong>: Machtig gebruikers om bestanden te-uploaden. Deze optie is alleen beschikbaar als de categorie physiek is (niet
- virtueel).</li>
-
-</ul>
-
-<p>Je kan de opties ook beheren via "Eigenschappen" beheer schermen (scherm <span class="pwgScreen">Upload</span>, <span
-class="pwgScreen">Commentaar</span>, <span class="pwgScreen">Sluiten</span>,
-<span class="pwgScreen">Publiek/Private</span>, <span
-class="pwgScreen">Vertegewoordiging</span> beschikbaar via <span
-class="pwgScreen">Administratie, CategorieĂŤn, Eigenschappen</span>).</p>
-
-<h3>Sorteer volgorde</h3>
-
-<p>Kies als de standaard sortering word gebruikt.</p>
-
-<p>Indicatie dat de sortering wort toegepast op de sub-categorieĂŤn.</p>
-
-<p>Gebruik specifieke sorteren middels de kolommen in deze categorie.</p>
-<ul>
-<li><strong>Aanmaak datum</strong>: Aanmaak datum foto</li>
-<li><strong>Plaatings datum</strong>: Synchronizatie datum</li>
-<li><strong>Gemiddelde waardering(*)</strong>: Gemiddelde waardering kan gewijzigt worden door een bezoeker</li>
-<li><strong>Most visited (*)</strong>: The current visit change the most visited order</li>
-<li><strong>Bestandsnaam</strong>: Gekozen naam in het informatie veld</li>
-<li><strong>Id</strong>: Interne Id (recente categorieĂŤn hoger id dan vorige id's.</li>
-
-</ul>
-<p><strong>(*)</strong>Neem zorg en test het voor uw zelf aangezien het onvoorspelbare resultaten kan geven.</p>
-
-
-<h3>Vertegenwoordiging</h3>
-
-<p>De vertegenwoordiging van de categorie is een indexplaatje "thumbnail" welke getoond word
-om de categorie te tonen op de hoofdpagina (<span class="pwgScreen">category.php</span>) wanneer een
-categorie alleen sub-categorieieĂŤn bevat (alleen als root categorie).</p>
-
-<p>Er zijn 4 manieren om een indexplaatje te tonen als weergavevan een categoie :</p>
-
-<ul>
-
- <li><span class="pwgScreen">Picture page</span>: in het aktiemenu,
- met een van de knoppen is het mogelijk om een plaatje te kiezen als
- vertegenwoordiging van een categorie. Deze knop is alleen beschikbaar voor administrators.</li>
-
- <li><span class="pwgScreen">Verander informatie over een plaatje</span> via de administratie.
- Je kunt bij dit scherm komen via <span class="pwgScreen">picture.php</span> of
- <span class="pwgScreen">Batch management</span> in <em>unit mode</em>. Kijk voor meer info in de documentatie voor meer details.</li>
-
- <li><span class="pwgScreen">Administratie, CategorieĂŤn, Eigenschappen, Thumbnails</span>. Kijk voor meer info in de documentatie voor meer details.</li>
-
- <li><span class="pwgScreen">Bewerk een categorie</span> (dit scherm).</li>
-
-</ul>
-
-<p>De indexafbeelding is afhankelijk van de configuratie parameter <code>allow_random_representative</code> (zie <span
-class="filename">include/config_default.inc.php</span>).</p>
-
-<p>Standaard is <code>allow_random_representative</code> ingesteld op false (onwaar)
-elke categorie die tenminste 1 element bevat is vertegenwoordigd door een vastgestelde afbeelding.
-Eenmaal ingesteld (Bij het maken van de categorie), kan deze alleen veranderd worden door administrator
- die daar dan om verzoekt it. Als de indexafbeelding niet meer bestaat kun je er <strong>willekeurig</strong> een nieuwe aan toewijzen.</p>
-
-<p>Als de configuratie parameter <code>allow_random_representative</code> is
-ingesteld op true (waar), dan is eer geen vaste indexafbeelding. Gebruik gewoon <strong>Verwijder indexafbeelding</strong> knop.</p>
-
-<p>Als de categorie geen elementen bevat (maar alleen sub-categorieĂŤn) kan het
-vertegenwoordigt worden dankzij het scherm <span class="pwgScreen">verander informatie over een afbeelding</span>. De enigste optie
-op het huidige scherm is <strong>Verwijder vertegenwoordigingsafbeelding</strong> knop, na deze optie te hebben gebruikt is er geen
-afbeeldingsafbeeldings optie meer om te veranderen.</p>
-
-<h3>Link alle categorie elementen aan een nieuwe categorie</h3>
-
-<ul>
-
-<li><strong>Virtuele categorie naam</strong>: Nieuwe categorie naam aanmaaken,
-alle afbeeldingen van de huidige categorie zullen gekoppeld worden aan de nieuwecategorie.</li>
-
-<li><strong>Ouder categorie</strong>: Waar de nieuwe moet komen, laat dit leeg om deze in de root te maken.</li>
-
-</ul>
-
-<h3>Link alle categorie elementen aan bestaande categorieĂŤn</h3>
-
-<ul>
-
-<li><strong>CategorieĂŤn</strong>: Kies de doelcategorie.</li>
-
-</ul>
-
-<h3>Stuur een informatie email naar de groepsleden</h3>
-
-<ul>
-
-<li><strong>Groep</strong>: Geadresseerden groep</li>
-
-<li><strong>Email inhoud</strong>: Vrije tekst om mee te sturen.</li>
-
-</ul> \ No newline at end of file
diff --git a/BSF/language/nl_NL/help/cat_move.html b/BSF/language/nl_NL/help/cat_move.html
deleted file mode 100644
index 9ff2ca3c3..000000000
--- a/BSF/language/nl_NL/help/cat_move.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<h2>Verplaatsen virtuele categorieĂŤn</h2>
-
-<p>Allen virtuele categorieĂŤn kunnen een nieuwe ouder-categorie hebben.</p>
-
-<h3>Virtuele categorieĂŤn verplaatsen</h3>
-
-<p>Selecteer een virtuele categorie die je wilt verplaatsen.
-Als de lijst leeg is, wil dat zeggen dat je er geen gemaakt hebt.</p>
-
-<h3>Nieuwe ouder categorie</h3>
-
-<p>Selecteer de nieuwe ouder (virtueel of physiek).
-Als je het niet doet zullen de geselecteerde categorieĂŤn verplaatst worden
-naar het begin van de map (root). CategorieĂŤn kunnen niet verplaatst worden
-naar zichzelf of een kind van de categorie.</p> \ No newline at end of file
diff --git a/BSF/language/nl_NL/help/cat_options.html b/BSF/language/nl_NL/help/cat_options.html
deleted file mode 100644
index 5fcd1fa13..000000000
--- a/BSF/language/nl_NL/help/cat_options.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<h2>Categorie opties</h2>
-
-<p>Dit scherm geeft administrators de mogelijkheid om categorie opties te beheren voor meerde categorieĂŤn in ĂŠĂŠn keer.</p>
-
-<dl>
-
- <dt>Upload</dt>
- <dd>Maak categorieĂŤn benaderbaar voor bezoekers om er bestanden in te plaatsen. Alleen niet virtuele en externe categorieĂŤn worden getoond.</dd>
-
- <dt>Commentaar</dt>
- <dd>Geef gebruikers rechten om commentaar te plaatsen in de geselecteerde categorieĂŤn.
- Selecteer de categorie waarop commentaar gegeven kan worden.
- Op een afbeelding kan alleen commentaar gegeven worden als deze behoord tot een categorie waar dit is toegestaan.</dd>
-
- <dt>sluiten</dt>
- <dd>Geselecteerde categorieĂŤn zijn op dit moment gesloten voor onderhoud.
- Als je een categorie sluit, alle daaronder liggende categorieĂŤn zijn dan ook gesloten. Als je een categorie
- weer opent, alle ouder categorieĂŤn worden dan ook weer geopend.</dd>
-
- <dt>Publiek / private</dt>
- <dd>Beheer rechten voor de geselecteerde categorieĂŤn. Geselecteerde categorieĂŤn zijn private : je moet gebruikers/groepen rechten geven op deze categorieĂŤn.
- Als je een categorie private maakt, alle daaronderliggende categorieĂŤn worden dan ook private.
- Als je eeen categorie publiek maakt, alle ouder categorieĂŤn worden dan ook publiek</dd>
-
- <dt>Vertegenwoordiging</dt>
- <dd>Deze opties kunnen alleen beheerd worden als de configuratie parameter <code>allow_random_representative</code>
- is ingesteld op <em>true</em>.(zie <span class="filename">include/config_defaults.inc.php</span>)
- Elke categorie kan vertegenwoordigd worden door een willekeurige of afzonderlijke vertegenwoordiging (door een unieke afbeelding).</dd>
-
-</dl>
diff --git a/BSF/language/nl_NL/help/cat_perm.html b/BSF/language/nl_NL/help/cat_perm.html
deleted file mode 100644
index 08e5f9c43..000000000
--- a/BSF/language/nl_NL/help/cat_perm.html
+++ /dev/null
@@ -1,14 +0,0 @@
-<h2>Beheer rechten voor een categorie</h2>
-
-<p>Dit scherm is allen beschikbaar voor private categorĂŤn. Hier kun je gebruikers en groepn toegang geven voor deze categorie.</p>
-
-<h3>Groepen</h3>
-
-<p>Je kan groepen toegang geven of toegang weigeren op de huidige categorie. Door het aanpassen van de groepsrechten kun je dat
-<br>bereiken. Je zal de lijst met gebruikers die toegang hebben tot deze categorie moeten wijzigen
-op basis van groepsrechten.</p>
-
-<h3>Gebruikers</h3>
-
-<p>Je kan een individuele gebruiker toegang geven of weigeren.
-Gebruikers die behoren tot een groep kunnen ook toegang gegeven of geweigerd worden.</p>
diff --git a/BSF/language/nl_NL/help/configuration.html b/BSF/language/nl_NL/help/configuration.html
deleted file mode 100644
index b613d03a2..000000000
--- a/BSF/language/nl_NL/help/configuration.html
+++ /dev/null
@@ -1,105 +0,0 @@
-<h2>Configuratie</h2>
-
-<p>Dit scherm geeft de administrator de mogenlijkheid tot basisconfiguratie. Dit scherm toont namelijk slechts eenvoudige
-configuratieparameters die zouden moeten zijn genoeg voor de overgrote meerderheid van beheerders. Als je de andere mogelijkheden wilt zien
-(geavanceerde) over de configuratie parameters, lees dan <span cass="filename">include/config_default.inc.php</span>.</p>
-
-<p>Dit scherm wordt verdeeld in verscheidene secties, hergroeperend configuratieparameters per thema.</p>
-
-
-<h3>Begin</h3>
-<ul>
- <li><strong>Gallerie titel</strong>: word gebruikt in RSS meldingen en meldingen per email.</li>
-
- <li><strong>Pagina banner</strong>: word getoond op elke publieke pagina.</li>
-
- <li><strong>Gallerie URL</strong>: word gebruikt voor de RSS meldingen.</li>
-
- <li><strong>Sluit gallery</strong>: Sluit de hele gallerie voor onderhoud. Alleen administrators kunnen de gallerie nog bereiken.</li>
-
- <li><strong>Waardering</strong>: Waarderings optie is ingeschakeld.</li>
-
- <li><strong>Waardering door gasten</strong>: Niet geregisteerde gebruikers kunnen ook hun waardering geven aan afbeeldingen.</li>
-
- <li><strong>Sta registratie toe</strong>: Registratie is gratis voor iedereen.</li>
-
- <li><strong>Email adres is verplicht voor alle gebruikers</strong>: Email adres word gecontroleerd bij registratie of profiel update uitgezonderd als de actie word uitgevoerd op de administratie scherm.</li>
-
- <li><strong>Email admins wanneer een nieuwe gebruiker zich registreerd</strong>: Administrators ontvangen een mailtje bij elke registratie.</li>
-
-</ul>
-
-<h3>Geschiedenis</h3>
-<ul>
- <p>Bezoek op de pagina's <span class="pwgScreen">category.php</span> en <span class="pwgScreen">picture.php</span> worden opgeslagen in de <code>history</code> tabel.</p>
-
- <p>Bezoek word getoond in <span class="pwgScreen">Administratie, Speciaal, Geschiedenis</span>.</p>
-
- <li><strong>Bewaar pagina bezoek door gasten</strong>: pagina bezoek van gasten wordt opgeslagen.</li>
-
- <li><strong>Bewaar pagina bezoek door gebruikers</strong>: pagina bezoek van geregistreerde gebruikers wordt opgeslagen.</li>
-
- <li><strong>Bewaar pagina bezoek door administrators</strong>: pagina bezoek van administrators wordt opgeslagen.</li>
-
-</ul>
-
-<h3>Commentaar</h3>
-<ul>
-
- <li><strong>Commentaar door iedereen</strong>: Ook gasten kunnen commentaar plaatsen.</li>
-
- <li><strong>Aantal commentaren per per pagina</strong>.</li>
-
- <li><strong>Validatie</strong>: een administrator valideerd de door gebruikers geplaatste commentaren voordat deze zichtbaar wordt op de website.
- Valideren van gebruikers commentaar gebeurd via het scherm <span class="pwgScreen">Administratie, Afbeeldingen, Commentaar</span>.</li>
-
- <li><strong>Email admins when a valid comment is entered</strong>:
-Sends an email to the administrators when a user enters a comment and this comment is validated.</li>
-
- <li><strong>Email admins wanneer een commentaar validatie nodig heeft</strong>:
-Stuurt de administrator een bericht dat een gebruiker een p[merking heeft geplaatst die nog gevalideerd moet worden door de administrator.
-Gebruikers commentaar valideren gaat via het scherm <span class="pwgScreen">Administratie, Afbeeldingen, Commentaren</span>.</li>
-
-</ul>
-
-<!--TODO --><h3>Upload</h3>
-<ul>
-<!--TODO --> <li><strong>Show upload link every time</strong>: If exists uploadeable categories, add link will be show for each categoy.</li>
-<!--TODO --> <li><strong>User access level to upload</strong>: Allows to restrict upload by users</li>
- <li><strong>Email admins wanneer een afbeelding is ge-upload</strong>: Administrators ontvangen een mailtje voor elke ge-uploade bestand door gebruikers.</li>
-</ul>
-
-<h3>Standaard weergave</h3>
-
-<p>Hier kan je de weergave aan passen die als standaard worden ingesteld, die je gast ziet als hij zich niet heeft aangemeld. Eenmaal aangemeld worden deze
-opties overschreven door de gebruikers eigen opties (aanpasbaar in <span class="pwgScreen">profiel</span>).</p>
-
-<p>Het is mogelijk om de weergave opties voor alle gebruikers aan te passen, via scherm <span class="pwgScreen">Administratie, Identificatie, Gebruikers</span>, waar de opties voor de geslecteerde lijst van gebruikers word getoond.</p>
-
-<ul>
-
- <li><strong>Talen</strong>: betreft slechts Piwigo labels. De namen van de categorie, de bestandsnamen en alle beschrijvingen vallen hier buiten.</li>
-
- <li><strong>Aantal afbeeldingen per rij</strong></li>
-
- <li><strongAantal afbeeldingen per pagina</strong></li>
-
- <li><strong>aangezichts thema</strong></li>
-
- <li><strong>Recente periode</strong>: per dag. Periode waarin de foto aangeduid moet worden als nieuw. Moet meer dan 1 dag zijn.</li>
-
- <li><strong>Toon alle categorieĂŤn</strong>: Toon standaard alle categorieĂŤn in het menu? <em>Warning</em>: deze optie is een server belastende optie
-en toont mogelijk een erg groot menu als je categorie erg veel sub categorieĂŤn bevat.</li>
-
- <li><strong>Aantal commentaren tonen</strong>: Het aantal commentaren zichtbaar bij een afbeelding op de thumbnails pagina. Zware belasting.</li>
-
- <li><strong>Toon aantal hits</strong>: Toon het aantal keren dat een afbeelding bekeken is, onder de afbeelding op de thumbnails pagina.
- Allen mogelijk als de geavanceerde configuratie parameter is: <br /> $conf['show_nb_hits'] = true; <br />
- Opmerking: standaars is dit false.</li>
-
- <li><strong>Maximale breedte van de afbeeldingen</strong>: maximale toonbare breedte. Als de afbeeldingen groter zijn dan deze instelling, worden ze verkleind op het scherm. Als je deze optie gebruikt, denk er dan over na om de afbeelding aan te passen voor je ze plaatst op je gallery.</li>
-
- <li><strong>Maximale hoogte van de afbeeldingen</strong>: Zelfde als hierboven.</li>
-
-</ul>
-
diff --git a/BSF/language/nl_NL/help/group_list.html b/BSF/language/nl_NL/help/group_list.html
deleted file mode 100644
index 44a7e5c6d..000000000
--- a/BSF/language/nl_NL/help/group_list.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<h2>Groepen lijst</h2>
-
-<p>Hier kan je de gedefinieerde groepen beheren.</p>
-
-<h3>Voeg een groep toe</h3>
-
-<p>Een administrator kan groepen toevoegen.</p>
-
-<h3>Groeps lijst</h3>
-
-<p>De lijst staat voor elk element toe:</p>
-
-
-<ul>
- <li>naar de ledenlijst gaan</li>
- <li>naar rechten gaan</li>
- <li>een groep verwijderen (vereist een bevestiging)</li>
- <li>stel de staus in als "standaard" (vereist een bevestiging)</li>
-</ul>
-
-<h3>Standaard groepen</h3>
-<p>Standaard groepen zijn groepen waar nieuwe gebruikers automatisch lid van worden.</p> \ No newline at end of file
diff --git a/BSF/language/nl_NL/help/index.php b/BSF/language/nl_NL/help/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/language/nl_NL/help/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/language/nl_NL/help/maintenance.html b/BSF/language/nl_NL/help/maintenance.html
deleted file mode 100644
index f444ce9eb..000000000
--- a/BSF/language/nl_NL/help/maintenance.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<h2>Onderhoud</h2>
-
-<p>Om de pagina genereringstijd te optimaliseren, gebruikt Piwigo gecachde informatie. Voorbeeld,
-inplaats van in plaats van het tellen van het aantal beelden, bevat elke categorie bij paginaherladen,
-wordt deze informatie opgeslagen inde database. In theorie, zou deze informatie altijd correct zijn,
-maar soms kan een fout optreden en de cache informatie is dan foutief.</p>
-
-<p>Bepaalde informatie word door tijd nutteloos. Door de nutteloze informatie te verwijderen uit de database bespaar je ruimte.</p>
-
-<ul>
-
- <li><strong>Update categorie informatie:</strong> Voor elke categorie,
- informatie bijwerken of controleren zijn de volgende: lijst van hooft
- categorieĂŤn, aantal afbeeldingen, datum van de laatste afbeelding, positie onder
- broeder categorieĂŤn, positie onder alle categorieĂŤn. Deze aktie controleerd ook de koppeling met de indexafbeelding.</li>
-
- <li><strong>Update afbeeldings informatie:</strong> Voor elke afbeelding,
- informatie om te updaten zijn : volledige adres naar het bestand, gemiddelde waardering.
- <em>Waarschuwing</em>: raak niet in verwarring met de metadata informatie, welke gesynchroniseerd word via <span class="pwgScreen">Administratie,
- CategorieĂŤn, Synchronizeren</span> of doormiddel van wijzigen enkele afbeelding (via <span class="pwgScreen">Afbeelding</span> voorbeeld).</li>
-
- <li><strong>Repareren en optimalizeren database:</strong>
- Voor elke tabel, re-odrer, reparatie en optimalizatie worden voltooid.
- </li>
-</ul>
-
-<ul>
- <li><strong>Filter geschiedenis:</strong> Verwijder alle <code>geschiedenis</code>uit de tabel. Scherm <span class="pwgScreen">Administratie,
- Speciaal, Geschiedenis</span> toont geen informatie meer uit de verleden tijd. <em>Waarschuwing</em>: alle data wordt verwijderd en is niet meer te herstellen.</li>
-
- <li><strong>Filter samenvatting:</strong> Verwijder alle informatie over het bezoek aan de website. Deze samenvatting is samengesteld uit de geschiedenis informatie.</li>
-
- <li><strong>Filter sessies:</strong> Verwijder verlopen gebruikers sessies.</li>
-
- <li><strong>Filter nooit gebruikte meldingen</strong></li>
-
-</ul>
diff --git a/BSF/language/nl_NL/help/notification_by_mail.html b/BSF/language/nl_NL/help/notification_by_mail.html
deleted file mode 100644
index 6cdf1977c..000000000
--- a/BSF/language/nl_NL/help/notification_by_mail.html
+++ /dev/null
@@ -1,15 +0,0 @@
-<h2>Meldingen per email</h2>
-
-<p>Dit scherm geeft je de mogelijkheid om emailmeldingen te configureren en te beheren om je gebruikers op de hoogte te stellen van nieuws op je website.</p>
-
-<p>Dit scherm is verdeelt in 3 delen:</p>
-
-<h3>Parameters</h3>
-<p>Alleen beschikbaar voor webmasters, dit deel configureerd de meldingen per email.</p>
-
-<h3>Inschrijven</h3>
-<p>Alleen beschikbaar voor webmasters, dit deel beheerd de in/uitschrijvingen voor email meldingen.</p>
-
-<h3>Verzending</h3>
-<p>Alleen beschikbaar voor webmasters en administrators, dit deel staat het toe om email meldingen te verzenden.</p>
-
diff --git a/BSF/language/nl_NL/help/permalinks.html b/BSF/language/nl_NL/help/permalinks.html
deleted file mode 100644
index 1438cfaea..000000000
--- a/BSF/language/nl_NL/help/permalinks.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<h2>Permanente links</h2>
-
-<p>Permanente links worden gebruikt om de adressen naar de categorie mooier te maken. wanneer een categorie een bepaalde permanente link heeft, wordt categorienaam niet meer vereist in de link ernaar toe.</p>
-
-<p>Wanneer een permanente link wordt verwijderd heb je de mogelijkheid om de geschiedenis te bewaren omde externe links naar de gallery werkend te houden. In de tabel met de permanente link geschiedenis kun je zien wanneer een permanente link is verwijderd, alsmede de laatste keer dat hij is gebruikt en het aantal keer.<p>
-
-<p>Let op: De permanente link naar een categorie moet uniek zijn. In de geschiedenis kan ook maar ĂŠĂŠn keer dezelfde permanente link bestaan.</p>
diff --git a/BSF/language/nl_NL/help/search.html b/BSF/language/nl_NL/help/search.html
deleted file mode 100644
index 8b4d88667..000000000
--- a/BSF/language/nl_NL/help/search.html
+++ /dev/null
@@ -1,19 +0,0 @@
-<h2>Zoeken</h2>
-
-<p>Via deze pagina kun je afbeeldingen zoeken in de totale gallerie.</p>
-
-<dl>
-
- <dt>Zoeken naar woorden</dt>
- <dd>Zoek naar opgegeven woorden in alle eigenschappen die betrekking heeft op de afbeelding die in de gallerie word getoond. Gebruik * als vervanging voor gedeeltelijke overeenkomsten.</dd>
-
- <dt>Zoeken naar Auteur</dt>
- <dd>Gebruik * als vervanging voor gedeeltelijke overeenkomsten.</dd>
-
- <dt>Zoeken op datum</dt>
- <dd>Selecteer een datum en/of een eind datum voor je zoekopdracht. Laat de datum leeg als je zoekt op een datum voor vandaag. Het jaartal moet zijn in het formaat : 0000 (2004)</dd>
-
- <dt>Zoeken in CategorieĂŤn</dt>
- <dd>Selecteer de categorie of categorieĂŤn waarin je wil zoeken. Voor snelheid kunnen alle subcategorieĂŤn worden doorzocht door de ouder te selecteren, en dan kun je kiezen om de subcategorieĂŤn te doorzoeken doormiddel van het aanvinken van die optie.</dd>
-
-</dl>
diff --git a/BSF/language/nl_NL/help/site_manager.html b/BSF/language/nl_NL/help/site_manager.html
deleted file mode 100644
index ed3efd437..000000000
--- a/BSF/language/nl_NL/help/site_manager.html
+++ /dev/null
@@ -1,36 +0,0 @@
-<h2>Externe sites</h2>
-
-<p>Piwigo biedt de mogelijkheid om verscheidene servers te gebruiken om de afbeeldingen op te slaan die uw gallerie zullen samenstellen.
- Het kan nuttig zijn als uw gallerie beperkte ruimte is op de server, en dat u een grote hoeveelheid beelden aan hebt wordt getoond.<p>
-
-<ol>
-
- <li>bewerk bestand <span class="filename">beheer/create_listing_file.php</span>,
- door het veranderen van de parameters opties zoals <code>$conf['prefix_thumbnail']</code> of
- <code>$conf['use_exif']</code>.</li>
-
- <li>plaats het aangepaste bestand <span class="filename">beheer/create_listing_file.php</span>
- op de andere server, in dezelfde map als je huidige categorie mappen (als de map <span class="filename">galleries</span> op
- deze website) via ftp. Voorbeeld, je hebt toegang tot <span class="filename">http://example.com/galleries/create_listing_file.php</span>.</li>
-
- <li>ga naar <span class="pwgScreen">administratie paneel, CategorieĂŤn, Site manager</span>. maak een nieuwe site aan, voorbeeld <span class="filename">http://example.com/galleries</span>.</li>
-
- <li>een nieuwe externe site is geregistreerd. Je hebt nu 4 mogelijkheden :
-
- <ol>
-
- <li><strong>genereer een lijst</strong> : stuurd verzoek om een externe lijst te maken.</li>
-
- <li><strong>synchronizeer</strong> : leest de externe <span class="filename">listing.xml</span> bestand en synchronizeerd deze met de database informatie.</li>
-
- <li><strong>opschonen</strong> : verwijderd externe <span class="filename">listing.xml</span> bestandem.</li>
-
- <li><strong>verwijderen</strong> : verwijderd de site (en alle gerelateerde categorieĂŤn en elementen) in de database.</li>
-
- </ol>
- </li>
-</ol>
-
-<!-- <p>Je kan ook handmatig deze <span class="filename">listing.xml</span> genereren, door dit bestand te kopieĂŤren vanaf de externe server en te plaatsen in je huidige
-Piwigo root map en dan het beheersscherm te openen : Piwigo zal voorstellen om de gevonden listing.xml te gebruiken.</p>-->
-
diff --git a/BSF/language/nl_NL/help/synchronize.html b/BSF/language/nl_NL/help/synchronize.html
deleted file mode 100644
index 004b2d838..000000000
--- a/BSF/language/nl_NL/help/synchronize.html
+++ /dev/null
@@ -1,8 +0,0 @@
-<h2>Synchronizeren</h2>
-
-<p>Er zijn 2 synchronizaties mogelijk : mappen/bestanden en bestands metadata. mapppen/bestanden gaat over het synchronizeren van je mapstructuur met de categorie structuur in de database.
- metadata gaat over het bijwerken van de informatie zoals bestandsgrootte, dimenties in pixels en EXIF of IPTC informatie.</p>
-
-<p>De eerste synchronizatie moet zijn mappen/bestanden.</p>
-
-<p>Het synchronizatiren kan een lange tijd duren (afhankelijk van de server belasting en het aantal bestanden) daarom is het mogelijk om de categorieĂŤn ĂŠĂŠn voor ĂŠĂŠn te doen. (categorie voor categorie)</p>
diff --git a/BSF/language/nl_NL/help/thumbnail.html b/BSF/language/nl_NL/help/thumbnail.html
deleted file mode 100644
index 0bacf2c68..000000000
--- a/BSF/language/nl_NL/help/thumbnail.html
+++ /dev/null
@@ -1,25 +0,0 @@
-<h2>Thumbnails maken</h2>
-
-<p>Deze pagina geeft je de mogelijkheid om ontbrekende thumbnails aan te maken.</p>
-
-<dl>
-
- <dt>GD versie</dt>
-
- <dd>GD is een afbeeldings m,anipulatie software voor bebruik in PHP. Kies de versie van GD welke op deze server is geinstalleerd. Als je de verkeerde kiest, kun je foutberichten
-te zien krijgen, ga dan terug en kies de andere versie. Als geen enkele versie werkt, dan betekent dit dat de server geen GD ondersteund.</dd>
-
- <dt>Breedte en hoogte</dt>
-
- <dd>Maximale groote die een indexafbeelding (thumbnail) mag hebben, daarbij blijft de verhouding behouden.</dd>
-
- <dt>Aantal thumbnails aanmaken</dt>
-
- <dd>Probeer niet in ĂŠĂŠn keer teveel thumbnails te maken, dit vergt namelijk erg veel processorkracht. Als je phpgallery hebt geinstalleerd bij een gratis webhoster kan deze door de hoge
- processorkracht die je vraagt het besluit nemen om je website te verwijderen.</dd>
-
- <dt>Bestandsformaat</dt>
-
- <dd>Alleen het bestandsformaat JPEG wordt ondersteund om thumbnails te maken. Thumbnails kunnen alleen gemaakt worden van PNG en JPEG afbeeldingen.</dd>
-
-</dl>
diff --git a/BSF/language/nl_NL/help/user_list.html b/BSF/language/nl_NL/help/user_list.html
deleted file mode 100644
index 34f1bfd24..000000000
--- a/BSF/language/nl_NL/help/user_list.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<h2>Gebruikers lijst</h2>
-
-<p>Hier kun je geregistreerde gebruikers beheren. Rechten kun je aanpassen in een aantal andere schermen.</p>
-
-<h3>Gebruiker toevoegen</h3>
-
-<p>Administrators kunnen zelf handmatig een gebruiker toevoegen.</p>
-
-<h3>Bebruikerslijst</h3>
-
-<p>De lijst kan gefilterd worden op gebruikersnaam (gebruike * als wildcard), groepen of status. De lijst kan gesorteerd worden op registratiedatum of gebruikersnaam, van A tot Z
-of van Z tot A.</p>
-
-<p>Dit scherm werkt verschillende gebruikers bij met verschillende akties:</p>
-
-<ul>
-
- <li>verwijder gebruikers (vereist een bevestiging)</li>
-
- <li>veranderen status</li>
-
- <li>aan/af koppelen van groepen</li>
-
- <li>wijzig weergave eigenschappen</li>
-
- <li>wijzig extra eigenschappen</li>
-
-</ul>
-
-<p>Het doel is de geselecteerde groep gebruikers (standaard) of alle gebruikers. dit word gevraagd.</p>
-<h3>Adviseur</h3>
-<p>Definitie van adviseursgebruiker:</p>
-<ul>
- <li>verleen toegang op alle schermen die door deze status wordt toegestaan</li>
- <li>alleen lezen of simulatie toegang</li>
-</ul>
-
-<p>Het is mogelijk om de advies toe te staan via de variabel $conf['allow_adviser'].</p>
-<p>Als de variabele is 'true', dan is het moegelijk om een gebruiker aan te wijzen als adviseur</p>
diff --git a/BSF/language/nl_NL/help/web_service.html b/BSF/language/nl_NL/help/web_service.html
deleted file mode 100644
index 751244008..000000000
--- a/BSF/language/nl_NL/help/web_service.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<h2>Web Service Checker</h2>
-
-<p>Deze pagina laat geeft je de mogelijkheid om de parameters in te stellen.</p>
-
-<dl>
-
- <dt>Omgevings instellingen</dt>
-
- <dd>Als de service toegankelijk is (Advanced configuration => $conf['ws_access_control']) dan zie je de geavanceeerde mogelijkheden die tot de deze service behoren.</dd>
-
- <dt>Vertrouwelijke partnersleutel (Verplicht)</dt>
-
- <dd>Unieke sleutel om te delen met uw partner. Neem hiervoor een complexe sleutel (bijvoorbeeld 8 karakters)
- neem hiervoor verschillende letters, leestekens, getallen, of speciale karakters.
- VOORBEELD: "P!e2r!k Le G@2l".
-
- <strong>Verborgen voor iedereen op adviseursmodus.</strong>
-
- <dt>Doel (Optioneel)</dt>
-
- <dd>kan een afbeeldings ID lijst zijn:<ul><li>
- toon/277,275,142,235,178,190,204,236-238,253,268,276,285,41,73</li><li>
- of een categorie id lijst als : cat/16,32,21</li><li>
- of een tag id lijst als: tag/22,61,36 </li></ul>
- alle id lijst worden tot een minimum beperkt als:<ul><li>
- toon/41,73,142,178,190,204,<strong>235-238</strong>,253,268,<strong>275-277</strong>,285</li></ul>
- </dd>
-
- <dt>Beperk toegang (Optioneel)</dt>
-
- <dd>Als u uw partner tot een specifiek verzoek wilt beperken.</dd>
-
- <dt>Weergave afbeeldingen limiet </dt>
-
- <dd>Limiteer weergave afbeeldingen: weergeven limiteren voor elke opdracht.</dd>
-
- <dt>Duur</dt>
-
- <dd>Van nu, vastgestelde beschikbaarheid in dagen. Als u over de duur uitstelt, zou de dienst nooit beschikbaar zijn.</dd>
-
- <dt>Commentaar</dt>
-
- <dd>Laat zien wie er achter de website zit en wees duidelijk. Vergeet niet dat als iemand een admin of adviseur is op jou website, dat hij/zij deze informatie kan lezen.</dd>
-
-</dl>
diff --git a/BSF/language/nl_NL/index.php b/BSF/language/nl_NL/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/language/nl_NL/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/language/nl_NL/install.lang.php b/BSF/language/nl_NL/install.lang.php
deleted file mode 100644
index 6eb29d16d..000000000
--- a/BSF/language/nl_NL/install.lang.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-$lang['install_message'] = 'Bericht';
-$lang['Initial_config'] = 'Basis configuratie';
-$lang['Default_lang'] = 'Standaard gallery taal';
-$lang['step1_title'] = 'Database configuratie';
-$lang['step2_title'] = 'Admin configuratie';
-$lang['Start_Install'] = 'Start Installatie';
-$lang['reg_err_mail_address'] = 'E-mail adres moet lijken op xxx@yyy.eee (voorbeeld : jack@altern.org)';
-
-$lang['install_webmaster'] = 'Webmaster login';
-$lang['install_webmaster_info'] = 'Het word getoond aan de bezoekers. Het is ook noodzakelijk voor de administratie van de website';
-
-$lang['step1_confirmation'] = 'Parameters zijn correct';
-$lang['step1_err_db'] = 'De verbinding met de server is geslaagd, maar het is niet mogelijk om verbinding te krijgen met de database';
-$lang['step1_err_server'] = 'Geen verbinding met de server';
-$lang['step1_err_copy_2'] = 'Het is nu mogelijk om verder te gaan met de volgende stap van de installatie';
-$lang['step1_err_copy_next'] = 'volgende stap';
-$lang['step1_err_copy'] = 'Kopieer de tekst tussen de lijnen en plak deze in het bestand "include/mysql.inc.php"(Waarschuwing: mysql.inc.php mag alleen het blauwe gedeelte bevatten, geen return of extra spatie). Dit moet alleen wanneer dit bestand geen schrijfrechten';
-
-$lang['step1_host'] = 'MySQL host';
-$lang['step1_host_info'] = 'localhost, sql.multimania.com, toto.freesurf.fr';
-$lang['step1_user'] = 'Gebruiker';
-$lang['step1_user_info'] = 'De gebruikersnaam welke door uw provider is gegeven';
-$lang['step1_pass'] = 'Wachtwoord';
-$lang['step1_pass_info'] = 'De gebruikersnaam welke door uw provider is gegeven';
-$lang['step1_database'] = 'Database naam';
-$lang['step1_database_info'] = 'Ook deze is door uw provider gegeven';
-$lang['step1_prefix'] = 'Database tabel voorvoegsel';
-$lang['step1_prefix_info'] = 'Tabellen in de database worden voorzien van dit voorvoegsel (dit maakt een beter beheer van de database mogelijk) ook wel prefix genoemd';
-$lang['step2_err_login1'] = 'Geef een gebruikersnaam voor de beheerder';
-$lang['step2_err_login3'] = 'De gebruikersnaam mag geen \' of " bevatten';
-$lang['step2_err_pass'] = 'Vul a.u.b. nogmaals uw wachtwoord in';
-$lang['install_end_title'] = 'Installatie voltooid';
-$lang['step2_pwd'] = 'Webmaster wachtwoord';
-$lang['step2_pwd_info'] = 'Hou dit vertrouwlijk, dit geeft toegang tot de beheermodule';
-$lang['step2_pwd_conf'] = 'Wachtwoord [bevestigen]';
-$lang['step2_pwd_conf_info'] = 'verificatie';
-$lang['install_help'] = 'Hulp nodig ? stel een vraag op het <a href="%s" target="_blank">Piwigo forum</a>.';
-$lang['install_end_message'] = 'Het installeren van Piwigo is klaar, de volgende stap is<br /><br />het verwijderen van "install.php" dit is om de veiligheid te waarborgen<br />
-Vervolg de instructies nadat "install.php" is verwijderd:<ul><li>Ga naar de Indentificatie pagina: [ <a href="identification.php">Indentificatie</a> ] gebruik hiervoor het eerder opgegeven gebruikersnaam met wachtwoord</li>
-<li>Deze gebruikersnaam geeft u toegang tot de beheermenu zodat u afbeeldingen op uw website kan plaatsen</li></ul>';
-
-$lang['conf_mail_webmaster'] = 'Webmaster email adres';
-$lang['conf_mail_webmaster_info'] = 'Het is mogelijk dat bezoekers contact opnemen met de beheerder middels e-mail';
-?> \ No newline at end of file
diff --git a/BSF/language/nl_NL/iso.txt b/BSF/language/nl_NL/iso.txt
deleted file mode 100644
index a66da5d83..000000000
--- a/BSF/language/nl_NL/iso.txt
+++ /dev/null
@@ -1 +0,0 @@
-Dutch [NL] \ No newline at end of file
diff --git a/BSF/nbm.php b/BSF/nbm.php
deleted file mode 100644
index b183bcb20..000000000
--- a/BSF/nbm.php
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-
-//--------------------------------------------------------------------- include
-define('PHPWG_ROOT_PATH','./');
-include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
-check_status(ACCESS_FREE);
-include_once(PHPWG_ROOT_PATH.'include/functions_notification.inc.php');
-include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/functions_notification_by_mail.inc.php');
-// Translations are in admin file too
-load_language('admin.lang');
-// Need to update a second time
-trigger_action('loading_lang');
-load_language('local.lang');
-
-
-
-// +-----------------------------------------------------------------------+
-// | Main |
-// +-----------------------------------------------------------------------+
-$page['errors'] = array();
-$page['infos'] = array();
-
-if (isset($_GET['subscribe'])
- and preg_match('/^[A-Za-z0-9]{16}$/', $_GET['subscribe']))
-{
- subscribe_notification_by_mail(false, array($_GET['subscribe']));
-}
-else
-if (isset($_GET['unsubscribe'])
- and preg_match('/^[A-Za-z0-9]{16}$/', $_GET['unsubscribe']))
-{
- unsubscribe_notification_by_mail(false, array($_GET['unsubscribe']));
-}
-else
-{
- array_push($page['errors'], l10n('nbm_unknown_identifier'));
-}
-
-// +-----------------------------------------------------------------------+
-// | template initialization |
-// +-----------------------------------------------------------------------+
-$title = l10n('nbm_item_notification');
-$page['body_id'] = 'theNBMPage';
-include(PHPWG_ROOT_PATH.'include/page_header.php');
-
-$template->set_filenames(array('nbm'=>'nbm.tpl'));
-
-// +-----------------------------------------------------------------------+
-// | errors & infos |
-// +-----------------------------------------------------------------------+
-$template->assign(
- array(
- 'errors' => $page['errors'],
- 'infos' => $page['infos'],
- )
- );
-
-// +-----------------------------------------------------------------------+
-// | html code display |
-// +-----------------------------------------------------------------------+
-$template->parse('nbm');
-include(PHPWG_ROOT_PATH.'include/page_tail.php');
-?>
diff --git a/BSF/notification.php b/BSF/notification.php
deleted file mode 100644
index 6271fd004..000000000
--- a/BSF/notification.php
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// +-----------------------------------------------------------------------+
-// | initialization |
-// +-----------------------------------------------------------------------+
-
-define('PHPWG_ROOT_PATH','./');
-include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_GUEST);
-
-// +-----------------------------------------------------------------------+
-// | new feed creation |
-// +-----------------------------------------------------------------------+
-
-$page['feed'] = find_available_feed_id();
-
-$query = '
-INSERT INTO '.USER_FEED_TABLE.'
- (id, user_id, last_check)
- VALUES
- (\''.$page['feed'].'\', '.$user['id'].', NULL)
-;';
-pwg_query($query);
-
-
-$feed_url=PHPWG_ROOT_PATH.'feed.php';
-if (is_a_guest())
-{
- $feed_image_only_url=$feed_url;
- $feed_url .= '?feed='.$page['feed'];
-}
-else
-{
- $feed_url .= '?feed='.$page['feed'];
- $feed_image_only_url=$feed_url.'&amp;image_only';
-}
-
-// +-----------------------------------------------------------------------+
-// | template initialization |
-// +-----------------------------------------------------------------------+
-
-$title = l10n('Notification');
-$page['body_id'] = 'theNotificationPage';
-$page['meta_robots']=array('noindex'=>1, 'nofollow'=>1);
-
-$template->append('head_elements',
- '<link rel="alternate" type="application/rss+xml" href="'.$feed_url.'">'
- );
-
-$template->set_filenames(array('notification'=>'notification.tpl'));
-
-$template->assign(
- array(
- 'U_FEED' => $feed_url,
- 'U_FEED_IMAGE_ONLY' => $feed_image_only_url,
- )
- );
-
-// +-----------------------------------------------------------------------+
-// | html code display |
-// +-----------------------------------------------------------------------+
-include(PHPWG_ROOT_PATH.'include/page_header.php');
-$template->parse('notification');
-include(PHPWG_ROOT_PATH.'include/page_tail.php');
-
-?> \ No newline at end of file
diff --git a/BSF/password.php b/BSF/password.php
deleted file mode 100644
index 2161188b7..000000000
--- a/BSF/password.php
+++ /dev/null
@@ -1,165 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// +-----------------------------------------------------------------------+
-// | initialization |
-// +-----------------------------------------------------------------------+
-
-define('PHPWG_ROOT_PATH','./');
-include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
-include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_FREE);
-
-// +-----------------------------------------------------------------------+
-// | send a new password |
-// +-----------------------------------------------------------------------+
-
-$page['errors'] = array();
-$page['infos'] = array();
-
-if (isset($_POST['submit']))
-{
- $mailto =
- '<a href="mailto:'.get_webmaster_mail_address().'">'
- .l10n('Contact webmaster')
- .'</a>'
- ;
-
- if (isset($_POST['no_mail_address']) and $_POST['no_mail_address'] == 1)
- {
- array_push($page['infos'], l10n('Email address is missing'));
- array_push($page['infos'], $mailto);
- }
- else if (isset($_POST['mail_address']) and !empty($_POST['mail_address']))
- {
- $mail_address = mysql_escape_string($_POST['mail_address']);
-
- $query = '
-SELECT '.$conf['user_fields']['id'].' AS id
- , '.$conf['user_fields']['username'].' AS username
- , '.$conf['user_fields']['email'].' AS email
-FROM '.USERS_TABLE.' as u
- INNER JOIN '.USER_INFOS_TABLE.' AS ui
- ON u.'.$conf['user_fields']['id'].' = ui.user_id
-WHERE '
- .$conf['user_fields']['email'].' = \''.$mail_address.'\' AND
- (
- ui.status = \'normal\' OR
- (ui.status in (\'admin\', \'webmaster\') AND ui.adviser = \'true\')
- )
-;';
- $result = pwg_query($query);
-
- if (mysql_num_rows($result) > 0)
- {
- $error_on_mail = false;
- $datas = array();
-
- while ($row = mysql_fetch_array($result))
- {
- $new_password = generate_key(6);
-
- $infos =
- l10n('Username').': '.$row['username']
- ."\n".l10n('Password').': '.$new_password
- ;
-
- if (pwg_mail($row['email'],
- array('subject' => l10n('password updated'), 'content' => $infos)))
- {
- $data =
- array(
- $conf['user_fields']['id']
- => $row['id'],
-
- $conf['user_fields']['password']
- => $conf['pass_convert']($new_password)
- );
-
- array_push($datas, $data);
- }
- else
- {
- $error_on_mail = true;
- }
- }
-
- if ($error_on_mail)
- {
- array_push($page['errors'], l10n('Error sending email'));
- array_push($page['errors'], $mailto);
- }
- else
- {
- include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
- mass_updates(
- USERS_TABLE,
- array(
- 'primary' => array($conf['user_fields']['id']),
- 'update' => array($conf['user_fields']['password'])
- ),
- $datas
- );
-
- array_push($page['infos'], l10n('New password sent by email'));
- }
- }
- else
- {
- array_push($page['errors'], l10n('No user matches this email address'));
- array_push($page['errors'], l10n('Administrator, webmaster and special user cannot use this method'));
- array_push($page['errors'], $mailto);
- }
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | template initialization |
-// +-----------------------------------------------------------------------+
-
-$title = l10n('Forgot your password?');
-$page['body_id'] = 'thePasswordPage';
-
-$template->set_filenames(array('password'=>'password.tpl'));
-$template->assign( array(
- 'F_ACTION'=> get_root_url().'password.php'
- )
- );
-// +-----------------------------------------------------------------------+
-// | infos & errors display |
-// +-----------------------------------------------------------------------+
-$template->assign('errors', $page['errors']);
-$template->assign('infos', $page['infos']);
-
-// +-----------------------------------------------------------------------+
-// | html code display |
-// +-----------------------------------------------------------------------+
-include(PHPWG_ROOT_PATH.'include/page_header.php');
-$template->pparse('password');
-include(PHPWG_ROOT_PATH.'include/page_tail.php');
-
-?>
diff --git a/BSF/picture.php b/BSF/picture.php
deleted file mode 100644
index 8daacb353..000000000
--- a/BSF/picture.php
+++ /dev/null
@@ -1,877 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-define('PHPWG_ROOT_PATH','./');
-include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
-include(PHPWG_ROOT_PATH.'include/section_init.inc.php');
-include_once(PHPWG_ROOT_PATH.'include/functions_picture.inc.php');
-
-// Check Access and exit when user status is not ok
-check_status(ACCESS_GUEST);
-
-// access authorization check
-if (isset($page['category']))
-{
- check_restrictions($page['category']['id']);
-}
-
-$page['rank_of'] = array_flip($page['items']);
-
-// if this image_id doesn't correspond to this category, an error message is
-// displayed, and execution is stopped
-if ( !isset($page['rank_of'][$page['image_id']]) )
-{
- page_not_found(
- 'The requested image does not belong to this image set',
- duplicate_index_url()
- );
-}
-
-// add default event handler for rendering element content
-add_event_handler(
- 'render_element_content',
- 'default_picture_content',
- EVENT_HANDLER_PRIORITY_NEUTRAL,
- 2
- );
-// add default event handler for rendering element description
-add_event_handler('render_element_description', 'nl2br');
-
-trigger_action('loc_begin_picture');
-
-// this is the default handler that generates the display for the element
-function default_picture_content($content, $element_info)
-{
- if ( !empty($content) )
- {// someone hooked us - so we skip;
- return $content;
- }
- if (!isset($element_info['image_url']))
- { // nothing to do
- return $content;
- }
-
- global $user, $page, $template;
-
- $template->set_filenames(
- array('default_content'=>'picture_content.tpl')
- );
-
- if ( !$page['slideshow'] and isset($element_info['high_url']) )
- {
- $uuid = uniqid(rand());
- $template->assign(
- 'high',
- array(
- 'U_HIGH' => $element_info['high_url'],
- 'UUID' => $uuid,
- )
- );
- }
- $template->assign( array(
- 'SRC_IMG' => $element_info['image_url'],
- 'ALT_IMG' => $element_info['file'],
- 'WIDTH_IMG' => @$element_info['scaled_width'],
- 'HEIGHT_IMG' => @$element_info['scaled_height'],
- )
- );
- return $template->parse( 'default_content', true);
-}
-
-// +-----------------------------------------------------------------------+
-// | initialization |
-// +-----------------------------------------------------------------------+
-
-// caching first_rank, last_rank, current_rank in the displayed
-// section. This should also help in readability.
-$page['first_rank'] = 0;
-$page['last_rank'] = count($page['items']) - 1;
-$page['current_rank'] = $page['rank_of'][ $page['image_id'] ];
-
-// caching current item : readability purpose
-$page['current_item'] = $page['image_id'];
-
-if ($page['current_rank'] != $page['first_rank'])
-{
- // caching first & previous item : readability purpose
- $page['previous_item'] = $page['items'][ $page['current_rank'] - 1 ];
- $page['first_item'] = $page['items'][ $page['first_rank'] ];
-}
-
-if ($page['current_rank'] != $page['last_rank'])
-{
- // caching next & last item : readability purpose
- $page['next_item'] = $page['items'][ $page['current_rank'] + 1 ];
- $page['last_item'] = $page['items'][ $page['last_rank'] ];
-}
-
-$url_up = duplicate_index_url(
- array(
- 'start' =>
- floor($page['current_rank'] / $user['nb_image_page'])
- * $user['nb_image_page']
- ),
- array(
- 'start',
- )
- );
-
-$url_self = duplicate_picture_url();
-
-// +-----------------------------------------------------------------------+
-// | actions |
-// +-----------------------------------------------------------------------+
-
-/**
- * Actions are favorite adding, user comment deletion, setting the picture
- * as representative of the current category...
- *
- * Actions finish by a redirection
- */
-
-if (isset($_GET['action']))
-{
- switch ($_GET['action'])
- {
- case 'add_to_favorites' :
- {
- $query = '
-INSERT INTO '.FAVORITES_TABLE.'
- (image_id,user_id)
- VALUES
- ('.$page['image_id'].','.$user['id'].')
-;';
- pwg_query($query);
-
- redirect($url_self);
-
- break;
- }
- case 'remove_from_favorites' :
- {
- $query = '
-DELETE FROM '.FAVORITES_TABLE.'
- WHERE user_id = '.$user['id'].'
- AND image_id = '.$page['image_id'].'
-;';
- pwg_query($query);
-
- if ('favorites' == $page['section'])
- {
- redirect($url_up);
- }
- else
- {
- redirect($url_self);
- }
-
- break;
- }
- case 'set_as_representative' :
- {
- if (is_admin() and !is_adviser() and isset($page['category']))
- {
- $query = '
-UPDATE '.CATEGORIES_TABLE.'
- SET representative_picture_id = '.$page['image_id'].'
- WHERE id = '.$page['category']['id'].'
-;';
- pwg_query($query);
- }
-
- redirect($url_self);
-
- break;
- }
- case 'toggle_metadata' :
- {
- break;
- }
- case 'add_to_caddie' :
- {
- fill_caddie(array($page['image_id']));
- redirect($url_self);
- break;
- }
- case 'rate' :
- {
- include_once(PHPWG_ROOT_PATH.'include/functions_rate.inc.php');
- rate_picture(
- $page['image_id'],
- isset($_POST['rate']) ? $_POST['rate'] : $_GET['rate']
- );
- redirect($url_self);
- }
- case 'delete_comment' :
- {
- if (isset($_GET['comment_to_delete'])
- and is_numeric($_GET['comment_to_delete'])
- and is_admin() and !is_adviser() )
- {
- $query = '
-DELETE FROM '.COMMENTS_TABLE.'
- WHERE id = '.$_GET['comment_to_delete'].'
-;';
- pwg_query( $query );
- }
-
- redirect($url_self);
- }
- }
-}
-
-// incrementation of the number of hits, we do this only if no action
-if (trigger_event('allow_increment_element_hit_count', !isset($_POST['content']) ) )
-{
- $query = '
-UPDATE
- '.IMAGES_TABLE.'
- SET hit = hit+1
- WHERE id = '.$page['image_id'].'
-;';
- pwg_query($query);
-}
-//---------------------------------------------------------- related categories
-$query = '
-SELECT category_id,uppercats,commentable,global_rank
- FROM '.IMAGE_CATEGORY_TABLE.'
- INNER JOIN '.CATEGORIES_TABLE.' ON category_id = id
- WHERE image_id = '.$page['image_id'].'
-'.get_sql_condition_FandF
- (
- array
- (
- 'forbidden_categories' => 'category_id',
- 'visible_categories' => 'category_id'
- ),
- 'AND'
- ).'
-;';
-$result = pwg_query($query);
-$related_categories = array();
-while ($row = mysql_fetch_array($result))
-{
- array_push($related_categories, $row);
-}
-usort($related_categories, 'global_rank_compare');
-//-------------------------first, prev, current, next & last picture management
-$picture = array();
-
-$ids = array($page['image_id']);
-if (isset($page['previous_item']))
-{
- array_push($ids, $page['previous_item']);
- array_push($ids, $page['first_item']);
-}
-if (isset($page['next_item']))
-{
- array_push($ids, $page['next_item']);
- array_push($ids, $page['last_item']);
-}
-
-$query = '
-SELECT *
- FROM '.IMAGES_TABLE.'
- WHERE id IN ('.implode(',', $ids).')
-;';
-
-$result = pwg_query($query);
-
-while ($row = mysql_fetch_assoc($result))
-{
- if (isset($page['previous_item']) and $row['id'] == $page['previous_item'])
- {
- $i = 'previous';
- }
- else if (isset($page['next_item']) and $row['id'] == $page['next_item'])
- {
- $i = 'next';
- }
- else if (isset($page['first_item']) and $row['id'] == $page['first_item'])
- {
- $i = 'first';
- }
- else if (isset($page['last_item']) and $row['id'] == $page['last_item'])
- {
- $i = 'last';
- }
- else
- {
- $i = 'current';
- }
-
- $picture[$i] = $row;
-
- $picture[$i]['is_picture'] = false;
- if (in_array(get_extension($row['file']), $conf['picture_ext']))
- {
- $picture[$i]['is_picture'] = true;
- }
-
- // ------ build element_path and element_url
- $picture[$i]['element_path'] = get_element_path($picture[$i]);
- $picture[$i]['element_url'] = get_element_url($picture[$i]);
-
- // ------ build image_path and image_url
- if ($i=='current' or $i=='next')
- {
- $picture[$i]['image_path'] = get_image_path( $picture[$i] );
- $picture[$i]['image_url'] = get_image_url( $picture[$i] );
- }
-
- if ($i=='current')
- {
- if ( $picture[$i]['is_picture'] )
- {
- if ( $user['enabled_high']=='true' )
- {
- $hi_url=get_high_url($picture[$i]);
- if ( !empty($hi_url) )
- {
- $picture[$i]['high_url'] = $hi_url;
- $picture[$i]['download_url'] = get_download_url('h',$picture[$i]);
- }
- }
- }
- else
- { // not a pic - need download link
- $picture[$i]['download_url'] = get_download_url('e',$picture[$i]);
- }
- }
-
- $picture[$i]['thumbnail'] = get_thumbnail_url($row);
-
- if ( !empty( $row['name'] ) )
- {
- $picture[$i]['name'] = $row['name'];
- }
- else
- {
- $file_wo_ext = get_filename_wo_extension($row['file']);
- $picture[$i]['name'] = str_replace('_', ' ', $file_wo_ext);
- }
-
- $picture[$i]['url'] = duplicate_picture_url(
- array(
- 'image_id' => $row['id'],
- 'image_file' => $row['file'],
- ),
- array(
- 'start',
- )
- );
-
- if ('previous'==$i and $page['previous_item']==$page['first_item'])
- {
- $picture['first'] = $picture[$i];
- }
- if ('next'==$i and $page['next_item']==$page['last_item'])
- {
- $picture['last'] = $picture[$i];
- }
-}
-
-// calculation of width and height for the current picture
-if (empty($picture['current']['width']))
-{
- $taille_image = @getimagesize($picture['current']['image_path']);
- if ($taille_image!==false)
- {
- $picture['current']['width'] = $taille_image[0];
- $picture['current']['height']= $taille_image[1];
- }
-}
-
-if (!empty($picture['current']['width']))
-{
- list(
- $picture['current']['scaled_width'],
- $picture['current']['scaled_height']
- ) = get_picture_size(
- $picture['current']['width'],
- $picture['current']['height'],
- @$user['maxwidth'],
- @$user['maxheight']
- );
-}
-
-$url_admin =
- get_root_url().'admin.php?page=picture_modify'
- .'&amp;cat_id='.(isset($page['category']) ? $page['category']['id'] : '')
- .'&amp;image_id='.$page['image_id']
-;
-
-$slideshow_params = array();
-$slideshow_url_params = array();
-
-if (isset($_GET['slideshow']))
-{
- $page['slideshow'] = true;
- $page['meta_robots'] = array('noindex'=>1, 'nofollow'=>1);
-
- $slideshow_params = decode_slideshow_params($_GET['slideshow']);
- $slideshow_url_params['slideshow'] = encode_slideshow_params($slideshow_params);
-
- if ($slideshow_params['play'])
- {
- $id_pict_redirect = '';
- if (isset($page['next_item']))
- {
- $id_pict_redirect = 'next';
- }
- else
- {
- if ($slideshow_params['repeat'] and isset($page['first_item']))
- {
- $id_pict_redirect = 'first';
- }
- }
-
- if (!empty($id_pict_redirect))
- {
- // $redirect_msg, $refresh, $url_link and $title are required for creating
- // an automated refresh page in header.tpl
- $refresh = $slideshow_params['period'];
- $url_link = add_url_params(
- $picture[$id_pict_redirect]['url'],
- $slideshow_url_params
- );
- $redirect_msg = nl2br(l10n('redirect_msg'));
- }
- }
-}
-else
-{
- $page['slideshow'] = false;
-}
-
-$template->set_filenames(
- array(
- 'picture' =>
- (($page['slideshow'] and $conf['light_slideshow']) ? 'slideshow.tpl' : 'picture.tpl'),
- ));
-
-
-$title = $picture['current']['name'];
-$title_nb = ($page['current_rank'] + 1).'/'.count($page['items']);
-
-// metadata
-$url_metadata = duplicate_picture_url();
-
-// do we have a plugin that can show metadata for something else than images?
-$metadata_showable = trigger_event(
- 'get_element_metadata_available',
- (
- ($conf['show_exif'] or $conf['show_iptc'])
- and isset($picture['current']['image_path'])
- ),
- $picture['current']['path']
- );
-
-if ($metadata_showable)
-{
- if ( !isset($_GET['metadata']) )
- {
- $url_metadata = add_url_params( $url_metadata, array('metadata'=>null) );
- }
- else
- {
- $page['meta_robots']=array('noindex'=>1, 'nofollow'=>1);
- }
-}
-
-$page['body_id'] = 'thePicturePage';
-
-// allow plugins to change what we computed before passing data to template
-$picture = trigger_event('picture_pictures_data', $picture);
-
-
-if (isset($picture['next']['image_url'])
- and $picture['next']['is_picture'] )
-{
- $template->assign('U_PREFETCH', $picture['next']['image_url'] );
-}
-
-//------------------------------------------------------- navigation management
-foreach (array('first','previous','next','last', 'current') as $which_image)
-{
- if (isset($picture[$which_image]))
- {
- $template->assign(
- $which_image,
- array(
- 'TITLE' => $picture[$which_image]['name'],
- 'THUMB_SRC' => $picture[$which_image]['thumbnail'],
- // Params slideshow was transmit to navigation buttons
- 'U_IMG' =>
- add_url_params(
- $picture[$which_image]['url'], $slideshow_url_params),
- 'U_DOWNLOAD' => @$picture['current']['download_url'],
- )
- );
- }
-}
-
-
-if ($page['slideshow'])
-{
- // Add local-slideshow.css file if exists
- // Not only for ligth
- $css = PHPWG_ROOT_PATH . get_themeconf('template_dir') . '/theme/'
- . get_themeconf('theme') . '/local-slideshow.css';
- if (file_exists($css))
- {
- //TODO CORRECT THIS $template->assign_block_vars('slideshow', array());
- }
-
- $tpl_slideshow = array();
-
- //slideshow end
- $template->assign(
- array(
- 'U_SLIDESHOW_STOP' => $picture['current']['url'],
- )
- );
-
- foreach (array('repeat', 'play') as $p)
- {
- $var_name =
- 'U_'
- .($slideshow_params[$p] ? 'STOP_' : 'START_')
- .strtoupper($p);
-
- $tpl_slideshow[$var_name] =
- add_url_params(
- $picture['current']['url'],
- array('slideshow' =>
- encode_slideshow_params(
- array_merge($slideshow_params,
- array($p => ! $slideshow_params[$p]))
- )
- )
- );
- }
-
- foreach (array('dec', 'inc') as $op)
- {
- $new_period = $slideshow_params['period'] + ((($op == 'dec') ? -1 : 1) * $conf['slideshow_period_step']);
- $new_slideshow_params =
- correct_slideshow_params(
- array_merge($slideshow_params,
- array('period' => $new_period)));
-
- if ($new_slideshow_params['period'] === $new_period)
- {
- $var_name = 'U_'.strtoupper($op).'_PERIOD';
- $tpl_slideshow[$var_name] =
- add_url_params(
- $picture['current']['url'],
- array('slideshow' => encode_slideshow_params($new_slideshow_params)
- )
- );
- }
- }
- $template->assign('slideshow', $tpl_slideshow );
-}
-else
-{
- $template->assign(
- array(
- 'U_SLIDESHOW_START' =>
- add_url_params(
- $picture['current']['url'],
- array( 'slideshow'=>''))
- )
- );
-}
-
-$template->assign(
- array(
- 'SECTION_TITLE' => $page['title'],
- 'PHOTO' => $title_nb,
- 'SHOW_PICTURE_NAME_ON_TITLE' => $conf['show_picture_name_on_title'],
-
- 'LEVEL_SEPARATOR' => $conf['level_separator'],
-
- 'FILE_PICTURE_NAV_BUTTONS' => 'picture_nav_buttons.tpl',
-
- 'U_HOME' => make_index_url(),
- 'U_UP' => $url_up,
- 'U_METADATA' => $url_metadata,
- )
- );
-
-
-//------------------------------------------------------- upper menu management
-
-// admin links
-if (is_admin())
-{
- if (isset($page['category']))
- {
- $template->assign(
- array(
- 'U_SET_AS_REPRESENTATIVE' => add_url_params($url_self,
- array('action'=>'set_as_representative')
- )
- )
- );
- }
-
- $template->assign(
- array(
- 'U_CADDIE' => add_url_params($url_self,
- array('action'=>'add_to_caddie')
- ),
- 'U_ADMIN' => $url_admin,
- )
- );
-}
-
-// favorite manipulation
-if (!is_a_guest())
-{
- // verify if the picture is already in the favorite of the user
- $query = '
-SELECT COUNT(*) AS nb_fav
- FROM '.FAVORITES_TABLE.'
- WHERE image_id = '.$page['image_id'].'
- AND user_id = '.$user['id'].'
-;';
- $result = pwg_query($query);
- $row = mysql_fetch_array($result);
-
- if ($row['nb_fav'] == 0)
- {
- $template->assign(
- 'favorite',
- array(
- 'FAVORITE_IMG' =>
- get_root_url().get_themeconf('icon_dir').'/favorite.png',
- 'FAVORITE_HINT' => l10n('add_favorites_hint'),
- 'U_FAVORITE' => add_url_params(
- $url_self,
- array('action'=>'add_to_favorites')
- ),
- )
- );
- }
- else
- {
- $template->assign(
- 'favorite',
- array(
- 'FAVORITE_IMG' =>
- get_root_url().get_themeconf('icon_dir').'/del_favorite.png',
- 'FAVORITE_HINT' => l10n('del_favorites_hint'),
- 'U_FAVORITE' => add_url_params(
- $url_self,
- array('action'=>'remove_from_favorites')
- ),
- )
- );
- }
-}
-
-//--------------------------------------------------------- picture information
-$header_infos = array(); //for html header use
-// legend
-if (isset($picture['current']['comment'])
- and !empty($picture['current']['comment']))
-{
- $template->assign(
- 'COMMENT_IMG',
- trigger_event('render_element_description',
- $picture['current']['comment'])
- );
- $header_infos['COMMENT'] = strip_tags($picture['current']['comment']);
-}
-
-$infos = array();
-
-// author
-if (!empty($picture['current']['author']))
-{
- $infos['INFO_AUTHOR'] =
-// FIXME because of search engine partial rewrite, giving the author
-// name threw GET is not supported anymore. This feature should come
-// back later, with a better design
-// '<a href="'.
-// PHPWG_ROOT_PATH.'category.php?cat=search'.
-// '&amp;search=author:'.$picture['current']['author']
-// .'">'.$picture['current']['author'].'</a>';
- $picture['current']['author'];
- $header_infos['INFO_AUTHOR'] = $picture['current']['author'];
-}
-
-// creation date
-if (!empty($picture['current']['date_creation']))
-{
- $val = format_date($picture['current']['date_creation']);
- $url = make_index_url(
- array(
- 'chronology_field'=>'created',
- 'chronology_style'=>'monthly',
- 'chronology_view'=>'list',
- 'chronology_date' => explode('-', $picture['current']['date_creation'])
- )
- );
- $infos['INFO_CREATION_DATE'] =
- '<a href="'.$url.'" rel="nofollow">'.$val.'</a>';
-}
-
-// date of availability
-$val = format_date($picture['current']['date_available'], 'mysql_datetime');
-$url = make_index_url(
- array(
- 'chronology_field'=>'posted',
- 'chronology_style'=>'monthly',
- 'chronology_view'=>'list',
- 'chronology_date' => explode(
- '-',
- substr($picture['current']['date_available'], 0, 10)
- )
- )
- );
-$infos['INFO_POSTED_DATE'] = '<a href="'.$url.'" rel="nofollow">'.$val.'</a>';
-
-// size in pixels
-if ($picture['current']['is_picture'] and isset($picture['current']['width']) )
-{
- if ($picture['current']['scaled_width'] !== $picture['current']['width'] )
- {
- $infos['INFO_DIMENSIONS'] =
- '<a href="'.$picture['current']['image_url'].'" title="'.
- l10n('Original dimensions').'">'.
- $picture['current']['width'].'*'.$picture['current']['height'].'</a>';
- }
- else
- {
- $infos['INFO_DIMENSIONS'] =
- $picture['current']['width'].'*'.$picture['current']['height'];
- }
-}
-
-// filesize
-if (!empty($picture['current']['filesize']))
-{
- $infos['INFO_FILESIZE'] =
- sprintf(l10n('%d Kb'), $picture['current']['filesize']);
-}
-
-// number of visits
-$infos['INFO_VISITS'] = $picture['current']['hit'];
-
-// file
-$infos['INFO_FILE'] = $picture['current']['file'];
-
-$template->assign($infos);
-
-// related tags
-$tags = get_common_tags( array($page['image_id']), -1);
-if ( count($tags) )
-{
- foreach ($tags as $tag)
- {
- $template->append(
- 'related_tags',
- array(
- 'ID' => $tag['id'],
- 'NAME' => $tag['name'],
- 'U_TAG' => make_index_url(
- array(
- 'tags' => array($tag)
- )
- ),
- 'U_TAG_IMAGE' => duplicate_picture_url(
- array(
- 'section' => 'tags',
- 'tags' => array($tag)
- )
- )
- )
- );
- }
-}
-
-// related categories
-if ( count($related_categories)==1 and
- isset($page['category']) and
- $related_categories[0]['category_id']==$page['category']['id'] )
-{ // no need to go to db, we have all the info
- $template->append(
- 'related_categories',
- get_cat_display_name( $page['category']['upper_names'] )
- );
-}
-else
-{ // use only 1 sql query to get names for all related categories
- $ids = array();
- foreach ($related_categories as $category)
- {// add all uppercats to $ids
- $ids = array_merge($ids, explode(',', $category['uppercats']) );
- }
- $ids = array_unique($ids);
- $query = '
-SELECT id, name, permalink
- FROM '.CATEGORIES_TABLE.'
- WHERE id IN ('.implode(',',$ids).')';
- $cat_map = hash_from_query($query, 'id');
- foreach ($related_categories as $category)
- {
- $cats = array();
- foreach ( explode(',', $category['uppercats']) as $id )
- {
- $cats[] = $cat_map[$id];
- }
- $template->append('related_categories', get_cat_display_name($cats) );
- }
-}
-
-// maybe someone wants a special display (call it before page_header so that
-// they can add stylesheets)
-$element_content = trigger_event(
- 'render_element_content',
- '',
- $picture['current']
- );
-$template->assign( 'ELEMENT_CONTENT', $element_content );
-
-// +-----------------------------------------------------------------------+
-// | sub pages |
-// +-----------------------------------------------------------------------+
-
-include(PHPWG_ROOT_PATH.'include/picture_rate.inc.php');
-include(PHPWG_ROOT_PATH.'include/picture_comment.inc.php');
-if ($metadata_showable and isset($_GET['metadata']))
-{
- include(PHPWG_ROOT_PATH.'include/picture_metadata.inc.php');
-}
-
-include(PHPWG_ROOT_PATH.'include/page_header.php');
-trigger_action('loc_end_picture');
-$template->pparse('picture');
-//------------------------------------------------------------ log informations
-pwg_log($picture['current']['id'], 'picture');
-include(PHPWG_ROOT_PATH.'include/page_tail.php');
-?>
diff --git a/BSF/plugins/LocalFilesEditor/admin.php b/BSF/plugins/LocalFilesEditor/admin.php
deleted file mode 100644
index 209855904..000000000
--- a/BSF/plugins/LocalFilesEditor/admin.php
+++ /dev/null
@@ -1,304 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-include_once(PHPWG_ROOT_PATH.'admin/include/tabsheet.class.php');
-include_once(LOCALEDIT_PATH.'functions.inc.php');
-load_language('plugin.lang', LOCALEDIT_PATH);
-$my_base_url = get_admin_plugin_menu_link(__FILE__);
-
-// +-----------------------------------------------------------------------+
-// | Tabssheet
-// +-----------------------------------------------------------------------+
-if (!isset($_GET['tab']))
- $page['tab'] = 'localconf';
-else
- $page['tab'] = $_GET['tab'];
-
-$tabsheet = new tabsheet();
-$tabsheet->add('localconf',
- l10n('locfiledit_onglet_localconf'),
- $my_base_url.'&amp;tab=localconf');
-$tabsheet->add('css',
- l10n('locfiledit_onglet_css'),
- $my_base_url.'&amp;tab=css');
-$tabsheet->add('tpl',
- l10n('locfiledit_onglet_tpl'),
- $my_base_url.'&amp;tab=tpl');
-$tabsheet->add('lang',
- l10n('locfiledit_onglet_lang'),
- $my_base_url.'&amp;tab=lang');
-$tabsheet->add('plug',
- l10n('locfiledit_onglet_plug'),
- $my_base_url.'&amp;tab=plug');
-$tabsheet->select($page['tab']);
-$tabsheet->assign();
-
-
-// +-----------------------------------------------------------------------+
-// | Variables init
-// +-----------------------------------------------------------------------+
-$edited_file = '';
-$content_file = '';
-$new_file['localconf'] = "<?php\n\n".l10n('locfiledit_newfile')."\n\n\n\n\n?>";
-$new_file['css'] = l10n('locfiledit_newfile') . "\n\n";
-$new_file['lang'] = "<?php\n\n" . l10n('locfiledit_newfile') . "\n\n\n\n\n?>";
-$new_file['plug'] = "<?php\n/*
-Plugin Name: " . l10n('locfiledit_onglet_plug') . "
-Version: 1.0
-Description: " . l10n('locfiledit_onglet_plug') . "
-Plugin URI: http://www.phpwebgallery.net
-Author:
-Author URI:
-*/\n\n\n\n\n?>";
-
-// Editarea options
-$editarea = array(
- 'start_highlight' => true,
- 'language' => substr($user['language'], 0, 2),
- 'toolbar' => 'search,fullscreen, |,select_font, |, undo, redo, change_smooth_selection, highlight, reset_highlight, |, help');
-if (isset($conf['editarea_options']) and is_array($conf['editarea_options']))
-{
- $editarea = array_merge($editarea, $conf['editarea_options']);
-}
-
-// Edit selected file for CSS, template and language
-if ((isset($_POST['edit'])) and !is_numeric($_POST['file_to_edit']))
-{
- $edited_file = $_POST['file_to_edit'];
- $content_file = file_exists($edited_file) ?
- file_get_contents($edited_file) : $new_file[$page['tab']];
-}
-
-
-// +-----------------------------------------------------------------------+
-// | Process tabsheet
-// +-----------------------------------------------------------------------+
-$options[] = l10n('locfiledit_choose_file');
-$selected = 0;
-
-switch ($page['tab'])
-{
- case 'localconf':
- $edited_file = PHPWG_ROOT_PATH . "include/config_local.inc.php";
- $content_file = file_exists($edited_file) ?
- file_get_contents($edited_file) : $new_file['localconf'];
-
- $template->assign('show_default' , array(
- array('SHOW_DEFAULT' => LOCALEDIT_PATH
- . 'show_default.php?file=include/config_default.inc.php',
- 'FILE' => 'config_default.inc.php')));
- $editarea['syntax'] = 'php';
- break;
-
- case 'css':
- $template_dir = PHPWG_ROOT_PATH . 'template';
- $options[] = '----------------------';
- $value = PHPWG_ROOT_PATH . "template-common/local-layout.css";
- $options[$value] = 'template-common / local-layout.css';
- if ($edited_file == $value) $selected = $value;
-
- foreach (get_dirs($template_dir) as $pwg_template)
- {
- $options[] = '----------------------';
- $value = $template_dir . '/' . $pwg_template . '/local-layout.css';
- $options[$value] = $pwg_template . ' / local-layout.css';
- if ($edited_file == $value) $selected = $value;
- $options[] = '----------------------';
- foreach (get_dirs($template_dir.'/'.$pwg_template.'/theme') as $theme)
- {
- $value = $template_dir.'/'.$pwg_template.'/theme/'.$theme.'/theme.css';
- $options[$value] = $pwg_template . ' / ' . $theme . ' / theme.css';
- if ($edited_file == $value) $selected = $value;
- }
- }
- $template->assign('css_lang_tpl', array(
- 'OPTIONS' => $options,
- 'SELECTED' => $selected));
- $editarea['syntax'] = 'css';
- break;
-
- case 'tpl':
- $template_dir = PHPWG_ROOT_PATH . 'template';
- foreach (get_dirs($template_dir) as $pwg_template)
- {
- $dir = $template_dir . '/' . $pwg_template . '/';
- $options[] = '----------------------';
- if (is_dir($dir) and $content = opendir($dir))
- {
- while ($node = readdir($content))
- {
- if (is_file($dir . $node)
- and strtolower(get_extension($node)) == 'tpl'
- and !strpos($node , '.bak.tpl'))
- {
- $value = $dir . $node;
- $options[$value] = $pwg_template . ' / ' . $node;
- if ($edited_file == $value) $selected = $value;
- }
- }
- }
- }
- $template->assign('css_lang_tpl', array(
- 'OPTIONS' => $options,
- 'SELECTED' => $selected));
- $editarea['syntax'] = 'html';
- break;
-
- case 'lang':
- $options[] = '----------------------';
- foreach (get_languages() as $language_code => $language_name)
- {
- $value = PHPWG_ROOT_PATH.'language/'.$language_code.'/local.lang.php';
- if ($edited_file == $value)
- {
- $selected = $value;
- $template->assign('show_default', array(
- array('SHOW_DEFAULT' => LOCALEDIT_PATH
- . 'show_default.php?file='
- . 'language/'.$language_code.'/common.lang.php',
- 'FILE' => 'common.lang.php'),
- array('SHOW_DEFAULT' => LOCALEDIT_PATH
- . 'show_default.php?file='
- . 'language/'.$language_code.'/admin.lang.php',
- 'FILE' => 'admin.lang.php')));
- }
- $options[$value] = $language_name;
- }
- $template->assign('css_lang_tpl', array(
- 'OPTIONS' => $options,
- 'SELECTED' => $selected));
- $editarea['syntax'] = 'php';
- break;
-
- case 'plug':
- $edited_file = PHPWG_PLUGINS_PATH . "PersonalPlugin/main.inc.php";
- $content_file = file_exists($edited_file) ?
- file_get_contents($edited_file) : $new_file['plug'];
- $editarea['syntax'] = 'php';
- break;
-}
-
-
-// +-----------------------------------------------------------------------+
-// | Load backup file
-// +-----------------------------------------------------------------------+
-if (isset($_POST['restore']) and !is_adviser())
-{
- $edited_file = $_POST['edited_file'];
- $content_file = file_get_contents(
- substr_replace($edited_file , '.bak' , strrpos($edited_file ,'.') , 0));
-
- array_push($page['infos'],
- l10n('locfiledit_bak_loaded1'),
- l10n('locfiledit_bak_loaded2'));
-}
-
-
-// +-----------------------------------------------------------------------+
-// | Save file
-// +-----------------------------------------------------------------------+
-if (isset($_POST['submit']) and !is_adviser())
-{
- $edited_file = $_POST['edited_file'];
- $content_file = stripslashes($_POST['text']);
- if (get_extension($edited_file) == 'php')
- {
- $content_file = eval_syntax($content_file);
- }
- if ($content_file === false)
- {
- array_push($page['errors'], l10n('locfiledit_syntax_error'));
- }
- else
- {
- if ($page['tab'] == 'plug'
- and !is_dir(PHPWG_PLUGINS_PATH . 'PersonalPlugin'))
- {
- @mkdir(PHPWG_PLUGINS_PATH . "PersonalPlugin");
- }
- if (file_exists($edited_file))
- {
- @copy($edited_file,
- substr_replace($edited_file,
- '.bak',
- strrpos($edited_file , '.'),
- 0)
- );
- }
-
- if ($file = @fopen($edited_file , "w"))
- {
- @fwrite($file , $content_file);
- @fclose($file);
- array_push($page['infos'],
- l10n('locfiledit_save_config'),
- sprintf(l10n('locfiledit_saved_bak'),
- substr(substr_replace($edited_file,
- '.bak',
- strrpos($edited_file , '.'),
- 0),
- 2)));
- }
- else
- {
- array_push($page['errors'], l10n('locfiledit_cant_save'));
- }
- }
-}
-
-
-// +-----------------------------------------------------------------------+
-// | template initialization
-// +-----------------------------------------------------------------------+
-$template->set_filenames(array(
- 'plugin_admin_content' => dirname(__FILE__) . '/admin.tpl'));
-
-if (!empty($edited_file))
-{
- if (!empty($page['errors']))
- {
- $content_file = stripslashes($_POST['text']);
- }
- $template->assign('zone_edit',
- array('EDITED_FILE' => $edited_file,
- 'CONTENT_FILE' => htmlspecialchars($content_file),
- 'FILE_NAME' => trim($edited_file, './\\')));
- if (file_exists(
- substr_replace($edited_file ,'.bak',strrpos($edited_file , '.'),0)))
- {
- $template->assign('restore', true);
- }
-}
-
-// Editarea
-if (!isset($conf['editarea_options']) or $conf['editarea_options'] !== false)
-{
- $template->assign('editarea', array(
- 'URL' => LOCALEDIT_PATH . 'editarea/edit_area_full.js',
- 'OPTIONS' => $editarea));
-}
-
-$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
-
-?> \ No newline at end of file
diff --git a/BSF/plugins/LocalFilesEditor/admin.tpl b/BSF/plugins/LocalFilesEditor/admin.tpl
deleted file mode 100644
index f1306080e..000000000
--- a/BSF/plugins/LocalFilesEditor/admin.tpl
+++ /dev/null
@@ -1,49 +0,0 @@
-{if isset($editarea)}
-<script type="text/javascript" src="{$editarea.URL}"></script>
-<script type="text/javascript">
-editAreaLoader.init({ldelim}
- id: "text"
- {foreach from=$editarea.OPTIONS key=option item=value}
- , {$option}: {$value|editarea_quote}
- {/foreach}
-{rdelim});
-</script>
-{/if}
-
-<div class="titrePage">
- <h2>LocalFiles Editor</h2>
- {$TABSHEET}
-</div>
-
-<form method="post" class="properties" action="" ENCTYPE="multipart/form-data">
-<div style="text-align:center;">
-
-{if isset ($css_lang_tpl)}
-{html_options name=file_to_edit options=$css_lang_tpl.OPTIONS selected=$css_lang_tpl.SELECTED}
-<input class="submit" type="submit" value="{'locfiledit_edit'|@translate}" name="edit" />
-<br>
-<br>
-{/if}
-
-{foreach from=$show_default item=file}
-<a href="{$file.SHOW_DEFAULT}" onclick="window.open( this.href, 'local_file', 'location=no,toolbar=no,menubar=no,status=no,resizable=yes,scrollbars=yes,width=800,height=600' ); return false;">{'locfiledit_show_default'|@translate} "{$file.FILE}"</a>
-<br>
-{/foreach}
-
-{if isset ($zone_edit)}
-<br>
-<input type="text" style="display:none;" value="{$zone_edit.EDITED_FILE}" name="edited_file"/>
-<b>{$zone_edit.FILE_NAME}</b>
-<br>
-<textarea rows="30" name="text" id="text" style="width:90%;">{$zone_edit.CONTENT_FILE}</textarea>
-<br>{'locfiledit_save_bak'|@translate}
-<br><br>
-<input class="submit" type="submit" value="{'locfiledit_save_file'|@translate}" name="submit" {$TAG_INPUT_ENABLED}/>
-{if isset ($restore)}
-<input class="submit" type="submit" value="{'locfiledit_restore'|@translate}" name="restore" onclick="return confirm('{'locfiledit_restore_confirm'|@translate|escape:'javascript'}');" {$TAG_INPUT_ENABLED}/>
-{/if}
-{/if}
-
-<br>
-</div>
-</form>
diff --git a/BSF/plugins/LocalFilesEditor/editarea/edit_area_full.js b/BSF/plugins/LocalFilesEditor/editarea/edit_area_full.js
deleted file mode 100644
index 7cb34270d..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/edit_area_full.js
+++ /dev/null
@@ -1,38 +0,0 @@
- function EAL(){this.version="0.7.1";date=new Date();this.start_time=date.getTime();this.win="loading";this.error=false;this.baseURL="";this.template="";this.lang=new Object();this.load_syntax=new Object();this.syntax=new Object();this.loadedFiles=new Array();this.waiting_loading=new Object();this.scripts_to_load=new Array();this.sub_scripts_to_load=new Array();this.resize=new Array();this.hidden=new Object();this.default_settings={debug: false ,smooth_selection: true ,font_size: "10" ,font_family: "monospace" ,start_highlight: false ,toolbar: "search, go_to_line, fullscreen, |, undo, redo, |, select_font,|, change_smooth_selection, highlight, reset_highlight, |, help" ,begin_toolbar: "" ,end_toolbar: "" ,is_multi_files: false ,allow_resize: "both" ,min_width: 400 ,min_height: 125 ,replace_tab_by_spaces: false ,allow_toggle: true ,language: "en" ,syntax: "" ,syntax_selection_allow: "basic,brainfuck,c,cpp,css,html,js,pas,php,python,ruby,sql,vb,xml" ,display: "onload" ,max_undo: 30 ,browsers: "known" ,plugins: "" ,gecko_spellcheck: false ,fullscreen: false ,is_editable: true ,load_callback: "" ,save_callback: "" ,change_callback: "" ,submit_callback: "" ,EA_init_callback: "" ,EA_delete_callback: "" ,EA_load_callback: "" ,EA_unload_callback: "" ,EA_toggle_on_callback: "" ,EA_toggle_off_callback: "" ,EA_file_switch_on_callback: "" ,EA_file_switch_off_callback: "" ,EA_file_close_callback: "" };this.advanced_buttons=[ ['new_document', 'newdocument.gif', 'new_document', false], ['search', 'search.gif', 'show_search', false], ['go_to_line', 'go_to_line.gif', 'go_to_line', false], ['undo', 'undo.gif', 'undo', true], ['redo', 'redo.gif', 'redo', true], ['change_smooth_selection', 'smooth_selection.gif', 'change_smooth_selection_mode', true], ['reset_highlight', 'reset_highlight.gif', 'resync_highlight', true], ['highlight', 'highlight.gif','change_highlight', true], ['help', 'help.gif', 'show_help', false], ['save', 'save.gif', 'save', false], ['load', 'load.gif', 'load', false], ['fullscreen', 'fullscreen.gif', 'toggle_full_screen', false] ];ua=navigator.userAgent;this.nav=new Object();this.nav['isMacOS']=(ua.indexOf('Mac OS') !=-1);this.nav['isIE']=(navigator.appName=="Microsoft Internet Explorer");if(this.nav['isIE']){this.nav['isIE']=ua.replace(/^.*?MSIE ([0-9\.]*).*$/, "$1");if(this.nav['isIE']<6) this.has_error();}if(this.nav['isNS']=ua.indexOf('Netscape/') !=-1){this.nav['isNS']=ua.substr(ua.indexOf('Netscape/')+9);if(this.nav['isNS']<8 || !this.nav['isIE']) this.has_error();}if(this.nav['isOpera']=(ua.indexOf('Opera') !=-1)){this.nav['isOpera']=ua.replace(/^.*?Opera.*?([0-9\.]+).*$/i, "$1");if(this.nav['isOpera']<9) this.has_error();this.nav['isIE']=false;}this.nav['isGecko']=(ua.indexOf('Gecko') !=-1);if(this.nav['isFirefox'] =(ua.indexOf('Firefox') !=-1)) this.nav['isFirefox']=ua.replace(/^.*?Firefox.*?([0-9\.]+).*$/i, "$1");if(this.nav['isIceweasel'] =(ua.indexOf('Iceweasel') !=-1)) this.nav['isFirefox']=this.nav['isIceweasel']=ua.replace(/^.*?Iceweasel.*?([0-9\.]+).*$/i, "$1");if(this.nav['isCamino'] =(ua.indexOf('Camino') !=-1)) this.nav['isCamino']=ua.replace(/^.*?Camino.*?([0-9\.]+).*$/i, "$1");if(this.nav['isSafari'] =(ua.indexOf('Safari') !=-1)) this.nav['isSafari']=ua.replace(/^.*?Version\/([0-9]+\.[0-9]+).*$/i, "$1");if(this.nav['isIE']>=6 || this.nav['isOpera']>=9 || this.nav['isFirefox'] || this.nav['isCamino'] || this.nav['isSafari']>=3) this.nav['isValidBrowser']=true;
-else this.nav['isValidBrowser']=false;this.set_base_url();for(var i=0;i<this.scripts_to_load.length;i++){setTimeout("eAL.load_script('"+this.baseURL + this.scripts_to_load[i]+ ".js');", 1);this.waiting_loading[this.scripts_to_load[i]+ ".js"]=false;}this.add_event(window, "load", EAL.prototype.window_loaded);};EAL.prototype.has_error=function(){this.error=true;for(var i in EAL.prototype){EAL.prototype[i]=function(){};}};EAL.prototype.window_loaded=function(){eAL.win="loaded";if (document.forms){for (var i=0;i<document.forms.length;i++){var form=document.forms[i];form.edit_area_replaced_submit=null;try{form.edit_area_replaced_submit=form.onsubmit;form.onsubmit="";}catch (e){}eAL.add_event(form, "submit", EAL.prototype.submit);eAL.add_event(form, "reset", EAL.prototype.reset);}}eAL.add_event(window, "unload", function(){for(var i in eAs){eAL.delete_instance(i);}});};EAL.prototype.init_ie_textarea=function(id){textarea=document.getElementById(id);try{if(textarea && typeof(textarea.focused)=="undefined"){textarea.focus();textarea.focused=true;textarea.selectionStart=textarea.selectionEnd=0;get_IE_selection(textarea);eAL.add_event(textarea, "focus", IE_textarea_focus);eAL.add_event(textarea, "blur", IE_textarea_blur);}}catch(ex){}};EAL.prototype.init=function(settings){if(!settings["id"]) this.has_error();if(this.error) return;if(eAs[settings["id"]]) eAL.delete_instance(settings["id"]);for(var i in this.default_settings){if(typeof(settings[i])=="undefined") settings[i]=this.default_settings[i];}if(settings["browsers"]=="known" && this.nav['isValidBrowser']==false){return;}if(settings["begin_toolbar"].length>0) settings["toolbar"]=settings["begin_toolbar"] +","+ settings["toolbar"];if(settings["end_toolbar"].length>0) settings["toolbar"]=settings["toolbar"] +","+ settings["end_toolbar"];settings["tab_toolbar"]=settings["toolbar"].replace(/ /g,"").split(",");settings["plugins"]=settings["plugins"].replace(/ /g,"").split(",");for(var i=0;i<settings["plugins"].length;i++){if(settings["plugins"][i].length==0) settings["plugins"].splice(i,1);}this.get_template();this.load_script(this.baseURL + "langs/"+ settings["language"] + ".js");if(settings["syntax"].length>0){settings["syntax"]=settings["syntax"].toLowerCase();this.load_script(this.baseURL + "reg_syntax/"+ settings["syntax"] + ".js");}eAs[settings["id"]]={"settings": settings};eAs[settings["id"]]["displayed"]=false;eAs[settings["id"]]["hidden"]=false;eAL.start(settings["id"]);};EAL.prototype.delete_instance=function(id){eAL.execCommand(id, "EA_delete");if(window.frames["frame_"+id] && window.frames["frame_"+id].editArea){if(eAs[id]["displayed"]) eAL.toggle(id, "off");window.frames["frame_"+id].editArea.execCommand("EA_unload");}var span=document.getElementById("EditAreaArroundInfos_"+id);if(span){span.parentNode.removeChild(span);}var iframe=document.getElementById("frame_"+id);if(iframe){iframe.parentNode.removeChild(iframe);try{delete window.frames["frame_"+id];}catch (e){}}delete eAs[id];};EAL.prototype.start=function(id){if(this.win!="loaded"){setTimeout("eAL.start('"+id+"');", 50);return;}for(var i in eAL.waiting_loading){if(eAL.waiting_loading[i]!="loaded" && typeof(eAL.waiting_loading[i])!="function"){setTimeout("eAL.start('"+id+"');", 50);return;}}if(!eAL.lang[eAs[id]["settings"]["language"]] || (eAs[id]["settings"]["syntax"].length>0 && !eAL.load_syntax[eAs[id]["settings"]["syntax"]]) ){setTimeout("eAL.start('"+id+"');", 50);return;}if(eAs[id]["settings"]["syntax"].length>0) eAL.init_syntax_regexp();if(!document.getElementById("EditAreaArroundInfos_"+id) && (eAs[id]["settings"]["debug"] || eAs[id]["settings"]["allow_toggle"])){var span=document.createElement("span");span.id="EditAreaArroundInfos_"+id;var html="";if(eAs[id]["settings"]["allow_toggle"]){checked=(eAs[id]["settings"]["display"]=="onload")?"checked":"";html+="<div id='edit_area_toggle_"+i+"'>";html+="<input id='edit_area_toggle_checkbox_"+ id +"' class='toggle_"+ id +"' type='checkbox' onclick='eAL.toggle(\""+ id +"\");' accesskey='e' "+checked+" />";html+="<label for='edit_area_toggle_checkbox_"+ id +"'>{$toggle}</label></div>";}if(eAs[id]["settings"]["debug"]) html+="<textarea id='edit_area_debug_"+ id +"' style='z-index: 20;width: 100%;height: 120px;overflow: auto;border: solid black 1px;'></textarea><br />";html=eAL.translate(html, eAs[id]["settings"]["language"]);span.innerHTML=html;var father=document.getElementById(id).parentNode;var next=document.getElementById(id).nextSibling;if(next==null) father.appendChild(span);
-else father.insertBefore(span, next);}if(!eAs[id]["initialized"]){this.execCommand(id, "EA_init");if(eAs[id]["settings"]["display"]=="later"){eAs[id]["initialized"]=true;return;}}if(this.nav['isIE']){eAL.init_ie_textarea(id);}var html_toolbar_content="";area=eAs[id];for(var i=0;i<area["settings"]["tab_toolbar"].length;i++){html_toolbar_content+=this.get_control_html(area["settings"]["tab_toolbar"][i], area["settings"]["language"]);}if(!this.iframe_script){this.iframe_script="";for(var i=0;i<this.sub_scripts_to_load.length;i++) this.iframe_script+='<script language="javascript" type="text/javascript" src="'+ this.baseURL + this.sub_scripts_to_load[i] +'.js"></script>';}for(var i=0;i<area["settings"]["plugins"].length;i++){if(!eAL.all_plugins_loaded) this.iframe_script+='<script language="javascript" type="text/javascript" src="'+ this.baseURL + 'plugins/' + area["settings"]["plugins"][i] + '/' + area["settings"]["plugins"][i] +'.js"></script>';this.iframe_script+='<script language="javascript" type="text/javascript" src="'+ this.baseURL + 'plugins/' + area["settings"]["plugins"][i] + '/langs/' + area["settings"]["language"] +'.js"></script>';}if(!this.iframe_css){this.iframe_css="<link href='"+ this.baseURL +"edit_area.css' rel='stylesheet' type='text/css' />";}var template=this.template.replace(/\[__BASEURL__\]/g, this.baseURL);template=template.replace("[__TOOLBAR__]",html_toolbar_content);template=this.translate(template, area["settings"]["language"], "template");template=template.replace("[__CSSRULES__]", this.iframe_css);template=template.replace("[__JSCODE__]", this.iframe_script);template=template.replace("[__EA_VERSION__]", this.version);area.textarea=document.getElementById(area["settings"]["id"]);eAs[area["settings"]["id"]]["textarea"]=area.textarea;if(typeof(window.frames["frame_"+area["settings"]["id"]])!='undefined') delete window.frames["frame_"+area["settings"]["id"]];var father=area.textarea.parentNode;var content=document.createElement("iframe");content.name="frame_"+area["settings"]["id"];content.id="frame_"+area["settings"]["id"];content.style.borderWidth="0px";setAttribute(content, "frameBorder", "0");content.style.overflow="hidden";content.style.display="none";var next=area.textarea.nextSibling;if(next==null) father.appendChild(content);
-else father.insertBefore(content, next);var frame=window.frames["frame_"+area["settings"]["id"]];frame.document.open();frame.eAs=eAs;frame.area_id=area["settings"]["id"];frame.document.area_id=area["settings"]["id"];frame.document.write(template);frame.document.close();};EAL.prototype.toggle=function(id, toggle_to){if(!toggle_to) toggle_to=(eAs[id]["displayed"]==true)?"off":"on";if(eAs[id]["displayed"]==true && toggle_to=="off"){this.toggle_off(id);}
-else if(eAs[id]["displayed"]==false && toggle_to=="on"){this.toggle_on(id);}return false;};EAL.prototype.toggle_off=function(id){if(window.frames["frame_"+id]){var frame=window.frames["frame_"+id];if(frame.editArea.fullscreen['isFull']) frame.editArea.toggle_full_screen(false);eAs[id]["displayed"]=false;eAs[id]["textarea"].wrap="off";setAttribute(eAs[id]["textarea"], "wrap", "off");var parNod=eAs[id]["textarea"].parentNode;var nxtSib=eAs[id]["textarea"].nextSibling;parNod.removeChild(eAs[id]["textarea"]);parNod.insertBefore(eAs[id]["textarea"], nxtSib);eAs[id]["textarea"].value=frame.editArea.textarea.value;var selStart=frame.editArea.last_selection["selectionStart"];var selEnd=frame.editArea.last_selection["selectionEnd"];var scrollTop=frame.document.getElementById("result").scrollTop;var scrollLeft=frame.document.getElementById("result").scrollLeft;document.getElementById("frame_"+id).style.display='none';eAs[id]["textarea"].style.display="inline";eAs[id]["textarea"].focus();if(this.nav['isIE']){eAs[id]["textarea"].selectionStart=selStart;eAs[id]["textarea"].selectionEnd=selEnd;eAs[id]["textarea"].focused=true;set_IE_selection(eAs[id]["textarea"]);}
-else{if(this.nav['isOpera']){eAs[id]["textarea"].setSelectionRange(0, 0);}try{eAs[id]["textarea"].setSelectionRange(selStart, selEnd);}catch(e){};}eAs[id]["textarea"].scrollTop=scrollTop;eAs[id]["textarea"].scrollLeft=scrollLeft;frame.editArea.execCommand("toggle_off");}};EAL.prototype.toggle_on=function(id){if(window.frames["frame_"+id]){var frame=window.frames["frame_"+id];area=window.frames["frame_"+id].editArea;area.textarea.value=eAs[id]["textarea"].value;var selStart=0;var selEnd=0;var scrollTop=0;var scrollLeft=0;if(eAs[id]["textarea"].use_last==true){var selStart=eAs[id]["textarea"].last_selectionStart;var selEnd=eAs[id]["textarea"].last_selectionEnd;var scrollTop=eAs[id]["textarea"].last_scrollTop;var scrollLeft=eAs[id]["textarea"].last_scrollLeft;eAs[id]["textarea"].use_last=false;}
-else{try{var selStart=eAs[id]["textarea"].selectionStart;var selEnd=eAs[id]["textarea"].selectionEnd;var scrollTop=eAs[id]["textarea"].scrollTop;var scrollLeft=eAs[id]["textarea"].scrollLeft;}catch(ex){}}this.set_editarea_size_from_textarea(id, document.getElementById("frame_"+id));eAs[id]["textarea"].style.display="none";document.getElementById("frame_"+id).style.display="inline";area.execCommand("focus");eAs[id]["displayed"]=true;area.execCommand("update_size");window.frames["frame_"+id].document.getElementById("result").scrollTop=scrollTop;window.frames["frame_"+id].document.getElementById("result").scrollLeft=scrollLeft;area.area_select(selStart, selEnd-selStart);area.execCommand("toggle_on");}
-else{var elem=document.getElementById(id);elem.last_selectionStart=elem.selectionStart;elem.last_selectionEnd=elem.selectionEnd;elem.last_scrollTop=elem.scrollTop;elem.last_scrollLeft=elem.scrollLeft;elem.use_last=true;eAL.start(id);}};EAL.prototype.set_editarea_size_from_textarea=function(id, frame){var elem=document.getElementById(id);var width=Math.max(eAs[id]["settings"]["min_width"], elem.offsetWidth)+"px";var height=Math.max(eAs[id]["settings"]["min_height"], elem.offsetHeight)+"px";if(elem.style.width.indexOf("%")!=-1) width=elem.style.width;if(elem.style.height.indexOf("%")!=-1) height=elem.style.height;frame.style.width=width;frame.style.height=height;};EAL.prototype.set_base_url=function(){if (!this.baseURL){var elements=document.getElementsByTagName('script');for (var i=0;i<elements.length;i++){if (elements[i].src && elements[i].src.match(/edit_area_[^\\\/]*$/i) ){var src=elements[i].src;src=src.substring(0, src.lastIndexOf('/'));this.baseURL=src;this.file_name=elements[i].src.substr(elements[i].src.lastIndexOf("/")+1);break;}}}var documentBasePath=document.location.href;if (documentBasePath.indexOf('?') !=-1) documentBasePath=documentBasePath.substring(0, documentBasePath.indexOf('?'));var documentURL=documentBasePath;documentBasePath=documentBasePath.substring(0, documentBasePath.lastIndexOf('/'));if (this.baseURL.indexOf('://')==-1 && this.baseURL.charAt(0) !='/'){this.baseURL=documentBasePath + "/" + this.baseURL;}this.baseURL+="/";};EAL.prototype.get_button_html=function(id, img, exec, isFileSpecific, baseURL){if(!baseURL) baseURL=this.baseURL;var cmd='editArea.execCommand(\'' + exec + '\')';html='<a id="a_'+ id +'" href="javascript:' + cmd + '" onclick="' + cmd + ';return false;" onmousedown="return false;" target="_self" fileSpecific="'+ (isFileSpecific?'yes':'no') +'">';html+='<img id="' + id + '" src="'+ baseURL +'images/' + img + '" title="{$' + id + '}" width="20" height="20" class="editAreaButtonNormal" onmouseover="editArea.switchClass(this,\'editAreaButtonOver\');" onmouseout="editArea.restoreClass(this);" onmousedown="editArea.restoreAndSwitchClass(this,\'editAreaButtonDown\');" /></a>';return html;};EAL.prototype.get_control_html=function(button_name, lang){for (var i=0;i<this.advanced_buttons.length;i++){var but=this.advanced_buttons[i];if (but[0]==button_name){return this.get_button_html(but[0], but[1], but[2], but[3]);}}switch (button_name){case "*": case "return": return "<br />";case "|": case "separator": return '<img src="'+ this.baseURL +'images/spacer.gif" width="1" height="15" class="editAreaSeparatorLine">';case "select_font": html="<select id='area_font_size' onchange='javascript:editArea.execCommand(\"change_font_size\")' fileSpecific='yes'>" +" <option value='-1'>{$font_size}</option>" +" <option value='8'>8 pt</option>" +" <option value='9'>9 pt</option>" +" <option value='10'>10 pt</option>" +" <option value='11'>11 pt</option>" +" <option value='12'>12 pt</option>" +" <option value='14'>14 pt</option>" +" </select>";return html;case "syntax_selection": var html="<select id='syntax_selection' onchange='javascript:editArea.execCommand(\"change_syntax\", this.value)' fileSpecific='yes'>";html+="<option value='-1'>{$syntax_selection}</option>";html+="</select>";return html;}return "<span id='tmp_tool_"+button_name+"'>["+button_name+"]</span>";};EAL.prototype.get_template=function(){if(this.template==""){var xhr_object=null;if(window.XMLHttpRequest) xhr_object=new XMLHttpRequest();
-else if(window.ActiveXObject) xhr_object=new ActiveXObject("Microsoft.XMLHTTP");
-else{alert("XMLHTTPRequest not supported. EditArea not loaded");return;}xhr_object.open("GET", this.baseURL+"template.html", false);xhr_object.send(null);if(xhr_object.readyState==4) this.template=xhr_object.responseText;
-else this.has_error();}};EAL.prototype.translate=function(text, lang, mode){if(mode=="word") text=eAL.get_word_translation(text, lang);
-else if(mode="template"){eAL.current_language=lang;text=text.replace(/\{\$([^\}]+)\}/gm, eAL.translate_template);}return text;};EAL.prototype.translate_template=function(){return eAL.get_word_translation(EAL.prototype.translate_template.arguments[1], eAL.current_language);};EAL.prototype.get_word_translation=function(val, lang){for(var i in eAL.lang[lang]){if(i==val) return eAL.lang[lang][i];}return "_"+val;};EAL.prototype.load_script=function(url){if (this.loadedFiles[url]) return;try{var script=document.createElement("script");script.type="text/javascript";script.src=url;script.charset="UTF-8";var head=document.getElementsByTagName("head");head[0].appendChild(script);}catch(e){document.write('<sc'+'ript language="javascript" type="text/javascript" src="' + url + '" charset="UTF-8"></sc'+'ript>');}this.loadedFiles[url]=true;};EAL.prototype.add_event=function(obj, name, handler){if (obj.attachEvent){obj.attachEvent("on" + name, handler);}
-else{obj.addEventListener(name, handler, false);}};EAL.prototype.remove_event=function(obj, name, handler){if (obj.detachEvent) obj.detachEvent("on" + name, handler);
-else obj.removeEventListener(name, handler, false);};EAL.prototype.reset=function(e){var formObj=eAL.nav['isIE'] ? window.event.srcElement : e.target;if(formObj.tagName!='FORM') formObj=formObj.form;for(var i in eAs){var is_child=false;for (var x=0;x<formObj.elements.length;x++){if(formObj.elements[x].id==i) is_child=true;}if(window.frames["frame_"+i] && is_child && eAs[i]["displayed"]==true){var exec='window.frames["frame_'+ i +'"].editArea.textarea.value=document.getElementById("'+ i +'").value;';exec+='window.frames["frame_'+ i +'"].editArea.execCommand("focus");';exec+='window.frames["frame_'+ i +'"].editArea.check_line_selection();';exec+='window.frames["frame_'+ i +'"].editArea.execCommand("reset");';window.setTimeout(exec, 10);}}return;};EAL.prototype.submit=function(e){var formObj=eAL.nav['isIE'] ? window.event.srcElement : e.target;if(formObj.tagName!='FORM') formObj=formObj.form;for(var i in eAs){var is_child=false;for (var x=0;x<formObj.elements.length;x++){if(formObj.elements[x].id==i) is_child=true;}if(is_child){if(window.frames["frame_"+i] && eAs[i]["displayed"]==true) document.getElementById(i).value=window.frames["frame_"+ i].editArea.textarea.value;eAL.execCommand(i,"EA_submit");}}if(typeof(formObj.edit_area_replaced_submit)=="function"){res=formObj.edit_area_replaced_submit();if(res==false){if(eAL.nav['isIE']) return false;
-else e.preventDefault();}}return;};EAL.prototype.getValue=function(id){if(window.frames["frame_"+id] && eAs[id]["displayed"]==true){return window.frames["frame_"+ id].editArea.textarea.value;}
-else if(elem=document.getElementById(id)){return elem.value;}return false;};EAL.prototype.setValue=function(id, new_val){if(window.frames["frame_"+id] && eAs[id]["displayed"]==true){window.frames["frame_"+ id].editArea.textarea.value=new_val;window.frames["frame_"+ id].editArea.execCommand("focus");window.frames["frame_"+ id].editArea.check_line_selection(false);window.frames["frame_"+ id].editArea.execCommand("onchange");}
-else if(elem=document.getElementById(id)){elem.value=new_val;}};EAL.prototype.getSelectionRange=function(id){var sel={"start": 0, "end": 0};if(window.frames["frame_"+id] && eAs[id]["displayed"]==true){var editArea=window.frames["frame_"+ id].editArea;sel["start"]=editArea.textarea.selectionStart;sel["end"]=editArea.textarea.selectionEnd;}
-else if(elem=document.getElementById(id)){sel=getSelectionRange(elem);}return sel;};EAL.prototype.setSelectionRange=function(id, new_start, new_end){if(window.frames["frame_"+id] && eAs[id]["displayed"]==true){window.frames["frame_"+ id].editArea.area_select(new_start, new_end-new_start);if(!this.nav['isIE']){window.frames["frame_"+ id].editArea.check_line_selection(false);window.frames["frame_"+ id].editArea.scroll_to_view();}}
-else if(elem=document.getElementById(id)){setSelectionRange(elem, new_start, new_end);}};EAL.prototype.getSelectedText=function(id){var sel=this.getSelectionRange(id);return this.getValue(id).substring(sel["start"], sel["end"]);};EAL.prototype.setSelectedText=function(id, new_val){new_val=new_val.replace(/\r/g, "");var sel=this.getSelectionRange(id);var text=this.getValue(id);if(window.frames["frame_"+id] && eAs[id]["displayed"]==true){var scrollTop=window.frames["frame_"+ id].document.getElementById("result").scrollTop;var scrollLeft=window.frames["frame_"+ id].document.getElementById("result").scrollLeft;}
-else{var scrollTop=document.getElementById(id).scrollTop;var scrollLeft=document.getElementById(id).scrollLeft;}text=text.substring(0, sel["start"])+ new_val +text.substring(sel["end"]);this.setValue(id, text);var new_sel_end=sel["start"]+ new_val.length;this.setSelectionRange(id, sel["start"], new_sel_end);if(new_val !=this.getSelectedText(id).replace(/\r/g, "")){this.setSelectionRange(id, sel["start"], new_sel_end+ new_val.split("\n").length -1);}if(window.frames["frame_"+id] && eAs[id]["displayed"]==true){window.frames["frame_"+ id].document.getElementById("result").scrollTop=scrollTop;window.frames["frame_"+ id].document.getElementById("result").scrollLeft=scrollLeft;window.frames["frame_"+ id].editArea.execCommand("onchange");}
-else{document.getElementById(id).scrollTop=scrollTop;document.getElementById(id).scrollLeft=scrollLeft;}};EAL.prototype.insertTags=function(id, open_tag, close_tag){var old_sel=this.getSelectionRange(id);text=open_tag + this.getSelectedText(id) + close_tag;eAL.setSelectedText(id, text);var new_sel=this.getSelectionRange(id);if(old_sel["end"] > old_sel["start"]) this.setSelectionRange(id, new_sel["end"], new_sel["end"]);
-else this.setSelectionRange(id, old_sel["start"]+open_tag.length, old_sel["start"]+open_tag.length);};EAL.prototype.hide=function(id){if(document.getElementById(id) && !this.hidden[id]){this.hidden[id]=new Object();this.hidden[id]["selectionRange"]=this.getSelectionRange(id);if(document.getElementById(id).style.display!="none"){this.hidden[id]["scrollTop"]=document.getElementById(id).scrollTop;this.hidden[id]["scrollLeft"]=document.getElementById(id).scrollLeft;}if(window.frames["frame_"+id]){this.hidden[id]["toggle"]=eAs[id]["displayed"];if(window.frames["frame_"+id] && eAs[id]["displayed"]==true){var scrollTop=window.frames["frame_"+ id].document.getElementById("result").scrollTop;var scrollLeft=window.frames["frame_"+ id].document.getElementById("result").scrollLeft;}
-else{var scrollTop=document.getElementById(id).scrollTop;var scrollLeft=document.getElementById(id).scrollLeft;}this.hidden[id]["scrollTop"]=scrollTop;this.hidden[id]["scrollLeft"]=scrollLeft;if(eAs[id]["displayed"]==true) eAL.toggle_off(id);}var span=document.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='none';}document.getElementById(id).style.display="none";}};EAL.prototype.show=function(id){if((elem=document.getElementById(id)) && this.hidden[id]){elem.style.display="inline";elem.scrollTop=this.hidden[id]["scrollTop"];elem.scrollLeft=this.hidden[id]["scrollLeft"];var span=document.getElementById("EditAreaArroundInfos_"+id);if(span){span.style.display='inline';}if(window.frames["frame_"+id]){elem.style.display="inline";if(this.hidden[id]["toggle"]==true) eAL.toggle_on(id);scrollTop=this.hidden[id]["scrollTop"];scrollLeft=this.hidden[id]["scrollLeft"];if(window.frames["frame_"+id] && eAs[id]["displayed"]==true){window.frames["frame_"+ id].document.getElementById("result").scrollTop=scrollTop;window.frames["frame_"+ id].document.getElementById("result").scrollLeft=scrollLeft;}
-else{elem.scrollTop=scrollTop;elem.scrollLeft=scrollLeft;}}sel=this.hidden[id]["selectionRange"];this.setSelectionRange(id, sel["start"], sel["end"]);delete this.hidden[id];}};EAL.prototype.getCurrentFile=function(id){return this.execCommand(id, 'get_file', this.execCommand(id, 'curr_file'));};EAL.prototype.getFile=function(id, file_id){return this.execCommand(id, 'get_file', file_id);};EAL.prototype.getAllFiles=function(id){return this.execCommand(id, 'get_all_files()');};EAL.prototype.openFile=function(id, file_infos){return this.execCommand(id, 'open_file', file_infos);};EAL.prototype.closeFile=function(id, file_id){return this.execCommand(id, 'close_file', file_id);};EAL.prototype.setFileEditedMode=function(id, file_id, to){var reg1=new RegExp('\\\\', 'g');var reg2=new RegExp('"', 'g');return this.execCommand(id, 'set_file_edited_mode("'+ file_id.replace(reg1, '\\\\').replace(reg2, '\\"') +'", '+ to +')');};EAL.prototype.execCommand=function(id, cmd, fct_param){switch(cmd){case "EA_init": if(eAs[id]['settings']["EA_init_callback"].length>0) eval(eAs[id]['settings']["EA_init_callback"]+"('"+ id +"');");break;case "EA_delete": if(eAs[id]['settings']["EA_delete_callback"].length>0) eval(eAs[id]['settings']["EA_delete_callback"]+"('"+ id +"');");break;case "EA_submit": if(eAs[id]['settings']["submit_callback"].length>0) eval(eAs[id]['settings']["submit_callback"]+"('"+ id +"');");break;}if(window.frames["frame_"+id] && window.frames["frame_"+ id].editArea){if(fct_param!=undefined) return eval('window.frames["frame_'+ id +'"].editArea.'+ cmd +'(fct_param);');
-else return eval('window.frames["frame_'+ id +'"].editArea.'+ cmd +';');}return false;};var eAL=new EAL();var eAs=new Object(); function getAttribute( elm, aname ){try{var avalue=elm.getAttribute( aname );}catch(exept){}if ( ! avalue ){for ( var i=0;i < elm.attributes.length;i ++ ){var taName=elm.attributes [i] .name.toLowerCase();if ( taName==aname ){avalue=elm.attributes [i] .value;return avalue;}}}return avalue;};function setAttribute( elm, attr, val ){if(attr=="class"){elm.setAttribute("className", val);elm.setAttribute("class", val);}
-else{elm.setAttribute(attr, val);}};function getChildren(elem, elem_type, elem_attribute, elem_attribute_match, option, depth){if(!option) var option="single";if(!depth) var depth=-1;if(elem){var children=elem.childNodes;var result=null;var results=new Array();for (var x=0;x<children.length;x++){strTagName=new String(children[x].tagName);children_class="?";if(strTagName!="undefined"){child_attribute=getAttribute(children[x],elem_attribute);if((strTagName.toLowerCase()==elem_type.toLowerCase() || elem_type=="") && (elem_attribute=="" || child_attribute==elem_attribute_match)){if(option=="all"){results.push(children[x]);}
-else{return children[x];}}if(depth!=0){result=getChildren(children[x], elem_type, elem_attribute, elem_attribute_match, option, depth-1);if(option=="all"){if(result.length>0){results=results.concat(result);}}
-else if(result!=null){return result;}}}}if(option=="all") return results;}return null;};function isChildOf(elem, parent){if(elem){if(elem==parent) return true;while(elem.parentNode !='undefined'){return isChildOf(elem.parentNode, parent);}}return false;};function getMouseX(e){if(e!=null && typeof(e.pageX)!="undefined"){return e.pageX;}
-else{return (e!=null?e.x:event.x)+ document.documentElement.scrollLeft;}};function getMouseY(e){if(e!=null && typeof(e.pageY)!="undefined"){return e.pageY;}
-else{return (e!=null?e.y:event.y)+ document.documentElement.scrollTop;}};function calculeOffsetLeft(r){return calculeOffset(r,"offsetLeft") };function calculeOffsetTop(r){return calculeOffset(r,"offsetTop") };function calculeOffset(element,attr){var offset=0;while(element){offset+=element[attr];element=element.offsetParent}return offset;};function get_css_property(elem, prop){if(document.defaultView){return document.defaultView.getComputedStyle(elem, null).getPropertyValue(prop);}
-else if(elem.currentStyle){var prop=prop.replace(/-\D/gi, function(sMatch){return sMatch.charAt(sMatch.length - 1).toUpperCase();});return elem.currentStyle[prop];}
-else return null;}var move_current_element;function start_move_element(e, id, frame){var elem_id=(e.target || e.srcElement).id;if(id) elem_id=id;if(!frame) frame=window;if(frame.event) e=frame.event;move_current_element=frame.document.getElementById(elem_id);move_current_element.frame=frame;frame.document.onmousemove=move_element;frame.document.onmouseup=end_move_element;mouse_x=getMouseX(e);mouse_y=getMouseY(e);move_current_element.start_pos_x=mouse_x - (move_current_element.style.left.replace("px","") || calculeOffsetLeft(move_current_element));move_current_element.start_pos_y=mouse_y - (move_current_element.style.top.replace("px","") || calculeOffsetTop(move_current_element));return false;};function end_move_element(e){move_current_element.frame.document.onmousemove="";move_current_element.frame.document.onmouseup="";move_current_element=null;};function move_element(e){if(move_current_element.frame && move_current_element.frame.event) e=move_current_element.frame.event;var mouse_x=getMouseX(e);var mouse_y=getMouseY(e);var new_top=mouse_y - move_current_element.start_pos_y;var new_left=mouse_x - move_current_element.start_pos_x;var max_left=move_current_element.frame.document.body.offsetWidth- move_current_element.offsetWidth;max_top=move_current_element.frame.document.body.offsetHeight- move_current_element.offsetHeight;new_top=Math.min(Math.max(0, new_top), max_top);new_left=Math.min(Math.max(0, new_left), max_left);move_current_element.style.top=new_top+"px";move_current_element.style.left=new_left+"px";return false;};var nav=eAL.nav;function getSelectionRange(textarea){return {"start": textarea.selectionStart, "end": textarea.selectionEnd};};function setSelectionRange(textarea, start, end){textarea.focus();start=Math.max(0, Math.min(textarea.value.length, start));end=Math.max(start, Math.min(textarea.value.length, end));if(nav['isOpera']){textarea.selectionEnd=1;textarea.selectionStart=0;textarea.selectionEnd=1;textarea.selectionStart=0;}textarea.selectionStart=start;textarea.selectionEnd=end;if(nav['isIE']) set_IE_selection(textarea);};function get_IE_selection(textarea){if(textarea && textarea.focused){if(!textarea.ea_line_height){var div=document.createElement("div");div.style.fontFamily=get_css_property(textarea, "font-family");div.style.fontSize=get_css_property(textarea, "font-size");div.style.visibility="hidden";div.innerHTML="0";document.body.appendChild(div);textarea.ea_line_height=div.offsetHeight;document.body.removeChild(div);}var range=document.selection.createRange();var stored_range=range.duplicate();stored_range.moveToElementText( textarea );stored_range.setEndPoint( 'EndToEnd', range );if(stored_range.parentElement()==textarea){var elem=textarea;var scrollTop=0;while(elem.parentNode){scrollTop+=elem.scrollTop;elem=elem.parentNode;}var relative_top=range.offsetTop - calculeOffsetTop(textarea)+ scrollTop;var line_start=Math.round((relative_top / textarea.ea_line_height) +1);var line_nb=Math.round(range.boundingHeight / textarea.ea_line_height);var range_start=stored_range.text.length - range.text.length;var tab=textarea.value.substr(0, range_start).split("\n");range_start+=(line_start - tab.length)*2;textarea.selectionStart=range_start;var range_end=textarea.selectionStart + range.text.length;tab=textarea.value.substr(0, range_start + range.text.length).split("\n");range_end+=(line_start + line_nb - 1 - tab.length)*2;textarea.selectionEnd=range_end;}}setTimeout("get_IE_selection(document.getElementById('"+ textarea.id +"'));", 50);};function IE_textarea_focus(){event.srcElement.focused=true;}function IE_textarea_blur(){event.srcElement.focused=false;}function set_IE_selection(textarea){if(!window.closed){var nbLineStart=textarea.value.substr(0, textarea.selectionStart).split("\n").length - 1;var nbLineEnd=textarea.value.substr(0, textarea.selectionEnd).split("\n").length - 1;var range=document.selection.createRange();range.moveToElementText( textarea );range.setEndPoint( 'EndToStart', range );range.moveStart('character', textarea.selectionStart - nbLineStart);range.moveEnd('character', textarea.selectionEnd - nbLineEnd - (textarea.selectionStart - nbLineStart) );range.select();}};eAL.waiting_loading["elements_functions.js"]="loaded";
- EAL.prototype.start_resize_area=function(){document.onmouseup=eAL.end_resize_area;document.onmousemove=eAL.resize_area;eAL.toggle(eAL.resize["id"]);var textarea=eAs[eAL.resize["id"]]["textarea"];var div=document.getElementById("edit_area_resize");if(!div){div=document.createElement("div");div.id="edit_area_resize";div.style.border="dashed #888888 1px";}var width=textarea.offsetWidth -2;var height=textarea.offsetHeight -2;div.style.display="block";div.style.width=width+"px";div.style.height=height+"px";var father=textarea.parentNode;father.insertBefore(div, textarea);textarea.style.display="none";eAL.resize["start_top"]=calculeOffsetTop(div);eAL.resize["start_left"]=calculeOffsetLeft(div);};EAL.prototype.end_resize_area=function(e){document.onmouseup="";document.onmousemove="";var div=document.getElementById("edit_area_resize");var textarea=eAs[eAL.resize["id"]]["textarea"];var width=Math.max(eAs[eAL.resize["id"]]["settings"]["min_width"], div.offsetWidth-4);var height=Math.max(eAs[eAL.resize["id"]]["settings"]["min_height"], div.offsetHeight-4);if(eAL.nav['isIE']==6){width-=2;height-=2;}textarea.style.width=width+"px";textarea.style.height=height+"px";div.style.display="none";textarea.style.display="inline";textarea.selectionStart=eAL.resize["selectionStart"];textarea.selectionEnd=eAL.resize["selectionEnd"];eAL.toggle(eAL.resize["id"]);return false;};EAL.prototype.resize_area=function(e){var allow=eAs[eAL.resize["id"]]["settings"]["allow_resize"];if(allow=="both" || allow=="y"){new_y=getMouseY(e);var new_height=Math.max(20, new_y- eAL.resize["start_top"]);document.getElementById("edit_area_resize").style.height=new_height+"px";}if(allow=="both" || allow=="x"){new_x=getMouseX(e);var new_width=Math.max(20, new_x- eAL.resize["start_left"]);document.getElementById("edit_area_resize").style.width=new_width+"px";}return false;};eAL.waiting_loading["resize_area.js"]="loaded";
- EAL.prototype.get_regexp=function(text_array){res="(\\b)(";for(i=0;i<text_array.length;i++){if(i>0) res+="|";res+=this.get_escaped_regexp(text_array[i]);}res+=")(\\b)";reg=new RegExp(res);return res;};EAL.prototype.get_escaped_regexp=function(str){return str.replace(/(\.|\?|\*|\+|\\|\(|\)|\[|\]|\}|\{|\$|\^|\|)/g, "\\$1");};EAL.prototype.init_syntax_regexp=function(){var lang_style=new Object();for(var lang in this.load_syntax){if(!this.syntax[lang]){this.syntax[lang]=new Object();this.syntax[lang]["keywords_reg_exp"]=new Object();this.keywords_reg_exp_nb=0;if(this.load_syntax[lang]['KEYWORDS']){param="g";if(this.load_syntax[lang]['KEYWORD_CASE_SENSITIVE']===false) param+="i";for(var i in this.load_syntax[lang]['KEYWORDS']){if(typeof(this.load_syntax[lang]['KEYWORDS'][i])=="function") continue;this.syntax[lang]["keywords_reg_exp"][i]=new RegExp(this.get_regexp( this.load_syntax[lang]['KEYWORDS'][i] ), param);this.keywords_reg_exp_nb++;}}if(this.load_syntax[lang]['OPERATORS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['OPERATORS']){if(typeof(this.load_syntax[lang]['OPERATORS'][i])=="function") continue;if(nb>0) str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['OPERATORS'][i]);nb++;}if(str.length>0) this.syntax[lang]["operators_reg_exp"]=new RegExp("("+str+")","g");}if(this.load_syntax[lang]['DELIMITERS']){var str="";var nb=0;for(var i in this.load_syntax[lang]['DELIMITERS']){if(typeof(this.load_syntax[lang]['DELIMITERS'][i])=="function") continue;if(nb>0) str+="|";str+=this.get_escaped_regexp(this.load_syntax[lang]['DELIMITERS'][i]);nb++;}if(str.length>0) this.syntax[lang]["delimiters_reg_exp"]=new RegExp("("+str+")","g");}var syntax_trace=new Array();this.syntax[lang]["quotes"]=new Object();var quote_tab=new Array();if(this.load_syntax[lang]['QUOTEMARKS']){for(var i in this.load_syntax[lang]['QUOTEMARKS']){if(typeof(this.load_syntax[lang]['QUOTEMARKS'][i])=="function") continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['QUOTEMARKS'][i]);this.syntax[lang]["quotes"][x]=x;quote_tab[quote_tab.length]="("+x+"(?:[^"+x+"\\\\]*(\\\\\\\\)*(\\\\"+x+"?)?)*("+x+"|$))";syntax_trace.push(x);}}this.syntax[lang]["comments"]=new Object();if(this.load_syntax[lang]['COMMENT_SINGLE']){for(var i in this.load_syntax[lang]['COMMENT_SINGLE']){if(typeof(this.load_syntax[lang]['COMMENT_SINGLE'][i])=="function") continue;var x=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_SINGLE'][i]);quote_tab[quote_tab.length]="("+x+"(.|\\r|\\t)*(\\n|$))";syntax_trace.push(x);this.syntax[lang]["comments"][x]="\n";}}if(this.load_syntax[lang]['COMMENT_MULTI']){for(var i in this.load_syntax[lang]['COMMENT_MULTI']){if(typeof(this.load_syntax[lang]['COMMENT_MULTI'][i])=="function") continue;var start=this.get_escaped_regexp(i);var end=this.get_escaped_regexp(this.load_syntax[lang]['COMMENT_MULTI'][i]);quote_tab[quote_tab.length]="("+start+"(.|\\n|\\r)*?("+end+"|$))";syntax_trace.push(start);syntax_trace.push(end);this.syntax[lang]["comments"][i]=this.load_syntax[lang]['COMMENT_MULTI'][i];}}if(quote_tab.length>0) this.syntax[lang]["comment_or_quote_reg_exp"]=new RegExp("("+quote_tab.join("|")+")","gi");if(syntax_trace.length>0) this.syntax[lang]["syntax_trace_regexp"]=new RegExp("((.|\n)*?)(\\\\*("+ syntax_trace.join("|") +"|$))", "gmi");if(this.load_syntax[lang]['SCRIPT_DELIMITERS']){this.syntax[lang]["script_delimiters"]=new Object();for(var i in this.load_syntax[lang]['SCRIPT_DELIMITERS']){if(typeof(this.load_syntax[lang]['SCRIPT_DELIMITERS'][i])=="function") continue;this.syntax[lang]["script_delimiters"][i]=this.load_syntax[lang]['SCRIPT_DELIMITERS'];}}this.syntax[lang]["custom_regexp"]=new Object();if(this.load_syntax[lang]['REGEXPS']){for(var i in this.load_syntax[lang]['REGEXPS']){if(typeof(this.load_syntax[lang]['REGEXPS'][i])=="function") continue;var val=this.load_syntax[lang]['REGEXPS'][i];if(!this.syntax[lang]["custom_regexp"][val['execute']]) this.syntax[lang]["custom_regexp"][val['execute']]=new Object();this.syntax[lang]["custom_regexp"][val['execute']][i]={'regexp' : new RegExp(val['search'], val['modifiers']) , 'class' : val['class']};}}if(this.load_syntax[lang]['STYLES']){lang_style[lang]=new Object();for(var i in this.load_syntax[lang]['STYLES']){if(typeof(this.load_syntax[lang]['STYLES'][i])=="function") continue;if(typeof(this.load_syntax[lang]['STYLES'][i]) !="string"){for(var j in this.load_syntax[lang]['STYLES'][i]){lang_style[lang][j]=this.load_syntax[lang]['STYLES'][i][j];}}
-else{lang_style[lang][i]=this.load_syntax[lang]['STYLES'][i];}}}var style="";for(var i in lang_style[lang]){if(lang_style[lang][i].length>0){style+="."+ lang +" ."+ i.toLowerCase() +" span{"+lang_style[lang][i]+"}\n";style+="."+ lang +" ."+ i.toLowerCase() +"{"+lang_style[lang][i]+"}\n";}}this.syntax[lang]["styles"]=style;}}};eAL.waiting_loading["reg_syntax.js"]="loaded";
-var editAreaLoader= eAL;var editAreas=eAs;EditAreaLoader=EAL;editAreaLoader.iframe_script= "<script language='Javascript' type='text/javascript'> function EA(){this.error=false;this.inlinePopup=new Array({popup_id: \"area_search_replace\", icon_id: \"search\"}, {popup_id: \"edit_area_help\", icon_id: \"help\"});this.plugins=new Object();this.line_number=0;this.nav=parent.eAL.nav;this.last_selection=new Object();this.last_text_to_highlight=\"\";this.last_hightlighted_text=\"\";this.syntax_list=new Array();this.allready_used_syntax=new Object();this.textareaFocused=false;this.previous=new Array();this.next=new Array();this.last_undo=\"\";this.files=new Object();this.filesIdAssoc=new Object();this.curr_file='';this.assocBracket=new Object();this.revertAssocBracket=new Object();this.assocBracket[\"(\"]=\")\";this.assocBracket[\"{\"]=\"}\";this.assocBracket[\"[\"]=\"]\";for(var index in this.assocBracket){this.revertAssocBracket[this.assocBracket[index]]=index;}this.is_editable=true;this.lineHeight=16;this.tab_nb_char=8;if(this.nav['isOpera']) this.tab_nb_char=6;this.is_tabbing=false;this.fullscreen={'isFull': false};this.isResizing=false;this.id=area_id;this.settings=eAs[this.id][\"settings\"];if((\"\"+this.settings['replace_tab_by_spaces']).match(/^[0-9]+$/)){this.tab_nb_char=this.settings['replace_tab_by_spaces'];this.tabulation=\"\";for(var i=0;i<this.tab_nb_char;i++) this.tabulation+=\" \";}\nelse{this.tabulation=\"\t\";}if(this.settings[\"syntax_selection_allow\"] && this.settings[\"syntax_selection_allow\"].length>0) this.syntax_list=this.settings[\"syntax_selection_allow\"].replace(/ /g,\"\").split(\",\");if(this.settings['syntax']) this.allready_used_syntax[this.settings['syntax']]=true;};EA.prototype.update_size=function(){if(eAs[eA.id] && eAs[eA.id][\"displayed\"]==true){if(eA.fullscreen['isFull']){parent.document.getElementById(\"frame_\"+eA.id).style.width=parent.document.getElementsByTagName(\"html\")[0].clientWidth + \"px\";parent.document.getElementById(\"frame_\"+eA.id).style.height=parent.document.getElementsByTagName(\"html\")[0].clientHeight + \"px\";}if(eA.tab_browsing_area.style.display=='block' && !eA.nav['isIE']){eA.tab_browsing_area.style.height=\"0px\";eA.tab_browsing_area.style.height=(eA.result.offsetTop - eA.tab_browsing_area.offsetTop -1)+\"px\";}var height=document.body.offsetHeight - eA.get_all_toolbar_height() - 4;eA.result.style.height=height +\"px\";var width=document.body.offsetWidth -2;eA.result.style.width=width+\"px\";for(var i=0;i<eA.inlinePopup.length;i++){var popup=document.getElementById(eA.inlinePopup[i][\"popup_id\"]);var max_left=document.body.offsetWidth- popup.offsetWidth;var max_top=document.body.offsetHeight- popup.offsetHeight;if(popup.offsetTop>max_top) popup.style.top=max_top+\"px\";if(popup.offsetLeft>max_left) popup.style.left=max_left+\"px\";}}};EA.prototype.init=function(){this.textarea=document.getElementById(\"textarea\");this.container=document.getElementById(\"container\");this.result=document.getElementById(\"result\");this.content_highlight=document.getElementById(\"content_highlight\");this.selection_field=document.getElementById(\"selection_field\");this.processing_screen=document.getElementById(\"processing\");this.editor_area=document.getElementById(\"editor\");this.tab_browsing_area=document.getElementById(\"tab_browsing_area\");if(!this.settings['is_editable']) this.set_editable(false);if(syntax_selec=document.getElementById(\"syntax_selection\")){for(var i=0;i<this.syntax_list.length;i++){var syntax=this.syntax_list[i];var option=document.createElement(\"option\");option.value=syntax;if(syntax==this.settings['syntax']) option.selected=\"selected\";option.innerHTML=this.get_translation(\"syntax_\" + syntax, \"word\");syntax_selec.appendChild(option);}}spans=parent.getChildren(document.getElementById(\"toolbar_1\"), \"span\", \"\", \"\", \"all\", -1);for(var i=0;i<spans.length;i++){id=spans[i].id.replace(/tmp_tool_(.*)/, \"$1\");if(id!=spans[i].id){for(var j in this.plugins){if(typeof(this.plugins[j].get_control_html)==\"function\" ){html=this.plugins[j].get_control_html(id);if(html!=false){html=this.get_translation(html, \"template\");var new_span=document.createElement(\"span\");new_span.innerHTML=html;var father=spans[i].parentNode;spans[i].parentNode.replaceChild(new_span, spans[i]);break;}}}}}this.textarea.value=eAs[this.id][\"textarea\"].value;if(this.settings[\"debug\"]) this.debug=parent.document.getElementById(\"edit_area_debug_\"+this.id);if(document.getElementById(\"redo\") !=null) this.switchClassSticky(document.getElementById(\"redo\"), 'editAreaButtonDisabled', true);if(typeof(parent.eAL.syntax[this.settings[\"syntax\"]])!=\"undefined\"){for(var i in parent.eAL.syntax){this.add_style(parent.eAL.syntax[i][\"styles\"]);}}if(this.nav['isOpera']) document.getElementById(\"editor\").onkeypress=keyDown;\nelse document.getElementById(\"editor\").onkeydown=keyDown;for(var i=0;i<this.inlinePopup.length;i++){if(this.nav['isIE'] || this.nav['isFirefox']) document.getElementById(this.inlinePopup[i][\"popup_id\"]).onkeydown=keyDown;\nelse document.getElementById(this.inlinePopup[i][\"popup_id\"]).onkeypress=keyDown;}if(this.settings[\"allow_resize\"]==\"both\" || this.settings[\"allow_resize\"]==\"x\" || this.settings[\"allow_resize\"]==\"y\") this.allow_resize(true);parent.eAL.toggle(this.id, \"on\");this.change_smooth_selection_mode(eA.smooth_selection);this.execCommand(\"change_highlight\", this.settings[\"start_highlight\"]);this.set_font(eA.settings[\"font_family\"], eA.settings[\"font_size\"]);children=parent.getChildren(document.body, \"\", \"selec\", \"none\", \"all\", -1);for(var i=0;i<children.length;i++){if(this.nav['isIE']) children[i].unselectable=true;\nelse children[i].onmousedown=function(){return false};}if(this.nav['isGecko']){this.textarea.spellcheck=this.settings[\"gecko_spellcheck\"];}if(this.nav['isOpera']){this.editor_area.style.position=\"absolute\";this.selection_field.style.marginTop=\"-1pt\";this.selection_field.style.paddingTop=\"1pt\";document.getElementById(\"cursor_pos\").style.marginTop=\"-1pt\";document.getElementById(\"end_bracket\").style.marginTop=\"-1pt\";this.content_highlight.style.marginTop=\"-1pt\";}if(this.nav['isSafari']){this.editor_area.style.position=\"absolute\";this.selection_field.style.marginTop=\"-1pt\";this.selection_field.style.paddingTop=\"1pt\";this.selection_field.style.marginLeft=\"3px\";this.content_highlight.style.marginTop=\"-1pt\";this.content_highlight.style.marginLeft=\"3px\";document.getElementById(\"cursor_pos\").style.marginLeft=\"3px\";document.getElementById(\"end_bracket\").style.marginLeft=\"3px\";}parent.eAL.add_event(this.result, \"click\", function(e){if((e.target || e.srcElement)==eA.result){eA.area_select(eA.textarea.value.length, 0);}});if(this.settings['is_multi_files']!=false) this.open_file({'id': this.curr_file, 'text': ''});setTimeout(\"eA.focus();eA.manage_size();eA.execCommand('EA_load');\", 10);this.check_undo();this.check_line_selection(true);this.scroll_to_view();for(var i in this.plugins){if(typeof(this.plugins[i].onload)==\"function\") this.plugins[i].onload();}if(this.settings['fullscreen']==true) this.toggle_full_screen(true);parent.eAL.add_event(window, \"resize\", eA.update_size);parent.eAL.add_event(parent.window, \"resize\", eA.update_size);parent.eAL.add_event(top.window, \"resize\", eA.update_size);parent.eAL.add_event(window, \"unload\", function(){if(eAs[eA.id] && eAs[eA.id][\"displayed\"]) eA.execCommand(\"EA_unload\");});};EA.prototype.manage_size=function(onlyOneTime){if(!eAs[this.id]) return false;if(eAs[this.id][\"displayed\"]==true && this.textareaFocused){var resized=false;var area_width=this.textarea.scrollWidth;var area_height=this.textarea.scrollHeight;if(this.nav['isOpera']){area_height=this.last_selection['nb_line']*this.lineHeight;area_width=10000;}if(this.nav['isIE']>=7) area_width-=45;if(this.nav['isGecko'] && this.smooth_selection && this.last_selection[\"nb_line\"]) area_height=this.last_selection[\"nb_line\"]*this.lineHeight;if(this.textarea.previous_scrollWidth!=area_width){if(!this.nav['isOpera'] && this.textarea.style.width && (this.textarea.style.width.replace(\"px\",\"\") < area_width)) area_width+=50;if(this.nav['isGecko'] || this.nav['isOpera']) this.container.style.width=(area_width+45)+\"px\";\nelse this.container.style.width=area_width+\"px\";this.textarea.style.width=area_width+\"px\";this.content_highlight.style.width=area_width+\"px\";this.textarea.previous_scrollWidth=area_width;resized=true;}var area_height=this.textarea.scrollHeight;if(this.nav['isOpera']){area_height=this.last_selection['nb_line']*this.lineHeight;}if(this.nav['isGecko'] && this.smooth_selection && this.last_selection[\"nb_line\"]) area_height=this.last_selection[\"nb_line\"]*this.lineHeight;if(this.textarea.previous_scrollHeight!=area_height){this.container.style.height=(area_height+2)+\"px\";this.textarea.style.height=area_height+\"px\";this.content_highlight.style.height=area_height+\"px\";this.textarea.previous_scrollHeight=area_height;resized=true;}if(this.last_selection[\"nb_line\"] >=this.line_number){var div_line_number=\"\";for(i=this.line_number+1;i<this.last_selection[\"nb_line\"]+100;i++){div_line_number+=i+\"<br />\";this.line_number++;}var span=document.createElement(\"span\");if(this.nav['isIE']) span.unselectable=true;span.innerHTML=div_line_number;document.getElementById(\"line_number\").appendChild(span);}this.textarea.scrollTop=\"0px\";this.textarea.scrollLeft=\"0px\";if(resized==true){this.scroll_to_view();}}if(!onlyOneTime) setTimeout(\"eA.manage_size();\", 100);};EA.prototype.add_event=function(obj, name, handler){if (this.nav['isIE']){obj.attachEvent(\"on\" + name, handler);}\nelse{obj.addEventListener(name, handler, false);}};EA.prototype.execCommand=function(cmd, param){for(var i in this.plugins){if(typeof(this.plugins[i].execCommand)==\"function\"){if(!this.plugins[i].execCommand(cmd, param)) return;}}switch(cmd){case \"save\": if(this.settings[\"save_callback\"].length>0) eval(\"parent.\"+this.settings[\"save_callback\"]+\"('\"+ this.id +\"', eA.textarea.value);\");break;case \"load\": if(this.settings[\"load_callback\"].length>0) eval(\"parent.\"+this.settings[\"load_callback\"]+\"('\"+ this.id +\"');\");break;case \"onchange\": if(this.settings[\"change_callback\"].length>0) eval(\"parent.\"+this.settings[\"change_callback\"]+\"('\"+ this.id +\"');\");break;case \"EA_load\": if(this.settings[\"EA_load_callback\"].length>0) eval(\"parent.\"+this.settings[\"EA_load_callback\"]+\"('\"+ this.id +\"');\");break;case \"EA_unload\": if(this.settings[\"EA_unload_callback\"].length>0) eval(\"parent.\"+this.settings[\"EA_unload_callback\"]+\"('\"+ this.id +\"');\");break;case \"toggle_on\": if(this.settings[\"EA_toggle_on_callback\"].length>0) eval(\"parent.\"+this.settings[\"EA_toggle_on_callback\"]+\"('\"+ this.id +\"');\");break;case \"toggle_off\": if(this.settings[\"EA_toggle_off_callback\"].length>0) eval(\"parent.\"+this.settings[\"EA_toggle_off_callback\"]+\"('\"+ this.id +\"');\");break;case \"re_sync\": if(!this.do_highlight) break;case \"file_switch_on\": if(this.settings[\"EA_file_switch_on_callback\"].length>0) eval(\"parent.\"+this.settings[\"EA_file_switch_on_callback\"]+\"(param);\");break;case \"file_switch_off\": if(this.settings[\"EA_file_switch_off_callback\"].length>0) eval(\"parent.\"+this.settings[\"EA_file_switch_off_callback\"]+\"(param);\");break;case \"file_close\": if(this.settings[\"EA_file_close_callback\"].length>0) return eval(\"parent.\"+this.settings[\"EA_file_close_callback\"]+\"(param);\");break;default: if(typeof(eval(\"eA.\"+cmd))==\"function\"){if(this.settings[\"debug\"]) eval(\"eA.\"+ cmd +\"(param);\");\nelse try{eval(\"eA.\"+ cmd +\"(param);\");}catch(e){};}}};EA.prototype.get_translation=function(word, mode){if(mode==\"template\") return parent.eAL.translate(word, this.settings[\"language\"], mode);\nelse return parent.eAL.get_word_translation(word, this.settings[\"language\"]);};EA.prototype.add_plugin=function(plug_name, plug_obj){for(var i=0;i<this.settings[\"plugins\"].length;i++){if(this.settings[\"plugins\"][i]==plug_name){this.plugins[plug_name]=plug_obj;plug_obj.baseURL=parent.eAL.baseURL + \"plugins/\" + plug_name + \"/\";if( typeof(plug_obj.init)==\"function\" ) plug_obj.init();}}};EA.prototype.load_css=function(url){try{link=document.createElement(\"link\");link.type=\"text/css\";link.rel=\"stylesheet\";link.media=\"all\";link.href=url;head=document.getElementsByTagName(\"head\");head[0].appendChild(link);}catch(e){document.write(\"<link href='\"+ url +\"' rel='stylesheet' type='text/css' />\");}};EA.prototype.load_script=function(url){try{script=document.createElement(\"script\");script.type=\"text/javascript\";script.src =url;script.charset=\"UTF-8\";head=document.getElementsByTagName(\"head\");head[0].appendChild(script);}catch(e){document.write(\"<script type='text/javascript' src='\" + url + \"' charset=\\\"UTF-8\\\"><\"+\"/script>\");}};EA.prototype.add_lang=function(language, values){if(!parent.eAL.lang[language]) parent.eAL.lang[language]=new Object();for(var i in values) parent.eAL.lang[language][i]=values[i];};var eA=new EA();eA.add_event(window, \"load\", init);function init(){setTimeout(\"eA.init();\", 10);}; EA.prototype.focus=function(){this.textarea.focus();this.textareaFocused=true;};EA.prototype.check_line_selection=function(timer_checkup){if(!eAs[this.id]) return false;if(!this.smooth_selection && !this.do_highlight){}\nelse if(this.textareaFocused && eAs[this.id][\"displayed\"]==true && this.isResizing==false){infos=this.get_selection_infos();if(this.last_selection[\"line_start\"] !=infos[\"line_start\"] || this.last_selection[\"line_nb\"] !=infos[\"line_nb\"] || infos[\"full_text\"] !=this.last_selection[\"full_text\"] || this.reload_highlight){new_top=this.lineHeight * (infos[\"line_start\"]-1);new_height=Math.max(0, this.lineHeight * infos[\"line_nb\"]);new_width=Math.max(this.textarea.scrollWidth, this.container.clientWidth -50);this.selection_field.style.top=new_top+\"px\";this.selection_field.style.width=new_width+\"px\";this.selection_field.style.height=new_height+\"px\";document.getElementById(\"cursor_pos\").style.top=new_top+\"px\";if(this.do_highlight==true){var curr_text=infos[\"full_text\"].split(\"\\n\");var content=\"\";var start=Math.max(0,infos[\"line_start\"]-1);var end=Math.min(curr_text.length, infos[\"line_start\"]+infos[\"line_nb\"]-1);for(i=start;i< end;i++){content+=curr_text[i]+\"\\n\";}content=content.replace(/&/g,\"&amp;\");content=content.replace(/</g,\"&lt;\");content=content.replace(/>/g,\"&gt;\");if(this.nav['isIE'] || this.nav['isOpera']) this.selection_field.innerHTML=\"<pre>\" + content.replace(\"\\n\", \"<br/>\") + \"</pre>\";\nelse this.selection_field.innerHTML=content;if(this.reload_highlight || (infos[\"full_text\"] !=this.last_text_to_highlight && (this.last_selection[\"line_start\"]!=infos[\"line_start\"] || this.last_selection[\"line_nb\"]!=infos[\"line_nb\"] || this.last_selection[\"nb_line\"]!=infos[\"nb_line\"]) ) ) this.maj_highlight(infos);}}if(infos[\"line_start\"] !=this.last_selection[\"line_start\"] || infos[\"curr_pos\"] !=this.last_selection[\"curr_pos\"] || infos[\"full_text\"].length!=this.last_selection[\"full_text\"].length || this.reload_highlight){var selec_char=infos[\"curr_line\"].charAt(infos[\"curr_pos\"]-1);var no_real_move=true;if(infos[\"line_nb\"]==1 && (this.assocBracket[selec_char] || this.revertAssocBracket[selec_char]) ){no_real_move=false;if(this.findEndBracket(infos, selec_char) ===true){document.getElementById(\"end_bracket\").style.visibility=\"visible\";document.getElementById(\"cursor_pos\").style.visibility=\"visible\";document.getElementById(\"cursor_pos\").innerHTML=selec_char;document.getElementById(\"end_bracket\").innerHTML=(this.assocBracket[selec_char] || this.revertAssocBracket[selec_char]);}\nelse{document.getElementById(\"end_bracket\").style.visibility=\"hidden\";document.getElementById(\"cursor_pos\").style.visibility=\"hidden\";}}\nelse{document.getElementById(\"cursor_pos\").style.visibility=\"hidden\";document.getElementById(\"end_bracket\").style.visibility=\"hidden\";}this.displayToCursorPosition(\"cursor_pos\", infos[\"line_start\"], infos[\"curr_pos\"]-1, infos[\"curr_line\"], no_real_move);if(infos[\"line_nb\"]==1 && infos[\"line_start\"]!=this.last_selection[\"line_start\"]) this.scroll_to_view();}this.last_selection=infos;}if(timer_checkup){if(this.do_highlight==true) setTimeout(\"eA.check_line_selection(true)\", 50);\nelse setTimeout(\"eA.check_line_selection(true)\", 50);}};EA.prototype.get_selection_infos=function(){if(this.nav['isIE']) this.getIESelection();start=this.textarea.selectionStart;end=this.textarea.selectionEnd;if(this.last_selection[\"selectionStart\"]==start && this.last_selection[\"selectionEnd\"]==end && this.last_selection[\"full_text\"]==this.textarea.value) return this.last_selection;if(this.tabulation!=\"\t\" && this.textarea.value.indexOf(\"\t\")!=-1){var len=this.textarea.value.length;this.textarea.value=this.replace_tab(this.textarea.value);start=end=start+(this.textarea.value.length-len);this.area_select(start, 0);}var selections=new Object();selections[\"selectionStart\"]=start;selections[\"selectionEnd\"]=end;selections[\"full_text\"]=this.textarea.value;selections[\"line_start\"]=1;selections[\"line_nb\"]=1;selections[\"curr_pos\"]=0;selections[\"curr_line\"]=\"\";selections[\"indexOfCursor\"]=0;selections[\"selec_direction\"]=this.last_selection[\"selec_direction\"];var splitTab=selections[\"full_text\"].split(\"\\n\");var nbLine=Math.max(0, splitTab.length);var nbChar=Math.max(0, selections[\"full_text\"].length - (nbLine - 1));if(selections[\"full_text\"].indexOf(\"\\r\")!=-1) nbChar=nbChar - (nbLine -1);selections[\"nb_line\"]=nbLine;selections[\"nb_char\"]=nbChar;if(start>0){var str=selections[\"full_text\"].substr(0,start);selections[\"curr_pos\"]=start - str.lastIndexOf(\"\\n\");selections[\"line_start\"]=Math.max(1, str.split(\"\\n\").length);}\nelse{selections[\"curr_pos\"]=1;}if(end>start){selections[\"line_nb\"]=selections[\"full_text\"].substring(start,end).split(\"\\n\").length;}selections[\"indexOfCursor\"]=this.textarea.selectionStart;selections[\"curr_line\"]=splitTab[Math.max(0,selections[\"line_start\"]-1)];if(selections[\"selectionStart\"]==this.last_selection[\"selectionStart\"]){if(selections[\"selectionEnd\"]>this.last_selection[\"selectionEnd\"]) selections[\"selec_direction\"]=\"down\";\nelse if(selections[\"selectionEnd\"]==this.last_selection[\"selectionStart\"]) selections[\"selec_direction\"]=this.last_selection[\"selec_direction\"];}\nelse if(selections[\"selectionStart\"]==this.last_selection[\"selectionEnd\"] && selections[\"selectionEnd\"]>this.last_selection[\"selectionEnd\"]){selections[\"selec_direction\"]=\"down\";}\nelse{selections[\"selec_direction\"]=\"up\";}document.getElementById(\"nbLine\").innerHTML=nbLine;document.getElementById(\"nbChar\").innerHTML=nbChar;document.getElementById(\"linePos\").innerHTML=selections[\"line_start\"];document.getElementById(\"currPos\").innerHTML=selections[\"curr_pos\"];return selections;};EA.prototype.getIESelection=function(){var range=document.selection.createRange();var stored_range=range.duplicate();stored_range.moveToElementText( this.textarea );stored_range.setEndPoint( 'EndToEnd', range );if(stored_range.parentElement() !=this.textarea) return;var scrollTop=this.result.scrollTop + document.body.scrollTop;var relative_top=range.offsetTop - parent.calculeOffsetTop(this.textarea) + scrollTop;var line_start=Math.round((relative_top / this.lineHeight) +1);var line_nb=Math.round(range.boundingHeight / this.lineHeight);var range_start=stored_range.text.length - range.text.length;var tab=this.textarea.value.substr(0, range_start).split(\"\\n\");range_start+=(line_start - tab.length)*2;this.textarea.selectionStart=range_start;var range_end=this.textarea.selectionStart + range.text.length;tab=this.textarea.value.substr(0, range_start + range.text.length).split(\"\\n\");range_end+=(line_start + line_nb - 1 - tab.length)*2;this.textarea.selectionEnd=range_end;};EA.prototype.setIESelection=function(){var nbLineStart=this.textarea.value.substr(0, this.textarea.selectionStart).split(\"\\n\").length - 1;var nbLineEnd=this.textarea.value.substr(0, this.textarea.selectionEnd).split(\"\\n\").length - 1;var range=document.selection.createRange();range.moveToElementText( this.textarea );range.setEndPoint( 'EndToStart', range );range.moveStart('character', this.textarea.selectionStart - nbLineStart);range.moveEnd('character', this.textarea.selectionEnd - nbLineEnd - (this.textarea.selectionStart - nbLineStart) );range.select();};EA.prototype.tab_selection=function(){if(this.is_tabbing) return;this.is_tabbing=true;if( this.nav['isIE'] ) this.getIESelection();var start=this.textarea.selectionStart;var end=this.textarea.selectionEnd;var insText=this.textarea.value.substring(start, end);var pos_start=start;var pos_end=end;if (insText.length==0){this.textarea.value=this.textarea.value.substr(0, start) + this.tabulation + this.textarea.value.substr(end);pos_start=start + this.tabulation.length;pos_end=pos_start;}\nelse{start=Math.max(0, this.textarea.value.substr(0, start).lastIndexOf(\"\\n\")+1);endText=this.textarea.value.substr(end);startText=this.textarea.value.substr(0, start);tmp=this.textarea.value.substring(start, end).split(\"\\n\");insText=this.tabulation+tmp.join(\"\\n\"+this.tabulation);this.textarea.value=startText + insText + endText;pos_start=start;pos_end=this.textarea.value.indexOf(\"\\n\", startText.length + insText.length);if(pos_end==-1) pos_end=this.textarea.value.length;}this.textarea.selectionStart=pos_start;this.textarea.selectionEnd=pos_end;if(this.nav['isIE']){this.setIESelection();setTimeout(\"eA.is_tabbing=false;\", 100);}\nelse this.is_tabbing=false;};EA.prototype.invert_tab_selection=function(){if(this.is_tabbing) return;this.is_tabbing=true;if(this.nav['isIE']) this.getIESelection();var start=this.textarea.selectionStart;var end=this.textarea.selectionEnd;var insText=this.textarea.value.substring(start, end);var pos_start=start;var pos_end=end;if (insText.length==0){if(this.textarea.value.substring(start-this.tabulation.length, start)==this.tabulation){this.textarea.value=this.textarea.value.substr(0, start-this.tabulation.length) + this.textarea.value.substr(end);pos_start=Math.max(0, start-this.tabulation.length);pos_end=pos_start;}}\nelse{start=this.textarea.value.substr(0, start).lastIndexOf(\"\\n\")+1;endText=this.textarea.value.substr(end);startText=this.textarea.value.substr(0, start);tmp=this.textarea.value.substring(start, end).split(\"\\n\");insText=\"\";for(i=0;i<tmp.length;i++){for(j=0;j<this.tab_nb_char;j++){if(tmp[i].charAt(0)==\"\t\"){tmp[i]=tmp[i].substr(1);j=this.tab_nb_char;}\nelse if(tmp[i].charAt(0)==\" \") tmp[i]=tmp[i].substr(1);}insText+=tmp[i];if(i<tmp.length-1) insText+=\"\\n\";}this.textarea.value=startText + insText + endText;pos_start=start;pos_end=this.textarea.value.indexOf(\"\\n\", startText.length + insText.length);if(pos_end==-1) pos_end=this.textarea.value.length;}this.textarea.selectionStart=pos_start;this.textarea.selectionEnd=pos_end;if(this.nav['isIE']){this.setIESelection();setTimeout(\"eA.is_tabbing=false;\", 100);}\nelse this.is_tabbing=false;};EA.prototype.press_enter=function(){if(!this.smooth_selection) return false;if(this.nav['isIE']) this.getIESelection();var scrollTop=this.result.scrollTop;var scrollLeft=this.result.scrollLeft;var start=this.textarea.selectionStart;var end=this.textarea.selectionEnd;var start_last_line=Math.max(0 , this.textarea.value.substring(0, start).lastIndexOf(\"\\n\") + 1 );var begin_line=this.textarea.value.substring(start_last_line, start).replace(/^([ \t]*).*/gm, \"$1\");if(begin_line==\"\\n\" || begin_line==\"\\r\" || begin_line.length==0) return false;if(this.nav['isIE'] || this.nav['isOpera']){begin_line=\"\\r\\n\"+ begin_line;}\nelse{begin_line=\"\\n\"+ begin_line;}this.textarea.value=this.textarea.value.substring(0, start) + begin_line + this.textarea.value.substring(end);this.area_select(start+ begin_line.length ,0);if(this.nav['isIE']){this.result.scrollTop=scrollTop;this.result.scrollLeft=scrollLeft;}return true;};EA.prototype.findEndBracket=function(infos, bracket){var start=infos[\"indexOfCursor\"];var normal_order=true;if(this.assocBracket[bracket]) endBracket=this.assocBracket[bracket];\nelse if(this.revertAssocBracket[bracket]){endBracket=this.revertAssocBracket[bracket];normal_order=false;}var end=-1;var nbBracketOpen=0;for(var i=start;i<infos[\"full_text\"].length && i>=0;){if(infos[\"full_text\"].charAt(i)==endBracket){nbBracketOpen--;if(nbBracketOpen<=0){end=i;break;}}\nelse if(infos[\"full_text\"].charAt(i)==bracket) nbBracketOpen++;if(normal_order) i++;\nelse i--;}if(end==-1) return false;var endLastLine=infos[\"full_text\"].substr(0, end).lastIndexOf(\"\\n\");if(endLastLine==-1) line=1;\nelse line=infos[\"full_text\"].substr(0, endLastLine).split(\"\\n\").length + 1;var curPos=end - endLastLine;this.displayToCursorPosition(\"end_bracket\", line, curPos, infos[\"full_text\"].substring(endLastLine +1, end));return true;};EA.prototype.displayToCursorPosition=function(id, start_line, cur_pos, lineContent, no_real_move){var elem=document.getElementById(\"test_font_size\");var dest=document.getElementById(id);var postLeft=0;elem.innerHTML=\"<pre><span id='test_font_size_inner'>\"+lineContent.substr(0, cur_pos).replace(/&/g,\"&amp;\").replace(/</g,\"&lt;\")+\"</span></pre>\";posLeft=45 + document.getElementById('test_font_size_inner').offsetWidth;var posTop=this.lineHeight * (start_line-1);if(no_real_move!=true){dest.style.top=posTop+\"px\";dest.style.left=posLeft+\"px\";}dest.cursor_top=posTop;dest.cursor_left=posLeft;};EA.prototype.area_select=function(start, length){this.textarea.focus();start=Math.max(0, Math.min(this.textarea.value.length, start));end=Math.max(start, Math.min(this.textarea.value.length, start+length));if(this.nav['isIE']){this.textarea.selectionStart=start;this.textarea.selectionEnd=end;this.setIESelection();}\nelse{if(this.nav['isOpera']){this.textarea.setSelectionRange(0, 0);}this.textarea.setSelectionRange(start, end);}this.check_line_selection();};EA.prototype.area_get_selection=function(){var text=\"\";if( document.selection ){var range=document.selection.createRange();text=range.text;}\nelse{text=this.textarea.value.substring(this.textarea.selectionStart, this.textarea.selectionEnd);}return text;}; EA.prototype.replace_tab=function(text){return text.replace(/((\\n?)([^\t\\n]*)\t)/gi, eA.smartTab);};EA.prototype.smartTab=function(){val=\" \";return EA.prototype.smartTab.arguments[2] + EA.prototype.smartTab.arguments[3] + val.substr(0, eA.tab_nb_char - (EA.prototype.smartTab.arguments[3].length)%eA.tab_nb_char);};EA.prototype.show_waiting_screen=function(){width=this.editor_area.offsetWidth;height=this.editor_area.offsetHeight;if(this.nav['isGecko'] || this.nav['isOpera'] || this.nav['isIE']>=7){width-=2;height-=2;}this.processing_screen.style.display=\"block\";this.processing_screen.style.width=width+\"px\";this.processing_screen.style.height=height+\"px\";this.waiting_screen_displayed=true;};EA.prototype.hide_waiting_screen=function(){this.processing_screen.style.display=\"none\";this.waiting_screen_displayed=false;};EA.prototype.add_style=function(styles){if(styles.length>0){newcss=document.createElement(\"style\");newcss.type=\"text/css\";newcss.media=\"all\";document.getElementsByTagName(\"head\")[0].appendChild(newcss);cssrules=styles.split(\"}\");newcss=document.styleSheets[0];if(newcss.rules){for(i=cssrules.length-2;i>=0;i--){newrule=cssrules[i].split(\"{\");newcss.addRule(newrule[0],newrule[1])}}\nelse if(newcss.cssRules){for(i=cssrules.length-1;i>=0;i--){if(cssrules[i].indexOf(\"{\")!=-1){newcss.insertRule(cssrules[i]+\"}\",0);}}}}};EA.prototype.set_font=function(family, size){var elems=new Array(\"textarea\", \"content_highlight\", \"cursor_pos\", \"end_bracket\", \"selection_field\", \"line_number\");if(family && family!=\"\") this.settings[\"font_family\"]=family;if(size && size>0) this.settings[\"font_size\"]=size;if(this.nav['isOpera']) this.settings['font_family']=\"monospace\";var elem_font=document.getElementById(\"area_font_size\");if(elem_font){for(var i=0;i<elem_font.length;i++){if(elem_font.options[i].value && elem_font.options[i].value==this.settings[\"font_size\"]) elem_font.options[i].selected=true;}}document.getElementById(\"test_font_size\").style.fontFamily=\"\"+this.settings[\"font_family\"];document.getElementById(\"test_font_size\").style.fontSize=this.settings[\"font_size\"]+\"pt\";document.getElementById(\"test_font_size\").innerHTML=\"0\";this.lineHeight=document.getElementById(\"test_font_size\").offsetHeight;for(var i=0;i<elems.length;i++){var elem=document.getElementById(elems[i]);document.getElementById(elems[i]).style.fontFamily=this.settings[\"font_family\"];document.getElementById(elems[i]).style.fontSize=this.settings[\"font_size\"]+\"pt\";document.getElementById(elems[i]).style.lineHeight=this.lineHeight+\"px\";}if(this.nav['isOpera']){var start=this.textarea.selectionStart;var end=this.textarea.selectionEnd;var parNod=this.textarea.parentNode, nxtSib=this.textarea.nextSibling;parNod.removeChild(this.textarea);parNod.insertBefore(this.textarea, nxtSib);this.area_select(start, end-start);}this.add_style(\"pre{font-family:\"+this.settings[\"font_family\"]+\"}\");this.last_line_selected=-1;this.last_selection=new Array();this.resync_highlight();};EA.prototype.change_font_size=function(){var size=document.getElementById(\"area_font_size\").value;if(size>0) this.set_font(\"\", size);};EA.prototype.open_inline_popup=function(popup_id){this.close_all_inline_popup();var popup=document.getElementById(popup_id);var editor=document.getElementById(\"editor\");for(var i=0;i<this.inlinePopup.length;i++){if(this.inlinePopup[i][\"popup_id\"]==popup_id){var icon=document.getElementById(this.inlinePopup[i][\"icon_id\"]);if(icon){this.switchClassSticky(icon, 'editAreaButtonSelected', true);break;}}}popup.style.height=\"auto\";popup.style.overflow=\"visible\";if(document.body.offsetHeight< popup.offsetHeight){popup.style.height=(document.body.offsetHeight-10)+\"px\";popup.style.overflow=\"auto\";}if(!popup.positionned){var new_left=editor.offsetWidth /2 - popup.offsetWidth /2;var new_top=editor.offsetHeight /2 - popup.offsetHeight /2;popup.style.left=new_left+\"px\";popup.style.top=new_top+\"px\";popup.positionned=true;}popup.style.visibility=\"visible\";};EA.prototype.close_inline_popup=function(popup_id){var popup=document.getElementById(popup_id);for(var i=0;i<this.inlinePopup.length;i++){if(this.inlinePopup[i][\"popup_id\"]==popup_id){var icon=document.getElementById(this.inlinePopup[i][\"icon_id\"]);if(icon){this.switchClassSticky(icon, 'editAreaButtonNormal', false);break;}}}popup.style.visibility=\"hidden\";};EA.prototype.close_all_inline_popup=function(e){for(var i=0;i<this.inlinePopup.length;i++){this.close_inline_popup(this.inlinePopup[i][\"popup_id\"]);}this.textarea.focus();};EA.prototype.show_help=function(){this.open_inline_popup(\"edit_area_help\");};EA.prototype.new_document=function(){this.textarea.value=\"\";this.area_select(0,0);};EA.prototype.get_all_toolbar_height=function(){var area=document.getElementById(\"editor\");var results=parent.getChildren(area, \"div\", \"class\", \"area_toolbar\", \"all\", \"0\");var height=0;for(var i=0;i<results.length;i++){height+=results[i].offsetHeight;}return height;};EA.prototype.go_to_line=function(line){if(!line){var icon=document.getElementById(\"go_to_line\");if(icon !=null){this.restoreClass(icon);this.switchClassSticky(icon, 'editAreaButtonSelected', true);}line=prompt(this.get_translation(\"go_to_line_prompt\"));if(icon !=null) this.switchClassSticky(icon, 'editAreaButtonNormal', false);}if(line && line!=null && line.search(/^[0-9]+$/)!=-1){var start=0;var lines=this.textarea.value.split(\"\\n\");if(line > lines.length) start=this.textarea.value.length;\nelse{for(var i=0;i<Math.min(line-1, lines.length);i++) start+=lines[i].length + 1;}this.area_select(start, 0);}};EA.prototype.change_smooth_selection_mode=function(setTo){if(this.do_highlight) return;if(setTo !=null){if(setTo ===false) this.smooth_selection=true;\nelse this.smooth_selection=false;}var icon=document.getElementById(\"change_smooth_selection\");this.textarea.focus();if(this.smooth_selection===true){this.switchClassSticky(icon, 'editAreaButtonNormal', false);this.smooth_selection=false;document.getElementById(\"selection_field\").style.display=\"none\";document.getElementById(\"cursor_pos\").style.display=\"none\";document.getElementById(\"end_bracket\").style.display=\"none\";}\nelse{this.switchClassSticky(icon, 'editAreaButtonSelected', false);this.smooth_selection=true;document.getElementById(\"selection_field\").style.display=\"block\";document.getElementById(\"cursor_pos\").style.display=\"block\";document.getElementById(\"end_bracket\").style.display=\"block\";}};EA.prototype.scroll_to_view=function(show){if(!this.smooth_selection) return;var zone=document.getElementById(\"result\");var cursor_pos_top=document.getElementById(\"cursor_pos\").cursor_top;if(show==\"bottom\") cursor_pos_top+=(this.last_selection[\"line_nb\"]-1)* this.lineHeight;var max_height_visible=zone.clientHeight + zone.scrollTop;var miss_top=cursor_pos_top + this.lineHeight - max_height_visible;if(miss_top>0){zone.scrollTop=zone.scrollTop + miss_top;}\nelse if( zone.scrollTop > cursor_pos_top){zone.scrollTop=cursor_pos_top;}var cursor_pos_left=document.getElementById(\"cursor_pos\").cursor_left;var max_width_visible=zone.clientWidth + zone.scrollLeft;var miss_left=cursor_pos_left + 10 - max_width_visible;if(miss_left>0){zone.scrollLeft=zone.scrollLeft + miss_left + 50;}\nelse if( zone.scrollLeft > cursor_pos_left){zone.scrollLeft=cursor_pos_left;}\nelse if( zone.scrollLeft==45){zone.scrollLeft=0;}};EA.prototype.check_undo=function(only_once){if(!eAs[this.id]) return false;if(this.textareaFocused && eAs[this.id][\"displayed\"]==true){var text=this.textarea.value;if(this.previous.length<=1) this.switchClassSticky(document.getElementById(\"undo\"), 'editAreaButtonDisabled', true);if(!this.previous[this.previous.length-1] || this.previous[this.previous.length-1][\"text\"] !=text){this.previous.push({\"text\": text, \"selStart\": this.textarea.selectionStart, \"selEnd\": this.textarea.selectionEnd});if(this.previous.length > this.settings[\"max_undo\"]+1) this.previous.shift();}if(this.previous.length >=2) this.switchClassSticky(document.getElementById(\"undo\"), 'editAreaButtonNormal', false);}if(!only_once) setTimeout(\"eA.check_undo()\", 3000);};EA.prototype.undo=function(){if(this.previous.length > 0){if(this.nav['isIE']) this.getIESelection();this.next.push({\"text\": this.textarea.value, \"selStart\": this.textarea.selectionStart, \"selEnd\": this.textarea.selectionEnd});var prev=this.previous.pop();if(prev[\"text\"]==this.textarea.value && this.previous.length > 0) prev=this.previous.pop();this.textarea.value=prev[\"text\"];this.last_undo=prev[\"text\"];this.area_select(prev[\"selStart\"], prev[\"selEnd\"]-prev[\"selStart\"]);this.switchClassSticky(document.getElementById(\"redo\"), 'editAreaButtonNormal', false);this.resync_highlight(true);this.check_file_changes();}};EA.prototype.redo=function(){if(this.next.length > 0){var next=this.next.pop();this.previous.push(next);this.textarea.value=next[\"text\"];this.last_undo=next[\"text\"];this.area_select(next[\"selStart\"], next[\"selEnd\"]-next[\"selStart\"]);this.switchClassSticky(document.getElementById(\"undo\"), 'editAreaButtonNormal', false);this.resync_highlight(true);this.check_file_changes();}if( this.next.length==0) this.switchClassSticky(document.getElementById(\"redo\"), 'editAreaButtonDisabled', true);};EA.prototype.check_redo=function(){if(eA.next.length==0 || eA.textarea.value!=eA.last_undo){eA.next=new Array();eA.switchClassSticky(document.getElementById(\"redo\"), 'editAreaButtonDisabled', true);}\nelse{this.switchClassSticky(document.getElementById(\"redo\"), 'editAreaButtonNormal', false);}};EA.prototype.switchClass=function(element, class_name, lock_state){var lockChanged=false;if (typeof(lock_state) !=\"undefined\" && element !=null){element.classLock=lock_state;lockChanged=true;}if (element !=null && (lockChanged || !element.classLock)){element.oldClassName=element.className;element.className=class_name;}};EA.prototype.restoreAndSwitchClass=function(element, class_name){if (element !=null && !element.classLock){this.restoreClass(element);this.switchClass(element, class_name);}};EA.prototype.restoreClass=function(element){if (element !=null && element.oldClassName && !element.classLock){element.className=element.oldClassName;element.oldClassName=null;}};EA.prototype.setClassLock=function(element, lock_state){if (element !=null) element.classLock=lock_state;};EA.prototype.switchClassSticky=function(element, class_name, lock_state){var lockChanged=false;if (typeof(lock_state) !=\"undefined\" && element !=null){element.classLock=lock_state;lockChanged=true;}if (element !=null && (lockChanged || !element.classLock)){element.className=class_name;element.oldClassName=class_name;}};EA.prototype.scroll_page=function(params){var dir=params[\"dir\"];var shift_pressed=params[\"shift\"];screen_height=document.getElementById(\"result\").clientHeight;var lines=this.textarea.value.split(\"\\n\");var new_pos=0;var length=0;var char_left=0;var line_nb=0;if(dir==\"up\"){var scroll_line=Math.ceil((screen_height -30)/this.lineHeight);if(this.last_selection[\"selec_direction\"]==\"up\"){for(line_nb=0;line_nb< Math.min(this.last_selection[\"line_start\"]-scroll_line, lines.length);line_nb++){new_pos+=lines[line_nb].length + 1;}char_left=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection[\"curr_pos\"]-1);if(shift_pressed) length=this.last_selection[\"selectionEnd\"]-new_pos-char_left;this.area_select(new_pos+char_left, length);view=\"top\";}\nelse{view=\"bottom\";for(line_nb=0;line_nb< Math.min(this.last_selection[\"line_start\"]+this.last_selection[\"line_nb\"]-1-scroll_line, lines.length);line_nb++){new_pos+=lines[line_nb].length + 1;}char_left=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection[\"curr_pos\"]-1);if(shift_pressed){start=Math.min(this.last_selection[\"selectionStart\"], new_pos+char_left);length=Math.max(new_pos+char_left, this.last_selection[\"selectionStart\"] )- start;if(new_pos+char_left < this.last_selection[\"selectionStart\"]) view=\"top\";}\nelse start=new_pos+char_left;this.area_select(start, length);}}\nelse{var scroll_line=Math.floor((screen_height-30)/this.lineHeight);if(this.last_selection[\"selec_direction\"]==\"down\"){view=\"bottom\";for(line_nb=0;line_nb< Math.min(this.last_selection[\"line_start\"]+this.last_selection[\"line_nb\"]-2+scroll_line, lines.length);line_nb++){if(line_nb==this.last_selection[\"line_start\"]-1) char_left=this.last_selection[\"selectionStart\"] -new_pos;new_pos+=lines[line_nb].length + 1;}if(shift_pressed){length=Math.abs(this.last_selection[\"selectionStart\"]-new_pos);length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection[\"curr_pos\"]);this.area_select(Math.min(this.last_selection[\"selectionStart\"], new_pos), length);}\nelse{this.area_select(new_pos+char_left, 0);}}\nelse{view=\"top\";for(line_nb=0;line_nb< Math.min(this.last_selection[\"line_start\"]+scroll_line-1, lines.length, lines.length);line_nb++){if(line_nb==this.last_selection[\"line_start\"]-1) char_left=this.last_selection[\"selectionStart\"] -new_pos;new_pos+=lines[line_nb].length + 1;}if(shift_pressed){length=Math.abs(this.last_selection[\"selectionEnd\"]-new_pos-char_left);length+=Math.min(lines[Math.min(lines.length-1, line_nb)].length, this.last_selection[\"curr_pos\"])- char_left-1;this.area_select(Math.min(this.last_selection[\"selectionEnd\"], new_pos+char_left), length);if(new_pos+char_left > this.last_selection[\"selectionEnd\"]) view=\"bottom\";}\nelse{this.area_select(new_pos+char_left, 0);}}}this.check_line_selection();this.scroll_to_view(view);};EA.prototype.start_resize=function(e){parent.eAL.resize[\"id\"]=eA.id;parent.eAL.resize[\"start_x\"]=(e)? e.pageX : event.x + document.body.scrollLeft;parent.eAL.resize[\"start_y\"]=(e)? e.pageY : event.y + document.body.scrollTop;if(eA.nav['isIE']){eA.textarea.focus();eA.getIESelection();}parent.eAL.resize[\"selectionStart\"]=eA.textarea.selectionStart;parent.eAL.resize[\"selectionEnd\"]=eA.textarea.selectionEnd;parent.eAL.start_resize_area();};EA.prototype.toggle_full_screen=function(to){if(typeof(to)==\"undefined\") to=!this.fullscreen['isFull'];var old=this.fullscreen['isFull'];this.fullscreen['isFull']=to;var icon=document.getElementById(\"fullscreen\");if(to && to!=old){var selStart=this.textarea.selectionStart;var selEnd=this.textarea.selectionEnd;var html=parent.document.getElementsByTagName(\"html\")[0];var frame=parent.document.getElementById(\"frame_\"+this.id);this.fullscreen['old_overflow']=parent.get_css_property(html, \"overflow\");this.fullscreen['old_height']=parent.get_css_property(html, \"height\");this.fullscreen['old_width']=parent.get_css_property(html, \"width\");this.fullscreen['old_scrollTop']=html.scrollTop;this.fullscreen['old_scrollLeft']=html.scrollLeft;this.fullscreen['old_zIndex']=parent.get_css_property(frame, \"z-index\");if(this.nav['isOpera']){html.style.height=\"100%\";html.style.width=\"100%\";}html.style.overflow=\"hidden\";html.scrollTop=0;html.scrollLeft=0;frame.style.position=\"absolute\";frame.style.width=html.clientWidth+\"px\";frame.style.height=html.clientHeight+\"px\";frame.style.display=\"block\";frame.style.zIndex=\"999999\";frame.style.top=\"0px\";frame.style.left=\"0px\";frame.style.top=\"-\"+parent.calculeOffsetTop(frame)+\"px\";frame.style.left=\"-\"+parent.calculeOffsetLeft(frame)+\"px\";this.switchClassSticky(icon, 'editAreaButtonSelected', false);this.fullscreen['allow_resize']=this.resize_allowed;this.allow_resize(false);if(this.nav['isFirefox']){parent.eAL.execCommand(this.id, \"update_size();\");this.area_select(selStart, selEnd-selStart);this.scroll_to_view();this.focus();}\nelse{setTimeout(\"parent.eAL.execCommand('\"+ this.id +\"', 'update_size();');eA.focus();\", 10);}}\nelse if(to!=old){var selStart=this.textarea.selectionStart;var selEnd=this.textarea.selectionEnd;var frame=parent.document.getElementById(\"frame_\"+this.id);frame.style.position=\"static\";frame.style.zIndex=this.fullscreen['old_zIndex'];var html=parent.document.getElementsByTagName(\"html\")[0];if(this.nav['isOpera']){html.style.height=\"auto\";html.style.width=\"auto\";html.style.overflow=\"auto\";}\nelse if(this.nav['isIE'] && parent!=top){html.style.overflow=\"auto\";}\nelse html.style.overflow=this.fullscreen['old_overflow'];html.scrollTop=this.fullscreen['old_scrollTop'];html.scrollTop=this.fullscreen['old_scrollLeft'];parent.eAL.hide(this.id);parent.eAL.show(this.id);this.switchClassSticky(icon, 'editAreaButtonNormal', false);if(this.fullscreen['allow_resize']) this.allow_resize(this.fullscreen['allow_resize']);if(this.nav['isFirefox']){this.area_select(selStart, selEnd-selStart);setTimeout(\"eA.scroll_to_view();\", 10);}}};EA.prototype.allow_resize=function(allow){var resize=document.getElementById(\"resize_area\");if(allow){resize.style.visibility=\"visible\";parent.eAL.add_event(resize, \"mouseup\", eA.start_resize);}\nelse{resize.style.visibility=\"hidden\";parent.eAL.remove_event(resize, \"mouseup\", eA.start_resize);}this.resize_allowed=allow;};EA.prototype.change_syntax=function(new_syntax, is_waiting){if(new_syntax==this.settings['syntax']) return true;var founded=false;for(var i=0;i<this.syntax_list.length;i++){if(this.syntax_list[i]==new_syntax) founded=true;}if(founded==true){if(!parent.eAL.load_syntax[new_syntax]){if(!is_waiting) parent.eAL.load_script(parent.eAL.baseURL + \"reg_syntax/\" + new_syntax + \".js\");setTimeout(\"eA.change_syntax('\"+ new_syntax +\"', true);\", 100);this.show_waiting_screen();}\nelse{if(!this.allready_used_syntax[new_syntax]){parent.eAL.init_syntax_regexp();this.add_style(parent.eAL.syntax[new_syntax][\"styles\"]);this.allready_used_syntax[new_syntax]=true;}var sel=document.getElementById(\"syntax_selection\");if(sel && sel.value!=new_syntax){for(var i=0;i<sel.length;i++){if(sel.options[i].value && sel.options[i].value==new_syntax) sel.options[i].selected=true;}}this.settings['syntax']=new_syntax;this.resync_highlight(true);this.hide_waiting_screen();return true;}}return false;};EA.prototype.set_editable=function(is_editable){if(is_editable){document.body.className=\"\";this.textarea.readOnly=false;this.is_editable=true;}\nelse{document.body.className=\"non_editable\";this.textarea.readOnly=true;this.is_editable=false;}if(eAs[this.id][\"displayed\"]==true) this.update_size();};EA.prototype.open_file=function(settings){if(settings['id']!=\"undefined\"){var id=settings['id'];var new_file=new Object();new_file['id']=id;new_file['title']=id;new_file['text']=\"\";new_file['last_selection']=\"\";new_file['last_text_to_highlight']=\"\";new_file['last_hightlighted_text']=\"\";new_file['previous']=new Array();new_file['next']=new Array();new_file['last_undo']=\"\";new_file['smooth_selection']=this.settings['smooth_selection'];new_file['do_highlight']=this.settings['start_highlight'];new_file['syntax']=this.settings['syntax'];new_file['scroll_top']=0;new_file['scroll_left']=0;new_file['selection_start']=0;new_file['selection_end']=0;new_file['edited']=false;new_file['font_size']=this.settings[\"font_size\"];new_file['font_family']=this.settings[\"font_family\"];new_file['toolbar']={'links':{}, 'selects': {}};new_file['compare_edited_text']=new_file['text'];this.files[id]=new_file;this.update_file(id, settings);this.files[id]['compare_edited_text']=this.files[id]['text'];var html_id='tab_file_'+encodeURIComponent(id);this.filesIdAssoc[html_id]=id;this.files[id]['html_id']=html_id;if(!document.getElementById(this.files[id]['html_id']) && id!=\"\"){this.tab_browsing_area.style.display=\"block\";var elem=document.createElement('li');elem.id=this.files[id]['html_id'];var close=\"<img src=\\\"\"+ parent.eAL.baseURL +\"images/close.gif\\\" title=\\\"\"+ this.get_translation('close_tab', 'word') +\"\\\" onclick=\\\"eA.execCommand('close_file', eA.filesIdAssoc['\"+ html_id +\"']);return false;\\\" class=\\\"hidden\\\" onmouseover=\\\"this.className=''\\\" onmouseout=\\\"this.className='hidden'\\\" />\";elem.innerHTML=\"<a onclick=\\\"javascript:eA.execCommand('switch_to_file', eA.filesIdAssoc['\"+ html_id +\"']);\\\" selec=\\\"none\\\"><b><span><strong class=\\\"edited\\\">*</strong>\"+ this.files[id]['title'] + close +\"</span></b></a>\";document.getElementById('tab_browsing_list').appendChild(elem);var elem=document.createElement('text');this.update_size();}if(id!=\"\") this.execCommand('file_open', this.files[id]);this.switch_to_file(id, true);return true;}\nelse return false;};EA.prototype.close_file=function(id){if(this.files[id]){this.save_file(id);if(this.execCommand('file_close', this.files[id])!==false){var li=document.getElementById(this.files[id]['html_id']);li.parentNode.removeChild(li);if(id==this.curr_file){var next_file=\"\";var is_next=false;for(var i in this.files){if(is_next){next_file=i;break;}\nelse if(i==id) is_next=true;\nelse next_file=i;}this.switch_to_file(next_file);}delete (this.files[id]);this.update_size();}}};EA.prototype.save_file=function(id){if(this.files[id]){var save=this.files[id];save['last_selection']=this.last_selection;save['last_text_to_highlight']=this.last_text_to_highlight;save['last_hightlighted_text']=this.last_hightlighted_text;save['previous']=this.previous;save['next']=this.next;save['last_undo']=this.last_undo;save['smooth_selection']=this.smooth_selection;save['do_highlight']=this.do_highlight;save['syntax']=this.settings['syntax'];save['text']=this.textarea.value;save['scroll_top']=this.result.scrollTop;save['scroll_left']=this.result.scrollLeft;save['selection_start']=this.last_selection[\"selectionStart\"];save['selection_end']=this.last_selection[\"selectionEnd\"];save['font_size']=this.settings[\"font_size\"];save['font_family']=this.settings[\"font_family\"];save['toolbar']={'links':{}, 'selects': {}};var links=document.getElementById(\"toolbar_1\").getElementsByTagName(\"a\");for(var i=0;i<links.length;i++){if(links[i].getAttribute('fileSpecific')=='yes'){var save_butt=new Object();var img=links[i].getElementsByTagName('img')[0];save_butt['classLock']=img.classLock;save_butt['className']=img.className;save_butt['oldClassName']=img.oldClassName;save['toolbar']['links'][links[i].id]=save_butt;}}var selects=document.getElementById(\"toolbar_1\").getElementsByTagName(\"select\");for(var i=0;i<selects.length;i++){if(selects[i].getAttribute('fileSpecific')=='yes'){save['toolbar']['selects'][selects[i].id]=selects[i].value;}}this.files[id]=save;return save;}\nelse return false;};EA.prototype.update_file=function(id, new_values){for(var i in new_values){this.files[id][i]=new_values[i];}};EA.prototype.display_file=function(id){if(id==''){this.textarea.readOnly=true;this.tab_browsing_area.style.display=\"none\";document.getElementById(\"no_file_selected\").style.display=\"block\";this.result.className=\"empty\";if(!this.files['']) this.open_file({id: ''});}\nelse{this.result.className=\"\";this.textarea.readOnly=!this.is_editable;document.getElementById(\"no_file_selected\").style.display=\"none\";this.tab_browsing_area.style.display=\"block\";}this.check_redo(true);this.check_undo(true);this.curr_file=id;var lis=this.tab_browsing_area.getElementsByTagName('li');for(var i=0;i<lis.length;i++){if(lis[i].id==this.files[id]['html_id']) lis[i].className='selected';\nelse lis[i].className='';}var new_file=this.files[id];this.textarea.value=new_file['text'];this.set_font(new_file['font_family'], new_file['font_size']);this.area_select(new_file['last_selection']['selection_start'], new_file['last_selection']['selection_end'] - new_file['last_selection']['selection_start']);this.manage_size(true);this.result.scrollTop=new_file['scroll_top'];this.result.scrollLeft=new_file['scroll_left'];this.previous=new_file['previous'];this.next=new_file['next'];this.last_undo=new_file['last_undo'];this.check_redo(true);this.check_undo(true);this.execCommand(\"change_highlight\", new_file['do_highlight']);this.execCommand(\"change_syntax\", new_file['syntax']);this.execCommand(\"change_smooth_selection_mode\", new_file['smooth_selection']);var links=new_file['toolbar']['links'];for(var i in links){if(img=document.getElementById(i).getElementsByTagName('img')[0]){var save_butt=new Object();img.classLock=links[i]['classLock'];img.className=links[i]['className'];img.oldClassName=links[i]['oldClassName'];}}var selects=new_file['toolbar']['selects'];for(var i in selects){var options=document.getElementById(i).options;for(var j=0;j<options.length;j++){if(options[j].value==selects[i]) document.getElementById(i).options[j].selected=true;}}};EA.prototype.switch_to_file=function(file_to_show, force_refresh){if(file_to_show!=this.curr_file || force_refresh){this.save_file(this.curr_file);if(this.curr_file!='') this.execCommand('file_switch_off', this.files[this.curr_file]);this.display_file(file_to_show);if(file_to_show!='') this.execCommand('file_switch_on', this.files[file_to_show]);}};EA.prototype.get_file=function(id){if(id==this.curr_file) this.save_file(id);return this.files[id];};EA.prototype.get_all_files=function(){tmp_files=this.files;this.save_file(this.curr_file);if(tmp_files['']) delete(this.files['']);return tmp_files;};EA.prototype.check_file_changes=function(){var id=this.curr_file;if(this.files[id] && this.files[id]['compare_edited_text']!=undefined){if(this.files[id]['compare_edited_text'].length==this.textarea.value.length && this.files[id]['compare_edited_text']==this.textarea.value){if(this.files[id]['edited']!=false) this.set_file_edited_mode(id, false);}\nelse{if(this.files[id]['edited']!=true) this.set_file_edited_mode(id, true);}}};EA.prototype.set_file_edited_mode=function(id, to){if(this.files[id] && document.getElementById(this.files[id]['html_id'])){var link=document.getElementById(this.files[id]['html_id']).getElementsByTagName('a')[0];if(to==true){link.className='edited';}\nelse{link.className='';if(id==this.curr_file) text=this.textarea.value;\nelse text=this.files[id]['text'];this.files[id]['compare_edited_text']=text;}this.files[id]['edited']=to;}};var clavier_cds=new Object(146);clavier_cds[8]=\"Retour arriere\";clavier_cds[9]=\"Tabulation\";clavier_cds[12]=\"Milieu (pave numerique)\";clavier_cds[13]=\"Entrer\";clavier_cds[16]=\"Shift\";clavier_cds[17]=\"Ctrl\";clavier_cds[18]=\"Alt\";clavier_cds[19]=\"Pause\";clavier_cds[20]=\"Verr Maj\";clavier_cds[27]=\"Esc\";clavier_cds[32]=\"Espace\";clavier_cds[33]=\"Page up\";clavier_cds[34]=\"Page down\";clavier_cds[35]=\"End\";clavier_cds[36]=\"Begin\";clavier_cds[37]=\"Fleche gauche\";clavier_cds[38]=\"Fleche haut\";clavier_cds[39]=\"Fleche droite\";clavier_cds[40]=\"Fleche bas\";clavier_cds[44]=\"Impr ecran\";clavier_cds[45]=\"Inser\";clavier_cds[46]=\"Suppr\";clavier_cds[91]=\"Menu Demarrer Windows / touche pomme Mac\";clavier_cds[92]=\"Menu Demarrer Windows\";clavier_cds[93]=\"Menu contextuel Windows\";clavier_cds[112]=\"F1\";clavier_cds[113]=\"F2\";clavier_cds[114]=\"F3\";clavier_cds[115]=\"F4\";clavier_cds[116]=\"F5\";clavier_cds[117]=\"F6\";clavier_cds[118]=\"F7\";clavier_cds[119]=\"F8\";clavier_cds[120]=\"F9\";clavier_cds[121]=\"F10\";clavier_cds[122]=\"F11\";clavier_cds[123]=\"F12\";clavier_cds[144]=\"Verr Num\";clavier_cds[145]=\"Arret defil\";function keyDown(e){if(!e){e=event;}for(var i in eA.plugins){if(typeof(eA.plugins[i].onkeydown)==\"function\"){if(eA.plugins[i].onkeydown(e)===false){if(eA.nav['isIE']) e.keyCode=0;return false;}}}var target_id=(e.target || e.srcElement).id;var use=false;if (clavier_cds[e.keyCode]) letter=clavier_cds[e.keyCode];\nelse letter=String.fromCharCode(e.keyCode);var low_letter=letter.toLowerCase();if(letter==\"Page up\" && !eA.nav['isOpera']){eA.execCommand(\"scroll_page\", {\"dir\": \"up\", \"shift\": ShiftPressed(e)});use=true;}\nelse if(letter==\"Page down\" && !eA.nav['isOpera']){eA.execCommand(\"scroll_page\", {\"dir\": \"down\", \"shift\": ShiftPressed(e)});use=true;}\nelse if(eA.is_editable==false){return true;}\nelse if(letter==\"Tabulation\" && target_id==\"textarea\" && !CtrlPressed(e) && !AltPressed(e)){if(ShiftPressed(e)) eA.execCommand(\"invert_tab_selection\");\nelse eA.execCommand(\"tab_selection\");use=true;if(eA.nav['isOpera'] || (eA.nav['isFirefox'] && eA.nav['isMacOS']) ) setTimeout(\"eA.execCommand('focus');\", 1);}\nelse if(letter==\"Entrer\" && target_id==\"textarea\"){if(eA.press_enter()) use=true;}\nelse if(letter==\"Entrer\" && target_id==\"area_search\"){eA.execCommand(\"area_search\");use=true;}\nelse if(letter==\"Esc\"){eA.execCommand(\"close_all_inline_popup\", e);use=true;}\nelse if(CtrlPressed(e) && !AltPressed(e) && !ShiftPressed(e)){switch(low_letter){case \"f\": eA.execCommand(\"area_search\");use=true;break;case \"r\": eA.execCommand(\"area_replace\");use=true;break;case \"q\": eA.execCommand(\"close_all_inline_popup\", e);use=true;break;case \"h\": eA.execCommand(\"change_highlight\");use=true;break;case \"g\": setTimeout(\"eA.execCommand('go_to_line');\", 5);use=true;break;case \"e\": eA.execCommand(\"show_help\");use=true;break;case \"z\": use=true;eA.execCommand(\"undo\");break;case \"y\": use=true;eA.execCommand(\"redo\");break;default: break;}}if(eA.next.length > 0){setTimeout(\"eA.check_redo();\", 10);}setTimeout(\"eA.check_file_changes();\", 10);if(use){if(eA.nav['isIE']) e.keyCode=0;return false;}return true;};function AltPressed(e){if (window.event){return (window.event.altKey);}\nelse{if(e.modifiers) return (e.altKey || (e.modifiers % 2));\nelse return e.altKey;}};function CtrlPressed(e){if (window.event){return (window.event.ctrlKey);}\nelse{return (e.ctrlKey || (e.modifiers==2) || (e.modifiers==3) || (e.modifiers>5));}};function ShiftPressed(e){if (window.event){return (window.event.shiftKey);}\nelse{return (e.shiftKey || (e.modifiers>3));}}; EA.prototype.show_search=function(){if(document.getElementById(\"area_search_replace\").style.visibility==\"visible\"){this.hidden_search();}\nelse{this.open_inline_popup(\"area_search_replace\");var text=this.area_get_selection();var search=text.split(\"\\n\")[0];document.getElementById(\"area_search\").value=search;document.getElementById(\"area_search\").focus();}};EA.prototype.hidden_search=function(){this.close_inline_popup(\"area_search_replace\");};EA.prototype.area_search=function(mode){if(!mode) mode=\"search\";document.getElementById(\"area_search_msg\").innerHTML=\"\";var search=document.getElementById(\"area_search\").value;this.textarea.focus();this.textarea.textareaFocused=true;var infos=this.get_selection_infos();var start=infos[\"selectionStart\"];var pos=-1;var pos_begin=-1;var length=search.length;if(document.getElementById(\"area_search_replace\").style.visibility!=\"visible\"){this.show_search();return;}if(search.length==0){document.getElementById(\"area_search_msg\").innerHTML=this.get_translation(\"search_field_empty\");return;}if(mode!=\"replace\" ){if(document.getElementById(\"area_search_reg_exp\").checked) start++;\nelse start+=search.length;}if(document.getElementById(\"area_search_reg_exp\").checked){var opt=\"m\";if(!document.getElementById(\"area_search_match_case\").checked) opt+=\"i\";var reg=new RegExp(search, opt);pos=infos[\"full_text\"].substr(start).search(reg);pos_begin=infos[\"full_text\"].search(reg);if(pos!=-1){pos+=start;length=infos[\"full_text\"].substr(start).match(reg)[0].length;}\nelse if(pos_begin!=-1){length=infos[\"full_text\"].match(reg)[0].length;}}\nelse{if(document.getElementById(\"area_search_match_case\").checked){pos=infos[\"full_text\"].indexOf(search, start);pos_begin=infos[\"full_text\"].indexOf(search);}\nelse{pos=infos[\"full_text\"].toLowerCase().indexOf(search.toLowerCase(), start);pos_begin=infos[\"full_text\"].toLowerCase().indexOf(search.toLowerCase());}}if(pos==-1 && pos_begin==-1){document.getElementById(\"area_search_msg\").innerHTML=\"<strong>\"+search+\"</strong> \"+this.get_translation(\"not_found\");return;}\nelse if(pos==-1 && pos_begin !=-1){begin=pos_begin;document.getElementById(\"area_search_msg\").innerHTML=this.get_translation(\"restart_search_at_begin\");}\nelse begin=pos;if(mode==\"replace\" && pos==infos[\"indexOfCursor\"]){var replace=document.getElementById(\"area_replace\").value;var new_text=\"\";if(document.getElementById(\"area_search_reg_exp\").checked){var opt=\"m\";if(!document.getElementById(\"area_search_match_case\").checked) opt+=\"i\";var reg=new RegExp(search, opt);new_text=infos[\"full_text\"].substr(0, begin) + infos[\"full_text\"].substr(start).replace(reg, replace);}\nelse{new_text=infos[\"full_text\"].substr(0, begin) + replace + infos[\"full_text\"].substr(begin + length);}this.textarea.value=new_text;this.area_select(begin, length);this.area_search();}\nelse this.area_select(begin, length);};EA.prototype.area_replace=function(){this.area_search(\"replace\");};EA.prototype.area_replace_all=function(){var base_text=this.textarea.value;var search=document.getElementById(\"area_search\").value;var replace=document.getElementById(\"area_replace\").value;if(search.length==0){document.getElementById(\"area_search_msg\").innerHTML=this.get_translation(\"search_field_empty\");return;}var new_text=\"\";var nb_change=0;if(document.getElementById(\"area_search_reg_exp\").checked){var opt=\"mg\";if(!document.getElementById(\"area_search_match_case\").checked) opt+=\"i\";var reg=new RegExp(search, opt);nb_change=infos[\"full_text\"].match(reg).length;new_text=infos[\"full_text\"].replace(reg, replace);}\nelse{if(document.getElementById(\"area_search_match_case\").checked){var tmp_tab=base_text.split(search);nb_change=tmp_tab.length -1;new_text=tmp_tab.join(replace);}\nelse{var lower_value=base_text.toLowerCase();var lower_search=search.toLowerCase();var start=0;var pos=lower_value.indexOf(lower_search);while(pos!=-1){nb_change++;new_text+=this.textarea.value.substring(start , pos)+replace;start=pos+ search.length;pos=lower_value.indexOf(lower_search, pos+1);}new_text+=this.textarea.value.substring(start);}}if(new_text==base_text){document.getElementById(\"area_search_msg\").innerHTML=\"<strong>\"+search+\"</strong> \"+this.get_translation(\"not_found\");}\nelse{this.textarea.value=new_text;document.getElementById(\"area_search_msg\").innerHTML=\"<strong>\"+nb_change+\"</strong> \"+this.get_translation(\"occurrence_replaced\");setTimeout(\"eA.textarea.focus();eA.textarea.textareaFocused=true;\", 100);}}; EA.prototype.change_highlight=function(change_to){if(this.settings[\"syntax\"].length==0 && change_to==false){this.switchClassSticky(document.getElementById(\"highlight\"), 'editAreaButtonDisabled', true);this.switchClassSticky(document.getElementById(\"reset_highlight\"), 'editAreaButtonDisabled', true);return false;}if(this.do_highlight==change_to) return false;if(this.nav['isIE']) this.getIESelection();var pos_start=this.textarea.selectionStart;var pos_end=this.textarea.selectionEnd;if(this.do_highlight===true || change_to==false) this.disable_highlight();\nelse this.enable_highlight();this.textarea.focus();this.textarea.selectionStart=pos_start;this.textarea.selectionEnd=pos_end;if(this.nav['isIE']) this.setIESelection();};EA.prototype.disable_highlight=function(displayOnly){document.getElementById(\"selection_field\").innerHTML=\"\";this.content_highlight.style.visibility=\"hidden\";var new_Obj=this.content_highlight.cloneNode(false);new_Obj.innerHTML=\"\";this.content_highlight.parentNode.insertBefore(new_Obj, this.content_highlight);this.content_highlight.parentNode.removeChild(this.content_highlight);this.content_highlight=new_Obj;var old_class=parent.getAttribute(this.textarea,\"class\");if(old_class){var new_class=old_class.replace(\"hidden\",\"\");parent.setAttribute(this.textarea, \"class\", new_class);}this.textarea.style.backgroundColor=\"transparent\";this.switchClassSticky(document.getElementById(\"highlight\"), 'editAreaButtonNormal', true);this.switchClassSticky(document.getElementById(\"reset_highlight\"), 'editAreaButtonDisabled', true);this.do_highlight=false;this.switchClassSticky(document.getElementById(\"change_smooth_selection\"), 'editAreaButtonSelected', true);if(typeof(this.smooth_selection_before_highlight)!=\"undefined\" && this.smooth_selection_before_highlight===false){this.change_smooth_selection_mode(false);}};EA.prototype.enable_highlight=function(){this.show_waiting_screen();this.content_highlight.style.visibility=\"visible\";var new_class=parent.getAttribute(this.textarea,\"class\")+\" hidden\";parent.setAttribute(this.textarea, \"class\", new_class);if(this.nav['isIE']) this.textarea.style.backgroundColor=\"#FFFFFF\";this.switchClassSticky(document.getElementById(\"highlight\"), 'editAreaButtonSelected', false);this.switchClassSticky(document.getElementById(\"reset_highlight\"), 'editAreaButtonNormal', false);this.smooth_selection_before_highlight=this.smooth_selection;if(!this.smooth_selection) this.change_smooth_selection_mode(true);this.switchClassSticky(document.getElementById(\"change_smooth_selection\"), 'editAreaButtonDisabled', true);this.do_highlight=true;this.resync_highlight();this.hide_waiting_screen();};EA.prototype.maj_highlight=function(infos){if(this.last_highlight_base_text==infos[\"full_text\"] && this.resync_highlight!==true) return;if(infos[\"full_text\"].indexOf(\"\\r\")!=-1) text_to_highlight=infos[\"full_text\"].replace(/\\r/g, \"\");\nelse text_to_highlight=infos[\"full_text\"];var start_line_pb=-1;var end_line_pb=-1;var stay_begin=\"\";var stay_end=\"\";var debug_opti=\"\";var date=new Date();var tps_start=date.getTime();var tps_middle_opti=date.getTime();if(this.reload_highlight===true){this.reload_highlight=false;}\nelse if(text_to_highlight.length==0){text_to_highlight=\"\\n \";}\nelse{var base_step=200;var cpt=0;var end=Math.min(text_to_highlight.length, this.last_text_to_highlight.length);var step=base_step;while(cpt<end && step>=1){if(this.last_text_to_highlight.substr(cpt, step)==text_to_highlight.substr(cpt, step)){cpt+=step;}\nelse{step=Math.floor(step/2);}}var pos_start_change=cpt;var line_start_change=text_to_highlight.substr(0, pos_start_change).split(\"\\n\").length -1;cpt_last=this.last_text_to_highlight.length;cpt=text_to_highlight.length;step=base_step;while(cpt>=0 && cpt_last>=0 && step>=1){if(this.last_text_to_highlight.substr(cpt_last-step, step)==text_to_highlight.substr(cpt-step, step)){cpt-=step;cpt_last-=step;}\nelse{step=Math.floor(step/2);}}var pos_new_end_change=cpt;var pos_last_end_change=cpt_last;if(pos_new_end_change<=pos_start_change){if(this.last_text_to_highlight.length < text_to_highlight.length){pos_new_end_change=pos_start_change + text_to_highlight.length - this.last_text_to_highlight.length;pos_last_end_change=pos_start_change;}\nelse{pos_last_end_change=pos_start_change + this.last_text_to_highlight.length - text_to_highlight.length;pos_new_end_change=pos_start_change;}}var change_new_text=text_to_highlight.substring(pos_start_change, pos_new_end_change);var change_last_text=this.last_text_to_highlight.substring(pos_start_change, pos_last_end_change);var line_new_end_change=text_to_highlight.substr(0, pos_new_end_change).split(\"\\n\").length -1;var line_last_end_change=this.last_text_to_highlight.substr(0, pos_last_end_change).split(\"\\n\").length -1;var change_new_text_line=text_to_highlight.split(\"\\n\").slice(line_start_change, line_new_end_change+1).join(\"\\n\");var change_last_text_line=this.last_text_to_highlight.split(\"\\n\").slice(line_start_change, line_last_end_change+1).join(\"\\n\");var trace_new=this.get_syntax_trace(change_new_text_line);var trace_last=this.get_syntax_trace(change_last_text_line);if(trace_new==trace_last){date=new Date();tps_middle_opti=date.getTime();stay_begin=this.last_hightlighted_text.split(\"\\n\").slice(0, line_start_change).join(\"\\n\");if(line_start_change>0) stay_begin+=\"\\n\";stay_end=this.last_hightlighted_text.split(\"\\n\").slice(line_last_end_change+1).join(\"\\n\");if(stay_end.length>0) stay_end=\"\\n\"+stay_end;if(stay_begin.length==0 && pos_last_end_change==-1) change_new_text_line+=\"\\n\";text_to_highlight=change_new_text_line;}if(this.settings[\"debug\"]){debug_opti=(trace_new==trace_last)?\"Optimisation\": \"No optimisation\";debug_opti+=\" start: \"+pos_start_change +\"(\"+line_start_change+\")\";debug_opti+=\" end_new: \"+ pos_new_end_change+\"(\"+line_new_end_change+\")\";debug_opti+=\" end_last: \"+ pos_last_end_change+\"(\"+line_last_end_change+\")\";debug_opti+=\"\\nchanged_text: \"+change_new_text+\" => trace: \"+trace_new;debug_opti+=\"\\nchanged_last_text: \"+change_last_text+\" => trace: \"+trace_last;debug_opti+=\"\\nchanged_line: \"+change_new_text_line;debug_opti+=\"\\nlast_changed_line: \"+change_last_text_line;debug_opti+=\"\\nstay_begin: \"+ stay_begin.slice(-200);debug_opti+=\"\\nstay_end: \"+ stay_end;debug_opti+=\"\\n\";}}date=new Date();tps_end_opti=date.getTime();var updated_highlight=this.colorize_text(text_to_highlight);date=new Date();tps2=date.getTime();var hightlighted_text=stay_begin + updated_highlight + stay_end;date=new Date();inner1=date.getTime();var new_Obj=this.content_highlight.cloneNode(false);if(this.nav['isIE'] || this.nav['isOpera']) new_Obj.innerHTML=\"<pre><span class='\"+ this.settings[\"syntax\"] +\"'>\" + hightlighted_text.replace(\"\\n\", \"<br/>\") + \"</span></pre>\";\nelse new_Obj.innerHTML=\"<span class='\"+ this.settings[\"syntax\"] +\"'>\"+ hightlighted_text +\"</span>\";this.content_highlight.parentNode.insertBefore(new_Obj, this.content_highlight);this.content_highlight.parentNode.removeChild(this.content_highlight);this.content_highlight=new_Obj;if(infos[\"full_text\"].indexOf(\"\\r\")!=-1) this.last_text_to_highlight=infos[\"full_text\"].replace(/\\r/g, \"\");\nelse this.last_text_to_highlight=infos[\"full_text\"];this.last_hightlighted_text=hightlighted_text;date=new Date();tps3=date.getTime();if(this.settings[\"debug\"]){tot1=tps_end_opti-tps_start;tot_middle=tps_end_opti- tps_middle_opti;tot2=tps2-tps_end_opti;tps_join=inner1-tps2;tps_td2=tps3-inner1;this.debug.value=\"Tps optimisation \"+tot1+\" (second part: \"+tot_middle+\") | tps reg exp: \"+tot2+\" | tps join: \"+tps_join;this.debug.value+=\" | tps update highlight content: \"+tps_td2+\"(\"+tps3+\")\\n\";this.debug.value+=debug_opti;}};EA.prototype.resync_highlight=function(reload_now){this.reload_highlight=true;this.last_highlight_base_text=\"\";this.focus();if(reload_now) this.check_line_selection(false);}; EA.prototype.comment_or_quote=function(){var new_class=\"\";var close_tag=\"\";for(var i in parent.eAL.syntax[eA.current_code_lang][\"quotes\"]){if(EA.prototype.comment_or_quote.arguments[0].indexOf(i)==0){new_class=\"quotesmarks\";close_tag=parent.eAL.syntax[eA.current_code_lang][\"quotes\"][i];}}if(new_class.length==0){for(var i in parent.eAL.syntax[eA.current_code_lang][\"comments\"]){if(EA.prototype.comment_or_quote.arguments[0].indexOf(i)==0){new_class=\"comments\";close_tag=parent.eAL.syntax[eA.current_code_lang][\"comments\"][i];}}}if(close_tag==\"\\n\"){return \"Âľ__\"+ new_class +\"__Âľ\"+EA.prototype.comment_or_quote.arguments[0].replace(/(\\r?\\n)?$/m, \"Âľ_END_Âľ$1\");}\nelse{reg=new RegExp(parent.eAL.get_escaped_regexp(close_tag)+\"$\", \"m\");if(EA.prototype.comment_or_quote.arguments[0].search(reg)!=-1) return \"Âľ__\"+ new_class +\"__Âľ\"+EA.prototype.comment_or_quote.arguments[0]+\"Âľ_END_Âľ\";\nelse return \"Âľ__\"+ new_class +\"__Âľ\"+EA.prototype.comment_or_quote.arguments[0];}};EA.prototype.get_syntax_trace=function(text){if(this.settings[\"syntax\"].length>0 && parent.eAL.syntax[this.settings[\"syntax\"]][\"syntax_trace_regexp\"]) return text.replace(parent.eAL.syntax[this.settings[\"syntax\"]][\"syntax_trace_regexp\"], \"$3\");};EA.prototype.colorize_text=function(text){text=\" \"+text;if(this.settings[\"syntax\"].length>0) text=this.apply_syntax(text, this.settings[\"syntax\"]);text=text.substr(1);text=text.replace(/&/g,\"&amp;\");text=text.replace(/</g,\"&lt;\");text=text.replace(/>/g,\"&gt;\");text=text.replace(/Âľ_END_Âľ/g,\"</span>\");text=text.replace(/Âľ__([a-zA-Z0-9]+)__Âľ/g,\"<span class='$1'>\");return text;};EA.prototype.apply_syntax=function(text, lang){this.current_code_lang=lang;if(!parent.eAL.syntax[lang]) return text;if(parent.eAL.syntax[lang][\"custom_regexp\"]['before']){for( var i in parent.eAL.syntax[lang][\"custom_regexp\"]['before']){var convert=\"$1Âľ__\"+ parent.eAL.syntax[lang][\"custom_regexp\"]['before'][i]['class'] +\"__Âľ$2Âľ_END_Âľ$3\";text=text.replace(parent.eAL.syntax[lang][\"custom_regexp\"]['before'][i]['regexp'], convert);}}if(parent.eAL.syntax[lang][\"comment_or_quote_reg_exp\"]){text=text.replace(parent.eAL.syntax[lang][\"comment_or_quote_reg_exp\"], this.comment_or_quote);}if(parent.eAL.syntax[lang][\"keywords_reg_exp\"]){for(var i in parent.eAL.syntax[lang][\"keywords_reg_exp\"]){text=text.replace(parent.eAL.syntax[lang][\"keywords_reg_exp\"][i], 'Âľ__'+i+'__Âľ$2Âľ_END_Âľ');}}if(parent.eAL.syntax[lang][\"delimiters_reg_exp\"]){text=text.replace(parent.eAL.syntax[lang][\"delimiters_reg_exp\"], 'Âľ__delimiters__Âľ$1Âľ_END_Âľ');}if(parent.eAL.syntax[lang][\"operators_reg_exp\"]){text=text.replace(parent.eAL.syntax[lang][\"operators_reg_exp\"], 'Âľ__operators__Âľ$1Âľ_END_Âľ');}if(parent.eAL.syntax[lang][\"custom_regexp\"]['after']){for( var i in parent.eAL.syntax[lang][\"custom_regexp\"]['after']){var convert=\"$1Âľ__\"+ parent.eAL.syntax[lang][\"custom_regexp\"]['after'][i]['class'] +\"__Âľ$2Âľ_END_Âľ$3\";text=text.replace(parent.eAL.syntax[lang][\"custom_regexp\"]['after'][i]['regexp'], convert);}}return text;};var editArea= eA;EditArea=EA;</script>";
-editAreaLoader.template= "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"> <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" > <head> <title>EditArea</title> <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /> [__CSSRULES__] [__JSCODE__] </head> <body> <div id='editor'> <div class='area_toolbar' id='toolbar_1'>[__TOOLBAR__]</div> <div class='area_toolbar' id='tab_browsing_area'><ul id='tab_browsing_list' class='menu'> <li> </li> </ul></div> <div id='result'> <div id='no_file_selected'></div> <div id='container'> <div id='cursor_pos' class='edit_area_cursor'>&nbsp;</div> <div id='end_bracket' class='edit_area_cursor'>&nbsp;</div> <div id='selection_field'></div> <div id='line_number' selec='none'></div> <div id='content_highlight'></div> <div id='test_font_size'></div> <textarea id='textarea' wrap='off' onchange='editArea.execCommand(\"onchange\");' onfocus='javascript:editArea.textareaFocused=true;' onblur='javascript:editArea.textareaFocused=false;'> </textarea> </div> </div> <div class='area_toolbar' id='toolbar_2'> <table class='statusbar' cellspacing='0' cellpadding='0'> <tr> <td class='total' selec='none'>{$position}:</td> <td class='infos' selec='none'> {$line_abbr} <span id='linePos'>0</span>, {$char_abbr} <span id='currPos'>0</span> </td> <td class='total' selec='none'>{$total}:</td> <td class='infos' selec='none'> {$line_abbr} <span id='nbLine'>0</span>, {$char_abbr} <span id='nbChar'>0</span> </td> <td class='resize'> <span id='resize_area'><img src='[__BASEURL__]images/statusbar_resize.gif' alt='resize' selec='none'></span> </td> </tr> </table> </div> </div> <div id='processing'> <div id='processing_text'> {$processing} </div> </div> <div id='area_search_replace' class='editarea_popup'> <table cellspacing='2' cellpadding='0' style='width: 100%'> <tr> <td selec='none'>{$search}</td> <td><input type='text' id='area_search' /></td> <td id='close_area_search_replace'> <a onclick='Javascript:editArea.execCommand(\"hidden_search\")'><img selec='none' src='[__BASEURL__]images/close.gif' alt='{$close_popup}' title='{$close_popup}' /></a><br /> </tr><tr> <td selec='none'>{$replace}</td> <td><input type='text' id='area_replace' /></td> <td><img id='move_area_search_replace' onmousedown='return parent.start_move_element(event,\"area_search_replace\", parent.frames[\"frame_\"+editArea.id]);' src='[__BASEURL__]images/move.gif' alt='{$move_popup}' title='{$move_popup}' /></td> </tr> </table> <div class='button'> <input type='checkbox' id='area_search_match_case' /><label for='area_search_match_case' selec='none'>{$match_case}</label> <input type='checkbox' id='area_search_reg_exp' /><label for='area_search_reg_exp' selec='none'>{$reg_exp}</label> <br /> <a onclick='Javascript:editArea.execCommand(\"area_search\")' selec='none'>{$find_next}</a> <a onclick='Javascript:editArea.execCommand(\"area_replace\")' selec='none'>{$replace}</a> <a onclick='Javascript:editArea.execCommand(\"area_replace_all\")' selec='none'>{$replace_all}</a><br /> </div> <div id='area_search_msg' selec='none'></div> </div> <div id='edit_area_help' class='editarea_popup'> <div class='close_popup'> <a onclick='Javascript:editArea.execCommand(\"close_all_inline_popup\")'><img src='[__BASEURL__]images/close.gif' alt='{$close_popup}' title='{$close_popup}' /></a> </div> <div><h2>Editarea [__EA_VERSION__]</h2><br /> <h3>{$shortcuts}:</h3> {$tab}: {$add_tab}<br /> {$shift}+{$tab}: {$remove_tab}<br /> {$ctrl}+f: {$search_command}<br /> {$ctrl}+r: {$replace_command}<br /> {$ctrl}+h: {$highlight}<br /> {$ctrl}+g: {$go_to_line}<br /> {$ctrl}+z: {$undo}<br /> {$ctrl}+y: {$redo}<br /> {$ctrl}+e: {$help}<br /> {$ctrl}+q, {$esc}: {$close_popup}<br /> {$accesskey} E: {$toggle}<br /> <br /> <em>{$about_notice}</em> <br /><div class='copyright'>&copy; Christophe Dolivet - 2007</div> </div> </div> </div> </body> </html> ";
-editAreaLoader.iframe_css= "<style>body, html{margin: 0;padding: 0;height: 100%;border: none;overflow: hidden;background-color: #FFFFFF;}body, html, table, form, textarea{font: 12px monospace, sans-serif;}#editor{border: solid #888888 1px;overflow: visible;}#result{z-index: 4;overflow: auto;border-top: solid #888888 1px;border-bottom: solid #888888 1px;position: relative;clear: both;}#result.empty{overflow: hidden;}#container{overflow: hidden;border: solid blue 0px;position: relative;z-index: 10;padding: 0 5px 0px 0;}#textarea{position: relative;top: 0px;left: 0px;padding: 0px 0px 0px 45px;width: 100%;height: 100%;overflow: hidden;z-index: 7;border: solid green 0px;background-color: transparent;}#textarea, #textarea:hover{outline: none;}#content_highlight{white-space: pre;padding: 1px 0 0 45px;position : absolute;z-index: 4;overflow: visible;border: solid yellow 0px;}#selection_field{padding: 0px 0px 0 45px;background-color: #E1F2F9;height: 1px;position: absolute;z-index: 5;top: -100px;margin: 1px 0 0 0px;white-space: pre;overflow: hidden;}#line_number{position: absolute;overflow: hidden;border-right: solid black 1px;z-index:8;width: 38px;padding-right: 5px;text-align: right;color: #AAAAAA;}#test_font_size{padding: 0;margin: 0;visibility: hidden;position: absolute;white-space: pre;}pre{margin: 0;padding: 0;}.hidden{opacity: 0.2;filter:alpha(opacity=20);}#result .edit_area_cursor{position: absolute;z-index:6;background-color: #FF6633;top: -100px;margin: 1px 0 0 0px;}#result .edit_area_selection_field .overline{background-color: #996600;}.editarea_popup{border: solid 1px #888888;background-color: #ECE9D8;width: 250px;padding: 4px;position: absolute;visibility: hidden;z-index: 15;top: -500px;}.editarea_popup, .editarea_popup table{font-family: sans-serif;font-size: 10pt;}.editarea_popup img{border: 0;}.editarea_popup .close_popup{float: right;line-height: 16px;border: 0px;padding: 0px;}.editarea_popup h1,.editarea_popup h2,.editarea_popup h3,.editarea_popup h4,.editarea_popup h5,.editarea_popup h6{margin: 0px;padding: 0px;}.editarea_popup .copyright{text-align: right;}div#area_search_replace{}div#area_search_replace img{border: 0px;}div#area_search_replace div.button{text-align: center;line-height: 1.7em;}div#area_search_replace .button a{cursor: pointer;border: solid 1px #888888;background-color: #DEDEDE;text-decoration: none;padding: 0 2px;color: #000000;white-space: nowrap;}div#area_search_replace a:hover{background-color: #EDEDED;}div#area_search_replace #move_area_search_replace{cursor: move;border: solid 1px #888888;}div#area_search_replace #close_area_search_replace{text-align: right;vertical-align: top;white-space: nowrap;}div#area_search_replace #area_search_msg{height: 18px;overflow: hidden;border-top: solid 1px #888888;margin-top: 3px;}#edit_area_help{width: 350px;}#edit_area_help div.close_popup{float: right;}.area_toolbar{width: 100%;margin: 0px;padding: 0px;background-color: #ECE9D8;text-align: center;}.area_toolbar, .area_toolbar table{font: 11px sans-serif;}.area_toolbar img{border: 0px;vertical-align: middle;}.area_toolbar input{margin: 0px;padding: 0px;}.area_toolbar select{font-family: 'MS Sans Serif',sans-serif,Verdana,Arial;font-size: 7pt;font-weight: normal;margin: 2px 0 0 0 ;padding: 0;vertical-align: top;background-color: #F0F0EE;}table.statusbar{width: 100%;}.area_toolbar td.infos{text-align: center;width: 130px;border-right: solid 1px #888888;border-width: 0 1px 0 0;padding: 0;}.area_toolbar td.total{text-align: right;width: 50px;padding: 0;}.area_toolbar td.resize{text-align: right;}.area_toolbar span#resize_area{cursor: nw-resize;visibility: hidden;}.editAreaButtonNormal, .editAreaButtonOver, .editAreaButtonDown, .editAreaSeparator, .editAreaSeparatorLine, .editAreaButtonDisabled, .editAreaButtonSelected {border: 0px; margin: 0px; padding: 0px; background: transparent;margin-top: 0px;margin-left: 1px;padding: 0px;}.editAreaButtonNormal {border: 1px solid #ECE9D8 !important;cursor: pointer;}.editAreaButtonOver {border: 1px solid #0A246A !important;cursor: pointer;background-color: #B6BDD2;}.editAreaButtonDown {cursor: pointer;border: 1px solid #0A246A !important;background-color: #8592B5;}.editAreaButtonSelected {border: 1px solid #C0C0BB !important;cursor: pointer;background-color: #F4F2E8;}.editAreaButtonDisabled {filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30);-moz-opacity:0.3;opacity: 0.3;border: 1px solid #F0F0EE !important;cursor: pointer;}.editAreaSeparatorLine {margin: 1px 2px;background-color: #C0C0BB;width: 2px;height: 18px;}#processing{display: none;background-color:#ECE9D8;border: solid #888888 1px;position: absolute;top: 0;left: 0;width: 100%;height: 100%;z-index: 100;text-align: center;}#processing_text{position:absolute;left: 50%;top: 50%;width: 200px;height: 20px;margin-left: -100px;margin-top: -10px;text-align: center;}#tab_browsing_area{display: none;background-color: #CCC9A8;border-top: 1px solid #888888;text-align: left;margin: 0px;}#tab_browsing_list {padding: 0;margin: 0;list-style-type: none;white-space: nowrap;}#tab_browsing_list li {float: left;margin: -1px;}#tab_browsing_list a {position: relative;display: block;text-decoration: none;float: left;cursor: pointer;line-height:14px;}#tab_browsing_list a span {display: block;color: #000;background: #ECE9D8;border: 1px solid #888888;border-width: 1px 1px 0px;text-align: center;padding: 2px 2px 1px 4px;position: relative;}#tab_browsing_list a b {display: block;border-bottom: 2px solid #617994;}#tab_browsing_list a .edited {display: none;}#tab_browsing_list a.edited .edited {display: inline;}#tab_browsing_list a img{margin-left: 7px;}#tab_browsing_list a.edited img{margin-left: 3px;}#tab_browsing_list a:hover span {background: #F4F2E8;border-color: #0A246A;}#tab_browsing_list .selected a span{background: #046380;color: #FFF;}#no_file_selected{height: 100%;width: 150%;background: #CCC;display: none;z-index: 20;position: absolute;}.non_editable #editor{border-width: 0 1px;}.non_editable .area_toolbar{display: none;}</style>";
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/close.gif b/BSF/plugins/LocalFilesEditor/editarea/images/close.gif
deleted file mode 100644
index 679ca2aa4..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/close.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/fullscreen.gif b/BSF/plugins/LocalFilesEditor/editarea/images/fullscreen.gif
deleted file mode 100644
index 66fa6d921..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/fullscreen.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/go_to_line.gif b/BSF/plugins/LocalFilesEditor/editarea/images/go_to_line.gif
deleted file mode 100644
index 06042ec9a..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/go_to_line.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/help.gif b/BSF/plugins/LocalFilesEditor/editarea/images/help.gif
deleted file mode 100644
index 51a1ee420..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/help.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/highlight.gif b/BSF/plugins/LocalFilesEditor/editarea/images/highlight.gif
deleted file mode 100644
index 16491f6cf..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/highlight.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/index.php b/BSF/plugins/LocalFilesEditor/editarea/images/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/load.gif b/BSF/plugins/LocalFilesEditor/editarea/images/load.gif
deleted file mode 100644
index 461698f56..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/load.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/move.gif b/BSF/plugins/LocalFilesEditor/editarea/images/move.gif
deleted file mode 100644
index d15f9f542..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/move.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/newdocument.gif b/BSF/plugins/LocalFilesEditor/editarea/images/newdocument.gif
deleted file mode 100644
index a9d293842..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/newdocument.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/opacity.png b/BSF/plugins/LocalFilesEditor/editarea/images/opacity.png
deleted file mode 100644
index b4217cb21..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/opacity.png
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/processing.gif b/BSF/plugins/LocalFilesEditor/editarea/images/processing.gif
deleted file mode 100644
index cce32f20f..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/processing.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/redo.gif b/BSF/plugins/LocalFilesEditor/editarea/images/redo.gif
deleted file mode 100644
index 3af90697f..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/redo.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/reset_highlight.gif b/BSF/plugins/LocalFilesEditor/editarea/images/reset_highlight.gif
deleted file mode 100644
index 0fa3cb797..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/reset_highlight.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/save.gif b/BSF/plugins/LocalFilesEditor/editarea/images/save.gif
deleted file mode 100644
index 2777bebfe..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/save.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/search.gif b/BSF/plugins/LocalFilesEditor/editarea/images/search.gif
deleted file mode 100644
index cfe76b5d5..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/search.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/smooth_selection.gif b/BSF/plugins/LocalFilesEditor/editarea/images/smooth_selection.gif
deleted file mode 100644
index 8a532e5e6..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/smooth_selection.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/spacer.gif b/BSF/plugins/LocalFilesEditor/editarea/images/spacer.gif
deleted file mode 100644
index 388486517..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/spacer.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/statusbar_resize.gif b/BSF/plugins/LocalFilesEditor/editarea/images/statusbar_resize.gif
deleted file mode 100644
index af89d803f..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/statusbar_resize.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/images/undo.gif b/BSF/plugins/LocalFilesEditor/editarea/images/undo.gif
deleted file mode 100644
index 520796d69..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/images/undo.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/LocalFilesEditor/editarea/index.php b/BSF/plugins/LocalFilesEditor/editarea/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/cs.js b/BSF/plugins/LocalFilesEditor/editarea/langs/cs.js
deleted file mode 100644
index cb7ff1e89..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/langs/cs.js
+++ /dev/null
@@ -1,61 +0,0 @@
-editAreaLoader.lang["cs"]={
-new_document: "NovĂ˝ dokument",
-search_button: "Najdi a nahraď",
-search_command: "Hledej další / otevři vyhledávací pole",
-search: "Hledej",
-replace: "Nahraď",
-replace_command: "Nahraď / otevři vyhledávací pole",
-find_next: "Najdi dalĹĄĂ­",
-replace_all: "Nahraď vše",
-reg_exp: "platnÊ výrazy",
-match_case: "vyhodnocenÊ výrazy",
-not_found: "nenalezenĂŠ.",
-occurrence_replaced: "výskyty nahrazenÊ.",
-search_field_empty: "Pole vyhledĂĄvĂĄnĂ­ je prĂĄzdnĂŠ",
-restart_search_at_begin: "Dosažen konec souboru, začínám od začátku.",
-move_popup: "Přesuň vyhledávací okno",
-font_size: "--Velikost textu--",
-go_to_line: "Přejdi na řádek",
-go_to_line_prompt: "Přejdi na řádek:",
-undo: "krok zpět",
-redo: "znovu",
-change_smooth_selection: "Povolit nebo zakázat některé ze zobrazených funkcí (účelnější zobrazení požaduje větší zatížení procesoru)",
-highlight: "Zvýrazňovåní syntaxe zap./vyp.",
-reset_highlight: "Obnovit zvýraznění (v případě nesrovnalostí)",
-help: "O programu",
-save: "UloĹžit",
-load: "Otevřít",
-line_abbr: "Ř.",
-char_abbr: "S.",
-position: "Pozice",
-total: "Celkem",
-close_popup: "Zavřít okno",
-shortcuts: "Zkratky",
-add_tab: "Přidat tabulování textu",
-remove_tab: "Odtsranit tabulovĂĄnĂ­ textu",
-about_notice: "Upozornění! Funkce zvýrazňování textu je k dispozici pouze pro malý text",
-toggle: "Přepnout editor",
-accesskey: "Přístupová klávesa",
-tab: "ZĂĄloĹžka",
-shift: "Shift",
-ctrl: "Ctrl",
-esc: "Esc",
-processing: "ZpracovĂĄvĂĄm ...",
-fullscreen: "CelĂĄ obrazovka",
-syntax_selection: "--vyber zvýrazňovač--",
-syntax_css: "CSS",
-syntax_html: "HTML",
-syntax_js: "Javascript",
-syntax_php: "Php",
-syntax_python: "Python",
-syntax_vb: "Visual Basic",
-syntax_xml: "Xml",
-syntax_c: "C",
-syntax_cpp: "CPP",
-syntax_basic: "Basic",
-syntax_pas: "Pascal",
-syntax_brainfuck: "Brainfuck",
-syntax_sql: "SQL",
-syntax_ruby: "Ruby",
-close_tab: "Close file"
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/de.js b/BSF/plugins/LocalFilesEditor/editarea/langs/de.js
deleted file mode 100644
index cd953473f..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/langs/de.js
+++ /dev/null
@@ -1,61 +0,0 @@
-editAreaLoader.lang["de"]={
-new_document: "Neues Dokument",
-search_button: "Suchen und Ersetzen",
-search_command: "Weitersuchen / &ouml;ffne Suchfeld",
-search: "Suchen",
-replace: "Ersetzen",
-replace_command: "Ersetzen / &ouml;ffne Suchfeld",
-find_next: "Weitersuchen",
-replace_all: "Ersetze alle Treffer",
-reg_exp: "regul&auml;re Ausdr&uuml;cke",
-match_case: "passt auf den Begriff<br />",
-not_found: "Nicht gefunden.",
-occurrence_replaced: "Die Vorkommen wurden ersetzt.",
-search_field_empty: "Leeres Suchfeld",
-restart_search_at_begin: "Ende des zu durchsuchenden Bereiches erreicht. Es wird die Suche von Anfang an fortgesetzt.", //find a shorter translation
-move_popup: "Suchfenster bewegen",
-font_size: "--Schriftgr&ouml;&szlig;e--",
-go_to_line: "Gehe zu Zeile",
-go_to_line_prompt: "Gehe zu Zeilennummmer:",
-undo: "R&uuml;ckg&auml;ngig",
-redo: "Wiederherstellen",
-change_smooth_selection: "Aktiviere/Deaktiviere einige Features (weniger Bildschirmnutzung aber mehr CPU-Belastung)",
-highlight: "Syntax Highlighting an- und ausschalten",
-reset_highlight: "Highlighting zur&uuml;cksetzen (falls mit Text nicht konform)",
-help: "Info",
-save: "Speichern",
-load: "&Ouml;ffnen",
-line_abbr: "Ln",
-char_abbr: "Ch",
-position: "Position",
-total: "Gesamt",
-close_popup: "Popup schlie&szlig;en",
-shortcuts: "Shortcuts",
-add_tab: "Tab zum Text hinzuf&uuml;gen",
-remove_tab: "Tab aus Text entfernen",
-about_notice: "Bemerkung: Syntax Highlighting ist nur f&uuml;r kurze Texte",
-toggle: "Editor an- und ausschalten",
-accesskey: "Accesskey",
-tab: "Tab",
-shift: "Shift",
-ctrl: "Ctrl",
-esc: "Esc",
-processing: "In Bearbeitung...",
-fullscreen: "Full-Screen",
-syntax_selection: "--Syntax--",
-syntax_css: "CSS",
-syntax_html: "HTML",
-syntax_js: "Javascript",
-syntax_php: "Php",
-syntax_python: "Python",
-syntax_vb: "Visual Basic",
-syntax_xml: "Xml",
-syntax_c: "C",
-syntax_cpp: "CPP",
-syntax_basic: "Basic",
-syntax_pas: "Pascal",
-syntax_brainfuck: "Brainfuck",
-syntax_sql: "SQL",
-syntax_ruby: "Ruby",
-close_tab: "Close file"
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/dk.js b/BSF/plugins/LocalFilesEditor/editarea/langs/dk.js
deleted file mode 100644
index 75700ec65..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/langs/dk.js
+++ /dev/null
@@ -1,61 +0,0 @@
-editAreaLoader.lang["dk"]={
-new_document: "nyt tomt dokument",
-search_button: "s&oslash;g og erstat",
-search_command: "find n&aelig;ste / &aring;ben s&oslash;gefelt",
-search: "s&oslash;g",
-replace: "erstat",
-replace_command: "erstat / &aring;ben s&oslash;gefelt",
-find_next: "find n&aelig;ste",
-replace_all: "erstat alle",
-reg_exp: "regular expressions",
-match_case: "forskel pĂĽ store/sm&aring; bogstaver<br />",
-not_found: "not found.",
-occurrence_replaced: "occurences replaced.",
-search_field_empty: "Search field empty",
-restart_search_at_begin: "End of area reached. Restart at begin.",
-move_popup: "flyt søgepopup",
-font_size: "--Skriftstørrelse--",
-go_to_line: "g&aring; til linie",
-go_to_line_prompt: "gĂĽ til linienummer:",
-undo: "fortryd",
-redo: "gentag",
-change_smooth_selection: "sl&aring; display funktioner til/fra (smartere display men mere CPU kr&aelig;vende)",
-highlight: "sl&aring; syntax highlight til/fra",
-reset_highlight: "nulstil highlight (hvis den er desynkroniseret fra teksten)",
-help: "om",
-save: "gem",
-load: "hent",
-line_abbr: "Ln",
-char_abbr: "Ch",
-position: "Position",
-total: "Total",
-close_popup: "luk popup",
-shortcuts: "Genveje",
-add_tab: "tilf&oslash;j tabulation til tekst",
-remove_tab: "fjern tabulation fra tekst",
-about_notice: "Husk: syntax highlight funktionen b&oslash;r kun bruge til sm&aring; tekster",
-toggle: "Sl&aring; editor til / fra",
-accesskey: "Accesskey",
-tab: "Tab",
-shift: "Skift",
-ctrl: "Ctrl",
-esc: "Esc",
-processing: "Processing...",
-fullscreen: "fullscreen",
-syntax_selection: "--Syntax--",
-syntax_css: "CSS",
-syntax_html: "HTML",
-syntax_js: "Javascript",
-syntax_php: "Php",
-syntax_python: "Python",
-syntax_vb: "Visual Basic",
-syntax_xml: "Xml",
-syntax_c: "C",
-syntax_cpp: "CPP",
-syntax_basic: "Basic",
-syntax_pas: "Pascal",
-syntax_brainfuck: "Brainfuck",
-syntax_sql: "SQL",
-syntax_ruby: "Ruby",
-close_tab: "Close file"
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/en.js b/BSF/plugins/LocalFilesEditor/editarea/langs/en.js
deleted file mode 100644
index aa432163b..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/langs/en.js
+++ /dev/null
@@ -1,61 +0,0 @@
-editAreaLoader.lang["en"]={
-new_document: "new empty document",
-search_button: "search and replace",
-search_command: "search next / open search area",
-search: "search",
-replace: "replace",
-replace_command: "replace / open search area",
-find_next: "find next",
-replace_all: "replace all",
-reg_exp: "regular expressions",
-match_case: "match case",
-not_found: "not found.",
-occurrence_replaced: "occurences replaced.",
-search_field_empty: "Search field empty",
-restart_search_at_begin: "End of area reached. Restart at begin.",
-move_popup: "move search popup",
-font_size: "--Font size--",
-go_to_line: "go to line",
-go_to_line_prompt: "go to line number:",
-undo: "undo",
-redo: "redo",
-change_smooth_selection: "enable/disable some display features (smarter display but more CPU charge)",
-highlight: "toggle syntax highlight on/off",
-reset_highlight: "reset highlight (if desyncronized from text)",
-help: "about",
-save: "save",
-load: "load",
-line_abbr: "Ln",
-char_abbr: "Ch",
-position: "Position",
-total: "Total",
-close_popup: "close popup",
-shortcuts: "Shortcuts",
-add_tab: "add tabulation to text",
-remove_tab: "remove tabulation to text",
-about_notice: "Notice: syntax highlight function is only for small text",
-toggle: "Toggle editor",
-accesskey: "Accesskey",
-tab: "Tab",
-shift: "Shift",
-ctrl: "Ctrl",
-esc: "Esc",
-processing: "Processing...",
-fullscreen: "fullscreen",
-syntax_selection: "--Syntax--",
-syntax_css: "CSS",
-syntax_html: "HTML",
-syntax_js: "Javascript",
-syntax_php: "Php",
-syntax_python: "Python",
-syntax_vb: "Visual Basic",
-syntax_xml: "Xml",
-syntax_c: "C",
-syntax_cpp: "CPP",
-syntax_basic: "Basic",
-syntax_pas: "Pascal",
-syntax_brainfuck: "Brainfuck",
-syntax_sql: "SQL",
-syntax_ruby: "Ruby",
-close_tab: "Close file"
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/es.js b/BSF/plugins/LocalFilesEditor/editarea/langs/es.js
deleted file mode 100644
index 0e425014a..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/langs/es.js
+++ /dev/null
@@ -1,61 +0,0 @@
-editAreaLoader.lang["es"]={
-new_document: "nuevo documento vacĂ­o",
-search_button: "buscar y reemplazar",
-search_command: "buscar siguiente / abrir ĂĄrea de bĂşsqueda",
-search: "buscar",
-replace: "reemplazar",
-replace_command: "reemplazar / abrir ĂĄrea de bĂşsqueda",
-find_next: "encontrar siguiente",
-replace_all: "reemplazar todos",
-reg_exp: "expresiones regulares",
-match_case: "coincidir capitalizaciĂłn",
-not_found: "no encontrado.",
-occurrence_replaced: "ocurrencias reemplazadas.",
-search_field_empty: "Campo de bĂşsqueda vacĂ­o",
-restart_search_at_begin: "Se ha llegado al final del ĂĄrea. Se va a seguir desde el principio.",
-move_popup: "mover la ventana de bĂşsqueda",
-font_size: "--TamaĂąo de la fuente--",
-go_to_line: "ir a la lĂ­nea",
-go_to_line_prompt: "ir a la lĂ­nea nĂşmero:",
-undo: "deshacer",
-redo: "rehacer",
-change_smooth_selection: "activar/desactivar algunas caracterĂ­sticas de visualizaciĂłn (visualizaciĂłn mĂĄs inteligente pero mĂĄs carga de CPU)",
-highlight: "intercambiar resaltado de sintaxis",
-reset_highlight: "reinicializar resaltado (si no esta sincronizado con el texto)",
-help: "acerca",
-save: "guardar",
-load: "cargar",
-line_abbr: "Ln",
-char_abbr: "Ch",
-position: "PosiciĂłn",
-total: "Total",
-close_popup: "recuadro de cierre",
-shortcuts: "Atajos",
-add_tab: "aĂąadir tabulado al texto",
-remove_tab: "borrar tabulado del texto",
-about_notice: "Aviso: el resaltado de sintaxis sĂłlo funciona para texto pequeĂąo",
-toggle: "Cambiar editor",
-accesskey: "Tecla de acceso",
-tab: "Tab",
-shift: "MayĂşsc",
-ctrl: "Ctrl",
-esc: "Esc",
-processing: "Procesando...",
-fullscreen: "pantalla completa",
-syntax_selection: "--Syntax--",
-syntax_css: "CSS",
-syntax_html: "HTML",
-syntax_js: "Javascript",
-syntax_php: "Php",
-syntax_python: "Python",
-syntax_vb: "Visual Basic",
-syntax_xml: "Xml",
-syntax_c: "C",
-syntax_cpp: "CPP",
-syntax_basic: "Basic",
-syntax_pas: "Pascal",
-syntax_brainfuck: "Brainfuck",
-syntax_sql: "SQL",
-syntax_ruby: "Ruby",
-close_tab: "Close file"
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/fr.js b/BSF/plugins/LocalFilesEditor/editarea/langs/fr.js
deleted file mode 100644
index b24bd03ae..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/langs/fr.js
+++ /dev/null
@@ -1,61 +0,0 @@
-editAreaLoader.lang["fr"]={
-new_document: "nouveau document (efface le contenu)",
-search_button: "rechercher / remplacer",
-search_command: "rechercher suivant / ouvrir la fen&ecirc;tre de recherche",
-search: "rechercher",
-replace: "remplacer",
-replace_command: "remplacer / ouvrir la fen&ecirc;tre de recherche",
-find_next: "rechercher",
-replace_all: "tout remplacer",
-reg_exp: "expr. r&eacute;guli&egrave;re",
-match_case: "respecter la casse",
-not_found: "pas trouv&eacute;.",
-occurrence_replaced: "remplacements &eacute;ffectu&eacute;s.",
-search_field_empty: "Le champ de recherche est vide.",
-restart_search_at_begin: "Fin du texte atteint, poursuite au d&eacute;but.",
-move_popup: "d&eacute;placer la fen&ecirc;tre de recherche",
-font_size: "--Taille police--",
-go_to_line: "aller &agrave; la ligne",
-go_to_line_prompt: "aller a la ligne numero:",
-undo: "annuler",
-redo: "refaire",
-change_smooth_selection: "activer/d&eacute;sactiver des fonctions d'affichage (meilleur affichage mais plus de charge processeur)",
-highlight: "activer/d&eacute;sactiver la coloration syntaxique",
-reset_highlight: "r&eacute;initialiser la coloration syntaxique (si d&eacute;syncronis&eacute;e du texte)",
-help: "&agrave; propos",
-save: "sauvegarder",
-load: "charger",
-line_abbr: "Ln",
-char_abbr: "Ch",
-position: "Position",
-total: "Total",
-close_popup: "fermer le popup",
-shortcuts: "Racourcis clavier",
-add_tab: "ajouter une tabulation dans le texte",
-remove_tab: "retirer une tabulation dans le texte",
-about_notice: "Note: la coloration syntaxique n'est pr&eacute;vue que pour de courts textes.",
-toggle: "basculer l'&eacute;diteur",
-accesskey: "Accesskey",
-tab: "Tab",
-shift: "Maj",
-ctrl: "Ctrl",
-esc: "Esc",
-processing: "chargement...",
-fullscreen: "plein &eacute;cran",
-syntax_selection: "--Syntaxe--",
-syntax_css: "CSS",
-syntax_html: "HTML",
-syntax_js: "Javascript",
-syntax_php: "Php",
-syntax_python: "Python",
-syntax_vb: "Visual Basic",
-syntax_xml: "Xml",
-syntax_c: "C",
-syntax_cpp: "CPP",
-syntax_basic: "Basic",
-syntax_pas: "Pascal",
-syntax_brainfuck: "Brainfuck",
-syntax_sql: "SQL",
-syntax_ruby: "Ruby",
-close_tab: "Fermer le fichier"
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/hr.js b/BSF/plugins/LocalFilesEditor/editarea/langs/hr.js
deleted file mode 100644
index f37b28c5e..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/langs/hr.js
+++ /dev/null
@@ -1,61 +0,0 @@
-editAreaLoader.lang["hr"]={
-new_document: "Novi dokument",
-search_button: "TraĹži i izmijeni",
-search_command: "TraĹži dalje / Otvori prozor za traĹženje",
-search: "TraĹži",
-replace: "Izmijeni",
-replace_command: "Izmijeni / Otvori prozor za traĹženje",
-find_next: "TraĹži dalje",
-replace_all: "Izmjeni sve",
-reg_exp: "Regularni izrazi",
-match_case: "Bitna vel. slova",
-not_found: "nije naĂ°eno.",
-occurrence_replaced: "izmjenjenih.",
-search_field_empty: "Prazno polje za traĹženje!",
-restart_search_at_begin: "Doťao do kraja. Poèeo od poèetka.",
-move_popup: "Pomakni prozor",
-font_size: "--Velièina teksta--",
-go_to_line: "Odi na redak",
-go_to_line_prompt: "Odi na redak:",
-undo: "Vrati natrag",
-redo: "Napravi ponovo",
-change_smooth_selection: "Ukljuèi/iskljuèi neke moguÌnosti prikaza (pametniji prikaz, ali zaguťeniji CPU)",
-highlight: "Ukljuèi/iskljuèi bojanje sintakse",
-reset_highlight: "Ponovi kolorizaciju (ako je nesinkronizirana s tekstom)",
-help: "O edit_area",
-save: "Spremi",
-load: "Uèitaj",
-line_abbr: "Ln",
-char_abbr: "Zn",
-position: "Pozicija",
-total: "Ukupno",
-close_popup: "Zatvori prozor",
-shortcuts: "Kratice",
-add_tab: "Dodaj tabulaciju",
-remove_tab: "Makni tabulaciju",
-about_notice: "Napomena: koloriziranje sintakse je samo za kratke kodove",
-toggle: "Prebaci naèin ureðivanja",
-accesskey: "Accesskey",
-tab: "Tab",
-shift: "Shift",
-ctrl: "Ctrl",
-esc: "Esc",
-processing: "Procesiram...",
-fullscreen: "Cijeli prozor",
-syntax_selection: "--Syntax--",
-syntax_css: "CSS",
-syntax_html: "HTML",
-syntax_js: "Javascript",
-syntax_php: "Php",
-syntax_python: "Python",
-syntax_vb: "Visual Basic",
-syntax_xml: "Xml",
-syntax_c: "C",
-syntax_cpp: "CPP",
-syntax_basic: "Basic",
-syntax_pas: "Pascal",
-syntax_brainfuck: "Brainfuck",
-syntax_sql: "SQL",
-syntax_ruby: "Ruby",
-close_tab: "Close file"
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/index.php b/BSF/plugins/LocalFilesEditor/editarea/langs/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/langs/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/it.js b/BSF/plugins/LocalFilesEditor/editarea/langs/it.js
deleted file mode 100644
index 2191e6b26..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/langs/it.js
+++ /dev/null
@@ -1,61 +0,0 @@
-editAreaLoader.lang["it"]={
-new_document: "nuovo documento vuoto",
-search_button: "cerca e sostituisci",
-search_command: "trova successivo / apri finestra di ricerca",
-search: "cerca",
-replace: "sostituisci",
-replace_command: "sostituisci / apri finestra di ricerca",
-find_next: "trova successivo",
-replace_all: "sostituisci tutti",
-reg_exp: "espressioni regolari",
-match_case: "confronta maiuscole/minuscole<br />",
-not_found: "non trovato.",
-occurrence_replaced: "occorrenze sostituite.",
-search_field_empty: "Campo ricerca vuoto",
-restart_search_at_begin: "Fine del testo raggiunta. Ricomincio dall'inizio.",
-move_popup: "sposta popup di ricerca",
-font_size: "-- Dimensione --",
-go_to_line: "vai alla linea",
-go_to_line_prompt: "vai alla linea numero:",
-undo: "annulla",
-redo: "ripeti",
-change_smooth_selection: "abilita/disabilita alcune caratteristiche della visualizzazione",
-highlight: "abilita/disabilita colorazione della sintassi",
-reset_highlight: "aggiorna colorazione (se non sincronizzata)",
-help: "informazioni su...",
-save: "salva",
-load: "carica",
-line_abbr: "Ln",
-char_abbr: "Ch",
-position: "Posizione",
-total: "Totale",
-close_popup: "chiudi popup",
-shortcuts: "Scorciatoie",
-add_tab: "aggiungi tabulazione",
-remove_tab: "rimuovi tabulazione",
-about_notice: "Avviso: la colorazione della sintassi vale solo con testo piccolo",
-toggle: "Abilita/disabilita editor",
-accesskey: "Accesskey",
-tab: "Tab",
-shift: "Shift",
-ctrl: "Ctrl",
-esc: "Esc",
-processing: "In corso...",
-fullscreen: "fullscreen",
-syntax_selection: "--Syntax--",
-syntax_css: "CSS",
-syntax_html: "HTML",
-syntax_js: "Javascript",
-syntax_php: "Php",
-syntax_python: "Python",
-syntax_vb: "Visual Basic",
-syntax_xml: "Xml",
-syntax_c: "C",
-syntax_cpp: "CPP",
-syntax_basic: "Basic",
-syntax_pas: "Pascal",
-syntax_brainfuck: "Brainfuck",
-syntax_sql: "SQL",
-syntax_ruby: "Ruby",
-close_tab: "Close file"
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/ja.js b/BSF/plugins/LocalFilesEditor/editarea/langs/ja.js
deleted file mode 100644
index 3afc1cb7d..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/langs/ja.js
+++ /dev/null
@@ -1,61 +0,0 @@
-editAreaLoader.lang["ja"]={
-new_document: "新規作成",
-search_button: "検索・置換",
-search_command: "次を検索 / 検索窓を表示",
-search: "検索",
-replace: "置換",
-replace_command: "置換 / 置換窓を表示",
-find_next: "次を検索",
-replace_all: "全置換",
-reg_exp: "正規表現",
-match_case: "大文字小文字の区別",
-not_found: "見つかりません。",
-occurrence_replaced: "置換しました。",
-search_field_empty: "検索対象文字列が空です。",
-restart_search_at_begin: "終端に達しました、始めに戻ります",
-move_popup: "検索窓を移動",
-font_size: "--フォントサイズ--",
-go_to_line: "指定行へ移動",
-go_to_line_prompt: "指定行へ移動します:",
-undo: "元に戻す",
-redo: "やり直し",
-change_smooth_selection: "スムース表示の切り替え(CPUを使います)",
-highlight: "構文強調表示の切り替え",
-reset_highlight: "構文強調表示のリセット",
-help: "ヘルプを表示",
-save: "保存",
-load: "読み螟み",
-line_abbr: "行",
-char_abbr: "文字",
-position: "位置",
-total: "合計",
-close_popup: "ポップアップを閉じる",
-shortcuts: "ショートカット",
-add_tab: "タブを挿入する",
-remove_tab: "タブを削除する",
-about_notice: "注意:構文強調表示は短いテキストでしか有効に機能しません。",
-toggle: "テキストエリアとeditAreaの切り替え",
-accesskey: "アクセスキー",
-tab: "Tab",
-shift: "Shift",
-ctrl: "Ctrl",
-esc: "Esc",
-processing: "処理中です...",
-fullscreen: "fullscreen",
-syntax_selection: "--Syntax--",
-syntax_css: "CSS",
-syntax_html: "HTML",
-syntax_js: "Javascript",
-syntax_php: "Php",
-syntax_python: "Python",
-syntax_vb: "Visual Basic",
-syntax_xml: "Xml",
-syntax_c: "C",
-syntax_cpp: "CPP",
-syntax_basic: "Basic",
-syntax_pas: "Pascal",
-syntax_brainfuck: "Brainfuck",
-syntax_sql: "SQL",
-syntax_ruby: "Ruby",
-close_tab: "Close file"
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/mk.js b/BSF/plugins/LocalFilesEditor/editarea/langs/mk.js
deleted file mode 100644
index 7cacb038c..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/langs/mk.js
+++ /dev/null
@@ -1,61 +0,0 @@
-editAreaLoader.lang["mk"]={
-new_document: "Нов документ",
-search_button: "Најди и замени",
-search_command: "Барај следно / Отвори нов прозорец за пребарување",
-search: "Барај",
-replace: "Замени",
-replace_command: "Замени / Отвори прозорец за пребарување",
-find_next: "најди сНоднО",
-replace_all: "Замени ги сите",
-reg_exp: "Регуларни изрази",
-match_case: "Битна е големината на буквите",
-not_found: "не е пронајдено.",
-occurrence_replaced: "СаПони.",
-search_field_empty: "Полето за пребарување е празно",
-restart_search_at_begin: "Крај на областа. Стартувај од почеток.",
-move_popup: "Помести го прозорецот",
-font_size: "--Големина на текстот--",
-go_to_line: "Оди на линија",
-go_to_line_prompt: "Оди на линија со број:",
-undo: "Врати",
-redo: "Повтори",
-change_smooth_selection: "Вклучи/исклучи некои карактеристики за приказ (попаметен приказ, но поголемо оптеретување за процесорот)",
-highlight: "Вклучи/исклучи осветлување на синтакса",
-reset_highlight: "Ресетирај го осветлувањето на синтакса (доколку е десинхронизиранo со текстот)",
-help: "За",
-save: "Зачувај",
-load: "Вчитај",
-line_abbr: "Лн",
-char_abbr: "Зн",
-position: "Позиција",
-total: "Вкупно",
-close_popup: "Затвори го прозорецот",
-shortcuts: "Кратенки",
-add_tab: "Додај табулација на текстот",
-remove_tab: "Отстрани ја табулацијата",
-about_notice: "Напомена: Осветлувањето на синтанса е само за краток текст",
-toggle: "Смени начин на уредување",
-accesskey: "Accesskey",
-tab: "Tab",
-shift: "Shift",
-ctrl: "Ctrl",
-esc: "Esc",
-processing: "Обработувам...",
-fullscreen: "Цел прозорец",
-syntax_selection: "--Синтакса--",
-syntax_css: "CSS",
-syntax_html: "HTML",
-syntax_js: "Javascript",
-syntax_php: "Php",
-syntax_python: "Python",
-syntax_vb: "Visual Basic",
-syntax_xml: "Xml",
-syntax_c: "C",
-syntax_cpp: "CPP",
-syntax_basic: "Basic",
-syntax_pas: "Pascal",
-syntax_brainfuck: "Brainfuck",
-syntax_sql: "SQL",
-syntax_ruby: "Ruby",
-close_tab: "Избери датотека"
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/nl.js b/BSF/plugins/LocalFilesEditor/editarea/langs/nl.js
deleted file mode 100644
index 00cbbe3a6..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/langs/nl.js
+++ /dev/null
@@ -1,61 +0,0 @@
-editAreaLoader.lang["nl"]={
-new_document: "nieuw leeg document",
-search_button: "zoek en vervang",
-search_command: "zoek volgende / zoekscherm openen",
-search: "zoek",
-replace: "vervang",
-replace_command: "vervang / zoekscherm openen",
-find_next: "volgende vinden",
-replace_all: "alles vervangen",
-reg_exp: "reguliere expressies",
-match_case: "hoofdletter gevoelig",
-not_found: "niet gevonden.",
-occurrence_replaced: "object vervangen.",
-search_field_empty: "Zoek veld leeg",
-restart_search_at_begin: "Niet meer instanties gevonden, begin opnieuw",
-move_popup: "versleep zoek scherm",
-font_size: "--Letter grootte--",
-go_to_line: "Ga naar regel",
-go_to_line_prompt: "Ga naar regel nummer:",
-undo: "Ongedaan maken",
-redo: "Opnieuw doen",
-change_smooth_selection: "zet wat schermopties aan/uit (kan langzamer zijn)",
-highlight: "zet syntax highlight aan/uit",
-reset_highlight: "reset highlight (indien gedesynchronizeerd)",
-help: "informatie",
-save: "opslaan",
-load: "laden",
-line_abbr: "Ln",
-char_abbr: "Ch",
-position: "Positie",
-total: "Totaal",
-close_popup: "Popup sluiten",
-shortcuts: "Snelkoppelingen",
-add_tab: "voeg tabs toe in tekst",
-remove_tab: "verwijder tabs uit tekst",
-about_notice: "Notitie: syntax highlight functie is alleen voor kleine tekst",
-toggle: "geavanceerde bewerkingsopties",
-accesskey: "Accessknop",
-tab: "Tab",
-shift: "Shift",
-ctrl: "Ctrl",
-esc: "Esc",
-processing: "Verwerken...",
-fullscreen: "fullscreen",
-syntax_selection: "--Syntax--",
-syntax_css: "CSS",
-syntax_html: "HTML",
-syntax_js: "Javascript",
-syntax_php: "Php",
-syntax_python: "Python",
-syntax_vb: "Visual Basic",
-syntax_xml: "Xml",
-syntax_c: "C",
-syntax_cpp: "CPP",
-syntax_basic: "Basic",
-syntax_pas: "Pascal",
-syntax_brainfuck: "Brainfuck",
-syntax_sql: "SQL",
-syntax_ruby: "Ruby",
-close_tab: "Close file"
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/pl.js b/BSF/plugins/LocalFilesEditor/editarea/langs/pl.js
deleted file mode 100644
index 501ec9a2b..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/langs/pl.js
+++ /dev/null
@@ -1,61 +0,0 @@
-editAreaLoader.lang["pl"]={
-new_document: "nowy dokument",
-search_button: "znajdź i zamień",
-search_command: "znajdź następny",
-search: "znajdĹş",
-replace: "zamień",
-replace_command: "zamień",
-find_next: "następny",
-replace_all: "zamień wszystko",
-reg_exp: "wyraĹźenie regularne",
-match_case: "uwzględnij wielkość liter<br />",
-not_found: "nie znaleziono.",
-occurrence_replaced: "wystąpień zamieniono.",
-search_field_empty: "Nie wprowadzono tekstu",
-restart_search_at_begin: "Koniec dokumentu. Wyszukiwanie od początku.",
-move_popup: "przesuń okienko wyszukiwania",
-font_size: "Rozmiar",
-go_to_line: "idĹş do linii",
-go_to_line_prompt: "numer linii:",
-undo: "cofnij",
-redo: "przywróć",
-change_smooth_selection: "włącz/wyłącz niektóre opcje wyglądu (zaawansowane opcje wyglądu obciążają procesor)",
-highlight: "włącz/wyłącz podświetlanie składni",
-reset_highlight: "odśwież podświetlanie składni (jeśli rozsynchronizowało się z tekstem)",
-help: "o programie",
-save: "zapisz",
-load: "otwĂłrz",
-line_abbr: "Ln",
-char_abbr: "Zn",
-position: "Pozycja",
-total: "W sumie",
-close_popup: "zamknij okienko",
-shortcuts: "SkrĂłty klawiaturowe",
-add_tab: "dodaj wcięcie do zaznaczonego tekstu",
-remove_tab: "usuń wcięcie",
-about_notice: "Uwaga: podświetlanie składni nie jest zalecane dla długich tekstów",
-toggle: "Włącz/wyłącz edytor",
-accesskey: "Alt+",
-tab: "Tab",
-shift: "Shift",
-ctrl: "Ctrl",
-esc: "Esc",
-processing: "Przetwarzanie...",
-fullscreen: "fullscreen",
-syntax_selection: "--Syntax--",
-syntax_css: "CSS",
-syntax_html: "HTML",
-syntax_js: "Javascript",
-syntax_php: "Php",
-syntax_python: "Python",
-syntax_vb: "Visual Basic",
-syntax_xml: "Xml",
-syntax_c: "C",
-syntax_cpp: "CPP",
-syntax_basic: "Basic",
-syntax_pas: "Pascal",
-syntax_brainfuck: "Brainfuck",
-syntax_sql: "SQL",
-syntax_ruby: "Ruby",
-close_tab: "Close file"
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/pt.js b/BSF/plugins/LocalFilesEditor/editarea/langs/pt.js
deleted file mode 100644
index 547796b0a..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/langs/pt.js
+++ /dev/null
@@ -1,61 +0,0 @@
-editAreaLoader.lang["pt"]={
-new_document: "Novo documento",
-search_button: "Localizar e substituir",
-search_command: "Localizar prĂłximo",
-search: "Localizar",
-replace: "Substituir",
-replace_command: "Substituir",
-find_next: "Localizar",
-replace_all: "Subst. tudo",
-reg_exp: "ExpressĂľes regulares",
-match_case: "Diferenciar maiĂşsculas e minĂşsculas",
-not_found: "NĂŁo encontrado.",
-occurrence_replaced: "OcorrĂŞncias substituidas",
-search_field_empty: "Campo localizar vazio.",
-restart_search_at_begin: "Fim das ocorrências. Recomeçar do inicio.",
-move_popup: "Mover janela",
-font_size: "--Tamanho da fonte--",
-go_to_line: "Ir para linha",
-go_to_line_prompt: "Ir para a linha:",
-undo: "Desfazer",
-redo: "Refazer",
-change_smooth_selection: "Opçþes visuais",
-highlight: "Cores de sintaxe",
-reset_highlight: "Resetar cores (se nĂŁo sincronizado)",
-help: "Sobre",
-save: "Salvar",
-load: "Carregar",
-line_abbr: "Ln",
-char_abbr: "Ch",
-position: "Posição",
-total: "Total",
-close_popup: "Fechar",
-shortcuts: "Shortcuts",
-add_tab: "Adicionar tabulação",
-remove_tab: "Remover tabulação",
-about_notice: "Atenção: Cores de sintaxe são indicados somente para textos pequenos",
-toggle: "Exibir editor",
-accesskey: "Accesskey",
-tab: "Tab",
-shift: "Shift",
-ctrl: "Ctrl",
-esc: "Esc",
-processing: "Processando...",
-fullscreen: "fullscreen",
-syntax_selection: "--Syntax--",
-syntax_css: "CSS",
-syntax_html: "HTML",
-syntax_js: "Javascript",
-syntax_php: "Php",
-syntax_python: "Python",
-syntax_vb: "Visual Basic",
-syntax_xml: "Xml",
-syntax_c: "C",
-syntax_cpp: "CPP",
-syntax_basic: "Basic",
-syntax_pas: "Pascal",
-syntax_brainfuck: "Brainfuck",
-syntax_sql: "SQL",
-syntax_ruby: "Ruby",
-close_tab: "Close file"
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/ru.js b/BSF/plugins/LocalFilesEditor/editarea/langs/ru.js
deleted file mode 100644
index 56b3cd57c..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/langs/ru.js
+++ /dev/null
@@ -1,61 +0,0 @@
-editAreaLoader.lang["ru"]={
-new_document: "новый пустой документ",
-search_button: "пОиск и СаПона",
-search_command: "искать следующий / открыть панель поиска",
-search: "пОиск",
-replace: "СаПона",
-replace_command: "заменить / открыть панель поиска",
-find_next: "найти следующее",
-replace_all: "заменить все",
-reg_exp: "регулярное выражение",
-match_case: "учитывать регистр",
-not_found: "но наКдонО.",
-occurrence_replaced: "вхождение заменено.",
-search_field_empty: "Поле поиска пустое",
-restart_search_at_begin: "Достигнут конец документа. Начинаю с начала.",
-move_popup: "переместить окно поиска",
-font_size: "--Размер шрифта--",
-go_to_line: "перейти к строке",
-go_to_line_prompt: "перейти к строке номер:",
-undo: "отменить",
-redo: "вернуть",
-change_smooth_selection: "включить/отключить некоторые функции просмотра (более красиво, но больше использует процессор)",
-highlight: "переключить подсветку синтаксиса включена/выключена",
-reset_highlight: "восстановить подсветку (если разсинхронизирована от текста)",
-help: "о программе",
-save: "сохранить",
-load: "загрузить",
-line_abbr: "Стр",
-char_abbr: "Стлб",
-position: "Позиция",
-total: "Всего",
-close_popup: "закрыть всплывающее окно",
-shortcuts: "Горячие клавиши",
-add_tab: "добавить табуляцию в текст",
-remove_tab: "убрать табуляцию из текста",
-about_notice: "Внимание: функция подсветки синтаксиса только для небольших текстов",
-toggle: "Переключить редактор",
-accesskey: "Горячая клавиша",
-tab: "Tab",
-shift: "Shift",
-ctrl: "Ctrl",
-esc: "Esc",
-processing: "Обработка...",
-fullscreen: "полный экран",
-syntax_selection: "--Синтакс--",
-syntax_css: "CSS",
-syntax_html: "HTML",
-syntax_js: "Javascript",
-syntax_php: "Php",
-syntax_python: "Python",
-syntax_vb: "Visual Basic",
-syntax_xml: "Xml",
-syntax_c: "C",
-syntax_cpp: "CPP",
-syntax_basic: "Basic",
-syntax_pas: "Pascal",
-syntax_brainfuck: "Brainfuck",
-syntax_sql: "SQL",
-syntax_ruby: "Ruby",
-close_tab: "Закрыть файл"
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/langs/sk.js b/BSF/plugins/LocalFilesEditor/editarea/langs/sk.js
deleted file mode 100644
index 3d4881a3f..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/langs/sk.js
+++ /dev/null
@@ -1,61 +0,0 @@
-editAreaLoader.lang["sk"]={
-new_document: "novĂ˝ prĂĄzdy dokument",
-search_button: "vyhĞadaj a nahraď",
-search_command: "hľadaj ďalsšie / otvor vyhľadávacie pole",
-search: "hÄžadaj",
-replace: "nahraď",
-replace_command: "nahraď / otvor vyhľadávacie pole",
-find_next: "nájdi ďalšie",
-replace_all: "nahraď všetko",
-reg_exp: "platnÊ výrazy",
-match_case: "zhodujúce sa výrazy",
-not_found: "nenĂĄjdenĂŠ.",
-occurrence_replaced: "výskyty nahradenÊ.",
-search_field_empty: "Pole vyhÄžadĂĄvanie je prĂĄdzne",
-restart_search_at_begin: "End of area reached. Restart at begin.",
-move_popup: "presuň vyhĞadåvacie okno",
-font_size: "--VeÄžkosĹĽ textu--",
-go_to_line: "prejdi na riadok",
-go_to_line_prompt: "prejdi na riadok:",
-undo: "krok späż",
-redo: "prepracovaĹĽ",
-change_smooth_selection: "povoliť/zamietnúť niektoré zo zobrazených funkcií (účelnejšie zobrazenie vyžaduje väčšie zaťaženie procesora CPU)",
-highlight: "prepnúż zvýrazňovanie syntaxe zap/vyp",
-reset_highlight: "zruťiż zvýrazňovanie (ak je nesynchronizovanÊ s textom)",
-help: "o programe",
-save: "uloĹžiĹĽ",
-load: "načítať",
-line_abbr: "Ln",
-char_abbr: "Ch",
-position: "PozĂ­cia",
-total: "Spolu",
-close_popup: "zavrieĹĽ okno",
-shortcuts: "Skratky",
-add_tab: "pridaĹĽ tabulovanie textu",
-remove_tab: "odstrĂĄniĹĽ tabulovanie textu",
-about_notice: "Upozornenie: funkcia zvýrazňovania syntaxe je dostupnå iba pre malý text",
-toggle: "Prepnúż editor",
-accesskey: "Accesskey",
-tab: "ZĂĄloĹžka",
-shift: "Shift",
-ctrl: "Ctrl",
-esc: "Esc",
-processing: "SpracĂşvam...",
-fullscreen: "cel=a obrazovka",
-syntax_selection: "--Vyber Syntax--",
-syntax_css: "CSS",
-syntax_html: "HTML",
-syntax_js: "Javascript",
-syntax_php: "Php",
-syntax_python: "Python",
-syntax_vb: "Visual Basic",
-syntax_xml: "Xml",
-syntax_c: "C",
-syntax_cpp: "CPP",
-syntax_basic: "Basic",
-syntax_pas: "Pascal",
-syntax_brainfuck: "Brainfuck",
-syntax_sql: "SQL",
-syntax_ruby: "Ruby",
-close_tab: "Close file"
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/css.js b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/css.js
deleted file mode 100644
index b8131ccdd..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/css.js
+++ /dev/null
@@ -1,84 +0,0 @@
-editAreaLoader.load_syntax["css"] = {
- 'COMMENT_SINGLE' : {1 : '@'}
- ,'COMMENT_MULTI' : {'/*' : '*/'}
- ,'QUOTEMARKS' : ['"', "'"]
- ,'KEYWORD_CASE_SENSITIVE' : false
- ,'KEYWORDS' : {
- 'attributes' : [
- 'aqua', 'azimuth', 'background-attachment', 'background-color',
- 'background-image', 'background-position', 'background-repeat',
- 'background', 'border-bottom-color', 'border-bottom-style',
- 'border-bottom-width', 'border-left-color', 'border-left-style',
- 'border-left-width', 'border-right', 'border-right-color',
- 'border-right-style', 'border-right-width', 'border-top-color',
- 'border-top-style', 'border-top-width','border-bottom', 'border-collapse',
- 'border-left', 'border-width', 'border-color', 'border-spacing',
- 'border-style', 'border-top', 'border', 'caption-side',
- 'clear', 'clip', 'color', 'content', 'counter-increment', 'counter-reset',
- 'cue-after', 'cue-before', 'cue', 'cursor', 'direction', 'display',
- 'elevation', 'empty-cells', 'float', 'font-family', 'font-size',
- 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant',
- 'font-weight', 'font', 'height', 'letter-spacing', 'line-height',
- 'list-style', 'list-style-image', 'list-style-position', 'list-style-type',
- 'margin-bottom', 'margin-left', 'margin-right', 'margin-top', 'margin',
- 'marker-offset', 'marks', 'max-height', 'max-width', 'min-height',
- 'min-width', 'opacity', 'orphans', 'outline', 'outline-color', 'outline-style',
- 'outline-width', 'overflow', 'padding-bottom', 'padding-left',
- 'padding-right', 'padding-top', 'padding', 'page', 'page-break-after',
- 'page-break-before', 'page-break-inside', 'pause-after', 'pause-before',
- 'pause', 'pitch', 'pitch-range', 'play-during', 'position', 'quotes',
- 'richness', 'right', 'size', 'speak-header', 'speak-numeral', 'speak-punctuation',
- 'speak', 'speech-rate', 'stress', 'table-layout', 'text-align', 'text-decoration',
- 'text-indent', 'text-shadow', 'text-transform', 'top', 'unicode-bidi',
- 'vertical-align', 'visibility', 'voice-family', 'volume', 'white-space', 'widows',
- 'width', 'word-spacing', 'z-index', 'bottom', 'left'
- ]
- ,'values' : [
- 'above', 'absolute', 'always', 'armenian', 'aural', 'auto', 'avoid',
- 'baseline', 'behind', 'below', 'bidi-override', 'black', 'blue', 'blink', 'block', 'bold', 'bolder', 'both',
- 'capitalize', 'center-left', 'center-right', 'center', 'circle', 'cjk-ideographic',
- 'close-quote', 'collapse', 'condensed', 'continuous', 'crop', 'crosshair', 'cross', 'cursive',
- 'dashed', 'decimal-leading-zero', 'decimal', 'default', 'digits', 'disc', 'dotted', 'double',
- 'e-resize', 'embed', 'extra-condensed', 'extra-expanded', 'expanded',
- 'fantasy', 'far-left', 'far-right', 'faster', 'fast', 'fixed', 'fuchsia',
- 'georgian', 'gray', 'green', 'groove', 'hebrew', 'help', 'hidden', 'hide', 'higher',
- 'high', 'hiragana-iroha', 'hiragana', 'icon', 'inherit', 'inline-table', 'inline',
- 'inset', 'inside', 'invert', 'italic', 'justify', 'katakana-iroha', 'katakana',
- 'landscape', 'larger', 'large', 'left-side', 'leftwards', 'level', 'lighter', 'lime', 'line-through', 'list-item', 'loud', 'lower-alpha', 'lower-greek', 'lower-roman', 'lowercase', 'ltr', 'lower', 'low',
- 'maroon', 'medium', 'message-box', 'middle', 'mix', 'monospace',
- 'n-resize', 'narrower', 'navy', 'ne-resize', 'no-close-quote', 'no-open-quote', 'no-repeat', 'none', 'normal', 'nowrap', 'nw-resize',
- 'oblique', 'olive', 'once', 'open-quote', 'outset', 'outside', 'overline',
- 'pointer', 'portrait', 'purple', 'px',
- 'red', 'relative', 'repeat-x', 'repeat-y', 'repeat', 'rgb', 'ridge', 'right-side', 'rightwards',
- 's-resize', 'sans-serif', 'scroll', 'se-resize', 'semi-condensed', 'semi-expanded', 'separate', 'serif', 'show', 'silent', 'silver', 'slow', 'slower', 'small-caps', 'small-caption', 'smaller', 'soft', 'solid', 'spell-out', 'square',
- 'static', 'status-bar', 'super', 'sw-resize',
- 'table-caption', 'table-cell', 'table-column', 'table-column-group', 'table-footer-group', 'table-header-group', 'table-row', 'table-row-group', 'teal', 'text', 'text-bottom', 'text-top', 'thick', 'thin', 'transparent',
- 'ultra-condensed', 'ultra-expanded', 'underline', 'upper-alpha', 'upper-latin', 'upper-roman', 'uppercase', 'url',
- 'visible',
- 'w-resize', 'wait', 'white', 'wider',
- 'x-fast', 'x-high', 'x-large', 'x-loud', 'x-low', 'x-small', 'x-soft', 'xx-large', 'xx-small',
- 'yellow', 'yes'
- ]
- ,'specials' : [
- 'important'
- ]
- }
- ,'OPERATORS' :[
- ':', ';', '!', '.', '#'
- ]
- ,'DELIMITERS' :[
- '{', '}'
- ]
- ,'STYLES' : {
- 'COMMENTS': 'color: #AAAAAA;'
- ,'QUOTESMARKS': 'color: #6381F8;'
- ,'KEYWORDS' : {
- 'attributes' : 'color: #48BDDF;'
- ,'values' : 'color: #2B60FF;'
- ,'specials' : 'color: #FF0000;'
- }
- ,'OPERATORS' : 'color: #FF00FF;'
- ,'DELIMITERS' : 'color: #60CA00;'
-
- }
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/html.js b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/html.js
deleted file mode 100644
index cc2a90e6e..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/html.js
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-* last update: 2006-08-24
-*/
-
-editAreaLoader.load_syntax["html"] = {
- 'COMMENT_SINGLE' : {}
- ,'COMMENT_MULTI' : {'<!--' : '-->'}
- ,'QUOTEMARKS' : {1: "'", 2: '"'}
- ,'KEYWORD_CASE_SENSITIVE' : false
- ,'KEYWORDS' : {
- }
- ,'OPERATORS' :[
- ]
- ,'DELIMITERS' :[
- ]
- ,'REGEXPS' : {
- 'doctype' : {
- 'search' : '()(<!DOCTYPE[^>]*>)()'
- ,'class' : 'doctype'
- ,'modifiers' : ''
- ,'execute' : 'before' // before or after
- }
- ,'tags' : {
- 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'
- ,'class' : 'tags'
- ,'modifiers' : 'gi'
- ,'execute' : 'before' // before or after
- }
- ,'attributes' : {
- 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'
- ,'class' : 'attributes'
- ,'modifiers' : 'g'
- ,'execute' : 'before' // before or after
- }
- }
- ,'STYLES' : {
- 'COMMENTS': 'color: #AAAAAA;'
- ,'QUOTESMARKS': 'color: #6381F8;'
- ,'KEYWORDS' : {
- }
- ,'OPERATORS' : 'color: #E775F0;'
- ,'DELIMITERS' : ''
- ,'REGEXPS' : {
- 'attributes': 'color: #B1AC41;'
- ,'tags': 'color: #E62253;'
- ,'doctype': 'color: #8DCFB5;'
- ,'test': 'color: #00FF00;'
- }
- }
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/index.php b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/js.js b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/js.js
deleted file mode 100644
index 8c7beb624..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/js.js
+++ /dev/null
@@ -1,60 +0,0 @@
-editAreaLoader.load_syntax["js"] = {
- 'COMMENT_SINGLE' : {1 : '//'}
- ,'COMMENT_MULTI' : {'/*' : '*/'}
- ,'QUOTEMARKS' : {1: "'", 2: '"'}
- ,'KEYWORD_CASE_SENSITIVE' : false
- ,'KEYWORDS' : {
- 'statements' : [
- 'as', 'break', 'case', 'catch', 'continue', 'decodeURI', 'delete', 'do',
- 'else', 'encodeURI', 'eval', 'finally', 'for', 'if', 'in', 'is', 'item',
- 'instanceof', 'return', 'switch', 'this', 'throw', 'try', 'typeof', 'void',
- 'while', 'write', 'with'
- ]
- ,'keywords' : [
- 'class', 'const', 'default', 'debugger', 'export', 'extends', 'false',
- 'function', 'import', 'namespace', 'new', 'null', 'package', 'private',
- 'protected', 'public', 'super', 'true', 'use', 'var', 'window', 'document',
- // the list below must be sorted and checked (if it is a keywords or a function and if it is not present twice
- 'Link ', 'outerHeight ', 'Anchor', 'FileUpload',
- 'location', 'outerWidth', 'Select', 'Area', 'find', 'Location', 'Packages', 'self',
- 'arguments', 'locationbar', 'pageXoffset', 'Form',
- 'Math', 'pageYoffset', 'setTimeout', 'assign', 'Frame', 'menubar', 'parent', 'status',
- 'blur', 'frames', 'MimeType', 'parseFloat', 'statusbar', 'Boolean', 'Function', 'moveBy',
- 'parseInt', 'stop', 'Button', 'getClass', 'moveTo', 'Password', 'String', 'callee', 'Hidden',
- 'name', 'personalbar', 'Submit', 'caller', 'history', 'NaN', 'Plugin', 'sun', 'captureEvents',
- 'History', 'navigate', 'print', 'taint', 'Checkbox', 'home', 'navigator', 'prompt', 'Text',
- 'Image', 'Navigator', 'prototype', 'Textarea', 'clearTimeout', 'Infinity',
- 'netscape', 'Radio', 'toolbar', 'close', 'innerHeight', 'Number', 'ref', 'top', 'closed',
- 'innerWidth', 'Object', 'RegExp', 'toString', 'confirm', 'isFinite', 'onBlur', 'releaseEvents',
- 'unescape', 'constructor', 'isNan', 'onError', 'Reset', 'untaint', 'Date', 'java', 'onFocus',
- 'resizeBy', 'unwatch', 'defaultStatus', 'JavaArray', 'onLoad', 'resizeTo', 'valueOf', 'document',
- 'JavaClass', 'onUnload', 'routeEvent', 'watch', 'Document', 'JavaObject', 'open', 'scroll', 'window',
- 'Element', 'JavaPackage', 'opener', 'scrollbars', 'Window', 'escape', 'length', 'Option', 'scrollBy'
- ]
- ,'functions' : [
- // common functions for Window object
- 'alert', 'Array', 'back', 'blur', 'clearInterval', 'close', 'confirm', 'eval ', 'focus', 'forward', 'home',
- 'name', 'navigate', 'onblur', 'onerror', 'onfocus', 'onload', 'onmove',
- 'onresize', 'onunload', 'open', 'print', 'prompt', 'scroll', 'scrollTo', 'setInterval', 'status',
- 'stop'
- ]
- }
- ,'OPERATORS' :[
- '+', '-', '/', '*', '=', '<', '>', '%', '!'
- ]
- ,'DELIMITERS' :[
- '(', ')', '[', ']', '{', '}'
- ]
- ,'STYLES' : {
- 'COMMENTS': 'color: #AAAAAA;'
- ,'QUOTESMARKS': 'color: #6381F8;'
- ,'KEYWORDS' : {
- 'statements' : 'color: #60CA00;'
- ,'keywords' : 'color: #48BDDF;'
- ,'functions' : 'color: #2B60FF;'
- }
- ,'OPERATORS' : 'color: #FF00FF;'
- ,'DELIMITERS' : 'color: #0038E1;'
-
- }
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/php.js b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/php.js
deleted file mode 100644
index 535a22bd3..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/php.js
+++ /dev/null
@@ -1,75 +0,0 @@
-editAreaLoader.load_syntax["php"] = {
- 'COMMENT_SINGLE' : {1 : '//', 2 : '#'}
- ,'COMMENT_MULTI' : {'/*' : '*/'}
- ,'QUOTEMARKS' : {1: "'", 2: '"'}
- ,'KEYWORD_CASE_SENSITIVE' : false
- ,'KEYWORDS' : {
- 'statements' : [
- 'include', 'require', 'include_once', 'require_once',
- 'for', 'foreach', 'as', 'if', 'elseif', 'else', 'while', 'do', 'endwhile',
- 'endif', 'switch', 'case', 'endswitch',
- 'return', 'break', 'continue'
- ]
- ,'reserved' : [
- '_GET', '_POST', '_SERVER', '_FILES', '_ENV', '_COOKIE', '_REQUEST',
- 'null', '__LINE__', '__FILE__',
- 'false', '&lt;?php', '?&gt;', '&lt;?',
- '&lt;script language', '&lt;/script&gt;',
- 'true', 'var', 'default',
- 'function', 'class', 'new', '&amp;new', 'this',
- '__FUNCTION__', '__CLASS__', '__METHOD__', 'PHP_VERSION',
- 'PHP_OS', 'DEFAULT_INCLUDE_PATH', 'PEAR_INSTALL_DIR', 'PEAR_EXTENSION_DIR',
- 'PHP_EXTENSION_DIR', 'PHP_BINDIR', 'PHP_LIBDIR', 'PHP_DATADIR', 'PHP_SYSCONFDIR',
- 'PHP_LOCALSTATEDIR', 'PHP_CONFIG_FILE_PATH', 'PHP_OUTPUT_HANDLER_START', 'PHP_OUTPUT_HANDLER_CONT',
- 'PHP_OUTPUT_HANDLER_END', 'E_ERROR', 'E_WARNING', 'E_PARSE', 'E_NOTICE',
- 'E_CORE_ERROR', 'E_CORE_WARNING', 'E_COMPILE_ERROR', 'E_COMPILE_WARNING', 'E_USER_ERROR',
- 'E_USER_WARNING', 'E_USER_NOTICE', 'E_ALL'
-
- ]
- ,'functions' : [
- 'func_num_args', 'func_get_arg', 'func_get_args', 'strlen', 'strcmp', 'strncmp', 'strcasecmp', 'strncasecmp', 'each', 'error_reporting', 'define', 'defined',
- 'trigger_error', 'user_error', 'set_error_handler', 'restore_error_handler', 'get_declared_classes', 'get_loaded_extensions',
- 'extension_loaded', 'get_extension_funcs', 'debug_backtrace',
- 'constant', 'bin2hex', 'sleep', 'usleep', 'time', 'mktime', 'gmmktime', 'strftime', 'gmstrftime', 'strtotime', 'date', 'gmdate', 'getdate', 'localtime', 'checkdate', 'flush', 'wordwrap', 'htmlspecialchars', 'htmlentities', 'html_entity_decode', 'md5', 'md5_file', 'crc32', 'getimagesize', 'image_type_to_mime_type', 'phpinfo', 'phpversion', 'phpcredits', 'strnatcmp', 'strnatcasecmp', 'substr_count', 'strspn', 'strcspn', 'strtok', 'strtoupper', 'strtolower', 'strpos', 'strrpos', 'strrev', 'hebrev', 'hebrevc', 'nl2br', 'basename', 'dirname', 'pathinfo', 'stripslashes', 'stripcslashes', 'strstr', 'stristr', 'strrchr', 'str_shuffle', 'str_word_count', 'strcoll', 'substr', 'substr_replace', 'quotemeta', 'ucfirst', 'ucwords', 'strtr', 'addslashes', 'addcslashes', 'rtrim', 'str_replace', 'str_repeat', 'count_chars', 'chunk_split', 'trim', 'ltrim', 'strip_tags', 'similar_text', 'explode', 'implode', 'setlocale', 'localeconv',
- 'parse_str', 'str_pad', 'chop', 'strchr', 'sprintf', 'printf', 'vprintf', 'vsprintf', 'sscanf', 'fscanf', 'parse_url', 'urlencode', 'urldecode', 'rawurlencode', 'rawurldecode', 'readlink', 'linkinfo', 'link', 'unlink', 'exec', 'system', 'escapeshellcmd', 'escapeshellarg', 'passthru', 'shell_exec', 'proc_open', 'proc_close', 'rand', 'srand', 'getrandmax', 'mt_rand', 'mt_srand', 'mt_getrandmax', 'base64_decode', 'base64_encode', 'abs', 'ceil', 'floor', 'round', 'is_finite', 'is_nan', 'is_infinite', 'bindec', 'hexdec', 'octdec', 'decbin', 'decoct', 'dechex', 'base_convert', 'number_format', 'fmod', 'ip2long', 'long2ip', 'getenv', 'putenv', 'getopt', 'microtime', 'gettimeofday', 'getrusage', 'uniqid', 'quoted_printable_decode', 'set_time_limit', 'get_cfg_var', 'magic_quotes_runtime', 'set_magic_quotes_runtime', 'get_magic_quotes_gpc', 'get_magic_quotes_runtime',
- 'import_request_variables', 'error_log', 'serialize', 'unserialize', 'memory_get_usage', 'var_dump', 'var_export', 'debug_zval_dump', 'print_r','highlight_file', 'show_source', 'highlight_string', 'ini_get', 'ini_get_all', 'ini_set', 'ini_alter', 'ini_restore', 'get_include_path', 'set_include_path', 'restore_include_path', 'setcookie', 'header', 'headers_sent', 'connection_aborted', 'connection_status', 'ignore_user_abort', 'parse_ini_file', 'is_uploaded_file', 'move_uploaded_file', 'intval', 'floatval', 'doubleval', 'strval', 'gettype', 'settype', 'is_null', 'is_resource', 'is_bool', 'is_long', 'is_float', 'is_int', 'is_integer', 'is_double', 'is_real', 'is_numeric', 'is_string', 'is_array', 'is_object', 'is_scalar',
- 'ereg', 'ereg_replace', 'eregi', 'eregi_replace', 'split', 'spliti', 'join', 'sql_regcase', 'dl', 'pclose', 'popen', 'readfile', 'rewind', 'rmdir', 'umask', 'fclose', 'feof', 'fgetc', 'fgets', 'fgetss', 'fread', 'fopen', 'fpassthru', 'ftruncate', 'fstat', 'fseek', 'ftell', 'fflush', 'fwrite', 'fputs', 'mkdir', 'rename', 'copy', 'tempnam', 'tmpfile', 'file', 'file_get_contents', 'stream_select', 'stream_context_create', 'stream_context_set_params', 'stream_context_set_option', 'stream_context_get_options', 'stream_filter_prepend', 'stream_filter_append', 'fgetcsv', 'flock', 'get_meta_tags', 'stream_set_write_buffer', 'set_file_buffer', 'set_socket_blocking', 'stream_set_blocking', 'socket_set_blocking', 'stream_get_meta_data', 'stream_register_wrapper', 'stream_wrapper_register', 'stream_set_timeout', 'socket_set_timeout', 'socket_get_status', 'realpath', 'fnmatch', 'fsockopen', 'pfsockopen', 'pack', 'unpack', 'get_browser', 'crypt', 'opendir', 'closedir', 'chdir', 'getcwd', 'rewinddir', 'readdir', 'dir', 'glob', 'fileatime', 'filectime', 'filegroup', 'fileinode', 'filemtime', 'fileowner', 'fileperms', 'filesize', 'filetype', 'file_exists', 'is_writable', 'is_writeable', 'is_readable', 'is_executable', 'is_file', 'is_dir', 'is_link', 'stat', 'lstat', 'chown',
- 'touch', 'clearstatcache', 'mail', 'ob_start', 'ob_flush', 'ob_clean', 'ob_end_flush', 'ob_end_clean', 'ob_get_flush', 'ob_get_clean', 'ob_get_length', 'ob_get_level', 'ob_get_status', 'ob_get_contents', 'ob_implicit_flush', 'ob_list_handlers', 'ksort', 'krsort', 'natsort', 'natcasesort', 'asort', 'arsort', 'sort', 'rsort', 'usort', 'uasort', 'uksort', 'shuffle', 'array_walk', 'count', 'end', 'prev', 'next', 'reset', 'current', 'key', 'min', 'max', 'in_array', 'array_search', 'extract', 'compact', 'array_fill', 'range', 'array_multisort', 'array_push', 'array_pop', 'array_shift', 'array_unshift', 'array_splice', 'array_slice', 'array_merge', 'array_merge_recursive', 'array_keys', 'array_values', 'array_count_values', 'array_reverse', 'array_reduce', 'array_pad', 'array_flip', 'array_change_key_case', 'array_rand', 'array_unique', 'array_intersect', 'array_intersect_assoc', 'array_diff', 'array_diff_assoc', 'array_sum', 'array_filter', 'array_map', 'array_chunk', 'array_key_exists', 'pos', 'sizeof', 'key_exists', 'assert', 'assert_options', 'version_compare', 'ftok', 'str_rot13', 'aggregate',
- 'session_name', 'session_module_name', 'session_save_path', 'session_id', 'session_regenerate_id', 'session_decode', 'session_register', 'session_unregister', 'session_is_registered', 'session_encode',
- 'session_start', 'session_destroy', 'session_unset', 'session_set_save_handler', 'session_cache_limiter', 'session_cache_expire', 'session_set_cookie_params', 'session_get_cookie_params', 'session_write_close', 'preg_match', 'preg_match_all', 'preg_replace', 'preg_replace_callback', 'preg_split', 'preg_quote', 'preg_grep', 'overload', 'ctype_alnum', 'ctype_alpha', 'ctype_cntrl', 'ctype_digit', 'ctype_lower', 'ctype_graph', 'ctype_print', 'ctype_punct', 'ctype_space', 'ctype_upper', 'ctype_xdigit', 'virtual', 'apache_request_headers', 'apache_note', 'apache_lookup_uri', 'apache_child_terminate', 'apache_setenv', 'apache_response_headers', 'apache_get_version', 'getallheaders', 'mysql_connect', 'mysql_pconnect', 'mysql_close', 'mysql_select_db', 'mysql_create_db', 'mysql_drop_db', 'mysql_query', 'mysql_unbuffered_query', 'mysql_db_query', 'mysql_list_dbs', 'mysql_list_tables', 'mysql_list_fields', 'mysql_list_processes', 'mysql_error', 'mysql_errno', 'mysql_affected_rows', 'mysql_insert_id', 'mysql_result', 'mysql_num_rows', 'mysql_num_fields', 'mysql_fetch_row', 'mysql_fetch_array', 'mysql_fetch_assoc', 'mysql_fetch_object', 'mysql_data_seek', 'mysql_fetch_lengths', 'mysql_fetch_field', 'mysql_field_seek', 'mysql_free_result', 'mysql_field_name', 'mysql_field_table', 'mysql_field_len', 'mysql_field_type', 'mysql_field_flags', 'mysql_escape_string', 'mysql_real_escape_string', 'mysql_stat',
- 'mysql_thread_id', 'mysql_client_encoding', 'mysql_get_client_info', 'mysql_get_host_info', 'mysql_get_proto_info', 'mysql_get_server_info', 'mysql_info', 'mysql', 'mysql_fieldname', 'mysql_fieldtable', 'mysql_fieldlen', 'mysql_fieldtype', 'mysql_fieldflags', 'mysql_selectdb', 'mysql_createdb', 'mysql_dropdb', 'mysql_freeresult', 'mysql_numfields', 'mysql_numrows', 'mysql_listdbs', 'mysql_listtables', 'mysql_listfields', 'mysql_db_name', 'mysql_dbname', 'mysql_tablename', 'mysql_table_name', 'pg_connect', 'pg_pconnect', 'pg_close', 'pg_connection_status', 'pg_connection_busy', 'pg_connection_reset', 'pg_host', 'pg_dbname', 'pg_port', 'pg_tty', 'pg_options', 'pg_ping', 'pg_query', 'pg_send_query', 'pg_cancel_query', 'pg_fetch_result', 'pg_fetch_row', 'pg_fetch_assoc', 'pg_fetch_array', 'pg_fetch_object', 'pg_fetch_all', 'pg_affected_rows', 'pg_get_result', 'pg_result_seek', 'pg_result_status', 'pg_free_result', 'pg_last_oid', 'pg_num_rows', 'pg_num_fields', 'pg_field_name', 'pg_field_num', 'pg_field_size', 'pg_field_type', 'pg_field_prtlen', 'pg_field_is_null', 'pg_get_notify', 'pg_get_pid', 'pg_result_error', 'pg_last_error', 'pg_last_notice', 'pg_put_line', 'pg_end_copy', 'pg_copy_to', 'pg_copy_from',
- 'pg_trace', 'pg_untrace', 'pg_lo_create', 'pg_lo_unlink', 'pg_lo_open', 'pg_lo_close', 'pg_lo_read', 'pg_lo_write', 'pg_lo_read_all', 'pg_lo_import', 'pg_lo_export', 'pg_lo_seek', 'pg_lo_tell', 'pg_escape_string', 'pg_escape_bytea', 'pg_unescape_bytea', 'pg_client_encoding', 'pg_set_client_encoding', 'pg_meta_data', 'pg_convert', 'pg_insert', 'pg_update', 'pg_delete', 'pg_select', 'pg_exec', 'pg_getlastoid', 'pg_cmdtuples', 'pg_errormessage', 'pg_numrows', 'pg_numfields', 'pg_fieldname', 'pg_fieldsize', 'pg_fieldtype', 'pg_fieldnum', 'pg_fieldprtlen', 'pg_fieldisnull', 'pg_freeresult', 'pg_result', 'pg_loreadall', 'pg_locreate', 'pg_lounlink', 'pg_loopen', 'pg_loclose', 'pg_loread', 'pg_lowrite', 'pg_loimport', 'pg_loexport',
- 'echo', 'print', 'global', 'static', 'exit', 'array', 'empty', 'eval', 'isset', 'unset', 'die'
-
- ]
- }
- ,'OPERATORS' :[
- '+', '-', '/', '*', '=', '<', '>', '%', '!', '&&', '||'
- ]
- ,'DELIMITERS' :[
- '(', ')', '[', ']', '{', '}'
- ]
- ,'REGEXPS' : {
- // highlight all variables ($...)
- 'variables' : {
- 'search' : '()(\\$\\w+)()'
- ,'class' : 'variables'
- ,'modifiers' : 'g'
- ,'execute' : 'before' // before or after
- }
- }
- ,'STYLES' : {
- 'COMMENTS': 'color: #AAAAAA;'
- ,'QUOTESMARKS': 'color: #879EFA;'
- ,'KEYWORDS' : {
- 'reserved' : 'color: #48BDDF;'
- ,'functions' : 'color: #0040FD;'
- ,'statements' : 'color: #60CA00;'
- }
- ,'OPERATORS' : 'color: #FF00FF;'
- ,'DELIMITERS' : 'color: #2B60FF;'
- ,'REGEXPS' : {
- 'variables' : 'color: #E0BD54;'
- }
- }
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/sql.js b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/sql.js
deleted file mode 100644
index f4530a99c..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/sql.js
+++ /dev/null
@@ -1,55 +0,0 @@
-editAreaLoader.load_syntax["sql"] = {
- 'COMMENT_SINGLE' : {1 : '--'}
- ,'COMMENT_MULTI' : {'/*' : '*/'}
- ,'QUOTEMARKS' : {1: "'", 2: '"', 3: '`'}
- ,'KEYWORD_CASE_SENSITIVE' : false
- ,'KEYWORDS' : {
- 'statements' : [
- 'select', 'SELECT', 'where', 'order', 'by',
- 'insert', 'from', 'update', 'grant', 'left join', 'right join',
- 'union', 'group', 'having', 'limit', 'alter', 'LIKE','IN','CASE'
- ]
- ,'reserved' : [
- 'null', 'enum', 'int', 'boolean', 'add', 'varchar'
-
- ]
- ,'functions' : [
- 'ABS','ACOS','ADDDATE','ADDTIME','AES_DECRYPT','AES_ENCRYPT','ASCII','ASIN','ATAN2 ATAN','ATAN','AVG','BENCHMARK','DISTINCT','BIN','BIT_AND','BIT_COUNT','BIT_LENGTH','BIT_OR','BIT_XOR','CAST','CEILING CEIL','CHAR_LENGTH','CHAR',
-'CHARACTER_LENGTH','CHARSET','COALESCE','COERCIBILITY','COLLATION','COMPRESS','CONCAT_WS','CONCAT','CONNECTION_ID','CONV','CONVERT_TZ','COS','COT','COUNT','CRC32','CURDATE','CURRENT_DATE','CURRENT_TIME','CURRENT_TIMESTAMP','CURRENT_USER','CURTIME','DATABASE','DATE_ADD','DATE_FORMAT','DATE_SUB','DATE','DATEDIFF','DAY','DAYNAME','DAYOFMONTH',
-'DAYOFWEEK','DAYOFYEAR','DECODE','DEFAULT','DEGREES','DES_DECRYPT','DES_ENCRYPT','ELT','ENCODE','ENCRYPT','EXP','EXPORT_SET','EXTRACT','FIELD','FIND_IN_SET','FLOOR','FORMAT','FOUND_ROWS','FROM_DAYS','FROM_UNIXTIME','GET_FORMAT','GET_LOCK','GREATEST','GROUP_CONCAT','HEX','HOUR','IF','IFNULL','INET_ATON','INET_NTOA',
-'INSERT','INSTR','INTERVAL','IS_FREE_LOCK','IS_USED_LOCK','ISNULL','LAST_DAY','LAST_INSERT_ID','LCASE','LEAST','LEFT','LENGTH','LN','LOAD_FILE','LOCALTIME','LOCALTIMESTAMP','LOCATE','LOG10','LOG2','LOG','LOWER','LPAD','LTRIM','MAKE_SET','MAKEDATE','MAKETIME','MASTER_POS_WAIT','MAX','MD5','MICROSECOND',
-'MID','MIN','MINUTE','MOD','MONTH','MONTHNAME','NOW','NULLIF','OCT','OCTET_LENGTH','OLD_PASSWORD','ORD','PASSWORD','PERIOD_ADD','PERIOD_DIFF','PI','POSITION','POW','POWER','PROCEDURE ANALYSE','QUARTER','QUOTE','RADIANS','RAND','RELEASE_LOCK','REPEAT','REPLACE','REVERSE','RIGHT','ROUND',
-'RPAD','RTRIM','SEC_TO_TIME','SECOND','SESSION_USER','SHA1','SHA','SIGN','SIN','SOUNDEX','SOUNDS LIKE','SPACE','SQRT','STD','STDDEV','STR_TO_DATE','STRCMP','SUBDATE','SUBSTRING_INDEX','SUBSTRING','SUBSTR','SUBTIME','SUM','SYSDATE','SYSTEM_USER','TAN','TIME_FORMAT','TIME_TO_SEC','TIME','TIMEDIFF',
-'TIMESTAMP','TO_DAYS','TRIM','TRUNCATE','UCASE','UNCOMPRESS','UNCOMPRESSED_LENGTH','UNHEX','UNIX_TIMESTAMP','UPPER','USER','UTC_DATE','UTC_TIME','UTC_TIMESTAMP','UUID','VALUES','VARIANCE','WEEK','WEEKDAY','WEEKOFYEAR','YEAR','YEARWEEK'
- ]
- }
- ,'OPERATORS' :[
- 'AND','&&','BETWEEN','BINARY','&','|','^','/','DIV','<=>','=','>=','>','<<','>>','IS','NULL','<=','<','-','%','!=','<>','!','||','OR','+','REGEXP','RLIKE','XOR','~','*'
- ]
- ,'DELIMITERS' :[
- '(', ')', '[', ']', '{', '}'
- ]
- ,'REGEXPS' : {
- // highlight all variables (@...)
- 'variables' : {
- 'search' : '()(\\@\\w+)()'
- ,'class' : 'variables'
- ,'modifiers' : 'g'
- ,'execute' : 'before' // before or after
- }
- }
- ,'STYLES' : {
- 'COMMENTS': 'color: #AAAAAA;'
- ,'QUOTESMARKS': 'color: #879EFA;'
- ,'KEYWORDS' : {
- 'reserved' : 'color: #48BDDF;'
- ,'functions' : 'color: #0040FD;'
- ,'statements' : 'color: #60CA00;'
- }
- ,'OPERATORS' : 'color: #FF00FF;'
- ,'DELIMITERS' : 'color: #2B60FF;'
- ,'REGEXPS' : {
- 'variables' : 'color: #E0BD54;'
- }
- }
-};
diff --git a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/xml.js b/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/xml.js
deleted file mode 100644
index a043dd63a..000000000
--- a/BSF/plugins/LocalFilesEditor/editarea/reg_syntax/xml.js
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-* last update: 2006-08-24
-*/
-
-editAreaLoader.load_syntax["xml"] = {
- 'COMMENT_SINGLE' : {}
- ,'COMMENT_MULTI' : {'<!--' : '-->'}
- ,'QUOTEMARKS' : {1: "'", 2: '"'}
- ,'KEYWORD_CASE_SENSITIVE' : false
- ,'KEYWORDS' : {
- }
- ,'OPERATORS' :[
- ]
- ,'DELIMITERS' :[
- ]
- ,'REGEXPS' : {
- 'xml' : {
- 'search' : '()(<\\?[^>]*?\\?>)()'
- ,'class' : 'xml'
- ,'modifiers' : 'g'
- ,'execute' : 'before' // before or after
- }
- ,'cdatas' : {
- 'search' : '()(<!\\[CDATA\\[.*?\\]\\]>)()'
- ,'class' : 'cdata'
- ,'modifiers' : 'g'
- ,'execute' : 'before' // before or after
- }
- ,'tags' : {
- 'search' : '(<)(/?[a-z][^ \r\n\t>]*)([^>]*>)'
- ,'class' : 'tags'
- ,'modifiers' : 'gi'
- ,'execute' : 'before' // before or after
- }
- ,'attributes' : {
- 'search' : '( |\n|\r|\t)([^ \r\n\t=]+)(=)'
- ,'class' : 'attributes'
- ,'modifiers' : 'g'
- ,'execute' : 'before' // before or after
- }
- }
- ,'STYLES' : {
- 'COMMENTS': 'color: #AAAAAA;'
- ,'QUOTESMARKS': 'color: #6381F8;'
- ,'KEYWORDS' : {
- }
- ,'OPERATORS' : 'color: #E775F0;'
- ,'DELIMITERS' : ''
- ,'REGEXPS' : {
- 'attributes': 'color: #B1AC41;'
- ,'tags': 'color: #E62253;'
- ,'xml': 'color: #8DCFB5;'
- ,'cdata': 'color: #50B020;'
- }
- }
-};
diff --git a/BSF/plugins/LocalFilesEditor/functions.inc.php b/BSF/plugins/LocalFilesEditor/functions.inc.php
deleted file mode 100644
index b53806bfb..000000000
--- a/BSF/plugins/LocalFilesEditor/functions.inc.php
+++ /dev/null
@@ -1,70 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * returns $code if php syntax is correct
- * else return false
- *
- * @param string php code
- */
-function eval_syntax($code)
-{
- $code = str_replace(array('<?php', '?>'), '', $code);
- $b = 0;
- foreach (token_get_all($code) as $token)
- {
- if ('{' == $token) ++$b;
- else if ('}' == $token) --$b;
- }
- if ($b) return false;
- else
- {
- ob_start();
- $eval = eval('if(0){' . $code . '}');
- ob_end_clean();
- if ($eval === false) return false;
- else return '<?php' . $code . '?>';
- }
-}
-
-/**
- * returns true or false if $str is bool
- * returns $str if $str is integer
- * else "$str"
- *
- * @param string
- */
-function editarea_quote($value)
-{
- switch (gettype($value))
- {
- case "boolean":
- return $value ? 'true' : 'false';
- case "integer":
- return $value;
- default:
- return '"'.$value.'"';
- }
-}
-
-?> \ No newline at end of file
diff --git a/BSF/plugins/LocalFilesEditor/index.php b/BSF/plugins/LocalFilesEditor/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/LocalFilesEditor/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/LocalFilesEditor/language/en_UK/index.php b/BSF/plugins/LocalFilesEditor/language/en_UK/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/LocalFilesEditor/language/en_UK/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php b/BSF/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php
deleted file mode 100644
index 9f608efca..000000000
--- a/BSF/plugins/LocalFilesEditor/language/en_UK/plugin.lang.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-$lang['locfiledit_onglet_localconf'] = 'Local config';
-$lang['locfiledit_onglet_css'] = 'CSS';
-$lang['locfiledit_onglet_tpl'] = 'Templates';
-$lang['locfiledit_onglet_lang'] = 'Languages';
-$lang['locfiledit_onglet_plug'] = 'Personal Plugin';
-$lang['locfiledit_cant_save'] = 'Current file isn\'t writeable. Check if a directory "include/" is writeable (chmod).';
-$lang['locfiledit_newfile'] = "/* File is not existing and will be created by LocalFiles Editor. */";
-$lang['locfiledit_save_config'] = 'File written successfully.';
-$lang['locfiledit_show_default'] = 'Display reference file: ';
-$lang['locfiledit_save_bak'] = 'Backup copy will be created on save.';
-$lang['locfiledit_saved_bak'] = 'Backup file created (%s)';
-$lang['locfiledit_save_file'] = 'Save file';
-$lang['locfiledit_choose_file'] = 'Choose the file to be edited';
-$lang['locfiledit_edit'] = 'Edit';
-$lang['locfiledit_restore'] = 'Restore the backup file';
-$lang['locfiledit_restore_confirm'] = 'Please confirm?
-Restore won\'t be effective till next save.';
-$lang['locfiledit_bak_loaded1'] = 'Backup file loaded.';
-$lang['locfiledit_bak_loaded2'] = 'You must save file to restore it.';
-$lang['locfiledit_syntax_error'] = 'Syntax error! File can\'t be saved.';
-
-?> \ No newline at end of file
diff --git a/BSF/plugins/LocalFilesEditor/language/es_ES/index.php b/BSF/plugins/LocalFilesEditor/language/es_ES/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/LocalFilesEditor/language/es_ES/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php b/BSF/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php
deleted file mode 100644
index 3652a53e1..000000000
--- a/BSF/plugins/LocalFilesEditor/language/es_ES/plugin.lang.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-$lang['locfiledit_onglet_localconf'] = 'ConfiguraciĂłn local';
-$lang['locfiledit_onglet_css'] = 'CSS';
-$lang['locfiledit_onglet_tpl'] = 'Templates';
-$lang['locfiledit_onglet_lang'] = 'Idiomas';
-$lang['locfiledit_onglet_plug'] = 'Plugin personal';
-$lang['locfiledit_cant_save'] = 'Imposible escribir el fichero. Verifique los permisos (chmod) del expediente "include/".';
-$lang['locfiledit_newfile'] = "/* El fichero no existe y serĂĄ creado en el momento del registro por LocalFiles Editor. */";
-$lang['locfiledit_save_config'] = 'El fichero ha sido registrado.';
-$lang['locfiledit_show_default'] = 'Fijar el fichero ';
-$lang['locfiledit_save_bak'] = 'Una copia de salvaguardia del fichero serĂĄ creada en el momento del registro';
-$lang['locfiledit_saved_bak'] = 'Una copia de salvaguardia ha sido creada (%s)';
-$lang['locfiledit_save_file'] = 'Registrar el fichero';
-$lang['locfiledit_choose_file'] = 'Escoja un fichero que hay que editar';
-$lang['locfiledit_edit'] = 'Editar';
-$lang['locfiledit_restore'] = 'Cargar el fichero de salvaguardia';
-$lang['locfiledit_restore_confirm'] = 'Âż Desea cargar el fichero de salvaguardia?
-Usted deberĂĄ luego hacer clic Registrar para restaurarlo.';
-$lang['locfiledit_bak_loaded1'] = 'Fichero cargado de salvaguardia';
-$lang['locfiledit_bak_loaded2'] = 'Usted debe registrarlo para salvaguardarlo.';
-$lang['locfiledit_syntax_error'] = 'ÂĄ Error de sintaxis! Imposible registrar el fichero.';
-
-?> \ No newline at end of file
diff --git a/BSF/plugins/LocalFilesEditor/language/fr_FR/index.php b/BSF/plugins/LocalFilesEditor/language/fr_FR/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/LocalFilesEditor/language/fr_FR/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php b/BSF/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php
deleted file mode 100644
index 3e0b65227..000000000
--- a/BSF/plugins/LocalFilesEditor/language/fr_FR/plugin.lang.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-$lang['locfiledit_onglet_localconf'] = 'Configuration locale';
-$lang['locfiledit_onglet_css'] = 'CSS';
-$lang['locfiledit_onglet_tpl'] = 'Templates';
-$lang['locfiledit_onglet_lang'] = 'Langues';
-$lang['locfiledit_onglet_plug'] = 'Plugin Personnel';
-$lang['locfiledit_cant_save'] = 'Impossible d\'ĂŠcrire le fichier. VĂŠrifiez les permissions (chmod) du dossier "include/".';
-$lang['locfiledit_newfile'] = "/* Le fichier n'existe pas et sera crĂŠĂŠ lors de l'enregistrement par LocalFiles Editor. */";
-$lang['locfiledit_save_config'] = 'Le fichier a ĂŠtĂŠ enregistrĂŠ.';
-$lang['locfiledit_show_default'] = 'Afficher le fichier ';
-$lang['locfiledit_save_bak'] = 'Une copie de sauvegarde du fichier sera crĂŠĂŠe lors de l\'enregistrement';
-$lang['locfiledit_saved_bak'] = 'Une copie de sauvegarde a ĂŠtĂŠ crĂŠĂŠe (%s)';
-$lang['locfiledit_save_file'] = 'Enregistrer le fichier';
-$lang['locfiledit_choose_file'] = 'Choisissez un fichier Ă  ĂŠditer';
-$lang['locfiledit_edit'] = 'Editer';
-$lang['locfiledit_restore'] = 'Charger le fichier de sauvegarde';
-$lang['locfiledit_restore_confirm'] = 'Souaitez-vous charger le fichier de sauvegarde?
-Vous devrez ensuite cliquer sur Enregistrer pour le restaurer.';
-$lang['locfiledit_bak_loaded1'] = 'Fichier de sauvegarde chargĂŠ';
-$lang['locfiledit_bak_loaded2'] = 'Vous devez l\'enregistrer pour le sauvegarder.';
-$lang['locfiledit_syntax_error'] = 'Erreur de syntaxe! Impossible d\'enregistrer le fichier.';
-
-?> \ No newline at end of file
diff --git a/BSF/plugins/LocalFilesEditor/language/index.php b/BSF/plugins/LocalFilesEditor/language/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/LocalFilesEditor/language/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/LocalFilesEditor/main.inc.php b/BSF/plugins/LocalFilesEditor/main.inc.php
deleted file mode 100644
index 378c69780..000000000
--- a/BSF/plugins/LocalFilesEditor/main.inc.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 Piwigo team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/*
-Plugin Name: LocalFiles Editor
-Version: 1.8
-Description: Edit local files from administration panel / Editeur de fichiers locaux
-Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=144
-Author: Piwigo team
-Author URI: http://piwigo.org
-*/
-
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-define('LOCALEDIT_PATH' , PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');
-
-function localfiles_admin_menu($menu)
-{
- array_push($menu, array(
- 'NAME' => 'LocalFiles Editor',
- 'URL' => get_admin_plugin_menu_link(LOCALEDIT_PATH . 'admin.php')));
- return $menu;
-}
-
-add_event_handler('get_admin_plugin_menu_links', 'localfiles_admin_menu');
-
-?> \ No newline at end of file
diff --git a/BSF/plugins/LocalFilesEditor/show_default.php b/BSF/plugins/LocalFilesEditor/show_default.php
deleted file mode 100644
index 3a70f258e..000000000
--- a/BSF/plugins/LocalFilesEditor/show_default.php
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-define('PHPWG_ROOT_PATH', '../../');
-include_once(PHPWG_ROOT_PATH . 'include/common.inc.php');
-include_once(LOCALEDIT_PATH.'functions.inc.php');
-check_status(ACCESS_ADMINISTRATOR);
-
-if (isset($_GET['file']))
-{
- $path = $_GET['file'];
- if (!is_admin() or (!substr_count($path, 'config_default.inc.php') and !substr_count($path, '.lang.php')))
- {
- die('Hacking attempt!');
- }
-
- $template->set_filename('show_default', dirname(__FILE__) . '/show_default.tpl');
-
- // Editarea
- if (!isset($conf['editarea_options']) or $conf['editarea_options'] !== false)
- {
- $editarea = array(
- 'syntax' => 'php',
- 'start_highlight' => true,
- 'is_editable' => false,
- 'language' => substr($user['language'], 0, 2));
-
- $template->assign('editarea', array(
- 'URL' => LOCALEDIT_PATH . 'editarea/edit_area_full.js',
- 'OPTIONS' => $editarea));
- }
-
- $file = file_get_contents(PHPWG_ROOT_PATH . $path);
-
- $template->assign(array('DEFAULT_CONTENT' => $file));
-
- $title = $path;
- $page['page_banner'] = '<h1>'.str_replace('/', ' / ', $path).'</h1>';
- $page['body_id'] = 'thePopuphelpPage';
-
- include(PHPWG_ROOT_PATH.'include/page_header.php');
-
- $template->pparse('show_default');
-
- include(PHPWG_ROOT_PATH.'include/page_tail.php');
-}
-
-?> \ No newline at end of file
diff --git a/BSF/plugins/LocalFilesEditor/show_default.tpl b/BSF/plugins/LocalFilesEditor/show_default.tpl
deleted file mode 100644
index bccfc9712..000000000
--- a/BSF/plugins/LocalFilesEditor/show_default.tpl
+++ /dev/null
@@ -1,13 +0,0 @@
-{if isset($editarea)}
-<script type="text/javascript" src="{$editarea.URL}"></script>
-<script type="text/javascript">
-editAreaLoader.init({ldelim}
- id: "text"
- {foreach from=$editarea.OPTIONS key=option item=value}
- , {$option}: {$value|editarea_quote}
- {/foreach}
-{rdelim});
-</script>
-{/if}
-
-<textarea rows="30" id="text" cols="90">{$DEFAULT_CONTENT}</textarea> \ No newline at end of file
diff --git a/BSF/plugins/add_index/admin/index.php b/BSF/plugins/add_index/admin/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/add_index/admin/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/add_index/admin/main_page.php b/BSF/plugins/add_index/admin/main_page.php
deleted file mode 100644
index 35193af4e..000000000
--- a/BSF/plugins/add_index/admin/main_page.php
+++ /dev/null
@@ -1,205 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if ((!defined('PHPWG_ROOT_PATH')) or (!(defined('IN_ADMIN') and IN_ADMIN)))
-{
- die('Hacking attempt!');
-}
-
-// +-----------------------------------------------------------------------+
-// | include |
-// +-----------------------------------------------------------------------+
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_ADMINISTRATOR);
-
-// +-----------------------------------------------------------------------+
-// | Functions |
-// +-----------------------------------------------------------------------+
-/**
- * returns an array containing sub-directories
- * recursive by default
- *
- * directories nammed ".svn" are omitted
- *
- * @param string $path
- * @param bool $recursive
- * @return array
- */
-function get_add_index_directories($path, $recursive = true)
-{
- $dirs = array();
-
- if (is_dir($path))
- {
- if ($contents = opendir($path))
- {
- while (($node = readdir($contents)) !== false)
- {
- if (
- is_dir($path.'/'.$node)
- and $node != '.'
- and $node != '..'
- and $node != '.svn'
- )
- {
- array_push($dirs, $path.'/'.$node);
- if ($recursive)
- {
- $dirs = array_merge($dirs, get_add_index_directories($path.'/'.$node));
- }
- }
- }
- }
- }
-
- return $dirs;
-}
-
-// +-----------------------------------------------------------------------+
-// | Main |
-// +-----------------------------------------------------------------------+
-// Compute values
-$index_file_src=$conf['add_index_source_directory_path'].$conf['add_index_filename'];
-$overwrite_file=isset($_GET['overwrite']);
-$site_id = (isset($_GET['site_id']) and is_numeric($_GET['site_id'])
- ? $_GET['site_id']
- : 0);
-
-// Init values
-$add_index_results = array();
-$count_copy = 0;
-$count_skip = 0;
-$count_error = 0;
-
-if (@file_exists($index_file_src))
-{
- $query = '
-select
- galleries_url
-from
- '.SITES_TABLE;
- if (!empty($site_id))
- {
- $query .= '
-where
- id = '.$site_id;
- }
- $query .= '
-order by
- id';
-
- $result = pwg_query($query);
-
- if (mysql_num_rows($result) > 0)
- {
- while (list($galleries_url) = mysql_fetch_row($result))
- {
- if (!url_is_remote($galleries_url))
- {
- //echo $galleries_url.'<BR>';
- foreach (get_add_index_directories($galleries_url) as $dir_galleries)
- {
- $file_dest = $dir_galleries.'/'.$conf['add_index_filename'];
- if ($overwrite_file or !@file_exists($file_dest))
- {
- if (copy($index_file_src, $file_dest))
- {
- array_push($add_index_results,
- sprintf(l10n('add_index_file_copied'), $file_dest));
- $count_copy++;
- }
- else
- {
- array_push($page['errors'],
- sprintf(l10n('add_index_file_not_copied'), $file_dest));
- $count_error++;
- }
- }
- else
- {
- $count_skip++;
- }
- }
- }
- else
- {
- if (!empty($site_id))
- {
- array_push($page['errors'],
- sprintf(l10n('add_index_not_local_site'),
- $galleries_url, $site_id));
- }
- }
- }
- }
-
- // Show always an result, defaut (0 copy, $count_copy == $count_skip == 0)
- if (($count_copy != 0) or ($count_skip == 0))
- {
- array_push($add_index_results,
- l10n_dec('add_index_nb_copied_file', 'add_index_nb_copied_files',
- $count_copy));
- }
- if ($count_skip != 0)
- {
- array_push($add_index_results,
- l10n_dec('add_index_nb_skipped_file', 'add_index_nb_skipped_files',
- $count_skip));
- }
- if ($count_error != 0)
- {
- array_push($page['errors'],
- l10n_dec('add_index_nb_not_copied_file', 'add_index_nb_not_copied_files',
- $count_error));
- }
-}
-else
-{
- array_push($page['errors'],
- sprintf(l10n('add_index_src_file_dont_exists'), $index_file_src));
-}
-
-// +-----------------------------------------------------------------------+
-// | template initialization |
-// +-----------------------------------------------------------------------+
-$template->set_filenames(array('main_page' => dirname(__FILE__).'/main_page.tpl'));
-
-if (count($add_index_results) != 0)
-{
- foreach ($add_index_results as $result)
- {
- $template->assign_block_vars('add_index_results.result', array('RESULT' => $result));
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | Sending html code |
-// +-----------------------------------------------------------------------+
-$template->assign_var_from_handle( 'ADMIN_CONTENT', 'main_page');
-
-?> \ No newline at end of file
diff --git a/BSF/plugins/add_index/admin/main_page.tpl b/BSF/plugins/add_index/admin/main_page.tpl
deleted file mode 100644
index 591ff7fc0..000000000
--- a/BSF/plugins/add_index/admin/main_page.tpl
+++ /dev/null
@@ -1,15 +0,0 @@
-<!-- DEV TAG: not smarty migrated -->
-<!-- $Id: notification_by_mail.tpl Ruben ARNAUD -->
-<div class="titrePage">
- <h2>{lang:Add_Index}</h2>
-</div>
-
-<!-- BEGIN add_index_results -->
-<div>
- <ul>
- <!-- BEGIN result -->
- <li>{add_index_results.result.RESULT}</li>
- <!-- END result -->
- </ul>
-</div>
-<!-- END add_index_results -->
diff --git a/BSF/plugins/add_index/index.php b/BSF/plugins/add_index/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/add_index/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/add_index/language/en_UK/help/advanced_feature.html b/BSF/plugins/add_index/language/en_UK/help/advanced_feature.html
deleted file mode 100644
index 00d15b57c..000000000
--- a/BSF/plugins/add_index/language/en_UK/help/advanced_feature.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<p>Functionality of AddIndex plugin:</p>
-<ul>
- <li>
- <strong>Add and overwrite "index" files for all local sites:</strong>
- Overwrite copy the file ./include/index.php to all sub-directories of gallerie local sites.
- </li>
-<ul>
diff --git a/BSF/plugins/add_index/language/en_UK/help/index.php b/BSF/plugins/add_index/language/en_UK/help/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/add_index/language/en_UK/help/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/add_index/language/en_UK/help/site_manager.html b/BSF/plugins/add_index/language/en_UK/help/site_manager.html
deleted file mode 100644
index 353980adc..000000000
--- a/BSF/plugins/add_index/language/en_UK/help/site_manager.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<p>Functionality of AddIndex plugin:</p>
-<ul>
- <li>
- <strong>Add "index" files for local site:</strong>
- Copy the file ./include/index.php to all sub-directories of selected local site.
- </li>
-<ul>
diff --git a/BSF/plugins/add_index/language/en_UK/index.php b/BSF/plugins/add_index/language/en_UK/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/add_index/language/en_UK/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/add_index/language/en_UK/plugin.lang.php b/BSF/plugins/add_index/language/en_UK/plugin.lang.php
deleted file mode 100644
index 63c3931ce..000000000
--- a/BSF/plugins/add_index/language/en_UK/plugin.lang.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-$lang['Add_Index'] = 'Add "index" files';
-$lang['Advanced_Add_Index'] = 'Add and overwrite "index" files for all local sites';
-$lang['Manager_Add_Index'] = 'add "index"';
-
-$lang['add_index_file_copied'] = '%s copied';
-$lang['add_index_file_not_copied'] = '%s not copied';
-$lang['add_index_not_local_site'] = '%s [%d] is a remote site, it\`s compatible with add "index" files';
-$lang['add_index_nb_copied_file'] = '%d file copied';
-$lang['add_index_nb_copied_files'] = '%d files copied';
-$lang['add_index_nb_skipped_file'] = '%d file skipped';
-$lang['add_index_nb_skipped_files'] = '%d files skipped';
-$lang['add_index_nb_not_copied_file'] = '%d file not copied';
-$lang['add_index_nb_not_copied_files'] = '%d files not copied';
-$lang['add_index_src_file_dont_exists'] = 'Source file %s don\'t esists, cannot duplicate this file';
-
-?>
diff --git a/BSF/plugins/add_index/language/es_ES/help/advanced_feature.html b/BSF/plugins/add_index/language/es_ES/help/advanced_feature.html
deleted file mode 100644
index 82734b259..000000000
--- a/BSF/plugins/add_index/language/es_ES/help/advanced_feature.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<p>Funcionalidad del plugin AddIndex:</p>
-<ul>
- <li>
- <strong>AdiciĂłn y aplastamiento de los ficheros "index" para todos los sitios locales :</strong>
- Copia con aplastamiento el fichero ./include/index.php en todos los subficheros de las galerĂ­as de los sitios locales.
- </li>
-</ul>
diff --git a/BSF/plugins/add_index/language/es_ES/help/index.php b/BSF/plugins/add_index/language/es_ES/help/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/add_index/language/es_ES/help/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/add_index/language/es_ES/help/site_manager.html b/BSF/plugins/add_index/language/es_ES/help/site_manager.html
deleted file mode 100644
index c09a6f3c3..000000000
--- a/BSF/plugins/add_index/language/es_ES/help/site_manager.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<p>Funcionalidad del plugin AddIndex:</p>
-<ul>
- <li>
- <strong>AdiciĂłn de los ficheros "index" para el sitio local:</strong>
- Copia el fichero ./include/index.php en todos los subficheros del sitio seleccionado.
- </li>
-</ul>
diff --git a/BSF/plugins/add_index/language/es_ES/index.php b/BSF/plugins/add_index/language/es_ES/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/add_index/language/es_ES/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/add_index/language/es_ES/plugin.lang.php b/BSF/plugins/add_index/language/es_ES/plugin.lang.php
deleted file mode 100644
index 26d104de6..000000000
--- a/BSF/plugins/add_index/language/es_ES/plugin.lang.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-$lang['Add_Index'] = 'AdiciĂłn de los ficheros "index"';
-$lang['Advanced_Add_Index'] = 'AdiciĂłn y aplastamiento de los ficheros "index" para todos los sitios locales';
-$lang['Manager_Add_Index'] = 'adiciĂłn de "index"';
-
-$lang['add_index_file_copied'] = '%s copiado';
-$lang['add_index_file_not_copied'] = '%s no copiado';
-$lang['add_index_not_local_site'] = '%s [%d] es un sitio distante, no es compatible con la adiciĂłn de ficheros "index"';
-$lang['add_index_nb_copied_file'] = '%d fichero copiado';
-$lang['add_index_nb_copied_files'] = '%d ficheros copiados';
-$lang['add_index_nb_skipped_file'] = '%d fichero que debe tratarse';
-$lang['add_index_nb_skipped_files'] = '%d ficheros que deben tratarse';
-$lang['add_index_nb_not_copied_file'] = '%d fichero no copiado';
-$lang['add_index_nb_not_copied_files'] = '%d ficheros no copiados';
-$lang['add_index_src_file_dont_exists'] = 'El fichero fuente no existe, la duplicaciĂłn de este fichero no es posible';
-
-?>
diff --git a/BSF/plugins/add_index/language/fr_FR/help/advanced_feature.html b/BSF/plugins/add_index/language/fr_FR/help/advanced_feature.html
deleted file mode 100644
index a5bf92e5b..000000000
--- a/BSF/plugins/add_index/language/fr_FR/help/advanced_feature.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<p>FonctionnalitĂŠ du plugin AddIndex:</p>
-<ul>
- <li>
- <strong>Ajout et ĂŠcrasement des fichiers "index" pour tous les sites locaux :</strong>
- Copie avec ĂŠcrasement le fichier ./include/index.php dans tous les sous-rĂŠpertoires des galeries des sites locaux.
- </li>
-</ul>
diff --git a/BSF/plugins/add_index/language/fr_FR/help/index.php b/BSF/plugins/add_index/language/fr_FR/help/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/add_index/language/fr_FR/help/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/add_index/language/fr_FR/help/site_manager.html b/BSF/plugins/add_index/language/fr_FR/help/site_manager.html
deleted file mode 100644
index 87b6ec15c..000000000
--- a/BSF/plugins/add_index/language/fr_FR/help/site_manager.html
+++ /dev/null
@@ -1,7 +0,0 @@
-<p>FonctionnalitĂŠ du plugin AddIndex:</p>
-<ul>
- <li>
- <strong>Ajout des fichiers "index" pour le site local :</strong>
- Copie le fichier ./include/index.php dans tous les sous-rĂŠpertoires du site sĂŠlectionnĂŠ.
- </li>
-</ul>
diff --git a/BSF/plugins/add_index/language/fr_FR/index.php b/BSF/plugins/add_index/language/fr_FR/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/add_index/language/fr_FR/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/add_index/language/fr_FR/plugin.lang.php b/BSF/plugins/add_index/language/fr_FR/plugin.lang.php
deleted file mode 100644
index 228ed75af..000000000
--- a/BSF/plugins/add_index/language/fr_FR/plugin.lang.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-$lang['Add_Index'] = 'Ajout des fichiers "index"';
-$lang['Advanced_Add_Index'] = 'Ajout et ĂŠcrasement des fichiers "index" pour tous les sites locaux';
-$lang['Manager_Add_Index'] = 'ajout des "index"';
-
-$lang['add_index_file_copied'] = '%s copiĂŠ';
-$lang['add_index_file_not_copied'] = '%s non copiĂŠ';
-$lang['add_index_not_local_site'] = '%s [%d] est un site distant, ce n\'est pas compatible avec l\'ajout de fichiers "index"';
-$lang['add_index_nb_copied_file'] = '%d fichier copiĂŠ';
-$lang['add_index_nb_copied_files'] = '%d fichiers copiĂŠs';
-$lang['add_index_nb_skipped_file'] = '%d fichier Ă  ne pas traiter';
-$lang['add_index_nb_skipped_files'] = '%d fichiers Ă  ne pas traiter';
-$lang['add_index_nb_not_copied_file'] = '%d fichier non copiĂŠ';
-$lang['add_index_nb_not_copied_files'] = '%d fichiers non copiĂŠs';
-$lang['add_index_src_file_dont_exists'] = 'Le fichier source n\'existe pas, la duplication de ce fichier n\'est pas possible';
-
-?>
diff --git a/BSF/plugins/add_index/language/index.php b/BSF/plugins/add_index/language/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/add_index/language/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/add_index/main.admin.inc.php b/BSF/plugins/add_index/main.admin.inc.php
deleted file mode 100644
index f293d30e0..000000000
--- a/BSF/plugins/add_index/main.admin.inc.php
+++ /dev/null
@@ -1,93 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if ((!defined('PHPWG_ROOT_PATH')) or (!(defined('IN_ADMIN') and IN_ADMIN)))
-{
- die('Hacking attempt!');
-}
-
-class AdminAddIndex extends AddIndex
-{
- function load_params()
- {
- global $conf;
-
- // Name of index file (index.php or index.htm or index.html)
- if (!isset($conf['add_index_filename']))
- {
- $conf['add_index_filename'] = 'index.php';
- }
- // Name of index file (index.php or index.htm or index.html)
- if (!isset($conf['add_index_source_directory_path']))
- {
- // Name of the directoty use in order to copy index file
- $conf['add_index_source_directory_path'] = PHPWG_ROOT_PATH.'include/';
- }
- }
-
- function loading_lang()
- {
- load_language('plugin.lang', $this->path);
- }
-
- function get_admin_advanced_features_links($advanced_features)
- {
- array_push($advanced_features,
- array
- (
- 'CAPTION' => l10n('Advanced_Add_Index'),
- 'URL' => get_admin_plugin_menu_link(dirname(__FILE__).'/admin/main_page.php').'&amp;overwrite'
- ));
-
- return $advanced_features;
- }
-
- function get_admins_site_links($site_manager_plugin_links, $site_id, $is_remote)
- {
- if (!$is_remote)
- {
- array_push($site_manager_plugin_links,
- array
- (
- 'U_HREF' => get_admin_plugin_menu_link(dirname(__FILE__).'/admin/main_page.php').'&amp;site_id='.$site_id,
- 'U_CAPTION' => l10n('Manager_Add_Index'),
- 'U_HINT' => l10n('Add_Index')
- ));
- }
-
- return $site_manager_plugin_links;
- }
-}
-
-// Create object
-$add_index = new AdminAddIndex();
-
-// Load Add Index parameters
-$add_index->load_params();
-
-// Add events
-add_event_handler('loading_lang', array(&$add_index, 'loading_lang'));
-add_event_handler('get_admin_advanced_features_links', array(&$add_index, 'get_admin_advanced_features_links'));
-add_event_handler('get_admins_site_links', array(&$add_index, 'get_admins_site_links'), EVENT_HANDLER_PRIORITY_NEUTRAL, 3);
-
-?> \ No newline at end of file
diff --git a/BSF/plugins/add_index/main.base.inc.php b/BSF/plugins/add_index/main.base.inc.php
deleted file mode 100644
index 765d1cbbf..000000000
--- a/BSF/plugins/add_index/main.base.inc.php
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-class AddIndex
-{
- var $path;
-
- function AddIndex()
- {
- $this->path = dirname(__FILE__).'/';
- }
-}
-
-?> \ No newline at end of file
diff --git a/BSF/plugins/add_index/main.inc.php b/BSF/plugins/add_index/main.inc.php
deleted file mode 100644
index 30e6b9ff6..000000000
--- a/BSF/plugins/add_index/main.inc.php
+++ /dev/null
@@ -1,53 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 Piwigo team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/*
-Plugin Name: Add Index
-Version: 1.8
-Description: Add file index.php file on all sub-directories of local galleries pictures. / Ajoute le fichier index.php sur les sous-rĂŠpertoires de galeries d'images locales.
-Plugin URI: http://piwigo.org
-Author: Piwigo team
-Author URI: http://piwigo.org
-*/
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-if (in_array(script_basename(), array('popuphelp', 'admin')))
-{
- if (defined('IN_ADMIN') and IN_ADMIN)
- {
- include_once(dirname(__FILE__).'/'.'main.base.inc.php');
- include_once(dirname(__FILE__).'/'.'main.admin.inc.php');
- }
- else
- {
- include_once(dirname(__FILE__).'/'.'main.base.inc.php');
- include_once(dirname(__FILE__).'/'.'main.normal.inc.php');
- }
- set_plugin_data($plugin['id'], $add_index);
-}
-
-?> \ No newline at end of file
diff --git a/BSF/plugins/add_index/main.normal.inc.php b/BSF/plugins/add_index/main.normal.inc.php
deleted file mode 100644
index 6f43c6e40..000000000
--- a/BSF/plugins/add_index/main.normal.inc.php
+++ /dev/null
@@ -1,60 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-class NormalAddIndex extends AddIndex
-{
- function get_popup_help_content($popup_help_content, $page)
- {
- if (in_array($page, array('advanced_feature', 'site_manager')))
- {
- $help_content =
- load_language('help/'.$page.'.html', $this->path, '', true);
- }
- else
- {
- $help_content = false;
- }
-
- if ($help_content == false)
- {
- return $popup_help_content;
- }
- else
- {
- return $popup_help_content.$help_content;
- }
- }
-}
-
-// Create object
-$add_index = new NormalAddIndex();
-
-// Add events
-add_event_handler('get_popup_help_content', array(&$add_index, 'get_popup_help_content'), EVENT_HANDLER_PRIORITY_NEUTRAL, 2);
-
-?> \ No newline at end of file
diff --git a/BSF/plugins/admin_advices/admin_advices.tpl b/BSF/plugins/admin_advices/admin_advices.tpl
deleted file mode 100644
index b4c7f6169..000000000
--- a/BSF/plugins/admin_advices/admin_advices.tpl
+++ /dev/null
@@ -1,39 +0,0 @@
-{if isset($ADVICE_ABOUT)}
-<div class="content">
- <h2>{'An_advice_about'|@translate} {$ADVICE_ABOUT}</h2>
- <h3>{$ADVICE_TEXT}</h3>
- <table summary="Admin advices summary">
- <tr><td style="text-align: left; width: 50%;">
- {foreach from=$More item=advice}
- {$advice}<BR />
- {/foreach}
- <br />
- </td><td style="text-align: right; width: 20%;">
- {if isset($thumbnail.IMAGE)}
- <a href="{$thumbnail.U_MODIFY}" title="{'link_info_image'|@translate}">
- <img class="thumbnail" src="{$thumbnail.IMAGE}"
- alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"></a>
- </td><td style="text-align: left;">
- <img src="{$themeconf.icon_dir}/{$thumbnail.NAME}check.png"
- alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Name'|@translate}<br />
- <img src="{$themeconf.icon_dir}/{$thumbnail.COMMENT}check.png"
- alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Description'|@translate}<br />
- <img src="{$themeconf.icon_dir}/{$thumbnail.AUTHOR}check.png"
- alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Author'|@translate}<br />
- <img src="{$themeconf.icon_dir}/{$thumbnail.CREATE_DATE}check.png"
- alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Creation date'|@translate}<br />
- <img src="{$themeconf.icon_dir}/{$thumbnail.METADATA}check.png"
- alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Metadata'|@translate}<br />
- <img src="{$themeconf.icon_dir}/{$thumbnail.TAGS}check.png"
- alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}"> {'Tags'|@translate} ({$thumbnail.NUM_TAGS})
- {/if}
- </td>
- </tr>
-
- <tr>
- <td colspan=2>{$smarty.now|date_format:"%A, %B %e, %Y - %r"} --- Templates generated by <a href="http://www.smarty.net/" onclick="window.open(this.href, ''); return false;">Smarty</a> {$smarty.version}</td>
- </tr>
- </table>
-
-</div>
-{/if} \ No newline at end of file
diff --git a/BSF/plugins/admin_advices/default-layout.css b/BSF/plugins/admin_advices/default-layout.css
deleted file mode 100644
index 35f8801f3..000000000
--- a/BSF/plugins/admin_advices/default-layout.css
+++ /dev/null
@@ -1,19 +0,0 @@
-.content {
- list-style-type:none;
- margin: 0 1em 0 14.5em;
- padding: 0 0 15px 0;
-}
-.content h2 {
- font-weight: bold;
- padding-left: 2em;
-}
-.content h3 {
- text-align: left;
- padding-left: 3em;
- font-size: 120%;
-}
-.content table tr td {
- text-align: left;
- padding-left: 2em;
-}
-
diff --git a/BSF/plugins/admin_advices/en_UK/index.php b/BSF/plugins/admin_advices/en_UK/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/admin_advices/en_UK/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/admin_advices/en_UK/lang.adv.php b/BSF/plugins/admin_advices/en_UK/lang.adv.php
deleted file mode 100644
index 26dc4d56b..000000000
--- a/BSF/plugins/admin_advices/en_UK/lang.adv.php
+++ /dev/null
@@ -1,447 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-global $lang;
-$lang['An_advice_about'] = 'A new advice about';
-$lang['Metadata'] = 'Metadata';
-
-foreach ($conf as $key => $value)
-{
- if ( is_string($value) )
- {
- $bool = ($value == 'false') ? false : $value;
- $bool = ($value == 'true') ? true : $bool;
- $conf[$key] = $bool;
- }
-}
-
-//
-// Don't forget to update range for new advices
-//
-$cases = range(1,34);
-srand ((double) microtime() * 10000000);
-shuffle($cases);
-
-$cond = false;
-foreach ($cases as $id_adv)
-{
- if ($cond) break;
- $adv = array();
- switch ($id_adv) {
- Case 1 :
- $adv[] = 'Current value: public. ';
- $adv[] = 'Try $conf[\'newcat_default_status\'] = \'private\';';
- $adv[] = 'You will have more time to describe and check your pictures.';
- $adv[] = 'Time to decide between private and public status.';
- $adv[] = 'If you choose private, time to distribute authorization.';
- $adv[] = 'Your new category will be well prepared.';
- $cond = ($conf['newcat_default_status'] !== 'public');
- $confk = 'newcat_default_status';
- break;
-
- Case 2 :
- $adv[] = 'Current value: ' . (string) $conf['slideshow_period'] . '.';
- $adv[] = 'This value could be too small for low band connections.';
- $adv[] = 'Think about higher value like 4.';
- $cond = ( $conf['slideshow_period'] < 4 );
- $confk = 'slideshow_period';
- break;
-
- Case 3 :
- $adv[] = 'Current value: ' . implode(', ', $conf['file_ext']) . '. ';
- $adv[] = 'Should never contains extensions which can be executed';
- $adv[] = 'on the server side like *.php, *.PHP, *.asp, ...';
- $cond = ( in_array('php',$conf['file_ext']) );
- $confk = 'file_ext';
- break;
-
- Case 4 :
- $adv[] = 'Show IPTC Data from your picture:';
- $adv[] = ' 1 - Copy one of your jpg pictures (a public one)' .
- ' in ./tools/<br />' .
- ' 2 - Rename it as sample.jpg.<br />' .
- ' 3 - Run ./tools/metadata.php<br />' .
- ' 4 - Analyse results to determine which IPTC fields could be' .
- ' useful for your visitors.';
- $adv[] = 'Beginners would prefer to keep $conf[\'show_iptc\'] = false;';
- $adv[] = 'Advanced users would take care of $lang values and impacts' .
- ' on templates.';
- $cond = true;
- $confk = 'show_iptc_mapping';
- break;
-
- Case 5 :
- $adv[] = 'Current value: ' . (string) $conf['top_number'] . '.';
- $adv[] = 'This value is maybe too high for low connections, ' .
- 'think about 25-50 depending on your thumbnail sizes.';
- $cond = ( $conf['top_number'] > 50 );
- $confk = 'top_number';
- break;
-
- Case 6 :
- $adv[] = 'Current value: ' . (string) $conf['top_number'] . '.';
- $adv[] = 'One? It could be too low for random pictures, ' .
- 'think about 5-10 depending on your thumbnail sizes.';
- $cond = ( $conf['top_number'] < 2 ) ? true : false;
- $confk = 'top_number';
- break;
-
- Case 7 :
- $adv[] = 'Current value: ' . (string) $conf['anti-flood_time'] . '.';
- $adv[] = 'For normal flow processing, your value is probably too high. ' .
- 'Reasonable value is 60 (default).' ;
- $cond = ( $conf['anti-flood_time'] > 100 ) ? true : false;
- $confk = 'anti-flood_time';
- break;
-
- Case 8 :
- $adv[] = 'Current value: ' . (string) $conf['calendar_datefield'] . '.';
- $adv[] = 'Authorized values are ' .
- "'date_creation' or 'date_available'" .
- ', otherwise you can get unpredictable results.' ;
- $cond = ( !in_array($conf['calendar_datefield'],
- array('date_creation','date_available')) );
- $confk = 'calendar_datefield';
- break;
-
- Case 9 :
- // If (iptc or exif) are used and date_creation is updated
- // Then it's Ok, you can use date_creation by default for calendar
- // else ... Advice
- $adv[] = 'Current value: ' . (string) $conf['calendar_datefield'] . '.';
- $adv[] = "'date_creation'" . ' is NOT filled by ' .
- 'any activated use metadata mapping fields.';
- $adv[] = 'So activate metadata usage <strong>or</strong> change to ' .
- '$conf[\'calendar_datefield\'] = \'date_available\'';
- $adv[] = 'Activate metadata usage as you want: <br />' .
- '1 - $conf[\'use_iptc\'] = true; or $conf[\'use_exif\'] = true; ' .
- 'each way will be correct.<br />' .
- '2 - And respectively map:<br />' .
- '$conf[\'use_iptc_mapping\'] = array( ..., \'date_creation\' ' .
- '=> \'2#055\', ...<br />' .
- 'or/and:<br />' .
- '$conf[\'use_exif_mapping\'] = array(\'date_creation\' ' .
- '=> \'DateTimeOriginal\', ...<br />' .
- '3 - Finally, a new task is up to you: Metadata synchronization.' ;
- $cond2 = ( $conf['use_exif'] and
- isset($conf['use_exif_mapping']['date_creation']) );
- $cond3 = ( $conf['use_iptc'] and
- isset($conf['use_iptc_mapping']['date_creation']) );
- $cond = ( $conf['calendar_datefield'] == 'date_creation' );
- $cond = ( ($cond2 or $cond3) and $cond ) ? false : true;
- $confk = 'calendar_datefield';
- break;
-
- Case 10 :
- $adv[] = 'Current value: false.';
- $adv[] = 'Not useful, private status is better, so code ' .
- '$conf[\'newcat_default_visible\'] = true;' ;
- $cond = !$conf['newcat_default_visible'];
- $confk = 'newcat_default_visible';
- break;
-
- Case 11 :
- $adv[] = 'Current value: ' . (string) $conf['level_separator'] . '.';
- $adv[] = 'Try something else like $conf[\'level_separator\'] = \'+ \';';
- $cond = ( $conf['level_separator'] == ' / ' );
- $confk = 'level_separator';
- break;
-
- Case 12 :
- $adv[] = 'Current value: ' . (string) $conf['paginate_pages_around'] . '.';
- $adv[] = 'Usual range is between 2 and 5. To be light, choose ' .
- '$conf[\'paginate_pages_around\'] = 2; <br />' .
- 'To offer large jump, choose $conf[\'paginate_pages_around\'] = 7;';
- $cond = (($conf['paginate_pages_around'] < 2)
- or ($conf['paginate_pages_around'] > 12));
- $confk = 'paginate_pages_around';
- break;
-
- Case 13 :
- $adv[] = 'Current value: ' . (string) $conf['tn_width'] . '.';
- $adv[] = 'Should be a close value to your thumbnail width.' .
- $adv[] = 'Usual range is between 96 and 150, ' .
- 'about $conf[\'tn_width\'] = 128;';
- $cond = (($conf['tn_width'] < 66)
- or ($conf['tn_width'] > 180));
- $confk = 'tn_width';
- break;
-
- Case 14 :
- $adv[] = 'Current value: ' . (string) $conf['tn_height'] . '.';
- $adv[] = 'Should be a close value to your thumbnail height.' .
- $adv[] = 'Usual range is between 96 and 150, ' .
- 'about $conf[\'tn_height\'] = 128;';
- $cond = (($conf['tn_height'] < 66)
- or ($conf['tn_height'] > 180));
- $confk = 'tn_height';
- break;
-
- Case 15 :
- $adv[] = 'Thumbnail height and width have to be equal.';
- $adv[] = 'Choose $conf[\'tn_height\'] = ' . (string) $conf['tn_width'] .
- ';<br />' .
- 'or $conf[\'tn_width\'] = ' . (string) $conf['tn_height'] . ';';
- $cond = ( $conf['tn_height'] !== $conf['tn_width'] );
- $confk = 'tn_height';
- break;
-
- Case 16 :
- $adv[] = 'Current value: true.';
- $adv[] = 'For security reason, please set ' .
- '$conf[\'show_version\'] = false;';
- $cond = $conf['show_version'];
- $confk = 'show_version';
- break;
-
- Case 17 :
- $adv[] = 'Current value: true.';
- $adv[] = 'For a lighter gallery just have a look to ' .
- '$conf[\'show_thumbnail_caption\'] = false;';
- $cond = $conf['show_thumbnail_caption'];
- $confk = 'show_thumbnail_caption';
- break;
-
- Case 18 :
- $adv[] = 'Current value: true.';
- $adv[] = 'For a lighter gallery just have a look to ' .
- '$conf[\'show_picture_name_on_title\'] = false;';
- $cond = $conf['show_picture_name_on_title'];
- $confk = 'show_picture_name_on_title';
- break;
-
- Case 19 :
- $adv[] = 'Current value: true.';
- $adv[] = 'If you do NOT have any category descriptions just have ' .
- 'a look to $conf[\'subcatify\'] = false;';
- $cond = $conf['subcatify'];
- $confk = 'subcatify';
- break;
-
- Case 20 :
- $adv[] = 'Current value: true.';
- $adv[] = 'Leave $conf[\'allow_random_representative\'] = true; <br />' .
- 'but analyze if you can avoid for performance reasons.' ;
- $cond = $conf['allow_random_representative'];
- $confk = 'allow_random_representative';
- break;
-
- Case 21 :
- $adv[] = 'Current value: ' . (string) $conf['prefix_thumbnail'] . '.';
- $adv[] = 'Be careful your $conf[\'prefix_thumbnail\'] is NOT standard.';
- $adv[] = 'Do NOT change it except if your thumbnails are NOT visible.';
- $adv[] = 'Distant site may use a different prefix but ' .
- 'create_listing_file.php must be modified.<br />' .
- 'You will get a warning message during synchronization in ' .
- 'that case.';
- $adv[] = 'Try to keep the same prefix thru all your sites either ' .
- 'local or distants.';
- $adv[] = 'Keep this parameter in your ./include/config_'.
- '<strong>local.inc.php</strong>. <br />'.
- 'See our wiki configuration page for more information about ' .
- './include/config_<strong>local.inc.php</strong>.';
- $cond = ( $conf['prefix_thumbnail'] !== 'TN-' );
- $confk = 'prefix_thumbnail';
- break;
-
- Case 22 :
- $adv[] = 'Current value: ' . (string) $conf['users_page'] . '.';
- $adv[] = 'Unless you have a low band connection, you can draw up ' .
- '$conf[\'users_page\'] to a higher value ' .
- 'if you have more than 20 members.';
- $cond = ( $conf['users_page'] < 21 );
- $confk = 'users_page';
- break;
-
- Case 23 :
- $adv[] = 'Current value: true.';
- $adv[] = 'Should be false, only few webmasters have to set ' .
- '$conf[\'mail_options\'] = true; <br />' .
- 'A specific advice you can get from an advanced ' .
- 'user on our forum in some mailing issues.' ;
- $cond = $conf['mail_options'];
- $confk = 'mail_options';
- break;
-
- Case 24 :
- $adv[] = 'Current value: true.';
- $adv[] = 'Should be false, only PWG dev Team have to set ' .
- '$conf[\'check_upgrade_feed\'] = true; for test purpose.' ;
- $cond = $conf['check_upgrade_feed'];
- $confk = 'check_upgrade_feed';
- break;
-
- Case 25 :
- $adv[] = '$conf[\'rate_items\'] has ' . count($conf['rate_items'])
- . 'items.';
- $adv[] = 'Your $conf[\'rate_items\'] would have 4 or 5 items not less.';
- $cond = ( count($conf['rate_items']) < 4 );
- $confk = 'rate_items';
- break;
-
- Case 26 :
- $adv[] = '$conf[\'rate_items\'] has ' . count($conf['rate_items'])
- . 'items.';
- $adv[] = 'Your $conf[\'rate_items\'] would have 5 or 6 items not more.';
- $adv[] = 'Check your best rated pictures prior to remove some values.' .
- '<br />Reduce excessive rating and change your ' .
- '$conf[\'rate_items\'].';
- $cond = ( count($conf['rate_items']) > 6 );
- $confk = 'rate_items';
- break;
-
- Case 27 :
- $adv[] = 'Current value: true.';
- $adv[] = 'Could be true, think about $conf[\'show_iptc\'] = false;'
- . '<br />Some Professional photographers choose false ' .
- 'their reasons are not really professional.' ;
- $adv[] = 'Do NOT confuse between <strong>show</strong>_iptc and ' .
- '<strong>use</strong>_iptc (have a look on metadata page ' .
- 'on our wiki).';
- $cond = $conf['show_iptc'];
- $confk = 'show_iptc';
- break;
-
- Case 28 :
- $adv[] = 'Current value: true.';
- $adv[] = 'Documentalists and professionnal photographers would ' .
- 'set it true, but beginners should leave it ' .
- 'as $conf[\'use_iptc\'] = false;';
- $adv[] = 'Take care of mentionned fields in metadata synchronization.' .
- '<br />Mentionned fields would be rewrited with IPTC values ' .
- ' even those ones are NOT empty.';
- $adv[] = 'Do NOT confuse between <strong>show</strong>_iptc and ' .
- '<strong>use</strong>_iptc (have a look on metadata page ' .
- 'on our wiki).';
- $cond = $conf['use_iptc'];
- $confk = 'use_iptc';
- break;
-
- Case 29 :
- $adv[] = 'How to deal with IPTC:';
- $adv[] = '1 - Copy one of your jpg pictures (a public one) in ./tools/' .
- '<br />2 - Rename it as sample.jpg.' .
- '<br />3 - Run ./tools/metadata.php' .
- '<br />4 - Analyse results to determine which IPTC fields ' .
- 'could be used to override database fields.';
- $adv[] = 'Beginners would prefer to keep $conf[\'use_iptc\'] = false;';
- $adv[] = 'Advanced users make documentation efforts prior ' .
- 'to upload their pictures.<br />' .
- 'IPTC fields have to be described in ' .
- '$conf[\'use_iptc_mapping\']';
- $adv[] = 'In any case, <strong>show</strong>_iptc_mapping and ' .
- '<strong>use</strong>_iptc_mapping must be totally different.';
- $cond = true;
- $confk = 'use_iptc';
- break;
-
- Case 30 :
- $adv[] = 'How to deal with IPTC:';
- $adv[] = '1 - Copy one of your jpg pictures (a public one) in ./tools/' .
- '<br />2 - Rename it as sample.jpg.' .
- '<br />3 - Run ./tools/metadata.php' .
- '<br />4 - Analyse results to determine which IPTC fields ' .
- 'could be used to override database fields.';
- $adv[] = 'Beginners would prefer to keep $conf[\'use_iptc\'] = false;';
- $adv[] = 'Advanced users make documentation efforts prior ' .
- 'to upload their pictures.';
- $adv[] = 'Take care of mentionned fields in metadata synchronization.' .
- '<br />Mentionned fields would be rewrited with IPTC values ' .
- ' even those ones are NOT empty.';
- $adv[] = 'In any case, <strong>show</strong>_iptc_mapping and ' .
- '<strong>use</strong>_iptc_mapping must be totally different.';
- $cond = true;
- $confk = 'use_iptc_mapping';
- break;
-
- Case 31 :
- $adv[] = 'Current value: ' . ( ( $conf['show_exif'] ) ? 'true':'false' )
- . '.';
- $adv[] = 'Should be true, some information from your camera ' .
- 'can be displayed.';
- $adv[] = 'Think about EXIF information could be different depending ' .
- 'on camera models.<br />' .
- 'If you change your camera these fields could be ' .
- 'partly different.';
- $adv[] = 'Many professional photographers choose false, ' .
- 'their reasons are to protect their knowledge.' ;
- $adv[] = 'Do NOT confuse between <strong>show</strong>_exif and ' .
- '<strong>use</strong>_exif (have a look on metadata page ' .
- 'on our wiki).';
- $cond = true;
- $confk = 'show_exif';
- break;
-
- Case 32 :
- $adv[] = 'How to deal with EXIF:';
- $adv[] = '1 - Copy one of your jpg pictures (a public one) in ./tools/' .
- '<br />2 - Rename it as sample.jpg.' .
- '<br />3 - Run ./tools/metadata.php' .
- '<br />4 - Analyse results to determine which EXIF fields ' .
- 'could be used to override database fields.';
- $adv[] = 'Beginners would prefer to let default values.';
- $adv[] = 'Advanced users would take care of $lang values and ' .
- 'impacts on templates.';
- $adv[] = 'In any case, <strong>show</strong>_exif_fields and ' .
- '<strong>use</strong>_exif_mapping must be totally different.';
- $cond = true;
- $confk = 'show_exif_fields';
- break;
-
- Case 33 :
- $adv[] = 'Current value: ' . ( ( $conf['use_exif'] ) ? 'true':'false' )
- . '.';
- $adv[] = 'Documentalists and professionnal photographers would ' .
- 'set it true, but beginners should leave the default value.';
- $adv[] = 'Take care of mentionned fields in metadata synchronization.' .
- '<br />Mentionned fields would be rewrited with EXIF values ' .
- ' even those ones are NOT empty.';
- $adv[] = 'Do NOT confuse between <strong>show</strong>_exif and ' .
- '<strong>use</strong>_exif (have a look on metadata page ' .
- 'on our wiki).';
- $cond = true;
- $confk = 'use_exif';
- break;
-
- Case 34 :
- $adv[] = 'How to deal with EXIF:';
- $adv[] = '1 - Copy one of your jpg pictures (a public one) in ./tools/' .
- '<br />2 - Rename it as sample.jpg.' .
- '<br />3 - Run ./tools/metadata.php' .
- '<br />4 - Analyse results to determine which EXIF fields ' .
- 'could be used to override database fields.';
- $adv[] = 'Beginners would prefer to let default values.';
- $adv[] = 'Advanced users would carefully chose overrided fields ' .
- 'prior to synchronize.';
- $adv[] = 'Take care of mentionned fields in metadata synchronization.' .
- '<br />Mentionned fields would be rewrited with EXIF values ' .
- ' even those ones are NOT empty.';
- $adv[] = 'In any case, <strong>show</strong>_exif_fields and ' .
- '<strong>use</strong>_exif_mapping must be totally different.';
- $cond = true;
- $confk = 'use_exif_mapping';
- break;
- }
-}
-
-?>
diff --git a/BSF/plugins/admin_advices/fr_FR/index.php b/BSF/plugins/admin_advices/fr_FR/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/admin_advices/fr_FR/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/admin_advices/fr_FR/lang.adv.php b/BSF/plugins/admin_advices/fr_FR/lang.adv.php
deleted file mode 100644
index 11fd5cf53..000000000
--- a/BSF/plugins/admin_advices/fr_FR/lang.adv.php
+++ /dev/null
@@ -1,480 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-global $lang;
-$lang['An_advice_about'] = 'Un nouveau conseil Ă  propos de ';
-$lang['Metadata'] = 'MĂŠta-donnĂŠes';
-
-foreach ($conf as $key => $value)
-{
- if ( is_string($value) )
- {
- $bool = ($value == 'false') ? false : $value;
- $bool = ($value == 'true') ? true : $bool;
- $conf[$key] = $bool;
- }
-}
-
-//
-// Don't forget to update range for new advices
-//
-$cases = range(1,34);
-srand ((double) microtime() * 10000000);
-shuffle($cases);
-
-$cond = false;
-foreach ($cases as $id_adv)
-{
- if ($cond) break;
- $adv = array();
- switch ($id_adv) {
- Case 1 :
- $adv[] = 'Valeur actuelle : public. ';
- $adv[] = 'Essayez $conf[\'newcat_default_status\'] = \'private\';';
- $adv[] = 'Vous aurez plus de temps pour dĂŠcrire et contrĂ´ler vos images. '
- . 'Du temps pour vous dĂŠcider entre un statut privĂŠ ou public.';
- $adv[] = 'Si vous choisissez de rester privĂŠ, vous passerez directement '
- . 'Ă  l\'attribution des autorisations. <br />'
- . 'Vos nouvelles catĂŠgories seront prĂŠparĂŠes plus facilement.';
- $cond = ($conf['newcat_default_status'] !== 'public');
- $confk = 'newcat_default_status';
- break;
-
- Case 2 :
- $adv[] = 'Valeur actuelle : ' . (string) $conf['slideshow_period'] . '.';
- $adv[] = 'Ce dĂŠlai pourrait ĂŞtre trop petit pour les connexions '
- . 'en bas dĂŠbit.';
- $adv[] = 'Pensez Ă  une valeur supĂŠrieure comme 4.';
- $cond = ( $conf['slideshow_period'] < 4 );
- $confk = 'slideshow_period';
- break;
-
- Case 3 :
- $adv[] = 'Valeur actuelle : ' . implode(', ', $conf['file_ext']) . '. ';
- $adv[] = 'Ne devrait jamais contenir des extensions pouvant ĂŞtre ';
- $adv[] = 'exĂŠcutĂŠes sur le serveur comme *.php, *.PHP, *.asp, ...';
- $cond = ( in_array('php',$conf['file_ext']) );
- $confk = 'file_ext';
- break;
-
- Case 4 :
- $adv[] = 'Comment gĂŠrer les IPTC:';
- $adv[] = ' 1 - Copiez une image jpg (publique) dans ./tools/<br />'
- . ' 2 - Renommez celle-ci en sample.jpg.<br />'
- . ' 3 - Lancez ./tools/metadata.php<br />'
- . ' 4 - Analysez les rĂŠsultats pour dĂŠterminer quels champs '
- . 'IPTC pourraient intĂŠresser vos visiteurs.';
- $adv[] = 'Les dĂŠbutants laisseront $conf[\'show_iptc\'] = false;';
- $adv[] = 'Les utilisateurs avancĂŠs penseront aux valeurs du tableau '
- . '$lang; voire mĂŞme Ă  l\'impact possible sur les templates.';
- $cond = true;
- $confk = 'show_iptc_mapping';
- break;
-
- Case 5 :
- $adv[] = 'Valeur actuelle : ' . (string) $conf['top_number'] . '.';
- $adv[] = 'Cette valeur pourrait ĂŞtre trop grande pour des connexions '
- . 'bas dĂŠbit.<br /> Pensez Ă  une valeur situĂŠe entre 25-50 '
- . 'en fonction de la taille de vos minitures.';
- $cond = ( $conf['top_number'] > 50 );
- $confk = 'top_number';
- break;
-
- Case 6 :
- $adv[] = 'Valeur actuelle : ' . (string) $conf['top_number'] . '.';
- $adv[] = 'Une seule? Au moins pour les images alĂŠatoires, pensez '
- . 'autour de 5-10 selon la tailles de vos miniatures.';
- $cond = ( $conf['top_number'] < 2 ) ? true : false;
- $confk = 'top_number';
- break;
-
- Case 7 :
- $adv[] = 'Valeur actuelle : ' . (string) $conf['anti-flood_time'] . '.';
- $adv[] = 'Pour un traitement fluide, votre valeur est sans doute trop '
- . 'grande. Une valeur raisonnable serait 60 (valeur par dĂŠfaut).' ;
- $cond = ( $conf['anti-flood_time'] > 100 ) ? true : false;
- $confk = 'anti-flood_time';
- break;
-
- Case 8 :
- $adv[] = 'Valeur actuelle : ' . (string) $conf['calendar_datefield'] .'.';
- $adv[] = 'Les valeurs admises sont '
- . "'date_creation' ou 'date_available'" . ', toute autre valeur'
- . 'peut aboutir Ă  des rĂŠsultats imprĂŠvisibles.' ;
- $cond = ( !in_array($conf['calendar_datefield'],
- array('date_creation','date_available')) );
- $confk = 'calendar_datefield';
- break;
-
- Case 9 :
- // If (iptc or exif) are used and date_creation is updated
- // Then it's Ok, you can use date_creation by default for calendar
- // else ... Advise
- $adv[] = 'Valeur actuelle : ' . (string) $conf['calendar_datefield'] .'.';
- $adv[] = "La 'date_creation'" . ' n\'est pas renseignĂŠe. Aucun champ '
- . 'des mĂŠta-donnĂŠes (use_) n\'actualise la base.';
- $adv[] = 'Soit vous activez l\'usage des mĂŠta-donnĂŠes <strong>ou'
- . '</strong> changez pour '
- . '$conf[\'calendar_datefield\'] = \'date_available\'';
- $adv[] = 'Activez l\'usage des mĂŠta-donnĂŠes simplement par: <br />'
- . '1 - $conf[\'use_iptc\'] = true; ou $conf[\'use_exif\'] = true; '
- . 'au choix, les 2 sont valables.<br />'
- . '2 - Respectivement Ă  chacune faire la modif:<br />'
- . '$conf[\'use_iptc_mapping\'] = array( ..., \'date_creation\' '
- . '=> \'2#055\', ...<br />'
- . 'et/ou:<br />'
- . '$conf[\'use_exif_mapping\'] = array(\'date_creation\' '
- . '=> \'DateTimeOriginal\', ...<br />'
- . '3 - Enfin une nouvelle tache vous est destinĂŠe: '
- . 'la synchronisation des mĂŠta-donnĂŠes.' ;
- $cond2 = ( $conf['use_exif'] and
- isset($conf['use_exif_mapping']['date_creation']) );
- $cond3 = ( $conf['use_iptc'] and
- isset($conf['use_iptc_mapping']['date_creation']) );
- $cond = ( $conf['calendar_datefield'] == 'date_creation' );
- $cond = ( ($cond2 or $cond3) and $cond ) ? false : true;
- $confk = 'calendar_datefield';
- break;
-
- Case 10 :
- $adv[] = 'Valeur actuelle : false.';
- $adv[] = 'C\'est une erreur, un statut "private" est plus simple, '
- . 'alors choisissez $conf[\'newcat_default_visible\'] = true;' ;
- $cond = !$conf['newcat_default_visible'];
- $confk = 'newcat_default_visible';
- break;
-
- Case 11 :
- $adv[] = 'Valeur actuelle : ' . (string) $conf['level_separator'] . '.';
- $adv[] = 'Vous pouvez toujours essayer un autre sĂŠparateur comme :'
- . '<br />$conf[\'level_separator\'] = \'+ \';';
- $cond = ( $conf['level_separator'] == ' / ' );
- $confk = 'level_separator';
- break;
-
- Case 12 :
- $adv[] = 'Valeur actuelle : ' . (string) $conf['paginate_pages_around']
- . '.';
- $adv[] = 'Les valeurs habituelles se situent entre 2 et 5.'
- . 'Pour un site avec une interface lÊgère, on choisira : <br />'
- . '$conf[\'paginate_pages_around\'] = 2; <br />'
- . 'Afin de proposer plus d\'accès directs, on choisira : <br />'
- . '$conf[\'paginate_pages_around\'] = 7;';
- $cond = (($conf['paginate_pages_around'] < 2)
- or ($conf['paginate_pages_around'] > 12));
- $confk = 'paginate_pages_around';
- break;
-
- Case 13 :
- $adv[] = 'Valeur actuelle : ' . (string) $conf['tn_width'] . '.';
- $adv[] = 'Doit ĂŞtre une valeur proche de la largeur de vos miniatures.';
- $adv[] = 'Les valeurs habituelles se situent entre 96 et 150, '
- . 'comme $conf[\'tn_width\'] = 128;';
- $cond = (($conf['tn_width'] < 66)
- or ($conf['tn_width'] > 180));
- $confk = 'tn_width';
- break;
-
- Case 14 :
- $adv[] = 'Valeur actuelle : ' . (string) $conf['tn_height'] . '.';
- $adv[] = 'Doit ĂŞtre une valeur proche de la hauteur de vos miniatures.';
- $adv[] = 'Les valeurs habituelles se situent entre 96 et 150, '
- . 'comme $conf[\'tn_height\'] = 128;';
- $cond = (($conf['tn_height'] < 66)
- or ($conf['tn_height'] > 180));
- $confk = 'tn_height';
- break;
-
- Case 15 :
- $adv[] = 'Il n\'y a aucune raison pour que la largeur maximale soit '
- . 'diffĂŠrente de la hauteur maximale. Pourquoi les ajouts en '
- . 'portrait afficheraient des miniatures dans une rĂŠsolution '
- . 'diffĂŠrente de celle des miniatures en paysage?';
- $adv[] = 'Essayez $conf[\'tn_height\'] = ' . (string) $conf['tn_width']
- . ';<br />'
- . 'ou $conf[\'tn_width\'] = ' . (string) $conf['tn_height'] . ';';
- $cond = ( $conf['tn_height'] !== $conf['tn_width'] );
- $confk = 'tn_height';
- break;
-
- Case 16 :
- $adv[] = 'Valeur actuelle : true.';
- $adv[] = 'Pour des raisons de sĂŠcuritĂŠ de votre galerie, prĂŠfĂŠrez '
- . '$conf[\'show_version\'] = false;';
- $cond = $conf['show_version'];
- $confk = 'show_version';
- break;
-
- Case 17 :
- $adv[] = 'Valeur actuelle : true.';
- $adv[] = 'Pour une galerie moins chargĂŠe, faites le test de '
- . '$conf[\'show_thumbnail_caption\'] = false;';
- $cond = $conf['show_thumbnail_caption'];
- $confk = 'show_thumbnail_caption';
- break;
-
- Case 18 :
- $adv[] = 'Valeur actuelle : true.';
- $adv[] = 'Pour une galerie moins chargĂŠe, faites le test de '
- . '$conf[\'show_picture_name_on_title\'] = false;';
- $cond = $conf['show_picture_name_on_title'];
- $confk = 'show_picture_name_on_title';
- break;
-
- Case 19 :
- $adv[] = 'Valeur actuelle : true.';
- $adv[] = 'Aucune de vos catÊgories ne possède de descriptions alors '
- . 'essayez $conf[\'subcatify\'] = false;';
- $cond = $conf['subcatify'];
- $confk = 'subcatify';
- break;
-
- Case 20 :
- $adv[] = 'Valeur actuelle : true.';
- $adv[] = 'Laissez $conf[\'allow_random_representative\'] = true; <br />'
- . 'mais ĂŠtudiez comment vous pouvez l\'ĂŠviter pour des raisons '
- . 'de performance.' ;
- $cond = $conf['allow_random_representative'];
- $confk = 'allow_random_representative';
- break;
-
- Case 21 :
- $adv[] = 'Valeur actuelle : ' . (string) $conf['prefix_thumbnail'] . '.';
- $adv[] = 'Attention, votre $conf[\'prefix_thumbnail\'] n\'est pas '
- . 'standard.';
- $adv[] = 'Ne pas changer votre prĂŠfixe sauf si vos miniatures ont un '
- . 'problème d\'affichage.';
- $adv[] = 'Un site distant peut avoir un prĂŠfixe diffĂŠrent, le '
- . 'create_listing_file.php devra ĂŞtre modifiĂŠ.<br />'
- . 'Vous devriez avoir un message d\'avertissement pendant la '
- . 'synchronisation dans ce cas.';
- $adv[] = 'Essayez de garder le mĂŞme prĂŠfixe de miniatures pour les sites '
- . 'locaux ou distants.';
- $adv[] = 'Conservez ce paramètre dans votre ./include/config_'
- . '<strong>local.inc.php</strong>. <br />'
- . 'Voir la page sur la configuration dans le Wiki pour plus '
- . 'd\'informations Ă  propos de '
- . './include/config_<strong>local.inc.php</strong>.';
- $cond = ( $conf['prefix_thumbnail'] !== 'TN-' );
- $confk = 'prefix_thumbnail';
- break;
-
- Case 22 :
- $adv[] = 'Valeur actuelle : ' . (string) $conf['users_page'] . '.';
- $adv[] = 'A moins d\'avoir une connexion bas dĂŠbit, vous pouvez '
- . 'augmenter largement $conf[\'users_page\'] '
- . 'surtout si vous avez plus de 20 membres.';
- $cond = ( $conf['users_page'] < 21 );
- $confk = 'users_page';
- break;
-
- Case 23 :
- $adv[] = 'Valeur actuelle : true.';
- $adv[] = 'Devrait ĂŞtre Ă  false, seulement quelques webmasters devront '
- . 'indiquer $conf[\'mail_options\'] = true; <br />'
- . 'Un utilisateur avancĂŠ de notre forum les aura conseillĂŠ '
- . 'dans un seul cas de problème d\'email.' ;
- $cond = $conf['mail_options'];
- $confk = 'mail_options';
- break;
-
- Case 24 :
- $adv[] = 'Valeur actuelle : true.';
- $adv[] = 'Devrait ĂŞtre Ă  false, seuls les membres de l\'ĂŠquipe PWG '
- . 'codent $conf[\'check_upgrade_feed\'] = true; pour leurs tests.';
- $cond = $conf['check_upgrade_feed'];
- $confk = 'check_upgrade_feed';
- break;
-
- Case 25 :
- $adv[] = '$conf[\'rate_items\'] dispose de ' . count($conf['rate_items'])
- . 'ĂŠlĂŠments.';
- $adv[] = 'Votre $conf[\'rate_items\'] devrait avoir 4 ou 5 ĂŠlĂŠments '
- . 'mais pas moins.';
- $cond = ( count($conf['rate_items']) < 4 );
- $confk = 'rate_items';
- break;
-
- Case 26 :
- $adv[] = '$conf[\'rate_items\'] has ' . count($conf['rate_items'])
- . 'items.';
- $adv[] = 'Votre $conf[\'rate_items\'] devrait avoir 4 ou 5 ĂŠlĂŠments '
- . 'mais pas plus.';
- $adv[] = 'ContrĂ´lez vos images les mieux notĂŠes avant de retirer '
- . ' certaines valeurs.'
- . '<br />RĂŠduire les valeurs excessives et modifiez votre '
- . '$conf[\'rate_items\'].';
- $cond = ( count($conf['rate_items']) > 6 );
- $confk = 'rate_items';
- break;
-
- Case 27 :
- $adv[] = 'Valeur actuelle : true.';
- $adv[] = 'Peut ĂŞtre effectivement Ă  true, ĂŠventuellement choisissez '
- . '$conf[\'show_iptc\'] = false;'
- . '<br />Comme quelques photographes professionnels choisissez '
- . 'false bien que leurs raisons ne soient guère professionnelles.';
- $adv[] = 'Ne confondez pas <strong>show</strong>_iptc et '
- . '<strong>use</strong>_iptc (consultez la pages de mĂŠtadonnĂŠes '
- . 'sur notre wiki).';
- $cond = $conf['show_iptc'];
- $confk = 'show_iptc';
- break;
-
- Case 28 :
- $adv[] = 'Valeur actuelle : true.';
- $adv[] = 'Les documentalistes et photographes professionnels choisiront '
- . 'cette valeur true, mais les dĂŠbutants devraient laisser '
- . '$conf[\'use_iptc\'] = false;';
- $adv[] = 'Faire attention aux champs mentionnĂŠs dans la synchronisation '
- . 'des mĂŠtadonnĂŠes.<br />Les champs indiquĂŠs pourront ĂŞtre '
- . 'ĂŠcrasĂŠs par des valeurs de champs IPTC quand bien mĂŞme ces '
- . 'champs ne seraient pas vides.';
- $adv[] = 'Ne confondez pas <strong>show</strong>_iptc et '
- . '<strong>use</strong>_iptc (consultez la pages de mĂŠtadonnĂŠes '
- . 'sur notre wiki).';
- $cond = $conf['use_iptc'];
- $confk = 'use_iptc';
- break;
-
- Case 29 :
- $adv[] = 'Comment gĂŠrer les IPTC:';
- $adv[] = ' 1 - Copiez une image jpg (publique) dans ./tools/<br />'
- . ' 2 - Renommez celle-ci en sample.jpg.<br />'
- . ' 3 - Lancez ./tools/metadata.php<br />'
- . ' 4 - Analysez les rĂŠsultats pour dĂŠterminer quels champs '
- . 'IPTC pourraient intĂŠresser vos visiteurs.';
- $adv[] = 'Les dĂŠbutants laisseront $conf[\'use_iptc\'] = false;';
- $adv[] = 'Les utilisateurs avancĂŠs feront des efforts de documentation '
- . 'avant de transfĂŠrer leurs images.<br />'
- . 'Les champs IPTC doivent ĂŞtre dĂŠcrits par '
- . '$conf[\'use_iptc_mapping\']';
- $adv[] = 'Dans tous les cas, <strong>show</strong>_iptc_mapping et '
- . '<strong>use</strong>_iptc_mapping seront '
- . 'totalement diffĂŠrents.';
- $cond = true;
- $confk = 'use_iptc';
- break;
-
- Case 30 :
- $adv[] = 'Comment gĂŠrer les IPTC:';
- $adv[] = ' 1 - Copiez une image jpg (publique) dans ./tools/<br />'
- . ' 2 - Renommez celle-ci en sample.jpg.<br />'
- . ' 3 - Lancez ./tools/metadata.php<br />'
- . ' 4 - Analysez les rĂŠsultats pour dĂŠterminer quels champs '
- . 'IPTC pourraient intĂŠresser vos visiteurs.';
- $adv[] = 'Les dĂŠbutants laisseront $conf[\'use_iptc\'] = false;';
- $adv[] = 'Les utilisateurs avancĂŠs feront des efforts de documentation '
- . 'avant de transfĂŠrer leurs images.<br />'
- . 'Les champs IPTC doivent ĂŞtre dĂŠcrits par '
- . '$conf[\'use_iptc_mapping\']';
- $adv[] = 'Faire attention aux champs mentionnĂŠs dans la synchronisation '
- . 'des mĂŠtadonnĂŠes.<br />Les champs indiquĂŠs pourront ĂŞtre '
- . 'ĂŠcrasĂŠs par des valeurs de champs IPTC quand bien mĂŞme ces '
- . 'champs ne seraient pas vides.';
- $adv[] = 'Dans tous les cas, <strong>show</strong>_iptc_mapping et '
- . '<strong>use</strong>_iptc_mapping seront '
- . 'totalement diffĂŠrents.';
- $cond = true;
- $confk = 'use_iptc_mapping';
- break;
-
- Case 31 :
- $adv[] = 'Valeur actuelle : '
- . ( ( $conf['show_exif'] ) ? 'true':'false' ) . '.';
- $adv[] = 'Devrait ĂŞtre Ă  true, certaines informations propres Ă  votre '
- . 'appareil pourront ĂŞtre affichĂŠes.';
- $adv[] = 'Pensez au fait que les informations EXIF peuvent ĂŞtre '
- . 'diffÊrentes suivant les modèles d\'appareil.<br />'
- . 'Si vous changez votre appareil ces champs pourraient en '
- . 'partie differents.';
- $adv[] = 'Beaucoup de photographes professionnels choissent false, '
- . 'ceci afin de protĂŠger leur savoir-faire.' ;
- $adv[] = 'Ne confondez pas <strong>show</strong>_exif et '
- . '<strong>use</strong>_exif (consultez la pages de mĂŠtadonnĂŠes '
- . 'sur notre wiki).';
- $cond = true;
- $confk = 'show_exif';
- break;
-
- Case 32 :
- $adv[] = 'Comment gĂŠrer les EXIF:';
- $adv[] = ' 1 - Copiez une image jpg (publique) dans ./tools/<br />'
- . ' 2 - Renommez celle-ci en sample.jpg.<br />'
- . ' 3 - Lancez ./tools/metadata.php<br />'
- . ' 4 - Analysez les rĂŠsultats pour dĂŠterminer quels champs '
- . 'EXIF pourraient intĂŠresser vos visiteurs.';
- $adv[] = 'Les dĂŠbutants laisseront la valeur par dĂŠfaut.';
- $adv[] = 'Les utilisateurs avancĂŠs penseront aux valeurs du tableau '
- . '$lang; voire mĂŞme Ă  l\'impact possible sur les templates.';
- $adv[] = 'Dans tous les cas, <strong>show</strong>_exif_fields et '
- . '<strong>use</strong>_exif_mapping seront '
- . 'totalement diffĂŠrents.';
- $cond = true;
- $confk = 'show_exif_fields';
- break;
-
- Case 33 :
- $adv[] = 'Valeur actuelle : ' . ( ( $conf['use_exif'] ) ? 'true':'false' )
- . '.';
- $adv[] = 'Les documentalistes et photographes professionnels choisiront '
- . 'cette valeur true, mais les dĂŠbutants devraient laisser '
- . 'la valeur par dĂŠfaut.';
- $adv[] = 'Faire attention aux champs mentionnĂŠs dans la synchronisation '
- . 'des mĂŠtadonnĂŠes.<br />Les champs indiquĂŠs pourront ĂŞtre '
- . 'ĂŠcrasĂŠs par des valeurs de champs EXIF quand bien mĂŞme ces '
- . 'champs ne seraient pas vides.';
- $adv[] = 'Ne confondez pas <strong>show</strong>_exif et '
- . '<strong>use</strong>_exif (consultez la pages de mĂŠtadonnĂŠes '
- . 'sur notre wiki).';
- $cond = true;
- $confk = 'use_exif';
- break;
-
- Case 34 :
- $adv[] = 'Comment gĂŠrer les EXIF:';
- $adv[] = ' 1 - Copiez une image jpg (publique) dans ./tools/<br />'
- . ' 2 - Renommez celle-ci en sample.jpg.<br />'
- . ' 3 - Lancez ./tools/metadata.php<br />'
- . ' 4 - Analysez les rĂŠsultats pour dĂŠterminer quels champs '
- . 'EXIF pourraient intĂŠresser vos visiteurs.';
- $adv[] = 'Les dĂŠbutants laisseront la valeur par dĂŠfaut.';
- $adv[] = 'Les utilisateurs avancĂŠs penseront aux valeurs du tableau '
- . '$lang; voire mĂŞme Ă  l\'impact possible sur les templates.';
- $adv[] = 'Les dĂŠbutants laisseront $conf[\'use_exif\'] = false;';
- $adv[] = 'Les utilisateurs avancÊs feront très attention aux champs '
- . 'sĂŠlectionnĂŠs et modifiĂŠs par la synchronisation.';
- $adv[] = 'Faire attention aux champs mentionnĂŠs dans la synchronisation '
- . 'des mĂŠtadonnĂŠes.<br />Ces champs pourront ĂŞtre '
- . 'ĂŠcrasĂŠs par des valeurs de champs EXIF quand bien mĂŞme ces '
- . 'champs ne seraient pas vides.';
- $adv[] = 'Dans tous les cas, <strong>show</strong>_exif_fields et '
- . '<strong>use</strong>_exif_mapping seront '
- . 'totalement diffĂŠrents.';
- $cond = true;
- $confk = 'use_exif_mapping';
- break;
- }
-}
-
-?>
diff --git a/BSF/plugins/admin_advices/index.php b/BSF/plugins/admin_advices/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/admin_advices/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/admin_advices/main.inc.php b/BSF/plugins/admin_advices/main.inc.php
deleted file mode 100644
index fe87cc723..000000000
--- a/BSF/plugins/admin_advices/main.inc.php
+++ /dev/null
@@ -1,127 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 Piwigo team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/*
-Plugin Name: Admin Advices
-Version: 1.8
-Description: Give you an advice on the administration page.
-Plugin URI: http://piwigo.org
-Author: Piwigo team
-Author URI: http://piwigo.org
-*/
-
-add_event_handler('loc_end_page_header', 'set_admin_advice_add_css' );
-
-// Add a XHTML tag in HEAD section
-function set_admin_advice_add_css()
-{
- global $template, $page;
- if ( isset($page['body_id']) and $page['body_id']=='theAdminPage'
- and $page['page'] == 'intro'
- )
- {// This Plugin works only on the Admin page
- $template->append(
- 'head_elements',
- '<link rel="stylesheet" type="text/css" '
- . 'href="'.PHPWG_PLUGINS_PATH.'admin_advices/default-layout.css">'
- );
- add_event_handler('loc_begin_page_tail', 'set_admin_advice' );
- }
-}
-
-// Build an advice on the Admin Intro page
-function set_admin_advice()
-{
- global $page, $user, $template, $conf;
-
-// Setup Advice Language (Maybe there is already a variable)
- $advlang = ( isset($user['language']) ) ?
- $user['language'] : get_default_language(); // en_UK
- $my_path = dirname(__FILE__).'/';
- $adv = array();
- if ( !@file_exists($my_path."$advlang/lang.adv.php") )
- {
- $advlang = 'en_UK';
- }
-// Include language advices
- @include_once( $my_path."$advlang/lang.adv.php" );
-
-// If there is an advice
- if ( $cond )
- {
- $template->set_filenames(array(
- 'admin_advice' => $my_path.'admin_advices.tpl')
- );
-
-// Random Thumbnail
- $query = '
-SELECT *
-FROM '.IMAGES_TABLE.'
-ORDER BY RAND(NOW())
-LIMIT 0, 1
-;';
- $result = pwg_query($query);
- $row = mysql_fetch_assoc($result);
- if ( is_array($row) )
- {
- $url_modify = get_root_url().'admin.php?page=picture_modify'
- .'&amp;image_id='.$row['id'];
- $query = '
-SELECT * FROM '.IMAGE_TAG_TABLE.'
-WHERE image_id = ' . $row['id'] .'
-;';
- $tag_count = mysql_num_rows(mysql_query($query));
- $template->assign('thumbnail',
- array(
- 'IMAGE' => get_thumbnail_url($row),
- 'IMAGE_ALT' => $row['file'],
- 'IMAGE_TITLE' => $row['name'],
- 'METADATA' => (empty($row['date_metadata_update'])) ?
- 'un' : '',
- 'NAME' => (empty($row['name'])) ?
- 'un' : '',
- 'COMMENT' => (empty($row['comment'])) ?
- 'un' : '',
- 'AUTHOR' => (empty($row['author'])) ?
- 'un' : '',
- 'CREATE_DATE' => (empty($row['date_creation'])) ?
- 'un' : '',
- 'TAGS' => ($tag_count == 0) ?
- 'un' : '',
- 'NUM_TAGS' => $tag_count,
- 'U_MODIFY' => $url_modify,
- )
- );
- }
- $advice_text = array_shift($adv);
- $template->assign(
- array(
- 'ADVICE_ABOUT' => '$conf[' . "'$confk'] ",
- 'ADVICE_TEXT' => $advice_text,
- )
- );
- $template->assign('More', $adv );
- $template->pparse('admin_advice');
- }
-}
-?>
diff --git a/BSF/plugins/admin_multi_view/controller.php b/BSF/plugins/admin_multi_view/controller.php
deleted file mode 100644
index 861df63a7..000000000
--- a/BSF/plugins/admin_multi_view/controller.php
+++ /dev/null
@@ -1,221 +0,0 @@
-<?php
-define('MULTIVIEW_CONTROLLER', 1);
-define('PHPWG_ROOT_PATH','../../');
-include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
-
-if (!is_admin() or !function_exists('multiview_user_init') )
-{
- pwg_unset_session_var( 'multiview_as' );
- pwg_unset_session_var( 'multiview_theme' );
- pwg_unset_session_var( 'multiview_lang' );
- pwg_unset_session_var( 'multiview_show_queries' );
- pwg_unset_session_var( 'multiview_debug_l10n' );
- pwg_unset_session_var( 'multiview_debug_template' );
-?>
-
-<script type="text/javascript">
- window.close();
-</script>
-<?php
- exit();
-}
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-"http://www.w3.org/TR/html4/strict.dtd">
-<?php
-
-$refresh_main = false;
-
-if ( isset($_GET['view_as']) )
-{
- if ( is_adviser() and $user['id']!=$_GET['view_as'] and $conf['guest_id']!=$_GET['view_as'])
- die('security error');
- pwg_set_session_var( 'multiview_as', (int)$_GET['view_as'] );
- // user change resets theme/lang
- pwg_unset_session_var( 'multiview_theme' );
- pwg_unset_session_var( 'multiview_lang' );
- $refresh_main = true;
-}
-if (pwg_get_session_var( 'multiview_as', $user['id']) != $user['id'] )
- $view_as_user = build_user( pwg_get_session_var( 'multiview_as',0), false);
-else
- $view_as_user = $user;
-
-if ( isset($_GET['theme']) )
-{
- pwg_set_session_var( 'multiview_theme', $_GET['theme'] );
- $refresh_main = true;
-}
-
-if ( isset($_GET['lang']) )
-{
- pwg_set_session_var( 'multiview_lang', $_GET['lang'] );
- $refresh_main = true;
-}
-
-if ( isset($_GET['show_queries']) )
-{
- if ( $_GET['show_queries']> 0 )
- pwg_set_session_var( 'multiview_show_queries', 1 );
- else
- pwg_unset_session_var( 'multiview_show_queries' );
- $refresh_main = true;
-}
-
-if ( isset($_GET['debug_l10n']) )
-{
- if ( $_GET['debug_l10n']>0 )
- pwg_set_session_var( 'multiview_debug_l10n', 1 );
- else
- pwg_unset_session_var( 'multiview_debug_l10n' );
- $refresh_main = true;
-}
-
-
-if ( isset($_GET['debug_template']) )
-{
- if ( $_GET['debug_template']>0 )
- pwg_set_session_var( 'multiview_debug_template', 1 );
- else
- pwg_unset_session_var( 'multiview_debug_template' );
- $refresh_main = true;
-}
-
-$my_url = get_root_url().'plugins/'.basename(dirname(__FILE__)).'/'.basename(__FILE__);
-
-// +-----------------------------------------------------------------------+
-// | users |
-$query = '
-SELECT '.$conf['user_fields']['id'].' AS id,'.$conf['user_fields']['username'].' AS username
-FROM '.USERS_TABLE;
-if (is_adviser())
-{
- $query .='
- WHERE '.$conf['user_fields']['id']. ' IN ('.$user['id'].','.$conf['guest_id'].')
-';
-}
-$query .='
- ORDER BY CONVERT('.$conf['user_fields']['username'].',CHAR)
-;';
-$user_map = simple_hash_from_query($query, 'id', 'username');
-
-$users_html = '<select onchange="document.location = this.options[this.selectedIndex].value;">';
-foreach( $user_map as $id=>$username)
-{
- $selected = ($id==$view_as_user['id']) ? 'selected="selected"' : '';
- $users_html .=
- '<option value="'
- .$my_url.'?view_as='.$id
- .'" '.$selected.'>'
- .$username
- .'</option>';
-}
-$users_html.= '</select>';
-
-
-// +-----------------------------------------------------------------------+
-// | templates |
-$my_template = '';
-$themes_html='<select onchange="document.location = this.options[this.selectedIndex].value;">';
-foreach (get_pwg_themes() as $pwg_template)
-{
- $selected = $pwg_template == pwg_get_session_var( 'multiview_theme', $view_as_user['template'].'/'.$view_as_user['theme'] ) ? 'selected="selected"' : '';
- $my_template = $selected == '' ? $my_template : $view_as_user['template'].'/theme/'.$view_as_user['theme'];
- $themes_html .=
- '<option value="'
- .$my_url.'?theme='.$pwg_template
- .'" '.$selected.'>'
- .$pwg_template
- .'</option>';
-}
-$themes_html .= '</select>';
-
-// +-----------------------------------------------------------------------+
-// | language |
-$lang_html='<select onchange="document.location = this.options[this.selectedIndex].value;">';
-foreach (get_languages() as $language_code => $language_name)
-{
- $selected = $language_code == pwg_get_session_var( 'multiview_lang', $view_as_user['language'] ) ? 'selected="selected"' : '';
- $lang_html .=
- '<option value="'
- .$my_url.'?lang='.$language_code
- .'" '.$selected.'>'
- .$language_name
- .'</option>';
-}
-$lang_html .= '</select>';
-
-// +-----------------------------------------------------------------------+
-// | show queries |
-$show_queries_html='';
-if (!$conf['show_queries'])
-{
- if ( !pwg_get_session_var( 'multiview_show_queries', 0 ) )
- $show_queries_html.='<a href="'.$my_url.'?show_queries=1">Show SQL queries</a>';
- else
- $show_queries_html.='<a href="'.$my_url.'?show_queries=0">Hide SQL queries</a>';
-}
-
-// +-----------------------------------------------------------------------+
-// | debug language |
-$debug_l10n_html='';
-if (!$conf['debug_l10n'])
-{
- if ( !pwg_get_session_var( 'multiview_debug_l10n', 0 ) )
- $debug_l10n_html.='<a href="'.$my_url.'?debug_l10n=1">Debug language</a>';
- else
- $debug_l10n_html.='<a href="'.$my_url.'?debug_l10n=0">Revert debug language</a>';
-}
-
-// +-----------------------------------------------------------------------+
-// | debug template |
-$debug_template_html='';
-if (!$conf['debug_template'])
-{
- if ( !pwg_get_session_var( 'multiview_debug_template', 0 ) )
- $debug_template_html.='<a href="'.$my_url.'?debug_template=1">Debug template</a>';
- else
- $debug_template_html.='<a href="'.$my_url.'?debug_template=0">Revert debug template</a>';
-}
-
-?>
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo get_pwg_charset() ?>">
-<title>Controller</title>
-<?php
-// Controller will be displayed with the **real admin template** (without Any if it has been removed)
-if ( $my_template !== '') {
- $my_template = get_root_url().'template/'.$my_template.'/theme.css';
- echo '<link rel="stylesheet" type="text/css" href="' . $my_template .'">';
-}
-?>
-
-</head>
-<body>
-<div>
-<script type="text/javascript">
-if (window.opener==null) {
- window.close();
- document.write("<"+"h2>How did you get here ???<"+"/h2>");
-}
-</script>
-
-<table>
-<tr><td>User</td><td><?php echo $users_html; ?></td></tr>
-
-<tr><td>Theme</td><td><?php echo $themes_html; ?></td></tr>
-
-<tr><td>Lang</td><td><?php echo $lang_html; ?></td></tr>
-</table>
-<?php echo implode( "<br/>\n", array($show_queries_html, $debug_l10n_html, $debug_template_html) ); ?>
-
-<script type="text/javascript">
-<?php
- if ($refresh_main) echo '
-window.opener.location = window.opener.location;';
-?>
-</script>
-</div>
-</body>
-</html>
diff --git a/BSF/plugins/admin_multi_view/index.php b/BSF/plugins/admin_multi_view/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/admin_multi_view/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/admin_multi_view/is_admin.inc.php b/BSF/plugins/admin_multi_view/is_admin.inc.php
deleted file mode 100644
index 7ae1f90dc..000000000
--- a/BSF/plugins/admin_multi_view/is_admin.inc.php
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-if (! defined('MULTIVIEW_CONTROLLER') )
-{
- global $user;
- $view_as = pwg_get_session_var( 'multiview_as', 0 );
- if ($view_as)
- {
- $user = build_user( $view_as, true);
- }
- $theme = pwg_get_session_var( 'multiview_theme', '' );
- if ( !empty($theme) )
- {
- list($user['template'], $user['theme']) = explode('/', $theme);
- unset( $user['admin_template'], $user['admin_theme']);
- }
- $lang = pwg_get_session_var( 'multiview_lang', '' );
- if ( !empty($lang) )
- {
- $user['language'] = $lang;
- }
- global $conf;
- if (pwg_get_session_var( 'multiview_show_queries', 0 ))
- $conf['show_queries'] = true;
- if (pwg_get_session_var( 'multiview_debug_l10n', 0 ))
- $conf['debug_l10n'] = true;
- if (pwg_get_session_var( 'multiview_debug_template', 0 ))
- $conf['debug_template'] = true;
-}
-
-add_event_handler('loc_end_page_header', 'multiview_loc_end_page_header');
-
-function multiview_loc_end_page_header()
-{
- global $template;
- $my_root_url = get_root_url().'plugins/'. basename(dirname(__FILE__)).'/';
- $js =
-'<script type="text/javascript">
-var theController = window.open("", "mview_controller", "alwaysRaised=yes,dependent=yes,toolbar=no,height=200,width=220,menubar=no,resizable=yes,scrollbars=yes,status=no");
-if ( theController.location.toString()=="about:blank" || !theController.location.toString().match(/^(https?.*\/)controller\.php(\?.+)?$/))
-{
- theController.location = "'.$my_root_url.'controller.php";
-}
-</script>';
-
- $template->append( 'head_elements', $js );
-}
-?>
diff --git a/BSF/plugins/admin_multi_view/main.inc.php b/BSF/plugins/admin_multi_view/main.inc.php
deleted file mode 100644
index d29486fd0..000000000
--- a/BSF/plugins/admin_multi_view/main.inc.php
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 Piwigo team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/*
-Plugin Name: Multi view
-Version: 1.8
-Description: Allows administrators to view gallery as guests and/or change the language and/or theme on the fly. Practical to debug changes ...
-Plugin URI: http://piwigo.org
-Author: Piwigo team
-Author URI: http://piwigo.org
-*/
-
-add_event_handler('user_init', 'multiview_user_init' );
-
-function multiview_user_init()
-{
- if (!is_admin())
- return;
- include_once( dirname(__FILE__).'/is_admin.inc.php' );
-}
-
-?>
diff --git a/BSF/plugins/c13y_upgrade/index.php b/BSF/plugins/c13y_upgrade/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/c13y_upgrade/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/c13y_upgrade/initialize.inc.php b/BSF/plugins/c13y_upgrade/initialize.inc.php
deleted file mode 100644
index cd7034c4c..000000000
--- a/BSF/plugins/c13y_upgrade/initialize.inc.php
+++ /dev/null
@@ -1,142 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-add_event_handler('list_check_integrity', 'c13y_upgrade');
-
-function c13y_upgrade($c13y)
-{
- global $conf;
-
- load_language('plugin.lang', dirname(__FILE__).'/');
-
- $can_be_deactivate = true;
-
- /* Check user with same e-mail */
- $query = '
-select
- count(*)
-from
- '.USERS_TABLE.'
-where
- '.$conf['user_fields']['email'].' is not null
-group by
- upper('.$conf['user_fields']['email'].')
-having count(*) > 1
-limit 0,1
-;';
-
- if (mysql_fetch_array(pwg_query($query)))
- {
- $can_be_deactivate = false;
- $c13y->add_anomaly(
- l10n('c13y_dbl_email_user'),
- null,
- null,
- l10n('c13y_correction_dbl_email_user'));
- }
-
- /* Check plugin included in Piwigo sources */
- $included_plugins = array('dew', 'UpToDate', 'PluginsManager');
- $query = '
-select
- id
-from
- '.PLUGINS_TABLE.'
-where
- id in ('.
- implode(
- ',',
- array_map(
- create_function('$s', 'return "\'".$s."\'";'),
- $included_plugins
- )
- )
- .')
-;';
-
- $result = pwg_query($query);
- while ($row = mysql_fetch_assoc($result))
- {
- $can_be_deactivate = false;
-
- $uninstall_msg_link =
- '<a href="'.
- PHPWG_ROOT_PATH.
- 'admin.php?page=plugins_list&amp;plugin='.$row['id'].'&amp;action=uninstall'.
- '" onclick="window.open(this.href, \'\'); return false;">'.
- sprintf(l10n('c13y_correction_obsolete_plugin'), $row['id']).'</a>';
-
- $c13y->add_anomaly(
- l10n('c13y_obsolete_plugin'),
- null,
- null,
- $uninstall_msg_link);
- }
-
- /* Check if this plugin must deactivate */
- if ($can_be_deactivate)
- {
- $deactivate_msg_link =
- '<a href="'.
- PHPWG_ROOT_PATH.
- 'admin.php?page=plugins_list&amp;plugin=c13y_upgrade&amp;action=deactivate'.
- '" onclick="window.open(this.href, \'\'); return false;">'.
- l10n('c13y_upgrade_deactivate').'</a>';
-
- $c13y->add_anomaly(
- l10n('c13y_upgrade_no_anomaly'),
- 'c13y_upgrade_correction',
- 'deactivate_plugin',
- $deactivate_msg_link
- );
- }
-}
-
-function c13y_upgrade_correction($action)
-{
- $result = false;
-
- switch ($action)
- {
- case 'deactivate_plugin':
- {
- $query = '
-REPLACE INTO '.PLUGINS_TABLE.'
-(id, state)
-VALUES (\'c13y_upgrade\', \'inactive\')
-;';
- pwg_query($query);
- $result = true;
- }
- break;
- }
-
- return $result;
-}
-
-?>
diff --git a/BSF/plugins/c13y_upgrade/language/en_UK/index.php b/BSF/plugins/c13y_upgrade/language/en_UK/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/c13y_upgrade/language/en_UK/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/c13y_upgrade/language/en_UK/plugin.lang.php b/BSF/plugins/c13y_upgrade/language/en_UK/plugin.lang.php
deleted file mode 100644
index b4fd37004..000000000
--- a/BSF/plugins/c13y_upgrade/language/en_UK/plugin.lang.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
-$lang['c13y_upgrade_no_anomaly'] = 'No anomaly detected after application upgrade';
-$lang['c13y_upgrade_deactivate'] = 'You can deactivate "Check upgrades" plugin';
-$lang['c13y_dbl_email_user'] = 'Users with same email address';
-$lang['c13y_correction_dbl_email_user'] = 'Delete duplicate users';
-$lang['c13y_obsolete_plugin'] = 'Obsolete plugin';
-$lang['c13y_correction_obsolete_plugin'] = '"%s" plugin has been included in this application version and you must uninstall it.';
-
-?>
diff --git a/BSF/plugins/c13y_upgrade/language/es_ES/index.php b/BSF/plugins/c13y_upgrade/language/es_ES/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/c13y_upgrade/language/es_ES/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/c13y_upgrade/language/es_ES/plugin.lang.php b/BSF/plugins/c13y_upgrade/language/es_ES/plugin.lang.php
deleted file mode 100644
index 839623f1c..000000000
--- a/BSF/plugins/c13y_upgrade/language/es_ES/plugin.lang.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
-$lang['c13y_upgrade_no_anomaly'] = 'Ninguna anomalĂ­a detectada despuĂŠs de la puesta al dĂ­a de la aplicaciĂłn';
-$lang['c13y_upgrade_deactivate'] = 'Usted puede desactivar el plugin Check upgrades';
-$lang['c13y_dbl_email_user'] = 'Utilizadores con la misma direcciĂłn e-mail';
-$lang['c13y_correction_dbl_email_user'] = 'Suprima a los utilizadores en duplicado';
-/* TODO */ $lang['c13y_obsolete_plugin'] = 'Obsolete plugin';
-/* TODO */ $lang['c13y_correction_obsolete_plugin'] = '"%s" plugin has been included in this application version and you must uninstall it.';
-
-?>
diff --git a/BSF/plugins/c13y_upgrade/language/fr_FR/index.php b/BSF/plugins/c13y_upgrade/language/fr_FR/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/c13y_upgrade/language/fr_FR/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/c13y_upgrade/language/fr_FR/plugin.lang.php b/BSF/plugins/c13y_upgrade/language/fr_FR/plugin.lang.php
deleted file mode 100644
index bd903f213..000000000
--- a/BSF/plugins/c13y_upgrade/language/fr_FR/plugin.lang.php
+++ /dev/null
@@ -1,32 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// --------- Starting below: New or revised $lang ---- from Butterfly (1.8)
-$lang['c13y_upgrade_no_anomaly'] = 'Pas d\'anomalie dÊtectÊe après la mise à jour de l\'application';
-$lang['c13y_upgrade_deactivate'] = 'Vous pouvez dĂŠsactiver le plugin "Check upgrades"';
-$lang['c13y_dbl_email_user'] = 'Utilisateurs avec la mĂŞme adresse email';
-$lang['c13y_correction_dbl_email_user'] = 'Supprimez les utilisateurs en double';
-$lang['c13y_obsolete_plugin'] = 'Plugin obsolète';
-$lang['c13y_correction_obsolete_plugin'] = 'Le plugin "%s" a ĂŠtĂŠ inclus dans cette version de l\'application et vous devez le dĂŠsinstaller.';
-
-?>
diff --git a/BSF/plugins/c13y_upgrade/language/index.php b/BSF/plugins/c13y_upgrade/language/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/c13y_upgrade/language/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/c13y_upgrade/main.inc.php b/BSF/plugins/c13y_upgrade/main.inc.php
deleted file mode 100644
index a6130322e..000000000
--- a/BSF/plugins/c13y_upgrade/main.inc.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 Piwigo team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/*
-Plugin Name: Check upgrades
-Version: 1.8
-Description: Check integrity of upgrades / ContrĂ´le d'intĂŠgritĂŠ des mises Ă  jour
-Plugin URI: http://piwigo.org
-Author: Piwigo team
-Author URI: http://piwigo.org
-*/
-
-if (!defined('PHPWG_ROOT_PATH'))
-{
- die('Hacking attempt!');
-}
-
-if (in_array(script_basename(), array('popuphelp', 'admin')))
-{
- if (defined('IN_ADMIN') and IN_ADMIN)
- {
- include_once(dirname(__FILE__).'/initialize.inc.php');
- }
-}
-
-?>
diff --git a/BSF/plugins/event_tracer/event_list.php b/BSF/plugins/event_tracer/event_list.php
deleted file mode 100644
index ae617fe87..000000000
--- a/BSF/plugins/event_tracer/event_list.php
+++ /dev/null
@@ -1,90 +0,0 @@
-<?php
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-function get_php_files($path, $to_ignore=array(), $recursive=true )
-{
- $files = array();
- if (is_dir($path))
- {
- if ($contents = opendir($path))
- {
- while (($node = readdir($contents)) !== false)
- {
- if ($node != '.' and $node != '..' and $node != '.svn'
- and !in_array($node, $to_ignore) )
- {
- if ( $recursive and is_dir($path.'/'.$node) )
- {
- $files = array_merge($files, get_php_files($path.'/'.$node, $to_ignore));
-
- }
- if ( is_file($path.'/'.$node) )
- {
- $files[] = $path.'/'.$node;
- }
- }
- }
- closedir($contents);
- }
- }
- return $files;
-}
-
-$files = array();
-$files = array_merge( $files, get_php_files('.', array(), false) );
-$files = array_merge( $files, get_php_files('./include') );
-$files = array_merge( $files, get_php_files('./admin') );
-$files = array_unique($files);
-
-$events = array();
-foreach ($files as $file)
-{
- $code = file_get_contents($file);
- $code = preg_replace( '#\?'.'>.*<\?php#m', '', $code);
- $code = preg_replace( '#\/\*.*\*\/#m', '', $code);
- $code = preg_replace( '#\/\/.*#', '', $code);
-
- $count = preg_match_all(
- '#[^a-zA-Z_$-]trigger_(action|event)\s*\(\s*([^,)]+)#m',
- $code, $matches
- );
-
- for ($i=0; $i<$count; $i++)
- {
- $type = $matches[1][$i];
- $name = preg_replace( '#^[\'"]?([^\'"]*)[\'"]?$#', '$1', $matches[2][$i]);
- array_push($events, array($type,$name,$file) );
- }
-}
-
-$sort= isset($_GET['sort']) ? $_GET['sort'] : 1;
-usort(
- $events,
- create_function( '$a,$b', 'return $a['.$sort.']>$b['.$sort.'];' )
- );
-
-global $template;
-
-$url = get_admin_plugin_menu_link(__FILE__);
-
-$template->assign( array(
- 'NB_EVENTS' => count($events),
- 'U_SORT0' => add_url_params($url, array('sort'=>0) ),
- 'U_SORT1' => add_url_params($url, array('sort'=>1) ),
- 'U_SORT2' => add_url_params($url, array('sort'=>2) ),
- ) );
-
-$template->assign('events', array());
-foreach ($events as $e)
-{
- $template->append( 'events', array(
- 'TYPE' => $e[0],
- 'NAME' => $e[1],
- 'FILE' => $e[2],
- )
- );
-}
-
-$template->set_filenames( array('event_list' => dirname(__FILE__).'/event_list.tpl' ) );
-$template->assign_var_from_handle( 'ADMIN_CONTENT', 'event_list');
-?>
diff --git a/BSF/plugins/event_tracer/event_list.tpl b/BSF/plugins/event_tracer/event_list.tpl
deleted file mode 100644
index accc27278..000000000
--- a/BSF/plugins/event_tracer/event_list.tpl
+++ /dev/null
@@ -1,17 +0,0 @@
-{* $Id$ *}
-There are {$NB_EVENTS} calls to triger_event or triger_action.
-
-<table width="99%" class="table2">
-<tr class="throw">
- <th><a href="{$U_SORT0}">Type</a></th>
- <th><a href="{$U_SORT1}">Name</a></th>
- <th><a href="{$U_SORT2}">File</a></th>
-</tr>
-{foreach from=$events item=event}
-<tr>
- <td>{$event.TYPE}</td>
- <td>{$event.NAME}</td>
- <td>{$event.FILE}</td>
-</tr>
-{/foreach}
-</table>
diff --git a/BSF/plugins/event_tracer/index.php b/BSF/plugins/event_tracer/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/event_tracer/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/event_tracer/main.inc.php b/BSF/plugins/event_tracer/main.inc.php
deleted file mode 100644
index dcf282146..000000000
--- a/BSF/plugins/event_tracer/main.inc.php
+++ /dev/null
@@ -1,137 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 Piwigo team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/*
-Plugin Name: Event tracer
-Version: 1.8.a
-Description: For developers. Shows all calls to trigger_event.
-Plugin URI: http://piwigo.org
-Author: Piwigo team
-Author URI: http://piwigo.org
-*/
-
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-class EventTracer
-{
- var $me_working;
- var $my_config;
-
- function EventTracer()
- {
- $this->me_working=0;
- }
-
- function get_config_file_dir()
- {
- global $conf;
- return $conf['local_data_dir'].'/plugins/';
- }
-
- function get_config_file_name()
- {
- return basename(dirname(__FILE__)).'.dat';
- }
-
- function load_config()
- {
- $x = @file_get_contents( $this->get_config_file_dir().$this->get_config_file_name() );
- if ($x!==false)
- {
- $c = unserialize($x);
- // do some more tests here
- $this->my_config = $c;
- }
- if ( !isset($this->my_config)
- or empty($this->my_config['filters']) )
- {
- $this->my_config['filters'] = array( '.*' );
- $this->my_config['show_args'] = false;
- $this->save_config();
- }
- }
-
- function save_config()
- {
- $dir = $this->get_config_file_dir();
- @mkdir($dir);
- $file = fopen( $dir.$this->get_config_file_name(), 'w' );
- fwrite($file, serialize($this->my_config) );
- fclose( $file );
- }
-
- function on_pre_trigger_event($event_info)
- {
- $this->dump('pre_trigger_event', $event_info);
- }
- function on_post_trigger_event($event_info)
- {
- $this->dump('post_trigger_event', $event_info);
- }
-
- function on_trigger_action($event_info)
- {
- $this->dump('trigger_action', $event_info);
- }
-
- function dump($event, $event_info)
- {
- foreach( $this->my_config['filters'] as $filter)
- {
- if ( preg_match( '/'.$filter.'/', $event_info['event'] ) )
- {
- if ($this->my_config['show_args'])
- {
- $s = '<pre>';
- $s .= htmlspecialchars( var_export( $event_info['data'], true ) );
- $s .= '</pre>';
- }
- else
- $s = '';
- pwg_debug($event.' "'.$event_info['event'].'" '.($s) );
- break;
- }
- }
- }
-
- function plugin_admin_menu($menu)
- {
- array_push($menu,
- array(
- 'NAME' => 'Event Tracer',
- 'URL' => get_admin_plugin_menu_link(dirname(__FILE__).'/tracer_admin.php')
- )
- );
- return $menu;
- }
-}
-
-$obj = new EventTracer();
-$obj->load_config();
-
-add_event_handler('get_admin_plugin_menu_links', array(&$obj, 'plugin_admin_menu') );
-add_event_handler('pre_trigger_event', array(&$obj, 'on_pre_trigger_event') );
-add_event_handler('post_trigger_event', array(&$obj, 'on_post_trigger_event') );
-add_event_handler('trigger_action', array(&$obj, 'on_trigger_action') );
-set_plugin_data($plugin['id'], $obj);
-?>
diff --git a/BSF/plugins/event_tracer/maintain.inc.php b/BSF/plugins/event_tracer/maintain.inc.php
deleted file mode 100644
index f7d0131c5..000000000
--- a/BSF/plugins/event_tracer/maintain.inc.php
+++ /dev/null
@@ -1,9 +0,0 @@
-<?php
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-function plugin_uninstall($plugin_id)
-{
- global $conf;
- @unlink( $conf['local_data_dir'].'/plugins/'.$plugin_id.'.dat' );
-}
-?>
diff --git a/BSF/plugins/event_tracer/tracer_admin.php b/BSF/plugins/event_tracer/tracer_admin.php
deleted file mode 100644
index b17f2a301..000000000
--- a/BSF/plugins/event_tracer/tracer_admin.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-$me = get_plugin_data($plugin_id);
-
-global $template;
-$template->set_filenames( array('plugin_admin_content' => dirname(__FILE__).'/tracer_admin.tpl') );
-
-if ( isset($_POST['eventTracer_filters']) )
-{
- $v = $_POST['eventTracer_filters'];
- $v = str_replace( "\r\n", "\n", $v );
- $v = str_replace( "\n\n", "\n", $v );
- $v = stripslashes($v);
- if (!empty($v))
- $me->my_config['filters'] = explode("\n", $v);
- else
- $me->my_config['filters'] = array();
- $me->my_config['show_args'] = isset($_POST['eventTracer_show_args']);
- $me->save_config();
- global $page;
- array_push($page['infos'], 'event tracer options saved');
-}
-$template->assign('EVENT_TRACER_FILTERS', implode("\n", $me->my_config['filters'] ) );
-$template->assign('EVENT_TRACER_SHOW_ARGS', $me->my_config['show_args'] ? 'checked="checked"' : '' );
-$template->assign('U_LIST_EVENTS', get_admin_plugin_menu_link(dirname(__FILE__).'/event_list.php'));
-
-//$template->assign_var('EVENT_TRACER_F_ACTION', $my_url);
-
-$template->assign_var_from_handle( 'ADMIN_CONTENT', 'plugin_admin_content');
-?>
diff --git a/BSF/plugins/event_tracer/tracer_admin.tpl b/BSF/plugins/event_tracer/tracer_admin.tpl
deleted file mode 100644
index 17d7e2b01..000000000
--- a/BSF/plugins/event_tracer/tracer_admin.tpl
+++ /dev/null
@@ -1,29 +0,0 @@
-{* $Id$ *}
-<div class="titrePage">
- <h2>Event Tracer</h2>
-</div>
-
-<p>
-The event tracer is a developer tool that logs in the footer of the window all calls to trigger_event method.
-You can use this plugin to see what events is Piwigo calling.
-<b>Note that $conf['show_queries'] must be true.</b>
-</p>
-<form method="post" action="" class="general">
-<fieldset>
- <legend>Event Tracer</legend>
-
-<label>Show event argument
- <input type="checkbox" name="eventTracer_show_args" {$EVENT_TRACER_SHOW_ARGS} />
-</label>
-<br/>
-<label>Fill below a list of regular expressions (one per line).
-An event will be logged if its name matches at least one expression in the list.
- <textarea name="eventTracer_filters" id="eventTracer_filters"rows="10" cols="80">{$EVENT_TRACER_FILTERS}</textarea>
-</label>
-
-</fieldset>
-
-<p><input class="submit" type="submit" value="Submit" /></p>
-
-<p><a href="{$U_LIST_EVENTS}">Click here to see a complete list of actions and events trigered by this PWG version</a>.</p>
-</form>
diff --git a/BSF/plugins/extended_description/index.php b/BSF/plugins/extended_description/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/extended_description/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/extended_description/main.inc.php b/BSF/plugins/extended_description/main.inc.php
deleted file mode 100644
index f8839b4c7..000000000
--- a/BSF/plugins/extended_description/main.inc.php
+++ /dev/null
@@ -1,69 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 Piwigo team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/*
-Plugin Name: Extended Description
-Version: 1.8
-Description: Allow multilanguage description / Permet d'avoir des descriptions mutilingues
-Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=175
-Author: Piwigo team
-Author URI: http://piwigo.org
-*/
-
-if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
-
-function get_user_language_desc($desc)
-{
- global $user;
-
- $user_lang = substr($user['language'], 0, 2);
-
- if (!substr_count(strtolower($desc), '[lang=' . $user_lang . ']'))
- {
- $user_lang = 'default';
- if (!substr_count(strtolower($desc), '[lang=default]'))
- {
- $desc = preg_replace("#(\A|\[/lang\])(.*?)(\[lang=(.*?)\]|\Z)#is", '$1[lang=default]$2[/lang]$3', $desc);
- }
- }
-
- preg_match_all("#\[lang=(" . $user_lang . "|all)\](.*?)\[/lang\]#is", $desc, $matches);
-
- return implode('', $matches[2]);
-}
-
-function extended_desc_mail_group_assign_vars($assign_vars)
-{
- if (isset($assign_vars['CPL_CONTENT']))
- {
- $assign_vars['CPL_CONTENT'] = get_user_language_desc($assign_vars['CPL_CONTENT']);
- }
- return $assign_vars;
-}
-
-add_event_handler ('render_category_description', 'get_user_language_desc');
-add_event_handler ('render_element_description', 'get_user_language_desc');
-add_event_handler('nbm_render_user_customize_mail_content', 'get_user_language_desc');
-add_event_handler('mail_group_assign_vars', 'extended_desc_mail_group_assign_vars');
-
-?> \ No newline at end of file
diff --git a/BSF/plugins/hello_world/index.php b/BSF/plugins/hello_world/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/hello_world/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/hello_world/main.inc.php b/BSF/plugins/hello_world/main.inc.php
deleted file mode 100644
index 07808d0d9..000000000
--- a/BSF/plugins/hello_world/main.inc.php
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/*
-Plugin Name: Hello World
-Version: 1.8
-Description: This example plugin changes the page banner for the administration page.
-Plugin URI: http://piwigo.org
-Author: Piwigo team
-Author URI: http://piwigo.org
-*/
-
-add_event_handler('loc_begin_page_header', 'hello_world_begin_header' );
-
-function hello_world_begin_header()
-{
- global $page;
- if ( isset($page['body_id']) and $page['body_id']=='theAdminPage')
- {
- $hellos = array( 'Aloha', 'Ahoy', 'Guten tag', 'Hello', 'Hoi', 'Hola', 'Salut', 'Yo' );
- shuffle($hellos);
- $page['page_banner'] = $hellos[0];
- // just as an example we modify it a little bit later
- add_event_handler('loc_end_page_header', 'hello_world_end_header');
- }
-}
-
-
-function hello_world_end_header()
-{
- global $template, $page;
- $template->assign( 'PAGE_BANNER',
- '<h1>"'.$page['page_banner'].'" from Piwigo plugin!</h1>');
-}
-
-?> \ No newline at end of file
diff --git a/BSF/plugins/index.php b/BSF/plugins/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/language_switch/icons/cz_CZ.gif b/BSF/plugins/language_switch/icons/cz_CZ.gif
deleted file mode 100644
index 89686c417..000000000
--- a/BSF/plugins/language_switch/icons/cz_CZ.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/language_switch/icons/de_DE.gif b/BSF/plugins/language_switch/icons/de_DE.gif
deleted file mode 100644
index 9b3009565..000000000
--- a/BSF/plugins/language_switch/icons/de_DE.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/language_switch/icons/en_UK.gif b/BSF/plugins/language_switch/icons/en_UK.gif
deleted file mode 100644
index 51b20e3c1..000000000
--- a/BSF/plugins/language_switch/icons/en_UK.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/language_switch/icons/es_AR.gif b/BSF/plugins/language_switch/icons/es_AR.gif
deleted file mode 100644
index 677979bc5..000000000
--- a/BSF/plugins/language_switch/icons/es_AR.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/language_switch/icons/es_ES.gif b/BSF/plugins/language_switch/icons/es_ES.gif
deleted file mode 100644
index d0d5adbbb..000000000
--- a/BSF/plugins/language_switch/icons/es_ES.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/language_switch/icons/fr_FR.gif b/BSF/plugins/language_switch/icons/fr_FR.gif
deleted file mode 100644
index 9080a66bf..000000000
--- a/BSF/plugins/language_switch/icons/fr_FR.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/language_switch/icons/hu_HU.gif b/BSF/plugins/language_switch/icons/hu_HU.gif
deleted file mode 100644
index 4eb513589..000000000
--- a/BSF/plugins/language_switch/icons/hu_HU.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/language_switch/icons/index.php b/BSF/plugins/language_switch/icons/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/language_switch/icons/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/language_switch/icons/it_IT.gif b/BSF/plugins/language_switch/icons/it_IT.gif
deleted file mode 100644
index 0ee512d4c..000000000
--- a/BSF/plugins/language_switch/icons/it_IT.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/language_switch/icons/nl_NL.gif b/BSF/plugins/language_switch/icons/nl_NL.gif
deleted file mode 100644
index 520e994b7..000000000
--- a/BSF/plugins/language_switch/icons/nl_NL.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/language_switch/icons/pl_PL.gif b/BSF/plugins/language_switch/icons/pl_PL.gif
deleted file mode 100644
index 66f140606..000000000
--- a/BSF/plugins/language_switch/icons/pl_PL.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/plugins/language_switch/index.php b/BSF/plugins/language_switch/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/plugins/language_switch/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/plugins/language_switch/language_switch.inc.php b/BSF/plugins/language_switch/language_switch.inc.php
deleted file mode 100644
index baaa0375a..000000000
--- a/BSF/plugins/language_switch/language_switch.inc.php
+++ /dev/null
@@ -1,92 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-function language_switch()
-{
- global $user, $template, $conf, $lang;
- if (!defined('PHPWG_ROOT_PATH')) { die('Hacking attempt!'); }
- $same = $user['language'];
- if ( isset( $_GET['lang']) )
- {
- if ( !empty($_GET['lang'] ) and
- file_exists( PHPWG_ROOT_PATH.'language/'
- . $_GET['lang'].'/common.lang.php') )
- {
- if (is_a_guest() or is_generic())
- {
- setcookie( 'pwg_lang_switch', $_GET['lang'],
- time()+60*60*24*30, cookie_path() );
- }
- else
- {
- $query = 'UPDATE '.USER_INFOS_TABLE.'
- SET language = \''.$_GET['lang'].'\'
- WHERE user_id = '.$user['id'].'
- ;';
- pwg_query($query);
- }
- $user['language'] = $_GET['lang'];
- }
- }
-// Users have $user['language']
-// Guest or generic members will use their cookied language !
- if ((is_a_guest() or is_generic())
- and isset( $_COOKIE['pwg_lang_switch'] ) )
- {
- $user['language'] = $_COOKIE['pwg_lang_switch'];
- }
-// Reload language only if it isn't the same one
- if ( $same !== $user['language'])
- {
- load_language('common.lang', '', $user['language']);
- load_language('local.lang', '', $user['language']);
- if (defined('IN_ADMIN') and IN_ADMIN)
- {
- load_language('admin.lang', '', $user['language']);
- }
- }
-}
-//if ( isset( $_GET['lang']) ) { redirect( make_index_url() ); }
-
-function Lang_flags()
-{
- global $user, $template;
- $available_lang = get_languages();
- foreach ( $available_lang as $code => $displayname )
- {
- $qlc_url = add_url_params( make_index_url(), array( 'lang' => $code ) );
- $qlc_alt = ucwords( $displayname );
- $qlc_title = $qlc_alt;
- $qlc_img = 'plugins/language_switch/icons/'
- . $code . '.gif';
-
- if ( $code !== $user['language'] and file_exists(PHPWG_ROOT_PATH.$qlc_img) )
- {
- $template->concat( 'PLUGIN_INDEX_ACTIONS',
- '<li><a href="' . $qlc_url . '" ><img src="' . get_root_url().$qlc_img . '" alt="'
- . $qlc_alt . '" title="'
- . $qlc_title . '" style="border: 1px solid #000000; '
- . ' margin: 0px 2px;" /></a></li>');
- }
- }
-}
-?> \ No newline at end of file
diff --git a/BSF/plugins/language_switch/main.inc.php b/BSF/plugins/language_switch/main.inc.php
deleted file mode 100644
index 0d3df1085..000000000
--- a/BSF/plugins/language_switch/main.inc.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 Piwigo team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/*
-Plugin Name: Language Switch
-Version: 1.8
-Description: Switch to another language from flags on your gallery home page.
-Plugin URI: http://phpwebgallery.net/ext/extension_view.php?eid=123
-Author: Piwigo team
-Author URI: http://piwigo.org
-*/
-
-include_once(PHPWG_PLUGINS_PATH.'language_switch/language_switch.inc.php');
-add_event_handler('loading_lang', 'language_switch' );
-add_event_handler('loc_end_index', 'Lang_flags' );
-?> \ No newline at end of file
diff --git a/BSF/popuphelp.php b/BSF/popuphelp.php
deleted file mode 100644
index b452eadcf..000000000
--- a/BSF/popuphelp.php
+++ /dev/null
@@ -1,80 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// +-----------------------------------------------------------------------+
-// | initialization |
-// +-----------------------------------------------------------------------+
-
-define('PHPWG_ROOT_PATH','./');
-include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_GUEST);
-
-$page['body_id'] = 'thePopuphelpPage';
-$title = l10n('Piwigo Help');
-$page['page_banner'] = '<h1>'.$title.'</h1>';
-$page['meta_robots']=array('noindex'=>1, 'nofollow'=>1);
-include(PHPWG_ROOT_PATH.'include/page_header.php');
-
-if
- (
- isset($_GET['page'])
- and preg_match('/^[a-z_]*$/', $_GET['page'])
- )
-{
- $help_content =
- load_language('help/'.$_GET['page'].'.html', '', '', true);
-
- if ($help_content == false)
- {
- $help_content = '';
- }
-
- $help_content = trigger_event(
- 'get_popup_help_content', $help_content, $_GET['page']);
-}
-else
-{
- die('Hacking attempt!');
-}
-
-$template->set_filename('popuphelp','popuphelp.tpl');
-
-$template->assign(
- array
- (
- 'HELP_CONTENT' => $help_content
- ));
-
-// +-----------------------------------------------------------------------+
-// | html code display |
-// +-----------------------------------------------------------------------+
-
-$template->pparse('popuphelp');
-
-include(PHPWG_ROOT_PATH.'include/page_tail.php');
-
-?> \ No newline at end of file
diff --git a/BSF/profile.php b/BSF/profile.php
deleted file mode 100644
index 1be97c7c1..000000000
--- a/BSF/profile.php
+++ /dev/null
@@ -1,271 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// customize appearance of the site for a user
-// +-----------------------------------------------------------------------+
-// | initialization |
-// +-----------------------------------------------------------------------+
-
-if (!defined('PHPWG_ROOT_PATH'))
-{//direct script access
- define('PHPWG_ROOT_PATH','./');
- include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
-
- // +-----------------------------------------------------------------------+
- // | Check Access and exit when user status is not ok |
- // +-----------------------------------------------------------------------+
- check_status(ACCESS_CLASSIC);
-
- $userdata = $user;
-
- trigger_action('loc_begin_profile');
-
- save_profile_from_post($userdata, $errors);
-
- $title= l10n('customize_page_title');
- $page['body_id'] = 'theProfilePage';
- include(PHPWG_ROOT_PATH.'include/page_header.php');
-
- load_profile_in_template(
- get_root_url().'profile.php', // action
- make_index_url(), // for redirect
- $userdata );
-
- // +-----------------------------------------------------------------------+
- // | errors display |
- // +-----------------------------------------------------------------------+
- if (count($errors) != 0)
- {
- $template->assign('errors', $errors);
- }
- $template->set_filename('profile', 'profile.tpl');
- trigger_action('loc_end_profile');
- $template->parse('profile');
- include(PHPWG_ROOT_PATH.'include/page_tail.php');
-}
-
-//------------------------------------------------------ update & customization
-function save_profile_from_post($userdata, &$errors)
-{
- global $conf;
- $errors = array();
-
- if (!isset($_POST['validate']))
- {
- return false;
- }
-
- $special_user = in_array($userdata['id'], array($conf['guest_id'], $conf['default_user_id']));
- if ($special_user)
- {
- unset($_POST['mail_address'],
- $_POST['password'],
- $_POST['use_new_pwd'],
- $_POST['passwordConf']
- );
- }
-
- $int_pattern = '/^\d+$/';
- if (empty($_POST['nb_image_line'])
- or (!preg_match($int_pattern, $_POST['nb_image_line'])))
- {
- $errors[] = l10n('nb_image_line_error');
- }
-
- if (empty($_POST['nb_line_page'])
- or (!preg_match($int_pattern, $_POST['nb_line_page'])))
- {
- $errors[] = l10n('nb_line_page_error');
- }
-
- if ($_POST['maxwidth'] != ''
- and (!preg_match($int_pattern, $_POST['maxwidth'])
- or $_POST['maxwidth'] < 50))
- {
- $errors[] = l10n('maxwidth_error');
- }
- if ($_POST['maxheight']
- and (!preg_match($int_pattern, $_POST['maxheight'])
- or $_POST['maxheight'] < 50))
- {
- $errors[] = l10n('maxheight_error');
- }
- // periods must be integer values, they represents number of days
- if (!preg_match($int_pattern, $_POST['recent_period'])
- or $_POST['recent_period'] <= 0)
- {
- $errors[] = l10n('periods_error') ;
- }
-
- if (isset($_POST['mail_address']))
- {
- // if $_POST and $userdata have are same email
- // validate_mail_address allows, however, to check email
- $mail_error = validate_mail_address($userdata['id'], $_POST['mail_address']);
- if (!empty($mail_error))
- {
- $errors[] = $mail_error;
- }
- }
-
- if (!empty($_POST['use_new_pwd']))
- {
- // password must be the same as its confirmation
- if ($_POST['use_new_pwd'] != $_POST['passwordConf'])
- {
- $errors[] = l10n('New password confirmation does not correspond');
- }
-
- if ( !defined('IN_ADMIN') )
- {// changing password requires old password
- $query = '
- SELECT '.$conf['user_fields']['password'].' AS password
- FROM '.USERS_TABLE.'
- WHERE '.$conf['user_fields']['id'].' = \''.$userdata['id'].'\'
- ;';
- list($current_password) = mysql_fetch_row(pwg_query($query));
-
- if ($conf['pass_convert']($_POST['password']) != $current_password)
- {
- $errors[] = l10n('Current password is wrong');
- }
- }
- }
-
- if (count($errors) == 0)
- {
- // mass_updates function
- include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-
- if (isset($_POST['mail_address']))
- {
- // update common user informations
- $fields = array($conf['user_fields']['email']);
-
- $data = array();
- $data{$conf['user_fields']['id']} = $userdata['id'];
- $data{$conf['user_fields']['email']} = $_POST['mail_address'];
-
- // password is updated only if filled
- if (!empty($_POST['use_new_pwd']))
- {
- array_push($fields, $conf['user_fields']['password']);
- // password is encrpyted with function $conf['pass_convert']
- $data{$conf['user_fields']['password']} =
- $conf['pass_convert']($_POST['use_new_pwd']);
- }
- mass_updates(USERS_TABLE,
- array('primary' => array($conf['user_fields']['id']),
- 'update' => $fields),
- array($data));
- }
-
- // update user "additional" informations (specific to Piwigo)
- $fields = array(
- 'nb_image_line', 'nb_line_page', 'language', 'maxwidth', 'maxheight',
- 'expand', 'show_nb_comments', 'show_nb_hits', 'recent_period', 'template'
- );
-
- $data = array();
- $data['user_id'] = $userdata['id'];
-
- foreach ($fields as $field)
- {
- if (isset($_POST[$field]))
- {
- $data[$field] = $_POST[$field];
- }
- }
- mass_updates(USER_INFOS_TABLE,
- array('primary' => array('user_id'), 'update' => $fields),
- array($data));
-
- trigger_action( 'save_profile_from_post', $userdata['id'] );
-
- if (!empty($_POST['redirect']))
- {
- redirect($_POST['redirect']);
- }
- }
- return true;
-}
-
-
-function load_profile_in_template($url_action, $url_redirect, $userdata)
-{
- global $template, $conf;
-
- $template->set_filename('profile_content', 'profile_content.tpl');
-
- $template->assign('radio_options',
- array(
- 'true' => l10n('Yes'),
- 'false' => l10n('No')));
-
- $template->assign(
- array(
- 'USERNAME'=>$userdata['username'],
- 'EMAIL'=>get_email_address_as_display_text(@$userdata['email']),
- 'NB_IMAGE_LINE'=>$userdata['nb_image_line'],
- 'NB_ROW_PAGE'=>$userdata['nb_line_page'],
- 'RECENT_PERIOD'=>$userdata['recent_period'],
- 'MAXWIDTH'=>@$userdata['maxwidth'],
- 'MAXHEIGHT'=>@$userdata['maxheight'],
- 'EXPAND' =>$userdata['expand'] ? 'true' : 'false',
- 'NB_COMMENTS'=>$userdata['show_nb_comments'] ? 'true' : 'false',
- 'NB_HITS'=>$userdata['show_nb_hits'] ? 'true' : 'false',
- 'REDIRECT' => $url_redirect,
- 'F_ACTION'=>$url_action,
- ));
-
- foreach (get_pwg_themes() as $pwg_template)
- {
- if (isset($_POST['submit'])
- or $userdata['template'].'/'.$userdata['theme'] == $pwg_template)
- {
- $template->assign('template_selection', $pwg_template);
- }
- $template_options[$pwg_template] = $pwg_template;
- }
- $template->assign('template_options', $template_options);
-
- foreach (get_languages() as $language_code => $language_name)
- {
- if (isset($_POST['submit']) or $userdata['language'] == $language_code)
- {
- $template->assign('language_selection', $language_code);
- }
- $language_options[$language_code] = $language_name;
- }
- $template->assign('language_options', $language_options);
-
- $special_user = in_array($userdata['id'], array($conf['guest_id'], $conf['default_user_id']));
- $template->assign('SPECIAL_USER', $special_user);
- $template->assign('IN_ADMIN', defined('IN_ADMIN'));
-
- // allow plugins to add their own form data to content
- trigger_action( 'load_profile_in_template', $userdata );
-
- $template->assign_var_from_handle('PROFILE_CONTENT', 'profile_content');
-}
-?>
diff --git a/BSF/qsearch.php b/BSF/qsearch.php
deleted file mode 100644
index 6b304085c..000000000
--- a/BSF/qsearch.php
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-define('PHPWG_ROOT_PATH','./');
-include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_GUEST);
-
-if (empty($_GET['q']))
-{
- redirect( make_index_url() );
-}
-
-$search = array();
-$search['q']=$_GET['q'];
-
-$query = '
-SElECT id FROM '.SEARCH_TABLE.'
- WHERE rules = \''.addslashes(serialize($search)).'\'
-;';
-$search_id = array_from_query( $query, 'id');
-if ( !empty($search_id) )
-{
- $search_id = $search_id[0];
- $query = '
-UPDATE '.SEARCH_TABLE.'
- SET last_seen=NOW()
- WHERE id='.$search_id;
- pwg_query($query);
-}
-else
-{
- $query ='
-INSERT INTO '.SEARCH_TABLE.'
- (rules, last_seen)
- VALUES
- (\''.addslashes(serialize($search)).'\', NOW() )
-;';
- pwg_query($query);
- $search_id = mysql_insert_id();
-}
-
-redirect(
- make_index_url(
- array(
- 'section' => 'search',
- 'search' => $search_id,
- )
- )
- );
-?> \ No newline at end of file
diff --git a/BSF/random.php b/BSF/random.php
deleted file mode 100644
index 7b0deaeb3..000000000
--- a/BSF/random.php
+++ /dev/null
@@ -1,63 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// +-----------------------------------------------------------------------+
-// | define and include |
-// +-----------------------------------------------------------------------+
-
-define('PHPWG_ROOT_PATH','./');
-include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_GUEST);
-
-// +-----------------------------------------------------------------------+
-// | generate random element list |
-// +-----------------------------------------------------------------------+
-
-$query = '
-SELECT DISTINCT(id)
- FROM '.IMAGES_TABLE.'
- INNER JOIN '.IMAGE_CATEGORY_TABLE.' AS ic ON id = ic.image_id
-'.get_sql_condition_FandF
- (
- array
- (
- 'forbidden_categories' => 'category_id',
- 'visible_categories' => 'category_id',
- 'visible_images' => 'id'
- ),
- 'WHERE'
- ).'
- ORDER BY RAND(NOW())
- LIMIT 0, '.$conf['top_number'].'
-;';
-
-// +-----------------------------------------------------------------------+
-// | redirect |
-// +-----------------------------------------------------------------------+
-
-redirect(make_index_url(array('list' => array_from_query($query, 'id'))));
-?> \ No newline at end of file
diff --git a/BSF/register.php b/BSF/register.php
deleted file mode 100644
index 7ce5f5207..000000000
--- a/BSF/register.php
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-//----------------------------------------------------------- include
-define('PHPWG_ROOT_PATH','./');
-include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_FREE);
-
-//----------------------------------------------------------- user registration
-
-if (!$conf['allow_user_registration'])
-{
- page_forbidden('User registration closed');
-}
-
-$errors = array();
-if (isset($_POST['submit']))
-{
- if ($_POST['password'] != $_POST['password_conf'])
- {
- array_push($errors, l10n('reg_err_pass'));
- }
-
- $errors =
- register_user($_POST['login'],
- $_POST['password'],
- $_POST['mail_address'],
- true,
- $errors);
-
- if (count($errors) == 0)
- {
- $user_id = get_userid($_POST['login']);
- log_user($user_id, false);
- redirect(make_index_url());
- }
-}
-
-$login = !empty($_POST['login'])?$_POST['login']:'';
-$email = !empty($_POST['mail_address'])?$_POST['mail_address']:'';
-
-//----------------------------------------------------- template initialization
-//
-// Start output of page
-//
-$title= l10n('Registration');
-$page['body_id'] = 'theRegisterPage';
-include(PHPWG_ROOT_PATH.'include/page_header.php');
-
-$template->set_filenames( array('register'=>'register.tpl') );
-$template->assign(array(
- 'U_HOME' => make_index_url(),
-
- 'F_ACTION' => 'register.php',
- 'F_LOGIN' => $login,
- 'F_EMAIL' => $email
- ));
-
-//-------------------------------------------------------------- errors display
-if (count($errors) != 0)
-{
- $template->assign('errors', $errors);
-}
-
-$template->parse('register');
-include(PHPWG_ROOT_PATH.'include/page_tail.php');
-?>
diff --git a/BSF/search.php b/BSF/search.php
deleted file mode 100644
index fe161f476..000000000
--- a/BSF/search.php
+++ /dev/null
@@ -1,226 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-//--------------------------------------------------------------------- include
-define('PHPWG_ROOT_PATH','./');
-include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status(ACCESS_GUEST);
-
-//------------------------------------------------------------------ form check
-$errors = array();
-$search = array();
-if (isset($_POST['submit']))
-{
- if (isset($_POST['search_allwords'])
- and !preg_match('/^\s*$/', $_POST['search_allwords']))
- {
- $drop_char_match = array(
- '-','^','$',';','#','&','(',')','<','>','`','\'','"','|',',','@','_',
- '?','%','~','.','[',']','{','}',':','\\','/','=','\'','!','*');
- $drop_char_replace = array(
- ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','','',' ',' ',' ',' ','',' ',
- ' ',' ',' ',' ',' ',' ',' ',' ','' ,' ',' ',' ',' ',' ');
-
- // Split words
- $search['fields']['allwords'] = array(
- 'words' => array_unique(
- preg_split(
- '/\s+/',
- str_replace(
- $drop_char_match,
- $drop_char_replace,
- $_POST['search_allwords']
- )
- )
- ),
- 'mode' => $_POST['mode'],
- );
- }
-
- if (isset($_POST['tags']))
- {
- $search['fields']['tags'] = array(
- 'words' => $_POST['tags'],
- 'mode' => $_POST['tag_mode'],
- );
- }
-
- if ($_POST['search_author'])
- {
- $search['fields']['author'] = array(
- 'words' => preg_split(
- '/\s+/',
- $_POST['search_author']
- ),
- 'mode' => 'OR',
- );
- }
-
- if (isset($_POST['cat']))
- {
- $search['fields']['cat'] = array(
- 'words' => $_POST['cat'],
- 'sub_inc' => ($_POST['subcats-included'] == 1) ? true : false,
- );
- }
-
- // dates
- $type_date = $_POST['date_type'];
-
- if (!empty($_POST['start_year']))
- {
- $search['fields'][$type_date.'-after'] = array(
- 'date' => join(
- '-',
- array(
- $_POST['start_year'],
- $_POST['start_month'] != 0 ? $_POST['start_month'] : '01',
- $_POST['start_day'] != 0 ? $_POST['start_day'] : '01',
- )
- ),
- 'inc' => true,
- );
- }
-
- if (!empty($_POST['end_year']))
- {
- $search['fields'][$type_date.'-before'] = array(
- 'date' => join(
- '-',
- array(
- $_POST['end_year'],
- $_POST['end_month'] != 0 ? $_POST['end_month'] : '12',
- $_POST['end_day'] != 0 ? $_POST['end_day'] : '31',
- )
- ),
- 'inc' => true,
- );
- }
-
- if (!empty($search))
- {
- // default search mode : each clause must be respected
- $search['mode'] = 'AND';
-
- // register search rules in database, then they will be available on
- // thumbnails page and picture page.
- $query ='
-INSERT INTO '.SEARCH_TABLE.'
- (rules, last_seen)
- VALUES
- (\''.serialize($search).'\', NOW())
-;';
- pwg_query($query);
-
- $search_id = mysql_insert_id();
- }
- else
- {
- array_push($errors, l10n('search_one_clause_at_least'));
- }
-}
-//----------------------------------------------------------------- redirection
-if (isset($_POST['submit']) and count($errors) == 0)
-{
- redirect(
- make_index_url(
- array(
- 'section' => 'search',
- 'search' => $search_id,
- )
- )
- );
-}
-//----------------------------------------------------- template initialization
-
-//
-// Start output of page
-//
-$title= l10n('search_title');
-$page['body_id'] = 'theSearchPage';
-
-$template->set_filename('search' ,'search.tpl' );
-
-$month_list = $lang['month'];
-$month_list[0]='------------';
-ksort($month_list);
-
-$template->assign(
- array(
- 'F_SEARCH_ACTION' => 'search.php',
- 'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=search',
-
- 'month_list' => $month_list,
- 'START_DAY_SELECTED' => @$_POST['start_day'],
- 'START_MONTH_SELECTED' => @$_POST['start_month'],
- 'END_DAY_SELECTED' => @$_POST['end_day'],
- 'END_MONTH_SELECTED' => @$_POST['end_month'],
- )
- );
-
-$available_tags = get_available_tags();
-
-if (count($available_tags) > 0)
-{
- usort( $available_tags, 'name_compare');
-
- $template->assign(
- 'TAG_SELECTION',
- get_html_tag_selection(
- $available_tags,
- 'tags',
- isset($_POST['tags']) ? $_POST['tags'] : array()
- )
- );
-}
-
-//------------------------------------------------------------- categories form
-$query = '
-SELECT id,name,global_rank,uppercats
- FROM '.CATEGORIES_TABLE.'
-'.get_sql_condition_FandF
- (
- array
- (
- 'forbidden_categories' => 'id',
- 'visible_categories' => 'id'
- ),
- 'WHERE'
- ).'
-;';
-display_select_cat_wrapper($query, array(), 'category_options', false);
-
-//-------------------------------------------------------------- errors display
-if (sizeof($errors) != 0)
-{
- $template->assign('errors', $errors);
-}
-//------------------------------------------------------------ log informations
-include(PHPWG_ROOT_PATH.'include/page_header.php');
-$template->pparse('search');
-include(PHPWG_ROOT_PATH.'include/page_tail.php');
-?>
diff --git a/BSF/search_rules.php b/BSF/search_rules.php
deleted file mode 100644
index 942f4dc22..000000000
--- a/BSF/search_rules.php
+++ /dev/null
@@ -1,243 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-/**
- * returns language value 'included' or 'excluded' depending on boolean
- * value. This function is useful only to make duplicate code shorter
- *
- * @param bool is_included
- * @return string
- */
-function inc_exc_str($is_included)
-{
- return $is_included ? l10n('included') : l10n('excluded');
-}
-
-// +-----------------------------------------------------------------------+
-// | initialization |
-// +-----------------------------------------------------------------------+
-
-define('PHPWG_ROOT_PATH','./');
-include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
-check_status(ACCESS_FREE);
-include_once( PHPWG_ROOT_PATH.'include/functions_search.inc.php' );
-
-$page['body_id'] = 'thePopuphelpPage';
-$title = l10n('Piwigo Help');
-$page['page_banner'] = '<h1>'.$title.'</h1>';
-$page['meta_robots']=array('noindex'=>1, 'nofollow'=>1);
-include(PHPWG_ROOT_PATH.'include/page_header.php');
-
-$template->set_filenames(array('search_rules' => 'search_rules.tpl'));
-
-// +-----------------------------------------------------------------------+
-// | Textual rules creation |
-// +-----------------------------------------------------------------------+
-
-// Rules are stored in database, serialized in an array. This array must be
-// transformed into a list of textual rules.
-
-$search = get_search_array($_GET['search_id']);
-
-if (isset($search['q']))
-{
- $template->append( 'search_words', $search['q'] );
-}
-else
-{
- $template->assign(
- array(
- 'INTRODUCTION'
- => 'OR' == $search['mode']
- ? l10n('At least one listed rule must be satisfied.')
- : l10n('Each listed rule must be satisfied.'),
- )
- );
-}
-
-if (isset($search['fields']['allwords']))
-{
- $template->append( 'search_words',
- sprintf(
- l10n('searched words : %s'),
- join(', ', $search['fields']['allwords']['words'])
- )
- );
-}
-
-if (isset($search['fields']['tags']))
-{
- $template->assign('SEARCH_TAGS_MODE', $search['fields']['tags']['mode']);
-
- $query = '
-SELECT name
- FROM '.TAGS_TABLE.'
- WHERE id IN ('.implode(',', $search['fields']['tags']['words']).')
-;';
- $template->assign(
- 'search_tags',
- array_from_query($query, 'name')
- );
-}
-
-if (isset($search['fields']['author']))
-{
- $template->append(
- 'search_words',
- sprintf(
- l10n('author(s) : %s'),
- join(', ', $search['fields']['author']['words'])
- )
- );
-}
-
-if (isset($search['fields']['cat']))
-{
- if ($search['fields']['cat']['sub_inc'])
- {
- // searching all the categories id of sub-categories
- $cat_ids = get_subcat_ids($search['fields']['cat']['words']);
- }
- else
- {
- $cat_ids = $search['fields']['cat']['words'];
- }
-
- $query = '
-SELECT id, uppercats, global_rank
- FROM '.CATEGORIES_TABLE.'
- WHERE id IN ('.
- implode(',', $cat_ids).
- ')
-;';
- $result = pwg_query($query);
-
- $categories = array();
- if (!empty($result))
- {
- while ($row = mysql_fetch_array($result))
- {
- array_push($categories, $row);
- }
- }
- usort($categories, 'global_rank_compare');
-
- foreach ($categories as $category)
- {
- $template->append(
- 'search_categories',
- get_cat_display_name_cache(
- $category['uppercats'],
- null, // no url on category names
- false // no blank replacement
- )
- );
- }
-}
-
-foreach (array('date_available', 'date_creation') as $datefield)
-{
- if ('date_available' == $datefield)
- {
- $lang_items = array(
- 'date' => 'became available on %s',
- 'period' => 'became available between %s (%s) and %s (%s)',
- 'after' => 'became available after %s (%s)',
- 'before' => 'became available before %s (%s)',
- );
- }
- elseif ('date_creation' == $datefield)
- {
- $lang_items = array(
- 'date' => 'created on %s',
- 'period' => 'created between %s (%s) and %s (%s)',
- 'after' => 'created after %s (%s)',
- 'before' => 'created before %s (%s)',
- );
- }
-
- $keys = array(
- 'date' => $datefield,
- 'after' => $datefield.'-after',
- 'before' => $datefield.'-before',
- );
-
- if (isset($search['fields'][ $keys['date'] ]))
- {
- $template->assign(
- strtoupper($datefield),
- sprintf(
- l10n($lang_items['date']),
- format_date($search['fields'][ $keys['date'] ])
- )
- );
- }
- elseif (isset($search['fields'][ $keys['before'] ])
- and isset($search['fields'][ $keys['after'] ]))
- {
- $template->assign(
- strtoupper($datefield),
- sprintf(
- l10n($lang_items['period']),
-
- format_date($search['fields'][ $keys['after'] ]['date']),
- inc_exc_str($search['fields'][ $keys['after'] ]['inc']),
-
- format_date($search['fields'][ $keys['before'] ]['date']),
- inc_exc_str($search['fields'][ $keys['before'] ]['inc'])
- )
- );
- }
- elseif (isset($search['fields'][ $keys['before'] ]))
- {
- $template->assign(
- strtoupper($datefield),
- sprintf(
- l10n($lang_items['before']),
-
- format_date($search['fields'][ $keys['before'] ]['date']),
- inc_exc_str($search['fields'][ $keys['before'] ]['inc'])
- )
- );
- }
- elseif (isset($search['fields'][ $keys['after'] ]))
- {
- $template->assign(
- strtoupper($datefield),
- sprintf(
- l10n($lang_items['after']),
-
- format_date($search['fields'][ $keys['after'] ]['date']),
- inc_exc_str($search['fields'][ $keys['after'] ]['inc'])
- )
- );
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | html code display |
-// +-----------------------------------------------------------------------+
-
-$template->pparse('search_rules');
-include(PHPWG_ROOT_PATH.'include/page_tail.php');
-?> \ No newline at end of file
diff --git a/BSF/tags.php b/BSF/tags.php
deleted file mode 100644
index 60c575121..000000000
--- a/BSF/tags.php
+++ /dev/null
@@ -1,101 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// +-----------------------------------------------------------------------+
-// | functions |
-// +-----------------------------------------------------------------------+
-
-function counter_compare($a, $b)
-{
- if ($a['counter'] == $b['counter'])
- {
- return id_compare($a, $b);
- }
-
- return ($a['counter'] < $b['counter']) ? +1 : -1;
-}
-
-function id_compare($a, $b)
-{
- return ($a['id'] < $b['id']) ? -1 : 1;
-}
-
-// +-----------------------------------------------------------------------+
-// | initialization |
-// +-----------------------------------------------------------------------+
-
-define('PHPWG_ROOT_PATH','./');
-include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
-
-check_status(ACCESS_GUEST);
-
-// +-----------------------------------------------------------------------+
-// | page header and options |
-// +-----------------------------------------------------------------------+
-
-$title= l10n('Tags');
-$page['body_id'] = 'theTagsPage';
-
-$template->set_filenames(array('tags'=>'tags.tpl'));
-
-// +-----------------------------------------------------------------------+
-// | tag cloud construction |
-// +-----------------------------------------------------------------------+
-
-// find all tags available for the current user
-$tags = get_available_tags();
-
-// we want only the first most represented tags, so we sort them by counter
-// and take the first tags
-usort($tags, 'counter_compare');
-$tags = array_slice($tags, 0, $conf['full_tag_cloud_items_number']);
-
-// depending on its counter and the other tags counter, each tag has a level
-$tags = add_level_to_tags($tags);
-
-// we want tags diplayed in alphabetic order
-usort($tags, 'name_compare');
-
-// display sorted tags
-foreach ($tags as $tag)
-{
- $template->append(
- 'tags',
- array(
- 'URL' => make_index_url(
- array(
- 'tags' => array($tag),
- )
- ),
-
- 'NAME' => $tag['name'],
- 'TITLE' => $tag['counter'],
- 'CLASS' => 'tagLevel'.$tag['level'],
- )
- );
-}
-
-include(PHPWG_ROOT_PATH.'include/page_header.php');
-$template->pparse('tags');
-include(PHPWG_ROOT_PATH.'include/page_tail.php');
-?> \ No newline at end of file
diff --git a/BSF/template-common/csshover.htc b/BSF/template-common/csshover.htc
deleted file mode 100644
index 14f88576c..000000000
--- a/BSF/template-common/csshover.htc
+++ /dev/null
@@ -1,120 +0,0 @@
-<attach event="ondocumentready" handler="parseStylesheets" />
-<script>
-/**
- * Whatever:hover - V1.42.060206 - hover & active
- * ------------------------------------------------------------
- * (c) 2005 - Peter Nederlof
- * Peterned - http://www.xs4all.nl/~peterned/
- * License - http://creativecommons.org/licenses/LGPL/2.1/
- *
- * Whatever:hover is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * Whatever:hover is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * Credits and thanks to:
- * Arnoud Berendsen, Martin Reurings, Robert Hanson
- *
- * howto: body { behavior:url("csshover.htc"); }
- * ------------------------------------------------------------
- */
-
-var csshoverReg = /(^|\s)(([^a]([^ ]+)?)|(a([^#.][^ ]+)+)):(hover|active)/i,
-currentSheet, doc = window.document, hoverEvents = [], activators = {
- onhover:{on:'onmouseover', off:'onmouseout'},
- onactive:{on:'onmousedown', off:'onmouseup'}
-}
-
-function parseStylesheets() {
- if(!/MSIE (5|6)/.test(navigator.userAgent)) return;
- window.attachEvent('onunload', unhookHoverEvents);
- var sheets = doc.styleSheets, l = sheets.length;
- for(var i=0; i<l; i++)
- parseStylesheet(sheets[i]);
-}
- function parseStylesheet(sheet) {
- if(sheet.imports) {
- try {
- var imports = sheet.imports, l = imports.length;
- for(var i=0; i<l; i++) parseStylesheet(sheet.imports[i]);
- } catch(securityException){}
- }
-
- try {
- var rules = (currentSheet = sheet).rules, l = rules.length;
- for(var j=0; j<l; j++) parseCSSRule(rules[j]);
- } catch(securityException){}
- }
-
- function parseCSSRule(rule) {
- var select = rule.selectorText, style = rule.style.cssText;
- if(!csshoverReg.test(select) || !style) return;
-
- var pseudo = select.replace(/[^:]+:([a-z-]+).*/i, 'on$1');
- var newSelect = select.replace(/(\.([a-z0-9_-]+):[a-z]+)|(:[a-z]+)/gi, '.$2' + pseudo);
- var className = (/\.([a-z0-9_-]*on(hover|active))/i).exec(newSelect)[1];
- var affected = select.replace(/:(hover|active).*$/, '');
- var elements = getElementsBySelect(affected);
- if(elements.length == 0) return;
-
- currentSheet.addRule(newSelect, style);
- for(var i=0; i<elements.length; i++)
- new HoverElement(elements[i], className, activators[pseudo]);
- }
-
-function HoverElement(node, className, events) {
- if(!node.hovers) node.hovers = {};
- if(node.hovers[className]) return;
- node.hovers[className] = true;
- hookHoverEvent(node, events.on, function() { node.className += ' ' + className; });
- hookHoverEvent(node, events.off, function() { node.className = node.className.replace(new RegExp('\\s+'+className, 'g'),''); });
-}
- function hookHoverEvent(node, type, handler) {
- node.attachEvent(type, handler);
- hoverEvents[hoverEvents.length] = {
- node:node, type:type, handler:handler
- };
- }
-
- function unhookHoverEvents() {
- for(var e,i=0; i<hoverEvents.length; i++) {
- e = hoverEvents[i];
- e.node.detachEvent(e.type, e.handler);
- }
- }
-
-function getElementsBySelect(rule) {
- var parts, nodes = [doc];
- parts = rule.split(' ');
- for(var i=0; i<parts.length; i++) {
- nodes = getSelectedNodes(parts[i], nodes);
- } return nodes;
-}
- function getSelectedNodes(select, elements) {
- var result, node, nodes = [];
- var identify = (/\#([a-z0-9_-]+)/i).exec(select);
- if(identify) {
- var element = doc.getElementById(identify[1]);
- return element? [element]:nodes;
- }
-
- var classname = (/\.([a-z0-9_-]+)/i).exec(select);
- var tagName = select.replace(/(\.|\#|\:)[a-z0-9_-]+/i, '');
- var classReg = classname? new RegExp('\\b' + classname[1] + '\\b'):false;
- for(var i=0; i<elements.length; i++) {
- result = tagName? elements[i].all.tags(tagName):elements[i].all;
- for(var j=0; j<result.length; j++) {
- node = result[j];
- if(classReg && !classReg.test(node.className)) continue;
- nodes[nodes.length] = node;
- }
- }
-
- return nodes;
- }
-</script> \ No newline at end of file
diff --git a/BSF/template-common/default-layout.css b/BSF/template-common/default-layout.css
deleted file mode 100644
index 1c3d70864..000000000
--- a/BSF/template-common/default-layout.css
+++ /dev/null
@@ -1,82 +0,0 @@
-/* $Id$ */
-
-/* Set the width of the menubar for the galery */
-#menubar {
- width: 18em;
-}
-.content {
- margin-left: 20em; /* = #menubar width + 2em */
-}
-/* Set minimum width of the page before getting a scrollbar */
-/* IE5 and IE6 don't get that */
-BODY {
- min-width: 60em; /* ~ 3* #menubar width */
-}
-BODY#thePopuphelpPage {
- min-width: 0;
-}
-
-/* Set the width of the menubar for the admin section */
-BODY#theAdminPage #menubar {
- width: 12.5em;
-}
-BODY#theAdminPage .content {
- margin-left: 14.5em; /* = #menubar width + 2em */
-}
-
-/* Set some sizes according to your maximum thumbnail width and height */
-.content UL.thumbnails SPAN,
-.content UL.thumbnails SPAN.wrap2 A,
-.content UL.thumbnails LABEL,
-.content DIV.thumbnailCategory DIV.illustration {
- width: 140px; /* max thumbnail width + 2px */
-}
-.content UL.thumbnails SPAN.wrap2,
-.content DIV.thumbnailCategory DIV.description {
- height: 140px; /* max thumbnail height + 2px */
-}
-.content DIV.comment BLOCKQUOTE {
- margin-left: 150px; /*maximum thumbnail width + ~10px */
-}
-
-/* Category thumbnails on main page */
-.content UL.thumbnailCategories LI {
- width: 49.7%; /* 49.7% for 2 per line, 33.2% for 3 per line*/
-}
-
-/* Set defaults for thumbnails legend */
-.content UL.thumbnails SPAN.thumbLegend {
- display: block; /* display: none; if you don't want legend */
- height: 4em; /* legend height (don't set auto to be Gecko friendly)*/
-}
-
-/* Tooltips*/
-.tooltip {
- position: relative;
-}
-
-.tooltip span {
- display: none;
-}
-
-.tooltip:hover {
- cursor: pointer;
- z-index: 500;
-}
-
-.tooltip:hover span {
- display: inline;
- position: absolute;
- top: 30px;
- left: -50px;
- width: 400px;
-
- font-size: 11px;
- text-decoration: none;
- text-align: justify;
- background-color: #FFFFCC;
- color: #444444;
-
- padding: 10px;
- border: 1px solid Black;
-}
diff --git a/BSF/template-common/favicon.ico b/BSF/template-common/favicon.ico
deleted file mode 100644
index cbceea43d..000000000
--- a/BSF/template-common/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/BSF/template-common/index.php b/BSF/template-common/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template-common/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template-common/inputfix.htc b/BSF/template-common/inputfix.htc
deleted file mode 100644
index e99d2b2c7..000000000
--- a/BSF/template-common/inputfix.htc
+++ /dev/null
@@ -1,42 +0,0 @@
-<public:attach event="oncontentready" onevent="fixElements()" />
-
-<script langage=javascript>
-
-function setFocusStyle()
-{
- window.event.srcElement.className += ' focus';
-}
-
-function setBlurStyle()
-{
- window.event.srcElement.className = window.event.srcElement.className.replace( ' focus', ' nofocus');
-}
-
-function setClassFromType()
-{
- this.className += ' ' + this.type;
-}
-
-function fixElements()
-{
- for ( var i=0; i<this.elements.length; i++ )
- {
- var elem=this.elements[i];
- switch ( elem.tagName )
- {
- case "INPUT":
- elem.className += ' ' + elem.type;
- if ( (elem.type != "radio") && (elem.type != "checkbox") )
- { /* setting focus/nofocus on those is a mess to handle in css */
- elem.attachEvent( 'onfocus', setFocusStyle );
- elem.attachEvent( 'onblur', setBlurStyle );
- }
- break;
- case "SELECT":
- case "TEXTAREA":
- elem.attachEvent( 'onfocus', setFocusStyle );
- elem.attachEvent( 'onblur', setBlurStyle );
- }
- }
-}
-</script>
diff --git a/BSF/template-common/jquery.accordion.js b/BSF/template-common/jquery.accordion.js
deleted file mode 100644
index ffa0711a5..000000000
--- a/BSF/template-common/jquery.accordion.js
+++ /dev/null
@@ -1,311 +0,0 @@
-/*
- * jQuery UI Accordion 1.6
- *
- * Copyright (c) 2007 JĂśrn Zaefferer
- *
- * http://docs.jquery.com/UI/Accordion
- *
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- * Revision: $Id$
- *
- */
-
-;(function($) {
-
-// If the UI scope is not available, add it
-$.ui = $.ui || {};
-
-$.fn.extend({
- accordion: function(options, data) {
- var args = Array.prototype.slice.call(arguments, 1);
-
- return this.each(function() {
- if (typeof options == "string") {
- var accordion = $.data(this, "ui-accordion");
- accordion[options].apply(accordion, args);
- // INIT with optional options
- } else if (!$(this).is(".ui-accordion"))
- $.data(this, "ui-accordion", new $.ui.accordion(this, options));
- });
- },
- // deprecated, use accordion("activate", index) instead
- activate: function(index) {
- return this.accordion("activate", index);
- }
-});
-
-$.ui.accordion = function(container, options) {
-
- // setup configuration
- this.options = options = $.extend({}, $.ui.accordion.defaults, options);
- this.element = container;
-
- $(container).addClass("ui-accordion");
-
- if ( options.navigation ) {
- var current = $(container).find("a").filter(options.navigationFilter);
- if ( current.length ) {
- if ( current.filter(options.header).length ) {
- options.active = current;
- } else {
- options.active = current.parent().parent().prev();
- current.addClass("current");
- }
- }
- }
-
- // calculate active if not specified, using the first header
- options.headers = $(container).find(options.header);
- options.active = findActive(options.headers, options.active);
-
- if ( options.fillSpace ) {
- var maxHeight = $(container).parent().height();
- options.headers.each(function() {
- maxHeight -= $(this).outerHeight();
- });
- var maxPadding = 0;
- options.headers.next().each(function() {
- maxPadding = Math.max(maxPadding, $(this).innerHeight() - $(this).height());
- }).height(maxHeight - maxPadding);
- } else if ( options.autoheight ) {
- var maxHeight = 0;
- options.headers.next().each(function() {
- maxHeight = Math.max(maxHeight, $(this).outerHeight());
- }).height(maxHeight);
- }
-
- options.headers
- .not(options.active || "")
- .next()
- .hide();
- options.active.parent().andSelf().addClass(options.selectedClass);
-
- if (options.event)
- $(container).bind((options.event) + ".ui-accordion", clickHandler);
-};
-
-$.ui.accordion.prototype = {
- activate: function(index) {
- // call clickHandler with custom event
- clickHandler.call(this.element, {
- target: findActive( this.options.headers, index )[0]
- });
- },
-
- enable: function() {
- this.options.disabled = false;
- },
- disable: function() {
- this.options.disabled = true;
- },
- destroy: function() {
- this.options.headers.next().css("display", "");
- if ( this.options.fillSpace || this.options.autoheight ) {
- this.options.headers.next().css("height", "");
- }
- $.removeData(this.element, "ui-accordion");
- $(this.element).removeClass("ui-accordion").unbind(".ui-accordion");
- }
-}
-
-function scopeCallback(callback, scope) {
- return function() {
- return callback.apply(scope, arguments);
- };
-}
-
-function completed(cancel) {
- // if removed while animated data can be empty
- if (!$.data(this, "ui-accordion"))
- return;
- var instance = $.data(this, "ui-accordion");
- var options = instance.options;
- options.running = cancel ? 0 : --options.running;
- if ( options.running )
- return;
- if ( options.clearStyle ) {
- options.toShow.add(options.toHide).css({
- height: "",
- overflow: ""
- });
- }
- $(this).triggerHandler("change.ui-accordion", [options.data], options.change);
-}
-
-function toggle(toShow, toHide, data, clickedActive, down) {
- var options = $.data(this, "ui-accordion").options;
- options.toShow = toShow;
- options.toHide = toHide;
- options.data = data;
- var complete = scopeCallback(completed, this);
-
- // count elements to animate
- options.running = toHide.size() == 0 ? toShow.size() : toHide.size();
-
- if ( options.animated ) {
- if ( !options.alwaysOpen && clickedActive ) {
- $.ui.accordion.animations[options.animated]({
- toShow: jQuery([]),
- toHide: toHide,
- complete: complete,
- down: down,
- autoheight: options.autoheight
- });
- } else {
- $.ui.accordion.animations[options.animated]({
- toShow: toShow,
- toHide: toHide,
- complete: complete,
- down: down,
- autoheight: options.autoheight
- });
- }
- } else {
- if ( !options.alwaysOpen && clickedActive ) {
- toShow.toggle();
- } else {
- toHide.hide();
- toShow.show();
- }
- complete(true);
- }
-}
-
-function clickHandler(event) {
- var options = $.data(this, "ui-accordion").options;
- if (options.disabled)
- return false;
-
- // called only when using activate(false) to close all parts programmatically
- if ( !event.target && !options.alwaysOpen ) {
- options.active.parent().andSelf().toggleClass(options.selectedClass);
- var toHide = options.active.next(),
- data = {
- instance: this,
- options: options,
- newHeader: jQuery([]),
- oldHeader: options.active,
- newContent: jQuery([]),
- oldContent: toHide
- },
- toShow = options.active = $([]);
- toggle.call(this, toShow, toHide, data );
- return false;
- }
- // get the click target
- var clicked = $(event.target);
-
- // due to the event delegation model, we have to check if one
- // of the parent elements is our actual header, and find that
- if ( clicked.parents(options.header).length )
- while ( !clicked.is(options.header) )
- clicked = clicked.parent();
-
- var clickedActive = clicked[0] == options.active[0];
-
- // if animations are still active, or the active header is the target, ignore click
- if (options.running || (options.alwaysOpen && clickedActive))
- return false;
- if (!clicked.is(options.header))
- return;
-
- // switch classes
- options.active.parent().andSelf().toggleClass(options.selectedClass);
- if ( !clickedActive ) {
- clicked.parent().andSelf().addClass(options.selectedClass);
- }
-
- // find elements to show and hide
- var toShow = clicked.next(),
- toHide = options.active.next(),
- //data = [clicked, options.active, toShow, toHide],
- data = {
- instance: this,
- options: options,
- newHeader: clicked,
- oldHeader: options.active,
- newContent: toShow,
- oldContent: toHide
- },
- down = options.headers.index( options.active[0] ) > options.headers.index( clicked[0] );
-
- options.active = clickedActive ? $([]) : clicked;
- toggle.call(this, toShow, toHide, data, clickedActive, down );
-
- return false;
-};
-
-function findActive(headers, selector) {
- return selector != undefined
- ? typeof selector == "number"
- ? headers.filter(":eq(" + selector + ")")
- : headers.not(headers.not(selector))
- : selector === false
- ? $([])
- : headers.filter(":eq(0)");
-}
-
-$.extend($.ui.accordion, {
- defaults: {
- selectedClass: "selected",
- alwaysOpen: true,
- animated: 'slide',
- event: "click",
- header: "a",
- autoheight: true,
- running: 0,
- navigationFilter: function() {
- return this.href.toLowerCase() == location.href.toLowerCase();
- }
- },
- animations: {
- slide: function(options, additions) {
- options = $.extend({
- easing: "swing",
- duration: 300
- }, options, additions);
- if ( !options.toHide.size() ) {
- options.toShow.animate({height: "show"}, options);
- return;
- }
- var hideHeight = options.toHide.height(),
- showHeight = options.toShow.height(),
- difference = showHeight / hideHeight;
- options.toShow.css({ height: 0, overflow: 'hidden' }).show();
- options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{
- step: function(now) {
- var current = (hideHeight - now) * difference;
- if ($.browser.msie || $.browser.opera) {
- current = Math.ceil(current);
- }
- options.toShow.height( current );
- },
- duration: options.duration,
- easing: options.easing,
- complete: function() {
- if ( !options.autoheight ) {
- options.toShow.css("height", "auto");
- }
- options.complete();
- }
- });
- },
- bounceslide: function(options) {
- this.slide(options, {
- easing: options.down ? "bounceout" : "swing",
- duration: options.down ? 1000 : 200
- });
- },
- easeslide: function(options) {
- this.slide(options, {
- easing: "easeinout",
- duration: 700
- })
- }
- }
-});
-
-})(jQuery);
diff --git a/BSF/template-common/jquery.accordion.min.js b/BSF/template-common/jquery.accordion.min.js
deleted file mode 100644
index e4b6cd9ff..000000000
--- a/BSF/template-common/jquery.accordion.min.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * jQuery UI Accordion 1.6
- *
- * Copyright (c) 2007 JĂśrn Zaefferer
- *
- * http://docs.jquery.com/UI/Accordion
- *
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- * Revision: $Id$
- *
- */;(function($){$.ui=$.ui||{};$.fn.extend({accordion:function(options,data){var args=Array.prototype.slice.call(arguments,1);return this.each(function(){if(typeof options=="string"){var accordion=$.data(this,"ui-accordion");accordion[options].apply(accordion,args);}else if(!$(this).is(".ui-accordion"))$.data(this,"ui-accordion",new $.ui.accordion(this,options));});},activate:function(index){return this.accordion("activate",index);}});$.ui.accordion=function(container,options){this.options=options=$.extend({},$.ui.accordion.defaults,options);this.element=container;$(container).addClass("ui-accordion");if(options.navigation){var current=$(container).find("a").filter(options.navigationFilter);if(current.length){if(current.filter(options.header).length){options.active=current;}else{options.active=current.parent().parent().prev();current.addClass("current");}}}options.headers=$(container).find(options.header);options.active=findActive(options.headers,options.active);if(options.fillSpace){var maxHeight=$(container).parent().height();options.headers.each(function(){maxHeight-=$(this).outerHeight();});var maxPadding=0;options.headers.next().each(function(){maxPadding=Math.max(maxPadding,$(this).innerHeight()-$(this).height());}).height(maxHeight-maxPadding);}else if(options.autoheight){var maxHeight=0;options.headers.next().each(function(){maxHeight=Math.max(maxHeight,$(this).outerHeight());}).height(maxHeight);}options.headers.not(options.active||"").next().hide();options.active.parent().andSelf().addClass(options.selectedClass);if(options.event)$(container).bind((options.event)+".ui-accordion",clickHandler);};$.ui.accordion.prototype={activate:function(index){clickHandler.call(this.element,{target:findActive(this.options.headers,index)[0]});},enable:function(){this.options.disabled=false;},disable:function(){this.options.disabled=true;},destroy:function(){this.options.headers.next().css("display","");if(this.options.fillSpace||this.options.autoheight){this.options.headers.next().css("height","");}$.removeData(this.element,"ui-accordion");$(this.element).removeClass("ui-accordion").unbind(".ui-accordion");}}function scopeCallback(callback,scope){return function(){return callback.apply(scope,arguments);};}function completed(cancel){if(!$.data(this,"ui-accordion"))return;var instance=$.data(this,"ui-accordion");var options=instance.options;options.running=cancel?0:--options.running;if(options.running)return;if(options.clearStyle){options.toShow.add(options.toHide).css({height:"",overflow:""});}$(this).triggerHandler("change.ui-accordion",[options.data],options.change);}function toggle(toShow,toHide,data,clickedActive,down){var options=$.data(this,"ui-accordion").options;options.toShow=toShow;options.toHide=toHide;options.data=data;var complete=scopeCallback(completed,this);options.running=toHide.size()==0?toShow.size():toHide.size();if(options.animated){if(!options.alwaysOpen&&clickedActive){$.ui.accordion.animations[options.animated]({toShow:jQuery([]),toHide:toHide,complete:complete,down:down,autoheight:options.autoheight});}else{$.ui.accordion.animations[options.animated]({toShow:toShow,toHide:toHide,complete:complete,down:down,autoheight:options.autoheight});}}else{if(!options.alwaysOpen&&clickedActive){toShow.toggle();}else{toHide.hide();toShow.show();}complete(true);}}function clickHandler(event){var options=$.data(this,"ui-accordion").options;if(options.disabled)return false;if(!event.target&&!options.alwaysOpen){options.active.parent().andSelf().toggleClass(options.selectedClass);var toHide=options.active.next(),data={instance:this,options:options,newHeader:jQuery([]),oldHeader:options.active,newContent:jQuery([]),oldContent:toHide},toShow=options.active=$([]);toggle.call(this,toShow,toHide,data);return false;}var clicked=$(event.target);if(clicked.parents(options.header).length)while(!clicked.is(options.header))clicked=clicked.parent();var clickedActive=clicked[0]==options.active[0];if(options.running||(options.alwaysOpen&&clickedActive))return false;if(!clicked.is(options.header))return;options.active.parent().andSelf().toggleClass(options.selectedClass);if(!clickedActive){clicked.parent().andSelf().addClass(options.selectedClass);}var toShow=clicked.next(),toHide=options.active.next(),data={instance:this,options:options,newHeader:clicked,oldHeader:options.active,newContent:toShow,oldContent:toHide},down=options.headers.index(options.active[0])>options.headers.index(clicked[0]);options.active=clickedActive?$([]):clicked;toggle.call(this,toShow,toHide,data,clickedActive,down);return false;};function findActive(headers,selector){return selector!=undefined?typeof selector=="number"?headers.filter(":eq("+selector+")"):headers.not(headers.not(selector)):selector===false?$([]):headers.filter(":eq(0)");}$.extend($.ui.accordion,{defaults:{selectedClass:"selected",alwaysOpen:true,animated:'slide',event:"click",header:"a",autoheight:true,running:0,navigationFilter:function(){return this.href.toLowerCase()==location.href.toLowerCase();}},animations:{slide:function(options,additions){options=$.extend({easing:"swing",duration:300},options,additions);if(!options.toHide.size()){options.toShow.animate({height:"show"},options);return;}var hideHeight=options.toHide.height(),showHeight=options.toShow.height(),difference=showHeight/hideHeight;options.toShow.css({height:0,overflow:'hidden'}).show();options.toHide.filter(":hidden").each(options.complete).end().filter(":visible").animate({height:"hide"},{step:function(now){var current=(hideHeight-now)*difference;if($.browser.msie||$.browser.opera){current=Math.ceil(current);}options.toShow.height(current);},duration:options.duration,easing:options.easing,complete:function(){if(!options.autoheight){options.toShow.css("height","auto");}options.complete();}});},bounceslide:function(options){this.slide(options,{easing:options.down?"bounceout":"swing",duration:options.down?1000:200});},easeslide:function(options){this.slide(options,{easing:"easeinout",duration:700})}}});})(jQuery); \ No newline at end of file
diff --git a/BSF/template-common/jquery.accordion.pack.js b/BSF/template-common/jquery.accordion.pack.js
deleted file mode 100644
index 447f9de26..000000000
--- a/BSF/template-common/jquery.accordion.pack.js
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * jQuery UI Accordion 1.6
- *
- * Copyright (c) 2007 JĂśrn Zaefferer
- *
- * http://docs.jquery.com/UI/Accordion
- *
- * Dual licensed under the MIT and GPL licenses:
- * http://www.opensource.org/licenses/mit-license.php
- * http://www.gnu.org/licenses/gpl.html
- *
- * Revision: $Id$
- *
- */
-eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}(';(3($){$.5=$.5||{};$.1L.M({6:3(c,b){7 d=1Q.1k.1K.F(16,1);9 2.B(3(){4(1m c=="1O"){7 a=$.j(2,"5-6");a[c].1h(a,d)}t 4(!$(2).R(".5-6"))$.j(2,"5-6",1D $.5.6(2,c))})},Q:3(a){9 2.6("Q",a)}});$.5.6=3(e,d){2.i=d=$.M({},$.5.6.11,d);2.N=e;$(e).L("5-6");4(d.1Z){7 a=$(e).1t("a").q(d.1r);4(a.V){4(a.q(d.u).V){d.8=a}t{d.8=a.m().m().1N();a.L("1M")}}}d.k=$(e).1t(d.u);d.8=U(d.k,d.8);4(d.1j){7 b=$(e).m().h();d.k.B(3(){b-=$(2).1g()});7 c=0;d.k.o().B(3(){c=P.19(c,$(2).1F()-$(2).h())}).h(b-c)}t 4(d.n){7 b=0;d.k.o().B(3(){b=P.19(b,$(2).1g())}).h(b)}d.k.O(d.8||"").o().10();d.8.m().J().L(d.w);4(d.Y)$(e).1z((d.Y)+".5-6",W)};$.5.6.1k={Q:3(a){W.F(2.N,{X:U(2.i.k,a)[0]})},1v:3(){2.i.Z=s},25:3(){2.i.Z=D},1Y:3(){2.i.k.o().C("1W","");4(2.i.1j||2.i.n){2.i.k.o().C("h","")}$.1V(2.N,"5-6");$(2.N).1U("5-6").1T(".5-6")}}3 1q(a,b){9 3(){9 a.1h(b,16)}}3 1p(a){4(!$.j(2,"5-6"))9;7 b=$.j(2,"5-6");7 c=b.i;c.v=a?0:--c.v;4(c.v)9;4(c.1S){c.l.1R(c.p).C({h:"",1n:""})}$(2).1P("1l.5-6",[c.j],c.1l)}3 I(g,c,b,d,a){7 e=$.j(2,"5-6").i;e.l=g;e.p=c;e.j=b;7 f=1q(1p,2);e.v=c.H()==0?g.H():c.H();4(e.G){4(!e.A&&d){$.5.6.T[e.G]({l:K([]),p:c,x:f,r:a,n:e.n})}t{$.5.6.T[e.G]({l:g,p:c,x:f,r:a,n:e.n})}}t{4(!e.A&&d){g.I()}t{c.10();g.S()}f(D)}}3 W(a){7 c=$.j(2,"5-6").i;4(c.Z)9 s;4(!a.X&&!c.A){c.8.m().J().1i(c.w);7 d=c.8.o(),j={1f:2,i:c,1e:K([]),1d:c.8,12:K([]),1b:d},f=c.8=$([]);I.F(2,f,d,j);9 s}7 b=$(a.X);4(b.1J(c.u).V)1I(!b.R(c.u))b=b.m();7 e=b[0]==c.8[0];4(c.v||(c.A&&e))9 s;4(!b.R(c.u))9;c.8.m().J().1i(c.w);4(!e){b.m().J().L(c.w)}7 f=b.o(),d=c.8.o(),j={1f:2,i:c,1e:b,1d:c.8,12:f,1b:d},r=c.k.1a(c.8[0])>c.k.1a(b[0]);c.8=e?$([]):b;I.F(2,f,d,j,e,r);9 s};3 U(a,b){9 b!=1H?1m b=="1G"?a.q(":18("+b+")"):a.O(a.O(b)):b===s?$([]):a.q(":18(0)")}$.M($.5.6,{11:{w:"1E",A:D,G:\'E\',Y:"1C",u:"a",n:D,v:0,1r:3(){9 2.17.1c()==1B.17.1c()}},T:{E:3(e,d){e=$.M({z:"15",y:1A},e,d);4(!e.p.H()){e.l.14({h:"S"},e);9}7 c=e.p.h(),13=e.l.h(),1s=13/c;e.l.C({h:0,1n:\'1o\'}).S();e.p.q(":1o").B(e.x).1y().q(":1x").14({h:"10"},{1X:3(a){7 b=(c-a)*1s;4($.1u.1w||$.1u.20){b=P.21(b)}e.l.h(b)},y:e.y,z:e.z,x:3(){4(!e.n){e.l.C("h","2a")}e.x()}})},28:3(a){2.E(a,{z:a.r?"27":"15",y:a.r?26:24})},23:3(a){2.E(a,{z:"22",y:29})}}})})(K);',62,135,'||this|function|if|ui|accordion|var|active|return||||||||height|options|data|headers|toShow|parent|autoheight|next|toHide|filter|down|false|else|header|running|selectedClass|complete|duration|easing|alwaysOpen|each|css|true|slide|call|animated|size|toggle|andSelf|jQuery|addClass|extend|element|not|Math|activate|is|show|animations|findActive|length|clickHandler|target|event|disabled|hide|defaults|newContent|showHeight|animate|swing|arguments|href|eq|max|index|oldContent|toLowerCase|oldHeader|newHeader|instance|outerHeight|apply|toggleClass|fillSpace|prototype|change|typeof|overflow|hidden|completed|scopeCallback|navigationFilter|difference|find|browser|enable|msie|visible|end|bind|300|location|click|new|selected|innerHeight|number|undefined|while|parents|slice|fn|current|prev|string|triggerHandler|Array|add|clearStyle|unbind|removeClass|removeData|display|step|destroy|navigation|opera|ceil|easeinout|easeslide|200|disable|1000|bounceout|bounceslide|700|auto'.split('|'),0,{})) \ No newline at end of file
diff --git a/BSF/template-common/lib/chili-1.7.pack.js b/BSF/template-common/lib/chili-1.7.pack.js
deleted file mode 100644
index 90e7735cb..000000000
--- a/BSF/template-common/lib/chili-1.7.pack.js
+++ /dev/null
@@ -1 +0,0 @@
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?"":e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('8={3b:"1.6",2o:"1B.1Y,1B.23,1B.2e",2i:"",2H:1a,12:"",2C:1a,Z:"",2a:\'<H V="$0">$$</H>\',R:"&#F;",1j:"&#F;&#F;&#F;&#F;",1f:"&#F;<1W/>",3c:5(){9 $(y).39("1k")[0]},I:{},N:{}};(5($){$(5(){5 1J(l,a){5 2I(A,h){4 3=(1v h.3=="1h")?h.3:h.3.1w;k.1m({A:A,3:"("+3+")",u:1+(3.c(/\\\\./g,"%").c(/\\[.*?\\]/g,"%").3a(/\\((?!\\?)/g)||[]).u,z:(h.z)?h.z:8.2a})}5 2z(){4 1E=0;4 1x=x 2A;Q(4 i=0;i<k.u;i++){4 3=k[i].3;3=3.c(/\\\\\\\\|\\\\(\\d+)/g,5(m,1F){9!1F?m:"\\\\"+(1E+1+1t(1F))});1x.1m(3);1E+=k[i].u}4 1w=1x.3d("|");9 x 1u(1w,(a.3g)?"2j":"g")}5 1S(o){9 o.c(/&/g,"&3h;").c(/</g,"&3e;")}5 1R(o){9 o.c(/ +/g,5(1X){9 1X.c(/ /g,R)})}5 G(o){o=1S(o);7(R){o=1R(o)}9 o}5 2m(2E){4 i=0;4 j=1;4 h;19(h=k[i++]){4 1b=D;7(1b[j]){4 1U=/(\\\\\\$)|(?:\\$\\$)|(?:\\$(\\d+))/g;4 z=h.z.c(1U,5(m,1V,K){4 3f=\'\';7(1V){9"$"}v 7(!K){9 G(1b[j])}v 7(K=="0"){9 h.A}v{9 G(1b[j+1t(K,10)])}});4 1A=D[D.u-2];4 2h=D[D.u-1];4 2G=2h.2v(11,1A);11=1A+2E.u;14+=G(2G)+z;9 z}v{j+=h.u}}}4 R=8.R;4 k=x 2A;Q(4 A 2r a.k){2I(A,a.k[A])}4 14="";4 11=0;l.c(2z(),2m);4 2y=l.2v(11,l.u);14+=G(2y);9 14}5 2B(X){7(!8.N[X]){4 Y=\'<Y 32="1p" 33="p/2u"\'+\' 30="\'+X+\'">\';8.N[X]=1H;7($.31.34){4 W=J.1L(Y);4 $W=$(W);$("2d").1O($W)}v{$("2d").1O(Y)}}}5 1q(e,a){4 l=e&&e.1g&&e.1g[0]&&e.1g[0].37;7(!l)l="";l=l.c(/\\r\\n?/g,"\\n");4 C=1J(l,a);7(8.1j){C=C.c(/\\t/g,8.1j)}7(8.1f){C=C.c(/\\n/g,8.1f)}$(e).38(C)}5 1o(q,13){4 1l={12:8.12,2x:q+".1d",Z:8.Z,2w:q+".2u"};4 B;7(13&&1v 13=="2l")B=$.35(1l,13);v B=1l;9{a:B.12+B.2x,1p:B.Z+B.2w}}7($.2q)$.2q({36:"2l.15"});4 2n=x 1u("\\\\b"+8.2i+"\\\\b","2j");4 1e=[];$(8.2o).2D(5(){4 e=y;4 1n=$(e).3i("V");7(!1n){9}4 q=$.3u(1n.c(2n,""));7(\'\'!=q){1e.1m(e);4 f=1o(q,e.15);7(8.2H||e.15){7(!8.N[f.a]){1D{8.N[f.a]=1H;$.3v(f.a,5(M){M.f=f.a;8.I[f.a]=M;7(8.2C){2B(f.1p)}$("."+q).2D(5(){4 f=1o(q,y.15);7(M.f==f.a){1q(y,M)}})})}1I(3s){3t("a 3w Q: "+q+\'@\'+3z)}}}v{4 a=8.I[f.a];7(a){1q(e,a)}}}});7(J.1i&&J.1i.29){5 22(p){7(\'\'==p){9""}1z{4 16=(x 3A()).2k()}19(p.3x(16)>-1);p=p.c(/\\<1W[^>]*?\\>/3y,16);4 e=J.1L(\'<1k>\');e.3l=p;p=e.3m.c(x 1u(16,"g"),\'\\r\\n\');9 p}4 T="";4 18=1G;$(1e).3j().G("1k").U("2c",5(){18=y}).U("1M",5(){7(18==y)T=J.1i.29().3k});$("3n").U("3q",5(){7(\'\'!=T){2p.3r.3o(\'3p\',22(T));2V.2R=1a}}).U("2c",5(){T=""}).U("1M",5(){18=1G})}})})(1Z);8.I["1Y.1d"]={k:{2M:{3:/\\/\\*[^*]*\\*+(?:[^\\/][^*]*\\*+)*\\//},25:{3:/\\<!--(?:.|\\n)*?--\\>/},2f:{3:/\\/\\/.*/},2P:{3:/2L|2T|2J|2O|2N|2X|2K|2Z|2U|2S|2W|2Y|2Q|51|c-50/},53:{3:/\\/[^\\/\\\\\\n]*(?:\\\\.[^\\/\\\\\\n]*)*\\/[52]*/},1h:{3:/(?:\\\'[^\\\'\\\\\\n]*(?:\\\\.[^\\\'\\\\\\n]*)*\\\')|(?:\\"[^\\"\\\\\\n]*(?:\\\\.[^\\"\\\\\\n]*)*\\")/},27:{3:/\\b[+-]?(?:\\d*\\.?\\d+|\\d+\\.?\\d*)(?:[1r][+-]?\\d+)?\\b/},4X:{3:/\\b(D|1N|1K|1I|2t|2s|4W|1z|v|1a|Q|5|7|2r|4Z|x|1G|9|1Q|y|1H|1D|1v|4|4Y|19|59)\\b/},1y:{3:/\\b(58|2k|2p|5b|5a|55|J|54|57|1t|56|4L|4K|4N|4M|4H|4G|4J)\\b/},1C:{3:/(?:\\<\\w+)|(?:\\>)|(?:\\<\\/\\w+\\>)|(?:\\/\\>)/},26:{3:/\\s+\\w+(?=\\s*=)/},20:{3:/([\\"\\\'])(?:(?:[^\\1\\\\\\r\\n]*?(?:\\1\\1|\\\\.))*[^\\1\\\\\\r\\n]*?)\\1/},21:{3:/&[\\w#]+?;/},4I:{3:/(\\$|1Z)/}}};8.I["23.1d"]={k:{25:{3:/\\<!--(?:.|\\n)*?--\\>/},1h:{3:/(?:\\\'[^\\\'\\\\\\n]*(?:\\\\.[^\\\'\\\\\\n]*)*\\\')|(?:\\"[^\\"\\\\\\n]*(?:\\\\.[^\\"\\\\\\n]*)*\\")/},27:{3:/\\b[+-]?(?:\\d*\\.?\\d+|\\d+\\.?\\d*)(?:[1r][+-]?\\d+)?\\b/},1C:{3:/(?:\\<\\w+)|(?:\\>)|(?:\\<\\/\\w+\\>)|(?:\\/\\>)/},26:{3:/\\s+\\w+(?=\\s*=)/},20:{3:/([\\"\\\'])(?:(?:[^\\1\\\\\\r\\n]*?(?:\\1\\1|\\\\.))*[^\\1\\\\\\r\\n]*?)\\1/},21:{3:/&[\\w#]+?;/}}};8.I["2e.1d"]={k:{4S:{3:/\\/\\*[^*]*\\*+([^\\/][^*]*\\*+)*\\//},2f:{3:/(?:\\/\\/.*)|(?:[^\\\\]\\#.*)/},4V:{3:/\\\'[^\\\'\\\\]*(?:\\\\.[^\\\'\\\\]*)*\\\'/},4U:{3:/\\"[^\\"\\\\]*(?:\\\\.[^\\"\\\\]*)*\\"/},4P:{3:/\\b(?:[4O][2b][1s][1s]|[4R][4Q][2b][1P]|[5c][5v][1s][5u][1P])\\b/},5x:{3:/\\b[+-]?(\\d*\\.?\\d+|\\d+\\.?\\d*)([1r][+-]?\\d+)?\\b/},5y:{3:/\\b(?:5z|5w(?:5A|5E(?:5F(?:17|1c)|5G(?:17|1c))|17|1T|5B|5C|5D(?:17|1T|1c)|1c)|P(?:5h(?:5k|5j)|5e(?:5d|5g(?:5f|5l)|5r|E(?:5t|5s)|5n(?:5m|5p)|L(?:3X|3W)|O(?:S|3Y(?:3T|3S|3V))|3U|S(?:44|47|46)|41))|40)\\b/},1y:{3:/(?:\\$43|\\$42|\\$3R|\\$3G|\\$3F|\\$3I|\\$3H|\\$3C|\\$3B|\\$3D)\\b/},28:{3:/\\b(?:3O|3N|3P|3K|3J|3M|3L|48|4v|1N|1K|1I|4u|V|4x|4w|2t|4r|2s|4q|1z|4t|v|4s|4D|4C|4F|4E|4z|4y|4B|4A|4p|4d|2F|2F|4g|Q|4f|5|1y|7|4a|4m|4l|4o|4i|4k|x|4j|4h|4n|4b|4c|49|4e|3Q|3E|9|45|1Q|y|3Z|1D|5o|5q|4|19|5i)\\b/},2g:{3:/\\$(\\w+)/,z:\'<H V="28">$</H><H V="2g">$1</H>\'},1C:{3:/(?:\\<\\?[24][4T][24])|(?:\\<\\?)|(?:\\?\\>)/}}}',62,353,'|||exp|var|function||if|ChiliBook|return|recipe||replace||el|path||step|||steps|ingredients|||str|text|recipeName||||length|else||new|this|replacement|stepName|settings|dish|arguments||160|filter|span|recipes|document|||recipeLoaded|required|||for|replaceSpace||insidePRE|bind|class|domLink|stylesheetPath|link|stylesheetFolder||lastIndex|recipeFolder|options|perfect|chili|newline|ERROR|downPRE|while|false|aux|WARNING|js|codes|replaceNewLine|childNodes|string|selection|replaceTab|pre|settingsDef|push|elClass|getPath|stylesheet|makeDish|eE|Ll|parseInt|RegExp|typeof|source|exps|global|do|offset|code|tag|try|prevLength|aNum|null|true|catch|cook|case|createElement|mouseup|break|append|Ee|switch|replaceSpaces|escapeHTML|NOTICE|pattern|escaped|br|spaces|mix|jQuery|avalue|entity|preformatted|xml|Pp|htcom|aname|numbers|keyword|createRange|defaultReplacement|Uu|mousedown|head|php|com|variable|input|elementClass|gi|valueOf|object|chef|selectClass|elementPath|window|metaobjects|in|default|continue|css|substring|stylesheetFile|recipeFile|lastUnmatched|knowHow|Array|checkCSS|stylesheetLoading|each|matched|extends|unmatched|recipeLoading|prepareStep|unblockUI|ajaxSubmit|silverlight|jscom|unblock|block|plugin|clearFields|returnValue|fieldValue|blockUI|formSerialize|event|resetForm|ajaxForm|clearForm|fieldSerialize|href|browser|rel|type|msie|extend|selector|data|html|next|match|version|getPRE|join|lt|bit|ignoreCase|amp|attr|parents|htmlText|innerHTML|innerText|body|setData|Text|copy|clipboardData|recipeNotAvailable|alert|trim|getJSON|unavailable|indexOf|ig|recipePath|Date|_SESSION|_SERVER|php_errormsg|require_once|_GET|_FILES|_REQUEST|_POST|__METHOD__|__LINE__|and|abstract|__FILE__|__CLASS__|__FUNCTION__|require|_ENV|END|CONT|PREFIX|START|OCALSTATEDIR|IBDIR|UTPUT_HANDLER_|throw|__COMPILER_HALT_OFFSET__|VERSION|_COOKIE|GLOBALS|API|static|YSCONFDIR|HLIB_SUFFIX|array|protected|implements|print|private|exit|public|foreach|final|or|isset|old_function|list|include_once|include|php_user_filter|interface|exception|die|declare|elseif|echo|cfunction|as|const|clone|endswitch|endif|eval|endwhile|enddeclare|empty|endforeach|endfor|isNaN|NaN|jquery|Infinity|clearTimeout|setTimeout|clearInterval|setInterval|Nn|value|Rr|Tt|mlcom|Hh|string2|string1|delete|keywords|void|instanceof|content|taconite|gim|regexp|escape|constructor|parseFloat|unescape|toString|with|prototype|element|Ff|BINDIR|HP_|PATH|CONFIG_FILE_|EAR_|xor|INSTALL_DIR|EXTENSION_DIR|SCAN_DIR|MAX|INT_|unset|SIZE|use|DATADIR|XTENSION_DIR|OL|Ss|Aa|E_|number|const1|DEFAULT_INCLUDE_PATH|ALL|PARSE|STRICT|USER_|CO|MPILE_|RE_'.split('|'),0,{}))
diff --git a/BSF/template-common/lib/jquery.dimensions.js b/BSF/template-common/lib/jquery.dimensions.js
deleted file mode 100644
index 3dd7a5c8d..000000000
--- a/BSF/template-common/lib/jquery.dimensions.js
+++ /dev/null
@@ -1,116 +0,0 @@
-/* Copyright (c) 2007 Paul Bakaus (paul.bakaus@googlemail.com) and Brandon Aaron (brandon.aaron@gmail.com || http://brandonaaron.net)
- * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
- * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
- *
- * $LastChangedDate$
- * $Rev$
- *
- * Version: @VERSION
- *
- * Requires: jQuery 1.2+
- */
-
-(function($){
-
-$.dimensions = {
- version: '@VERSION'
-};
-
-// Create innerHeight, innerWidth, outerHeight and outerWidth methods
-$.each( [ 'Height', 'Width' ], function(i, name){
-
- // innerHeight and innerWidth
- $.fn[ 'inner' + name ] = function() {
- if (!this[0]) return;
-
- var torl = name == 'Height' ? 'Top' : 'Left', // top or left
- borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right
-
- return num( this, name.toLowerCase() ) + num(this, 'padding' + torl) + num(this, 'padding' + borr);
- };
-
- // outerHeight and outerWidth
- $.fn[ 'outer' + name ] = function(options) {
- if (!this[0]) return;
-
- var torl = name == 'Height' ? 'Top' : 'Left', // top or left
- borr = name == 'Height' ? 'Bottom' : 'Right'; // bottom or right
-
- options = $.extend({ margin: false }, options || {});
-
- return num( this, name.toLowerCase() )
- + num(this, 'border' + torl + 'Width') + num(this, 'border' + borr + 'Width')
- + num(this, 'padding' + torl) + num(this, 'padding' + borr)
- + (options.margin ? (num(this, 'margin' + torl) + num(this, 'margin' + borr)) : 0);
- };
-});
-
-// Create scrollLeft and scrollTop methods
-$.each( ['Left', 'Top'], function(i, name) {
- $.fn[ 'scroll' + name ] = function(val) {
- if (!this[0]) return;
-
- return val != undefined ?
-
- // Set the scroll offset
- this.each(function() {
- this == window || this == document ?
- window.scrollTo(
- name == 'Left' ? val : $(window)[ 'scrollLeft' ](),
- name == 'Top' ? val : $(window)[ 'scrollTop' ]()
- ) :
- this[ 'scroll' + name ] = val;
- }) :
-
- // Return the scroll offset
- this[0] == window || this[0] == document ?
- self[ (name == 'Left' ? 'pageXOffset' : 'pageYOffset') ] ||
- $.boxModel && document.documentElement[ 'scroll' + name ] ||
- document.body[ 'scroll' + name ] :
- this[0][ 'scroll' + name ];
- };
-});
-
-$.fn.extend({
- position: function() {
- var left = 0, top = 0, elem = this[0], offset, parentOffset, offsetParent, results;
-
- if (elem) {
- // Get *real* offsetParent
- offsetParent = this.offsetParent();
-
- // Get correct offsets
- offset = this.offset();
- parentOffset = offsetParent.offset();
-
- // Subtract element margins
- offset.top -= num(elem, 'marginTop');
- offset.left -= num(elem, 'marginLeft');
-
- // Add offsetParent borders
- parentOffset.top += num(offsetParent, 'borderTopWidth');
- parentOffset.left += num(offsetParent, 'borderLeftWidth');
-
- // Subtract the two offsets
- results = {
- top: offset.top - parentOffset.top,
- left: offset.left - parentOffset.left
- };
- }
-
- return results;
- },
-
- offsetParent: function() {
- var offsetParent = this[0].offsetParent;
- while ( offsetParent && (!/^body|html$/i.test(offsetParent.tagName) && $.css(offsetParent, 'position') == 'static') )
- offsetParent = offsetParent.offsetParent;
- return $(offsetParent);
- }
-});
-
-function num(el, prop) {
- return parseInt($.css(el.jquery?el[0]:el,prop))||0;
-};
-
-})(jQuery); \ No newline at end of file
diff --git a/BSF/template-common/lib/jquery.easing.js b/BSF/template-common/lib/jquery.easing.js
deleted file mode 100644
index 881daaafb..000000000
--- a/BSF/template-common/lib/jquery.easing.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * jQuery Easing v1.1.1 - http://gsgd.co.uk/sandbox/jquery.easing.php
- *
- * Uses the built in easing capabilities added in jQuery 1.1
- * to offer multiple easing options
- *
- * Copyright (c) 2007 George Smith
- * Licensed under the MIT License:
- * http://www.opensource.org/licenses/mit-license.php
- */
-
-jQuery.extend(jQuery.easing, {
- easein: function(x, t, b, c, d) {
- return c*(t/=d)*t + b; // in
- },
- easeinout: function(x, t, b, c, d) {
- if (t < d/2) return 2*c*t*t/(d*d) + b;
- var ts = t - d/2;
- return -2*c*ts*ts/(d*d) + 2*c*ts/d + c/2 + b;
- },
- easeout: function(x, t, b, c, d) {
- return -c*t*t/(d*d) + 2*c*t/d + b;
- },
- expoin: function(x, t, b, c, d) {
- var flip = 1;
- if (c < 0) {
- flip *= -1;
- c *= -1;
- }
- return flip * (Math.exp(Math.log(c)/d * t)) + b;
- },
- expoout: function(x, t, b, c, d) {
- var flip = 1;
- if (c < 0) {
- flip *= -1;
- c *= -1;
- }
- return flip * (-Math.exp(-Math.log(c)/d * (t-d)) + c + 1) + b;
- },
- expoinout: function(x, t, b, c, d) {
- var flip = 1;
- if (c < 0) {
- flip *= -1;
- c *= -1;
- }
- if (t < d/2) return flip * (Math.exp(Math.log(c/2)/(d/2) * t)) + b;
- return flip * (-Math.exp(-2*Math.log(c/2)/d * (t-d)) + c + 1) + b;
- },
- bouncein: function(x, t, b, c, d) {
- return c - jQuery.easing['bounceout'](x, d-t, 0, c, d) + b;
- },
- bounceout: function(x, t, b, c, d) {
- if ((t/=d) < (1/2.75)) {
- return c*(7.5625*t*t) + b;
- } else if (t < (2/2.75)) {
- return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
- } else if (t < (2.5/2.75)) {
- return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
- } else {
- return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
- }
- },
- bounceinout: function(x, t, b, c, d) {
- if (t < d/2) return jQuery.easing['bouncein'] (x, t*2, 0, c, d) * .5 + b;
- return jQuery.easing['bounceout'] (x, t*2-d,0, c, d) * .5 + c*.5 + b;
- },
- elasin: function(x, t, b, c, d) {
- var s=1.70158;var p=0;var a=c;
- if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
- if (a < Math.abs(c)) { a=c; var s=p/4; }
- else var s = p/(2*Math.PI) * Math.asin (c/a);
- return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
- },
- elasout: function(x, t, b, c, d) {
- var s=1.70158;var p=0;var a=c;
- if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
- if (a < Math.abs(c)) { a=c; var s=p/4; }
- else var s = p/(2*Math.PI) * Math.asin (c/a);
- return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
- },
- elasinout: function(x, t, b, c, d) {
- var s=1.70158;var p=0;var a=c;
- if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
- if (a < Math.abs(c)) { a=c; var s=p/4; }
- else var s = p/(2*Math.PI) * Math.asin (c/a);
- if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
- return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
- },
- backin: function(x, t, b, c, d) {
- var s=1.70158;
- return c*(t/=d)*t*((s+1)*t - s) + b;
- },
- backout: function(x, t, b, c, d) {
- var s=1.70158;
- return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
- },
- backinout: function(x, t, b, c, d) {
- var s=1.70158;
- if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
- return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
- }
-}); \ No newline at end of file
diff --git a/BSF/template-common/lib/jquery.js b/BSF/template-common/lib/jquery.js
deleted file mode 100644
index f5cca331f..000000000
--- a/BSF/template-common/lib/jquery.js
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
- * jQuery 1.2.3 - New Wave Javascript
- *
- * Copyright (c) 2008 John Resig (jquery.com)
- * Dual licensed under the MIT (MIT-LICENSE.txt)
- * and GPL (GPL-LICENSE.txt) licenses.
- *
- * $Date$
- * $Rev$
- */
-eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(J(){7(1e.3N)L w=1e.3N;L E=1e.3N=J(a,b){K 1B E.2l.4T(a,b)};7(1e.$)L D=1e.$;1e.$=E;L u=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;L G=/^.[^:#\\[\\.]*$/;E.1n=E.2l={4T:J(d,b){d=d||T;7(d.15){6[0]=d;6.M=1;K 6}N 7(1o d=="25"){L c=u.2O(d);7(c&&(c[1]||!b)){7(c[1])d=E.4a([c[1]],b);N{L a=T.5J(c[3]);7(a)7(a.2w!=c[3])K E().2s(d);N{6[0]=a;6.M=1;K 6}N d=[]}}N K 1B E(b).2s(d)}N 7(E.1q(d))K 1B E(T)[E.1n.21?"21":"3U"](d);K 6.6E(d.1k==1M&&d||(d.5h||d.M&&d!=1e&&!d.15&&d[0]!=10&&d[0].15)&&E.2I(d)||[d])},5h:"1.2.3",87:J(){K 6.M},M:0,22:J(a){K a==10?E.2I(6):6[a]},2F:J(b){L a=E(b);a.54=6;K a},6E:J(a){6.M=0;1M.2l.1g.1i(6,a);K 6},R:J(a,b){K E.R(6,a,b)},4X:J(b){L a=-1;6.R(J(i){7(6==b)a=i});K a},1J:J(c,a,b){L d=c;7(c.1k==4e)7(a==10)K 6.M&&E[b||"1J"](6[0],c)||10;N{d={};d[c]=a}K 6.R(J(i){Q(c 1p d)E.1J(b?6.W:6,c,E.1l(6,d[c],b,i,c))})},1j:J(b,a){7((b==\'27\'||b==\'1R\')&&2M(a)<0)a=10;K 6.1J(b,a,"2o")},1u:J(b){7(1o b!="3V"&&b!=V)K 6.4x().3t((6[0]&&6[0].2i||T).5r(b));L a="";E.R(b||6,J(){E.R(6.3p,J(){7(6.15!=8)a+=6.15!=1?6.6K:E.1n.1u([6])})});K a},5m:J(b){7(6[0])E(b,6[0].2i).5k().3o(6[0]).2c(J(){L a=6;2b(a.1C)a=a.1C;K a}).3t(6);K 6},8w:J(a){K 6.R(J(){E(6).6z().5m(a)})},8p:J(a){K 6.R(J(){E(6).5m(a)})},3t:J(){K 6.3O(18,P,S,J(a){7(6.15==1)6.38(a)})},6q:J(){K 6.3O(18,P,P,J(a){7(6.15==1)6.3o(a,6.1C)})},6o:J(){K 6.3O(18,S,S,J(a){6.1a.3o(a,6)})},5a:J(){K 6.3O(18,S,P,J(a){6.1a.3o(a,6.2B)})},3h:J(){K 6.54||E([])},2s:J(b){L c=E.2c(6,J(a){K E.2s(b,a)});K 6.2F(/[^+>] [^+>]/.17(b)||b.1f("..")>-1?E.57(c):c)},5k:J(e){L f=6.2c(J(){7(E.14.1d&&!E.3E(6)){L a=6.69(P),4Y=T.3s("1x");4Y.38(a);K E.4a([4Y.3d])[0]}N K 6.69(P)});L d=f.2s("*").4R().R(J(){7(6[F]!=10)6[F]=V});7(e===P)6.2s("*").4R().R(J(i){7(6.15==3)K;L c=E.O(6,"2R");Q(L a 1p c)Q(L b 1p c[a])E.16.1b(d[i],a,c[a][b],c[a][b].O)});K f},1E:J(b){K 6.2F(E.1q(b)&&E.3y(6,J(a,i){K b.1P(a,i)})||E.3e(b,6))},56:J(b){7(b.1k==4e)7(G.17(b))K 6.2F(E.3e(b,6,P));N b=E.3e(b,6);L a=b.M&&b[b.M-1]!==10&&!b.15;K 6.1E(J(){K a?E.33(6,b)<0:6!=b})},1b:J(a){K!a?6:6.2F(E.37(6.22(),a.1k==4e?E(a).22():a.M!=10&&(!a.12||E.12(a,"3u"))?a:[a]))},3H:J(a){K a?E.3e(a,6).M>0:S},7j:J(a){K 6.3H("."+a)},5O:J(b){7(b==10){7(6.M){L c=6[0];7(E.12(c,"2k")){L e=c.3T,5I=[],11=c.11,2X=c.U=="2k-2X";7(e<0)K V;Q(L i=2X?e:0,2f=2X?e+1:11.M;i<2f;i++){L d=11[i];7(d.2p){b=E.14.1d&&!d.9J.1A.9y?d.1u:d.1A;7(2X)K b;5I.1g(b)}}K 5I}N K(6[0].1A||"").1r(/\\r/g,"")}K 10}K 6.R(J(){7(6.15!=1)K;7(b.1k==1M&&/5u|5t/.17(6.U))6.3k=(E.33(6.1A,b)>=0||E.33(6.31,b)>=0);N 7(E.12(6,"2k")){L a=b.1k==1M?b:[b];E("98",6).R(J(){6.2p=(E.33(6.1A,a)>=0||E.33(6.1u,a)>=0)});7(!a.M)6.3T=-1}N 6.1A=b})},3q:J(a){K a==10?(6.M?6[0].3d:V):6.4x().3t(a)},6S:J(a){K 6.5a(a).1V()},6Z:J(i){K 6.2K(i,i+1)},2K:J(){K 6.2F(1M.2l.2K.1i(6,18))},2c:J(b){K 6.2F(E.2c(6,J(a,i){K b.1P(a,i,a)}))},4R:J(){K 6.1b(6.54)},O:J(d,b){L a=d.23(".");a[1]=a[1]?"."+a[1]:"";7(b==V){L c=6.5n("8P"+a[1]+"!",[a[0]]);7(c==10&&6.M)c=E.O(6[0],d);K c==V&&a[1]?6.O(a[0]):c}N K 6.1N("8K"+a[1]+"!",[a[0],b]).R(J(){E.O(6,d,b)})},35:J(a){K 6.R(J(){E.35(6,a)})},3O:J(g,f,h,d){L e=6.M>1,3n;K 6.R(J(){7(!3n){3n=E.4a(g,6.2i);7(h)3n.8D()}L b=6;7(f&&E.12(6,"1O")&&E.12(3n[0],"4v"))b=6.3S("1U")[0]||6.38(6.2i.3s("1U"));L c=E([]);E.R(3n,J(){L a=e?E(6).5k(P)[0]:6;7(E.12(a,"1m")){c=c.1b(a)}N{7(a.15==1)c=c.1b(E("1m",a).1V());d.1P(b,a)}});c.R(6A)})}};E.2l.4T.2l=E.2l;J 6A(i,a){7(a.3Q)E.3P({1c:a.3Q,3l:S,1H:"1m"});N E.5g(a.1u||a.6x||a.3d||"");7(a.1a)a.1a.34(a)}E.1s=E.1n.1s=J(){L b=18[0]||{},i=1,M=18.M,5c=S,11;7(b.1k==8d){5c=b;b=18[1]||{};i=2}7(1o b!="3V"&&1o b!="J")b={};7(M==1){b=6;i=0}Q(;i<M;i++)7((11=18[i])!=V)Q(L a 1p 11){7(b===11[a])6w;7(5c&&11[a]&&1o 11[a]=="3V"&&b[a]&&!11[a].15)b[a]=E.1s(b[a],11[a]);N 7(11[a]!=10)b[a]=11[a]}K b};L F="3N"+(1B 3v()).3L(),6t=0,5b={};L H=/z-?4X|86-?84|1w|6k|7Z-?1R/i;E.1s({7Y:J(a){1e.$=D;7(a)1e.3N=w;K E},1q:J(a){K!!a&&1o a!="25"&&!a.12&&a.1k!=1M&&/J/i.17(a+"")},3E:J(a){K a.1F&&!a.1h||a.28&&a.2i&&!a.2i.1h},5g:J(a){a=E.3g(a);7(a){L b=T.3S("6f")[0]||T.1F,1m=T.3s("1m");1m.U="1u/4m";7(E.14.1d)1m.1u=a;N 1m.38(T.5r(a));b.38(1m);b.34(1m)}},12:J(b,a){K b.12&&b.12.2E()==a.2E()},1T:{},O:J(c,d,b){c=c==1e?5b:c;L a=c[F];7(!a)a=c[F]=++6t;7(d&&!E.1T[a])E.1T[a]={};7(b!=10)E.1T[a][d]=b;K d?E.1T[a][d]:a},35:J(c,b){c=c==1e?5b:c;L a=c[F];7(b){7(E.1T[a]){2V E.1T[a][b];b="";Q(b 1p E.1T[a])1Q;7(!b)E.35(c)}}N{1S{2V c[F]}1X(e){7(c.52)c.52(F)}2V E.1T[a]}},R:J(c,a,b){7(b){7(c.M==10){Q(L d 1p c)7(a.1i(c[d],b)===S)1Q}N Q(L i=0,M=c.M;i<M;i++)7(a.1i(c[i],b)===S)1Q}N{7(c.M==10){Q(L d 1p c)7(a.1P(c[d],d,c[d])===S)1Q}N Q(L i=0,M=c.M,1A=c[0];i<M&&a.1P(1A,i,1A)!==S;1A=c[++i]){}}K c},1l:J(b,a,c,i,d){7(E.1q(a))a=a.1P(b,i);K a&&a.1k==51&&c=="2o"&&!H.17(d)?a+"2S":a},1t:{1b:J(c,b){E.R((b||"").23(/\\s+/),J(i,a){7(c.15==1&&!E.1t.3Y(c.1t,a))c.1t+=(c.1t?" ":"")+a})},1V:J(c,b){7(c.15==1)c.1t=b!=10?E.3y(c.1t.23(/\\s+/),J(a){K!E.1t.3Y(b,a)}).6a(" "):""},3Y:J(b,a){K E.33(a,(b.1t||b).3X().23(/\\s+/))>-1}},68:J(b,c,a){L e={};Q(L d 1p c){e[d]=b.W[d];b.W[d]=c[d]}a.1P(b);Q(L d 1p c)b.W[d]=e[d]},1j:J(d,e,c){7(e=="27"||e=="1R"){L b,46={43:"4W",4U:"1Z",19:"3D"},3c=e=="27"?["7O","7M"]:["7J","7I"];J 5E(){b=e=="27"?d.7H:d.7F;L a=0,2N=0;E.R(3c,J(){a+=2M(E.2o(d,"7E"+6,P))||0;2N+=2M(E.2o(d,"2N"+6+"5X",P))||0});b-=24.7C(a+2N)}7(E(d).3H(":4d"))5E();N E.68(d,46,5E);K 24.2f(0,b)}K E.2o(d,e,c)},2o:J(e,k,j){L d;J 3x(b){7(!E.14.2d)K S;L a=T.4c.4K(b,V);K!a||a.4M("3x")==""}7(k=="1w"&&E.14.1d){d=E.1J(e.W,"1w");K d==""?"1":d}7(E.14.2z&&k=="19"){L c=e.W.50;e.W.50="0 7r 7o";e.W.50=c}7(k.1D(/4g/i))k=y;7(!j&&e.W&&e.W[k])d=e.W[k];N 7(T.4c&&T.4c.4K){7(k.1D(/4g/i))k="4g";k=k.1r(/([A-Z])/g,"-$1").2h();L h=T.4c.4K(e,V);7(h&&!3x(e))d=h.4M(k);N{L f=[],2C=[];Q(L a=e;a&&3x(a);a=a.1a)2C.4J(a);Q(L i=0;i<2C.M;i++)7(3x(2C[i])){f[i]=2C[i].W.19;2C[i].W.19="3D"}d=k=="19"&&f[2C.M-1]!=V?"2H":(h&&h.4M(k))||"";Q(L i=0;i<f.M;i++)7(f[i]!=V)2C[i].W.19=f[i]}7(k=="1w"&&d=="")d="1"}N 7(e.4n){L g=k.1r(/\\-(\\w)/g,J(a,b){K b.2E()});d=e.4n[k]||e.4n[g];7(!/^\\d+(2S)?$/i.17(d)&&/^\\d/.17(d)){L l=e.W.26,3K=e.3K.26;e.3K.26=e.4n.26;e.W.26=d||0;d=e.W.7f+"2S";e.W.26=l;e.3K.26=3K}}K d},4a:J(l,h){L k=[];h=h||T;7(1o h.3s==\'10\')h=h.2i||h[0]&&h[0].2i||T;E.R(l,J(i,d){7(!d)K;7(d.1k==51)d=d.3X();7(1o d=="25"){d=d.1r(/(<(\\w+)[^>]*?)\\/>/g,J(b,a,c){K c.1D(/^(aa|a6|7e|a5|4D|7a|a0|3m|9W|9U|9S)$/i)?b:a+"></"+c+">"});L f=E.3g(d).2h(),1x=h.3s("1x");L e=!f.1f("<9P")&&[1,"<2k 74=\'74\'>","</2k>"]||!f.1f("<9M")&&[1,"<73>","</73>"]||f.1D(/^<(9G|1U|9E|9B|9x)/)&&[1,"<1O>","</1O>"]||!f.1f("<4v")&&[2,"<1O><1U>","</1U></1O>"]||(!f.1f("<9w")||!f.1f("<9v"))&&[3,"<1O><1U><4v>","</4v></1U></1O>"]||!f.1f("<7e")&&[2,"<1O><1U></1U><6V>","</6V></1O>"]||E.14.1d&&[1,"1x<1x>","</1x>"]||[0,"",""];1x.3d=e[1]+d+e[2];2b(e[0]--)1x=1x.5o;7(E.14.1d){L g=!f.1f("<1O")&&f.1f("<1U")<0?1x.1C&&1x.1C.3p:e[1]=="<1O>"&&f.1f("<1U")<0?1x.3p:[];Q(L j=g.M-1;j>=0;--j)7(E.12(g[j],"1U")&&!g[j].3p.M)g[j].1a.34(g[j]);7(/^\\s/.17(d))1x.3o(h.5r(d.1D(/^\\s*/)[0]),1x.1C)}d=E.2I(1x.3p)}7(d.M===0&&(!E.12(d,"3u")&&!E.12(d,"2k")))K;7(d[0]==10||E.12(d,"3u")||d.11)k.1g(d);N k=E.37(k,d)});K k},1J:J(d,e,c){7(!d||d.15==3||d.15==8)K 10;L f=E.3E(d)?{}:E.46;7(e=="2p"&&E.14.2d)d.1a.3T;7(f[e]){7(c!=10)d[f[e]]=c;K d[f[e]]}N 7(E.14.1d&&e=="W")K E.1J(d.W,"9u",c);N 7(c==10&&E.14.1d&&E.12(d,"3u")&&(e=="9r"||e=="9o"))K d.9m(e).6K;N 7(d.28){7(c!=10){7(e=="U"&&E.12(d,"4D")&&d.1a)6Q"U 9i 9h\'t 9g 9e";d.9b(e,""+c)}7(E.14.1d&&/6O|3Q/.17(e)&&!E.3E(d))K d.4z(e,2);K d.4z(e)}N{7(e=="1w"&&E.14.1d){7(c!=10){d.6k=1;d.1E=(d.1E||"").1r(/6M\\([^)]*\\)/,"")+(2M(c).3X()=="96"?"":"6M(1w="+c*6L+")")}K d.1E&&d.1E.1f("1w=")>=0?(2M(d.1E.1D(/1w=([^)]*)/)[1])/6L).3X():""}e=e.1r(/-([a-z])/95,J(a,b){K b.2E()});7(c!=10)d[e]=c;K d[e]}},3g:J(a){K(a||"").1r(/^\\s+|\\s+$/g,"")},2I:J(b){L a=[];7(1o b!="93")Q(L i=0,M=b.M;i<M;i++)a.1g(b[i]);N a=b.2K(0);K a},33:J(b,a){Q(L i=0,M=a.M;i<M;i++)7(a[i]==b)K i;K-1},37:J(a,b){7(E.14.1d){Q(L i=0;b[i];i++)7(b[i].15!=8)a.1g(b[i])}N Q(L i=0;b[i];i++)a.1g(b[i]);K a},57:J(a){L c=[],2r={};1S{Q(L i=0,M=a.M;i<M;i++){L b=E.O(a[i]);7(!2r[b]){2r[b]=P;c.1g(a[i])}}}1X(e){c=a}K c},3y:J(c,a,d){L b=[];Q(L i=0,M=c.M;i<M;i++)7(!d&&a(c[i],i)||d&&!a(c[i],i))b.1g(c[i]);K b},2c:J(d,a){L c=[];Q(L i=0,M=d.M;i<M;i++){L b=a(d[i],i);7(b!==V&&b!=10){7(b.1k!=1M)b=[b];c=c.71(b)}}K c}});L v=8Y.8W.2h();E.14={5K:(v.1D(/.+(?:8T|8S|8R|8O)[\\/: ]([\\d.]+)/)||[])[1],2d:/77/.17(v),2z:/2z/.17(v),1d:/1d/.17(v)&&!/2z/.17(v),48:/48/.17(v)&&!/(8L|77)/.17(v)};L y=E.14.1d?"6H":"75";E.1s({8I:!E.14.1d||T.6F=="79",46:{"Q":"8F","8E":"1t","4g":y,75:y,6H:y,3d:"3d",1t:"1t",1A:"1A",2Y:"2Y",3k:"3k",8C:"8B",2p:"2p",8A:"8z",3T:"3T",6C:"6C",28:"28",12:"12"}});E.R({6B:J(a){K a.1a},8y:J(a){K E.4u(a,"1a")},8x:J(a){K E.2Z(a,2,"2B")},8v:J(a){K E.2Z(a,2,"4t")},8u:J(a){K E.4u(a,"2B")},8t:J(a){K E.4u(a,"4t")},8s:J(a){K E.5i(a.1a.1C,a)},8r:J(a){K E.5i(a.1C)},6z:J(a){K E.12(a,"8q")?a.8o||a.8n.T:E.2I(a.3p)}},J(c,d){E.1n[c]=J(b){L a=E.2c(6,d);7(b&&1o b=="25")a=E.3e(b,a);K 6.2F(E.57(a))}});E.R({6y:"3t",8m:"6q",3o:"6o",8l:"5a",8k:"6S"},J(c,b){E.1n[c]=J(){L a=18;K 6.R(J(){Q(L i=0,M=a.M;i<M;i++)E(a[i])[b](6)})}});E.R({8j:J(a){E.1J(6,a,"");7(6.15==1)6.52(a)},8i:J(a){E.1t.1b(6,a)},8h:J(a){E.1t.1V(6,a)},8g:J(a){E.1t[E.1t.3Y(6,a)?"1V":"1b"](6,a)},1V:J(a){7(!a||E.1E(a,[6]).r.M){E("*",6).1b(6).R(J(){E.16.1V(6);E.35(6)});7(6.1a)6.1a.34(6)}},4x:J(){E(">*",6).1V();2b(6.1C)6.34(6.1C)}},J(a,b){E.1n[a]=J(){K 6.R(b,18)}});E.R(["8f","5X"],J(i,c){L b=c.2h();E.1n[b]=J(a){K 6[0]==1e?E.14.2z&&T.1h["5e"+c]||E.14.2d&&1e["8e"+c]||T.6F=="79"&&T.1F["5e"+c]||T.1h["5e"+c]:6[0]==T?24.2f(24.2f(T.1h["5d"+c],T.1F["5d"+c]),24.2f(T.1h["5L"+c],T.1F["5L"+c])):a==10?(6.M?E.1j(6[0],b):V):6.1j(b,a.1k==4e?a:a+"2S")}});L C=E.14.2d&&4s(E.14.5K)<8c?"(?:[\\\\w*4r-]|\\\\\\\\.)":"(?:[\\\\w\\8b-\\8a*4r-]|\\\\\\\\.)",6v=1B 4q("^>\\\\s*("+C+"+)"),6u=1B 4q("^("+C+"+)(#)("+C+"+)"),6s=1B 4q("^([#.]?)("+C+"*)");E.1s({6r:{"":J(a,i,m){K m[2]=="*"||E.12(a,m[2])},"#":J(a,i,m){K a.4z("2w")==m[2]},":":{89:J(a,i,m){K i<m[3]-0},88:J(a,i,m){K i>m[3]-0},2Z:J(a,i,m){K m[3]-0==i},6Z:J(a,i,m){K m[3]-0==i},3j:J(a,i){K i==0},3J:J(a,i,m,r){K i==r.M-1},6n:J(a,i){K i%2==0},6l:J(a,i){K i%2},"3j-4p":J(a){K a.1a.3S("*")[0]==a},"3J-4p":J(a){K E.2Z(a.1a.5o,1,"4t")==a},"83-4p":J(a){K!E.2Z(a.1a.5o,2,"4t")},6B:J(a){K a.1C},4x:J(a){K!a.1C},82:J(a,i,m){K(a.6x||a.81||E(a).1u()||"").1f(m[3])>=0},4d:J(a){K"1Z"!=a.U&&E.1j(a,"19")!="2H"&&E.1j(a,"4U")!="1Z"},1Z:J(a){K"1Z"==a.U||E.1j(a,"19")=="2H"||E.1j(a,"4U")=="1Z"},80:J(a){K!a.2Y},2Y:J(a){K a.2Y},3k:J(a){K a.3k},2p:J(a){K a.2p||E.1J(a,"2p")},1u:J(a){K"1u"==a.U},5u:J(a){K"5u"==a.U},5t:J(a){K"5t"==a.U},59:J(a){K"59"==a.U},3I:J(a){K"3I"==a.U},58:J(a){K"58"==a.U},6j:J(a){K"6j"==a.U},6i:J(a){K"6i"==a.U},2G:J(a){K"2G"==a.U||E.12(a,"2G")},4D:J(a){K/4D|2k|6h|2G/i.17(a.12)},3Y:J(a,i,m){K E.2s(m[3],a).M},7X:J(a){K/h\\d/i.17(a.12)},7W:J(a){K E.3y(E.3G,J(b){K a==b.Y}).M}}},6g:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1B 4q("^([:.#]*)("+C+"+)")],3e:J(a,c,b){L d,2m=[];2b(a&&a!=d){d=a;L f=E.1E(a,c,b);a=f.t.1r(/^\\s*,\\s*/,"");2m=b?c=f.r:E.37(2m,f.r)}K 2m},2s:J(t,p){7(1o t!="25")K[t];7(p&&p.15!=1&&p.15!=9)K[];p=p||T;L d=[p],2r=[],3J,12;2b(t&&3J!=t){L r=[];3J=t;t=E.3g(t);L o=S;L g=6v;L m=g.2O(t);7(m){12=m[1].2E();Q(L i=0;d[i];i++)Q(L c=d[i].1C;c;c=c.2B)7(c.15==1&&(12=="*"||c.12.2E()==12))r.1g(c);d=r;t=t.1r(g,"");7(t.1f(" ")==0)6w;o=P}N{g=/^([>+~])\\s*(\\w*)/i;7((m=g.2O(t))!=V){r=[];L l={};12=m[2].2E();m=m[1];Q(L j=0,3f=d.M;j<3f;j++){L n=m=="~"||m=="+"?d[j].2B:d[j].1C;Q(;n;n=n.2B)7(n.15==1){L h=E.O(n);7(m=="~"&&l[h])1Q;7(!12||n.12.2E()==12){7(m=="~")l[h]=P;r.1g(n)}7(m=="+")1Q}}d=r;t=E.3g(t.1r(g,""));o=P}}7(t&&!o){7(!t.1f(",")){7(p==d[0])d.4l();2r=E.37(2r,d);r=d=[p];t=" "+t.6e(1,t.M)}N{L k=6u;L m=k.2O(t);7(m){m=[0,m[2],m[3],m[1]]}N{k=6s;m=k.2O(t)}m[2]=m[2].1r(/\\\\/g,"");L f=d[d.M-1];7(m[1]=="#"&&f&&f.5J&&!E.3E(f)){L q=f.5J(m[2]);7((E.14.1d||E.14.2z)&&q&&1o q.2w=="25"&&q.2w!=m[2])q=E(\'[@2w="\'+m[2]+\'"]\',f)[0];d=r=q&&(!m[3]||E.12(q,m[3]))?[q]:[]}N{Q(L i=0;d[i];i++){L a=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];7(a=="*"&&d[i].12.2h()=="3V")a="3m";r=E.37(r,d[i].3S(a))}7(m[1]==".")r=E.55(r,m[2]);7(m[1]=="#"){L e=[];Q(L i=0;r[i];i++)7(r[i].4z("2w")==m[2]){e=[r[i]];1Q}r=e}d=r}t=t.1r(k,"")}}7(t){L b=E.1E(t,r);d=r=b.r;t=E.3g(b.t)}}7(t)d=[];7(d&&p==d[0])d.4l();2r=E.37(2r,d);K 2r},55:J(r,m,a){m=" "+m+" ";L c=[];Q(L i=0;r[i];i++){L b=(" "+r[i].1t+" ").1f(m)>=0;7(!a&&b||a&&!b)c.1g(r[i])}K c},1E:J(t,r,h){L d;2b(t&&t!=d){d=t;L p=E.6g,m;Q(L i=0;p[i];i++){m=p[i].2O(t);7(m){t=t.7V(m[0].M);m[2]=m[2].1r(/\\\\/g,"");1Q}}7(!m)1Q;7(m[1]==":"&&m[2]=="56")r=G.17(m[3])?E.1E(m[3],r,P).r:E(r).56(m[3]);N 7(m[1]==".")r=E.55(r,m[2],h);N 7(m[1]=="["){L g=[],U=m[3];Q(L i=0,3f=r.M;i<3f;i++){L a=r[i],z=a[E.46[m[2]]||m[2]];7(z==V||/6O|3Q|2p/.17(m[2]))z=E.1J(a,m[2])||\'\';7((U==""&&!!z||U=="="&&z==m[5]||U=="!="&&z!=m[5]||U=="^="&&z&&!z.1f(m[5])||U=="$="&&z.6e(z.M-m[5].M)==m[5]||(U=="*="||U=="~=")&&z.1f(m[5])>=0)^h)g.1g(a)}r=g}N 7(m[1]==":"&&m[2]=="2Z-4p"){L e={},g=[],17=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.2O(m[3]=="6n"&&"2n"||m[3]=="6l"&&"2n+1"||!/\\D/.17(m[3])&&"7U+"+m[3]||m[3]),3j=(17[1]+(17[2]||1))-0,d=17[3]-0;Q(L i=0,3f=r.M;i<3f;i++){L j=r[i],1a=j.1a,2w=E.O(1a);7(!e[2w]){L c=1;Q(L n=1a.1C;n;n=n.2B)7(n.15==1)n.4k=c++;e[2w]=P}L b=S;7(3j==0){7(j.4k==d)b=P}N 7((j.4k-d)%3j==0&&(j.4k-d)/3j>=0)b=P;7(b^h)g.1g(j)}r=g}N{L f=E.6r[m[1]];7(1o f=="3V")f=f[m[2]];7(1o f=="25")f=6c("S||J(a,i){K "+f+";}");r=E.3y(r,J(a,i){K f(a,i,m,r)},h)}}K{r:r,t:t}},4u:J(b,c){L d=[];L a=b[c];2b(a&&a!=T){7(a.15==1)d.1g(a);a=a[c]}K d},2Z:J(a,e,c,b){e=e||1;L d=0;Q(;a;a=a[c])7(a.15==1&&++d==e)1Q;K a},5i:J(n,a){L r=[];Q(;n;n=n.2B){7(n.15==1&&(!a||n!=a))r.1g(n)}K r}});E.16={1b:J(f,i,g,e){7(f.15==3||f.15==8)K;7(E.14.1d&&f.53!=10)f=1e;7(!g.2D)g.2D=6.2D++;7(e!=10){L h=g;g=J(){K h.1i(6,18)};g.O=e;g.2D=h.2D}L j=E.O(f,"2R")||E.O(f,"2R",{}),1v=E.O(f,"1v")||E.O(f,"1v",J(){L a;7(1o E=="10"||E.16.5f)K a;a=E.16.1v.1i(18.3R.Y,18);K a});1v.Y=f;E.R(i.23(/\\s+/),J(c,b){L a=b.23(".");b=a[0];g.U=a[1];L d=j[b];7(!d){d=j[b]={};7(!E.16.2y[b]||E.16.2y[b].4j.1P(f)===S){7(f.3F)f.3F(b,1v,S);N 7(f.6b)f.6b("4i"+b,1v)}}d[g.2D]=g;E.16.2a[b]=P});f=V},2D:1,2a:{},1V:J(e,h,f){7(e.15==3||e.15==8)K;L i=E.O(e,"2R"),29,4X;7(i){7(h==10||(1o h=="25"&&h.7T(0)=="."))Q(L g 1p i)6.1V(e,g+(h||""));N{7(h.U){f=h.2q;h=h.U}E.R(h.23(/\\s+/),J(b,a){L c=a.23(".");a=c[0];7(i[a]){7(f)2V i[a][f.2D];N Q(f 1p i[a])7(!c[1]||i[a][f].U==c[1])2V i[a][f];Q(29 1p i[a])1Q;7(!29){7(!E.16.2y[a]||E.16.2y[a].4h.1P(e)===S){7(e.67)e.67(a,E.O(e,"1v"),S);N 7(e.66)e.66("4i"+a,E.O(e,"1v"))}29=V;2V i[a]}}})}Q(29 1p i)1Q;7(!29){L d=E.O(e,"1v");7(d)d.Y=V;E.35(e,"2R");E.35(e,"1v")}}},1N:J(g,c,d,f,h){c=E.2I(c||[]);7(g.1f("!")>=0){g=g.2K(0,-1);L a=P}7(!d){7(6.2a[g])E("*").1b([1e,T]).1N(g,c)}N{7(d.15==3||d.15==8)K 10;L b,29,1n=E.1q(d[g]||V),16=!c[0]||!c[0].36;7(16)c.4J(6.4Z({U:g,2L:d}));c[0].U=g;7(a)c[0].65=P;7(E.1q(E.O(d,"1v")))b=E.O(d,"1v").1i(d,c);7(!1n&&d["4i"+g]&&d["4i"+g].1i(d,c)===S)b=S;7(16)c.4l();7(h&&E.1q(h)){29=h.1i(d,b==V?c:c.71(b));7(29!==10)b=29}7(1n&&f!==S&&b!==S&&!(E.12(d,\'a\')&&g=="4V")){6.5f=P;1S{d[g]()}1X(e){}}6.5f=S}K b},1v:J(c){L a;c=E.16.4Z(c||1e.16||{});L b=c.U.23(".");c.U=b[0];L f=E.O(6,"2R")&&E.O(6,"2R")[c.U],42=1M.2l.2K.1P(18,1);42.4J(c);Q(L j 1p f){L d=f[j];42[0].2q=d;42[0].O=d.O;7(!b[1]&&!c.65||d.U==b[1]){L e=d.1i(6,42);7(a!==S)a=e;7(e===S){c.36();c.44()}}}7(E.14.1d)c.2L=c.36=c.44=c.2q=c.O=V;K a},4Z:J(c){L a=c;c=E.1s({},a);c.36=J(){7(a.36)a.36();a.7S=S};c.44=J(){7(a.44)a.44();a.7R=P};7(!c.2L)c.2L=c.7Q||T;7(c.2L.15==3)c.2L=a.2L.1a;7(!c.4S&&c.5w)c.4S=c.5w==c.2L?c.7P:c.5w;7(c.64==V&&c.63!=V){L b=T.1F,1h=T.1h;c.64=c.63+(b&&b.2v||1h&&1h.2v||0)-(b.62||0);c.7N=c.7L+(b&&b.2x||1h&&1h.2x||0)-(b.60||0)}7(!c.3c&&((c.4f||c.4f===0)?c.4f:c.5Z))c.3c=c.4f||c.5Z;7(!c.7b&&c.5Y)c.7b=c.5Y;7(!c.3c&&c.2G)c.3c=(c.2G&1?1:(c.2G&2?3:(c.2G&4?2:0)));K c},2y:{21:{4j:J(){5M();K},4h:J(){K}},3C:{4j:J(){7(E.14.1d)K S;E(6).2j("4P",E.16.2y.3C.2q);K P},4h:J(){7(E.14.1d)K S;E(6).3w("4P",E.16.2y.3C.2q);K P},2q:J(a){7(I(a,6))K P;18[0].U="3C";K E.16.1v.1i(6,18)}},3B:{4j:J(){7(E.14.1d)K S;E(6).2j("4O",E.16.2y.3B.2q);K P},4h:J(){7(E.14.1d)K S;E(6).3w("4O",E.16.2y.3B.2q);K P},2q:J(a){7(I(a,6))K P;18[0].U="3B";K E.16.1v.1i(6,18)}}}};E.1n.1s({2j:J(c,a,b){K c=="4H"?6.2X(c,a,b):6.R(J(){E.16.1b(6,c,b||a,b&&a)})},2X:J(d,b,c){K 6.R(J(){E.16.1b(6,d,J(a){E(6).3w(a);K(c||b).1i(6,18)},c&&b)})},3w:J(a,b){K 6.R(J(){E.16.1V(6,a,b)})},1N:J(c,a,b){K 6.R(J(){E.16.1N(c,a,6,P,b)})},5n:J(c,a,b){7(6[0])K E.16.1N(c,a,6[0],S,b);K 10},2g:J(){L b=18;K 6.4V(J(a){6.4N=0==6.4N?1:0;a.36();K b[6.4N].1i(6,18)||S})},7D:J(a,b){K 6.2j(\'3C\',a).2j(\'3B\',b)},21:J(a){5M();7(E.2Q)a.1P(T,E);N E.3A.1g(J(){K a.1P(6,E)});K 6}});E.1s({2Q:S,3A:[],21:J(){7(!E.2Q){E.2Q=P;7(E.3A){E.R(E.3A,J(){6.1i(T)});E.3A=V}E(T).5n("21")}}});L x=S;J 5M(){7(x)K;x=P;7(T.3F&&!E.14.2z)T.3F("5W",E.21,S);7(E.14.1d&&1e==3b)(J(){7(E.2Q)K;1S{T.1F.7B("26")}1X(3a){3z(18.3R,0);K}E.21()})();7(E.14.2z)T.3F("5W",J(){7(E.2Q)K;Q(L i=0;i<T.4L.M;i++)7(T.4L[i].2Y){3z(18.3R,0);K}E.21()},S);7(E.14.2d){L a;(J(){7(E.2Q)K;7(T.39!="5V"&&T.39!="1y"){3z(18.3R,0);K}7(a===10)a=E("W, 7a[7A=7z]").M;7(T.4L.M!=a){3z(18.3R,0);K}E.21()})()}E.16.1b(1e,"3U",E.21)}E.R(("7y,7x,3U,7w,5d,4H,4V,7v,"+"7G,7u,7t,4P,4O,7s,2k,"+"58,7K,7q,7p,3a").23(","),J(i,b){E.1n[b]=J(a){K a?6.2j(b,a):6.1N(b)}});L I=J(a,c){L b=a.4S;2b(b&&b!=c)1S{b=b.1a}1X(3a){b=c}K b==c};E(1e).2j("4H",J(){E("*").1b(T).3w()});E.1n.1s({3U:J(g,d,c){7(E.1q(g))K 6.2j("3U",g);L e=g.1f(" ");7(e>=0){L i=g.2K(e,g.M);g=g.2K(0,e)}c=c||J(){};L f="4Q";7(d)7(E.1q(d)){c=d;d=V}N{d=E.3m(d);f="61"}L h=6;E.3P({1c:g,U:f,1H:"3q",O:d,1y:J(a,b){7(b=="1W"||b=="5U")h.3q(i?E("<1x/>").3t(a.4b.1r(/<1m(.|\\s)*?\\/1m>/g,"")).2s(i):a.4b);h.R(c,[a.4b,b,a])}});K 6},7n:J(){K E.3m(6.5T())},5T:J(){K 6.2c(J(){K E.12(6,"3u")?E.2I(6.7m):6}).1E(J(){K 6.31&&!6.2Y&&(6.3k||/2k|6h/i.17(6.12)||/1u|1Z|3I/i.17(6.U))}).2c(J(i,c){L b=E(6).5O();K b==V?V:b.1k==1M?E.2c(b,J(a,i){K{31:c.31,1A:a}}):{31:c.31,1A:b}}).22()}});E.R("5S,6d,5R,6D,5Q,6m".23(","),J(i,o){E.1n[o]=J(f){K 6.2j(o,f)}});L B=(1B 3v).3L();E.1s({22:J(d,b,a,c){7(E.1q(b)){a=b;b=V}K E.3P({U:"4Q",1c:d,O:b,1W:a,1H:c})},7l:J(b,a){K E.22(b,V,a,"1m")},7k:J(c,b,a){K E.22(c,b,a,"3i")},7i:J(d,b,a,c){7(E.1q(b)){a=b;b={}}K E.3P({U:"61",1c:d,O:b,1W:a,1H:c})},85:J(a){E.1s(E.4I,a)},4I:{2a:P,U:"4Q",2U:0,5P:"4o/x-7h-3u-7g",5N:P,3l:P,O:V,6p:V,3I:V,49:{3M:"4o/3M, 1u/3M",3q:"1u/3q",1m:"1u/4m, 4o/4m",3i:"4o/3i, 1u/4m",1u:"1u/a7",4G:"*/*"}},4F:{},3P:J(s){L f,2W=/=\\?(&|$)/g,1z,O;s=E.1s(P,s,E.1s(P,{},E.4I,s));7(s.O&&s.5N&&1o s.O!="25")s.O=E.3m(s.O);7(s.1H=="4E"){7(s.U.2h()=="22"){7(!s.1c.1D(2W))s.1c+=(s.1c.1D(/\\?/)?"&":"?")+(s.4E||"7d")+"=?"}N 7(!s.O||!s.O.1D(2W))s.O=(s.O?s.O+"&":"")+(s.4E||"7d")+"=?";s.1H="3i"}7(s.1H=="3i"&&(s.O&&s.O.1D(2W)||s.1c.1D(2W))){f="4E"+B++;7(s.O)s.O=(s.O+"").1r(2W,"="+f+"$1");s.1c=s.1c.1r(2W,"="+f+"$1");s.1H="1m";1e[f]=J(a){O=a;1W();1y();1e[f]=10;1S{2V 1e[f]}1X(e){}7(h)h.34(g)}}7(s.1H=="1m"&&s.1T==V)s.1T=S;7(s.1T===S&&s.U.2h()=="22"){L i=(1B 3v()).3L();L j=s.1c.1r(/(\\?|&)4r=.*?(&|$)/,"$a4="+i+"$2");s.1c=j+((j==s.1c)?(s.1c.1D(/\\?/)?"&":"?")+"4r="+i:"")}7(s.O&&s.U.2h()=="22"){s.1c+=(s.1c.1D(/\\?/)?"&":"?")+s.O;s.O=V}7(s.2a&&!E.5H++)E.16.1N("5S");7((!s.1c.1f("a3")||!s.1c.1f("//"))&&s.1H=="1m"&&s.U.2h()=="22"){L h=T.3S("6f")[0];L g=T.3s("1m");g.3Q=s.1c;7(s.7c)g.a2=s.7c;7(!f){L l=S;g.9Z=g.9Y=J(){7(!l&&(!6.39||6.39=="5V"||6.39=="1y")){l=P;1W();1y();h.34(g)}}}h.38(g);K 10}L m=S;L k=1e.78?1B 78("9X.9V"):1B 76();k.9T(s.U,s.1c,s.3l,s.6p,s.3I);1S{7(s.O)k.4C("9R-9Q",s.5P);7(s.5C)k.4C("9O-5A-9N",E.4F[s.1c]||"9L, 9K 9I 9H 5z:5z:5z 9F");k.4C("X-9C-9A","76");k.4C("9z",s.1H&&s.49[s.1H]?s.49[s.1H]+", */*":s.49.4G)}1X(e){}7(s.6Y)s.6Y(k);7(s.2a)E.16.1N("6m",[k,s]);L c=J(a){7(!m&&k&&(k.39==4||a=="2U")){m=P;7(d){6I(d);d=V}1z=a=="2U"&&"2U"||!E.6X(k)&&"3a"||s.5C&&E.6J(k,s.1c)&&"5U"||"1W";7(1z=="1W"){1S{O=E.6W(k,s.1H)}1X(e){1z="5x"}}7(1z=="1W"){L b;1S{b=k.5q("6U-5A")}1X(e){}7(s.5C&&b)E.4F[s.1c]=b;7(!f)1W()}N E.5v(s,k,1z);1y();7(s.3l)k=V}};7(s.3l){L d=53(c,13);7(s.2U>0)3z(J(){7(k){k.9t();7(!m)c("2U")}},s.2U)}1S{k.9s(s.O)}1X(e){E.5v(s,k,V,e)}7(!s.3l)c();J 1W(){7(s.1W)s.1W(O,1z);7(s.2a)E.16.1N("5Q",[k,s])}J 1y(){7(s.1y)s.1y(k,1z);7(s.2a)E.16.1N("5R",[k,s]);7(s.2a&&!--E.5H)E.16.1N("6d")}K k},5v:J(s,a,b,e){7(s.3a)s.3a(a,b,e);7(s.2a)E.16.1N("6D",[a,s,e])},5H:0,6X:J(r){1S{K!r.1z&&9q.9p=="59:"||(r.1z>=6T&&r.1z<9n)||r.1z==6R||r.1z==9l||E.14.2d&&r.1z==10}1X(e){}K S},6J:J(a,c){1S{L b=a.5q("6U-5A");K a.1z==6R||b==E.4F[c]||E.14.2d&&a.1z==10}1X(e){}K S},6W:J(r,b){L c=r.5q("9k-U");L d=b=="3M"||!b&&c&&c.1f("3M")>=0;L a=d?r.9j:r.4b;7(d&&a.1F.28=="5x")6Q"5x";7(b=="1m")E.5g(a);7(b=="3i")a=6c("("+a+")");K a},3m:J(a){L s=[];7(a.1k==1M||a.5h)E.R(a,J(){s.1g(3r(6.31)+"="+3r(6.1A))});N Q(L j 1p a)7(a[j]&&a[j].1k==1M)E.R(a[j],J(){s.1g(3r(j)+"="+3r(6))});N s.1g(3r(j)+"="+3r(a[j]));K s.6a("&").1r(/%20/g,"+")}});E.1n.1s({1G:J(c,b){K c?6.2e({1R:"1G",27:"1G",1w:"1G"},c,b):6.1E(":1Z").R(J(){6.W.19=6.5s||"";7(E.1j(6,"19")=="2H"){L a=E("<"+6.28+" />").6y("1h");6.W.19=a.1j("19");7(6.W.19=="2H")6.W.19="3D";a.1V()}}).3h()},1I:J(b,a){K b?6.2e({1R:"1I",27:"1I",1w:"1I"},b,a):6.1E(":4d").R(J(){6.5s=6.5s||E.1j(6,"19");6.W.19="2H"}).3h()},6N:E.1n.2g,2g:J(a,b){K E.1q(a)&&E.1q(b)?6.6N(a,b):a?6.2e({1R:"2g",27:"2g",1w:"2g"},a,b):6.R(J(){E(6)[E(6).3H(":1Z")?"1G":"1I"]()})},9f:J(b,a){K 6.2e({1R:"1G"},b,a)},9d:J(b,a){K 6.2e({1R:"1I"},b,a)},9c:J(b,a){K 6.2e({1R:"2g"},b,a)},9a:J(b,a){K 6.2e({1w:"1G"},b,a)},99:J(b,a){K 6.2e({1w:"1I"},b,a)},97:J(c,a,b){K 6.2e({1w:a},c,b)},2e:J(l,k,j,h){L i=E.6P(k,j,h);K 6[i.2P===S?"R":"2P"](J(){7(6.15!=1)K S;L g=E.1s({},i);L f=E(6).3H(":1Z"),4A=6;Q(L p 1p l){7(l[p]=="1I"&&f||l[p]=="1G"&&!f)K E.1q(g.1y)&&g.1y.1i(6);7(p=="1R"||p=="27"){g.19=E.1j(6,"19");g.32=6.W.32}}7(g.32!=V)6.W.32="1Z";g.40=E.1s({},l);E.R(l,J(c,a){L e=1B E.2t(4A,g,c);7(/2g|1G|1I/.17(a))e[a=="2g"?f?"1G":"1I":a](l);N{L b=a.3X().1D(/^([+-]=)?([\\d+-.]+)(.*)$/),1Y=e.2m(P)||0;7(b){L d=2M(b[2]),2A=b[3]||"2S";7(2A!="2S"){4A.W[c]=(d||1)+2A;1Y=((d||1)/e.2m(P))*1Y;4A.W[c]=1Y+2A}7(b[1])d=((b[1]=="-="?-1:1)*d)+1Y;e.45(1Y,d,2A)}N e.45(1Y,a,"")}});K P})},2P:J(a,b){7(E.1q(a)||(a&&a.1k==1M)){b=a;a="2t"}7(!a||(1o a=="25"&&!b))K A(6[0],a);K 6.R(J(){7(b.1k==1M)A(6,a,b);N{A(6,a).1g(b);7(A(6,a).M==1)b.1i(6)}})},94:J(b,c){L a=E.3G;7(b)6.2P([]);6.R(J(){Q(L i=a.M-1;i>=0;i--)7(a[i].Y==6){7(c)a[i](P);a.72(i,1)}});7(!c)6.5p();K 6}});L A=J(b,c,a){7(!b)K 10;c=c||"2t";L q=E.O(b,c+"2P");7(!q||a)q=E.O(b,c+"2P",a?E.2I(a):[]);K q};E.1n.5p=J(a){a=a||"2t";K 6.R(J(){L q=A(6,a);q.4l();7(q.M)q[0].1i(6)})};E.1s({6P:J(b,a,c){L d=b&&b.1k==92?b:{1y:c||!c&&a||E.1q(b)&&b,2u:b,3Z:c&&a||a&&a.1k!=91&&a};d.2u=(d.2u&&d.2u.1k==51?d.2u:{90:8Z,9D:6T}[d.2u])||8X;d.5y=d.1y;d.1y=J(){7(d.2P!==S)E(6).5p();7(E.1q(d.5y))d.5y.1i(6)};K d},3Z:{70:J(p,n,b,a){K b+a*p},5j:J(p,n,b,a){K((-24.8V(p*24.8U)/2)+0.5)*a+b}},3G:[],3W:V,2t:J(b,c,a){6.11=c;6.Y=b;6.1l=a;7(!c.47)c.47={}}});E.2t.2l={4y:J(){7(6.11.30)6.11.30.1i(6.Y,[6.2J,6]);(E.2t.30[6.1l]||E.2t.30.4G)(6);7(6.1l=="1R"||6.1l=="27")6.Y.W.19="3D"},2m:J(a){7(6.Y[6.1l]!=V&&6.Y.W[6.1l]==V)K 6.Y[6.1l];L r=2M(E.1j(6.Y,6.1l,a));K r&&r>-8Q?r:2M(E.2o(6.Y,6.1l))||0},45:J(c,b,d){6.5B=(1B 3v()).3L();6.1Y=c;6.3h=b;6.2A=d||6.2A||"2S";6.2J=6.1Y;6.4B=6.4w=0;6.4y();L e=6;J t(a){K e.30(a)}t.Y=6.Y;E.3G.1g(t);7(E.3W==V){E.3W=53(J(){L a=E.3G;Q(L i=0;i<a.M;i++)7(!a[i]())a.72(i--,1);7(!a.M){6I(E.3W);E.3W=V}},13)}},1G:J(){6.11.47[6.1l]=E.1J(6.Y.W,6.1l);6.11.1G=P;6.45(0,6.2m());7(6.1l=="27"||6.1l=="1R")6.Y.W[6.1l]="8N";E(6.Y).1G()},1I:J(){6.11.47[6.1l]=E.1J(6.Y.W,6.1l);6.11.1I=P;6.45(6.2m(),0)},30:J(a){L t=(1B 3v()).3L();7(a||t>6.11.2u+6.5B){6.2J=6.3h;6.4B=6.4w=1;6.4y();6.11.40[6.1l]=P;L b=P;Q(L i 1p 6.11.40)7(6.11.40[i]!==P)b=S;7(b){7(6.11.19!=V){6.Y.W.32=6.11.32;6.Y.W.19=6.11.19;7(E.1j(6.Y,"19")=="2H")6.Y.W.19="3D"}7(6.11.1I)6.Y.W.19="2H";7(6.11.1I||6.11.1G)Q(L p 1p 6.11.40)E.1J(6.Y.W,p,6.11.47[p])}7(b&&E.1q(6.11.1y))6.11.1y.1i(6.Y);K S}N{L n=t-6.5B;6.4w=n/6.11.2u;6.4B=E.3Z[6.11.3Z||(E.3Z.5j?"5j":"70")](6.4w,n,0,1,6.11.2u);6.2J=6.1Y+((6.3h-6.1Y)*6.4B);6.4y()}K P}};E.2t.30={2v:J(a){a.Y.2v=a.2J},2x:J(a){a.Y.2x=a.2J},1w:J(a){E.1J(a.Y.W,"1w",a.2J)},4G:J(a){a.Y.W[a.1l]=a.2J+a.2A}};E.1n.5L=J(){L b=0,3b=0,Y=6[0],5l;7(Y)8M(E.14){L d=Y.1a,41=Y,1K=Y.1K,1L=Y.2i,5D=2d&&4s(5K)<8J&&!/a1/i.17(v),2T=E.1j(Y,"43")=="2T";7(Y.6G){L c=Y.6G();1b(c.26+24.2f(1L.1F.2v,1L.1h.2v),c.3b+24.2f(1L.1F.2x,1L.1h.2x));1b(-1L.1F.62,-1L.1F.60)}N{1b(Y.5G,Y.5F);2b(1K){1b(1K.5G,1K.5F);7(48&&!/^t(8H|d|h)$/i.17(1K.28)||2d&&!5D)2N(1K);7(!2T&&E.1j(1K,"43")=="2T")2T=P;41=/^1h$/i.17(1K.28)?41:1K;1K=1K.1K}2b(d&&d.28&&!/^1h|3q$/i.17(d.28)){7(!/^8G|1O.*$/i.17(E.1j(d,"19")))1b(-d.2v,-d.2x);7(48&&E.1j(d,"32")!="4d")2N(d);d=d.1a}7((5D&&(2T||E.1j(41,"43")=="4W"))||(48&&E.1j(41,"43")!="4W"))1b(-1L.1h.5G,-1L.1h.5F);7(2T)1b(24.2f(1L.1F.2v,1L.1h.2v),24.2f(1L.1F.2x,1L.1h.2x))}5l={3b:3b,26:b}}J 2N(a){1b(E.2o(a,"a8",P),E.2o(a,"a9",P))}J 1b(l,t){b+=4s(l)||0;3b+=4s(t)||0}K 5l}})();',62,631,'||||||this|if||||||||||||||||||||||||||||||||||||||function|return|var|length|else|data|true|for|each|false|document|type|null|style||elem||undefined|options|nodeName||browser|nodeType|event|test|arguments|display|parentNode|add|url|msie|window|indexOf|push|body|apply|css|constructor|prop|script|fn|typeof|in|isFunction|replace|extend|className|text|handle|opacity|div|complete|status|value|new|firstChild|match|filter|documentElement|show|dataType|hide|attr|offsetParent|doc|Array|trigger|table|call|break|height|try|cache|tbody|remove|success|catch|start|hidden||ready|get|split|Math|string|left|width|tagName|ret|global|while|map|safari|animate|max|toggle|toLowerCase|ownerDocument|bind|select|prototype|cur||curCSS|selected|handler|done|find|fx|duration|scrollLeft|id|scrollTop|special|opera|unit|nextSibling|stack|guid|toUpperCase|pushStack|button|none|makeArray|now|slice|target|parseFloat|border|exec|queue|isReady|events|px|fixed|timeout|delete|jsre|one|disabled|nth|step|name|overflow|inArray|removeChild|removeData|preventDefault|merge|appendChild|readyState|error|top|which|innerHTML|multiFilter|rl|trim|end|json|first|checked|async|param|elems|insertBefore|childNodes|html|encodeURIComponent|createElement|append|form|Date|unbind|color|grep|setTimeout|readyList|mouseleave|mouseenter|block|isXMLDoc|addEventListener|timers|is|password|last|runtimeStyle|getTime|xml|jQuery|domManip|ajax|src|callee|getElementsByTagName|selectedIndex|load|object|timerId|toString|has|easing|curAnim|offsetChild|args|position|stopPropagation|custom|props|orig|mozilla|accepts|clean|responseText|defaultView|visible|String|charCode|float|teardown|on|setup|nodeIndex|shift|javascript|currentStyle|application|child|RegExp|_|parseInt|previousSibling|dir|tr|state|empty|update|getAttribute|self|pos|setRequestHeader|input|jsonp|lastModified|_default|unload|ajaxSettings|unshift|getComputedStyle|styleSheets|getPropertyValue|lastToggle|mouseout|mouseover|GET|andSelf|relatedTarget|init|visibility|click|absolute|index|container|fix|outline|Number|removeAttribute|setInterval|prevObject|classFilter|not|unique|submit|file|after|windowData|deep|scroll|client|triggered|globalEval|jquery|sibling|swing|clone|results|wrapAll|triggerHandler|lastChild|dequeue|getResponseHeader|createTextNode|oldblock|checkbox|radio|handleError|fromElement|parsererror|old|00|Modified|startTime|ifModified|safari2|getWH|offsetTop|offsetLeft|active|values|getElementById|version|offset|bindReady|processData|val|contentType|ajaxSuccess|ajaxComplete|ajaxStart|serializeArray|notmodified|loaded|DOMContentLoaded|Width|ctrlKey|keyCode|clientTop|POST|clientLeft|clientX|pageX|exclusive|detachEvent|removeEventListener|swap|cloneNode|join|attachEvent|eval|ajaxStop|substr|head|parse|textarea|reset|image|zoom|odd|ajaxSend|even|before|username|prepend|expr|quickClass|uuid|quickID|quickChild|continue|textContent|appendTo|contents|evalScript|parent|defaultValue|ajaxError|setArray|compatMode|getBoundingClientRect|styleFloat|clearInterval|httpNotModified|nodeValue|100|alpha|_toggle|href|speed|throw|304|replaceWith|200|Last|colgroup|httpData|httpSuccess|beforeSend|eq|linear|concat|splice|fieldset|multiple|cssFloat|XMLHttpRequest|webkit|ActiveXObject|CSS1Compat|link|metaKey|scriptCharset|callback|col|pixelLeft|urlencoded|www|post|hasClass|getJSON|getScript|elements|serialize|black|keyup|keypress|solid|change|mousemove|mouseup|dblclick|resize|focus|blur|stylesheet|rel|doScroll|round|hover|padding|offsetHeight|mousedown|offsetWidth|Bottom|Top|keydown|clientY|Right|pageY|Left|toElement|srcElement|cancelBubble|returnValue|charAt|0n|substring|animated|header|noConflict|line|enabled|innerText|contains|only|weight|ajaxSetup|font|size|gt|lt|uFFFF|u0128|417|Boolean|inner|Height|toggleClass|removeClass|addClass|removeAttr|replaceAll|insertAfter|prependTo|contentWindow|contentDocument|wrap|iframe|children|siblings|prevAll|nextAll|prev|wrapInner|next|parents|maxLength|maxlength|readOnly|readonly|reverse|class|htmlFor|inline|able|boxModel|522|setData|compatible|with|1px|ie|getData|10000|ra|it|rv|PI|cos|userAgent|400|navigator|600|slow|Function|Object|array|stop|ig|NaN|fadeTo|option|fadeOut|fadeIn|setAttribute|slideToggle|slideUp|changed|slideDown|be|can|property|responseXML|content|1223|getAttributeNode|300|method|protocol|location|action|send|abort|cssText|th|td|cap|specified|Accept|With|colg|Requested|fast|tfoot|GMT|thead|1970|Jan|attributes|01|Thu|leg|Since|If|opt|Type|Content|embed|open|area|XMLHTTP|hr|Microsoft|onreadystatechange|onload|meta|adobeair|charset|http|1_|img|br|plain|borderLeftWidth|borderTopWidth|abbr'.split('|'),0,{})) \ No newline at end of file
diff --git a/BSF/template-common/pngfix.js b/BSF/template-common/pngfix.js
deleted file mode 100644
index 549761a1d..000000000
--- a/BSF/template-common/pngfix.js
+++ /dev/null
@@ -1,37 +0,0 @@
-
-// Correctly handle PNG transparency in Win IE 5.5 or higher.
-// http://homepage.ntlworld.com/bobosola. Updated 02-March-2004
-// 15-Jully-2006 : chrisaga use \" instead of ' in imgTitle
-// : to fix ' display in tooltips
-// : keep the alt attribute
-
-function correctPNG()
- {
- for(var i=0; i<document.images.length; i++)
- {
- var img = document.images[i]
- if (img.className == "button" || img.className == "icon")
- {
- var imgName = img.src.toUpperCase()
- if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
- {
- var imgID = (img.id) ? "id='" + img.id + "' " : ""
- var imgClass = (img.className) ? "class='" + img.className + "' " : ""
- //var imgTitle = (img.title) ? "title=\"" + img.title + "\" " : "alt=\"" + img.alt + "\" "
- var imgTitle = (img.title) ? "title=\"" + img.title + "\" " : "";
- imgTitle = imgTitle + (img.alt) ? "title=\"" + img.alt + "\" " : "";
- var imgStyle = "display:inline-block;" + img.style.cssText
- if (img.align == "left") imgStyle = "float:left;" + imgStyle
- if (img.align == "right") imgStyle = "float:right;" + imgStyle
- if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
- var strNewHTML = "<span " + imgID + imgClass + imgTitle
- + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
- + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
- + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
- img.outerHTML = strNewHTML
- i = i-1
- }
- }
- }
- }
-window.attachEvent("onload", correctPNG);
diff --git a/BSF/template-common/scripts.js b/BSF/template-common/scripts.js
deleted file mode 100644
index 83f4815e7..000000000
--- a/BSF/template-common/scripts.js
+++ /dev/null
@@ -1,74 +0,0 @@
-function SelectAll( formulaire )
-{
-var len = formulaire.elements.length;
-var i=0;
-for( i = 0; i < len; i++)
-{
- if ( formulaire.elements[i].type=='checkbox'
- && formulaire.elements[i].name != 'copie')
- {
- formulaire.elements[i].checked = true;
- }
-}
-}
-
-function DeselectAll( formulaire )
-{
-var len = formulaire.elements.length;
-var i=0;
-for( i = 0; i < len; i++)
-{
- if ( formulaire.elements[i].type=='checkbox'
- && formulaire.elements[i].name != 'copie')
- {
- formulaire.elements[i].checked = false;
- }
-}
-}
-
-function Inverser( formulaire )
-{
-var len = formulaire.elements.length;
-var i=0;
-for( i=0; i<len; i++)
-{
- if ( formulaire.elements[i].type=='checkbox'
- && formulaire.elements[i].name != 'copie')
- {
- formulaire.elements[i].checked = !formulaire.elements[i].checked;
- }
-}
-}
-
-function phpWGOpenWindow(theURL,winName,features)
-{
- img = new Image();
- img.src = theURL;
- if (img.complete)
- {
- var width=img.width +40;
- var height=img.height +40;
- }
- else
- {
- var width=640;
- var height=480;
- img.onload = resizeWindowToFit;
- }
- newWin = window.open(theURL,winName,features+',left=2,top=1,width=' + width + ',height=' + height);
-}
-
-function resizeWindowToFit()
-{
- newWin.resizeTo( img.width+50, img.height+100);
-}
-
-function popuphelp(url)
-{
- window.open(
- url,
- 'dc_popup',
- 'alwaysRaised=yes,dependent=yes,toolbar=no,height=420,width=500,menubar=no,resizable=yes,scrollbars=yes,status=no'
- );
-}
-
diff --git a/BSF/template-common/tooltipfix.htc b/BSF/template-common/tooltipfix.htc
deleted file mode 100644
index 4ce943af1..000000000
--- a/BSF/template-common/tooltipfix.htc
+++ /dev/null
@@ -1,31 +0,0 @@
-<public:attach event="onmouseover" onevent="montrer()" />
-<public:attach event="onmouseout" onevent="cacher()" />
-
-<script langage=javascript>
-var thisImg = this;
-var thisTitle = this.title;
-var thisAlt = this.alt;
-var thisA = this.parentNode;
-var aTitle = thisA.title;
-
-function montrer()
-{
- if (aTitle)
- {
- thisAlt=thisImg.alt;
- thisImg.alt=aTitle;
- thisImg.title=aTitle;
- }
- return;
-}
-
-function cacher() {
- if (thisAlt)
- {
- thisImg.alt=thisAlt;
- thisImg.title=thisTitle;
- }
- return;
-}
-</script>
-
diff --git a/BSF/template-extension/index.php b/BSF/template-extension/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template-extension/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template-extension/yoga/index.php b/BSF/template-extension/yoga/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template-extension/yoga/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template-extension/yoga/local/README b/BSF/template-extension/yoga/local/README
deleted file mode 100644
index dc5a2132c..000000000
--- a/BSF/template-extension/yoga/local/README
+++ /dev/null
@@ -1,19 +0,0 @@
-If you want to make some template customization without building a brand new
-template, you should use this directory to store yur customized version of the
-official template files rather than editing them on place.
-Doing this, they won't be lost during the next upgrade.
-
-For example, if you want your own header file just copy
-"template/yoga/header.tpl" to this directory with whatever, but significant,
-filename you want.
-Then edit "include/page_header.php" and replace the line :
- $template->set_filenames(array('header'=>'header.tpl'));
-by
- $template->set_filenames(array('header'=>'../../template-extension/yoga/local/header.tpl'));
-Or whatever new filename you gave instead of header.tpl
-
-In future version of PWG, you probably won't have to edit the php code, but
-a parameter table instead.
-
-Feel free to ask in the forum for further assistance :
-http://forum.phpwebgallery.net/
diff --git a/BSF/template-extension/yoga/local/index.php b/BSF/template-extension/yoga/local/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template-extension/yoga/local/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/index.php b/BSF/template/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/about.tpl b/BSF/template/yoga/about.tpl
deleted file mode 100644
index 62b51839d..000000000
--- a/BSF/template/yoga/about.tpl
+++ /dev/null
@@ -1,19 +0,0 @@
-{* $Id$ *}
-<div id="content" class="content">
- <div class="titrePage">
- <ul class="categoryActions">
- <li>
- <a href="{$U_HOME}" title="{'return to homepage'|@translate}">
- <img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/>
- </a>
- </li>
- </ul>
- <h2>{'About'|@translate}</h2>
- </div>
- <ul>
- {$ABOUT_MESSAGE}
- {if isset($THEME_ABOUT) }
- <li>{$THEME_ABOUT}</li>
- {/if}
- </ul>
-</div>
diff --git a/BSF/template/yoga/admin.tpl b/BSF/template/yoga/admin.tpl
deleted file mode 100644
index 188888951..000000000
--- a/BSF/template/yoga/admin.tpl
+++ /dev/null
@@ -1,103 +0,0 @@
-{* $Id$ *}
-<div id="post-header"></div>
-<div id="menubar">
- <dl>
- <dt class="rdion">{'Links'|@translate}</dt>
- <dd>
- <ul>
- <li><a href="{$U_RETURN}">{'home'|@translate}</a></li>
- <li><a href="{$U_FAQ}">{'instructions'|@translate}</a></li>
- <li><a href="{$U_ADMIN}" title="{'hint_admin'|@translate}">{'admin'|@translate}</a></li>
- </ul>
- </dd>
- </dl>
- <dl>
- <dt class="rdion">{'config'|@translate}</dt>
- <dd>
- <ul>
- <li><a href="{$U_CONFIG_GENERAL}">{'conf_general'|@translate}</a></li>
- <li><a href="{$U_CONFIG_DISPLAY}">{'conf_display'|@translate}</a></li>
- </ul>
- </dd>
- </dl>
- <dl>
- <dt class="rdion">{'Categories'|@translate}</dt>
- <dd>
- <ul>
- <li><a href="{$U_SITE_MANAGER}">{'Site manager'|@translate}</a></li>
- <li><a href="{$U_CAT_UPDATE}">{'update'|@translate}</a><br />&nbsp;</li>
- <li><a href="{$U_CATEGORIES}">{'manage'|@translate}</a></li>
- <li><a href="{$U_MOVE}">{'Move'|@translate}</a></li>
- <li><a href="{$U_CAT_OPTIONS}">{'cat_options_title'|@translate}</a></li>
- <li><a href="{$U_PERMALINKS}">{'Permalinks'|@translate}</a></li>
- </ul>
- </dd>
- </dl>
- <dl>
- <dt class="rdion">{'Pictures'|@translate}</dt>
- <dd>
- <ul>
- <li><a href="{$U_WAITING}">{'waiting'|@translate}</a></li>
- <li><a href="{$U_THUMBNAILS}">{'thumbnails'|@translate}</a></li>
- <li><a href="{$U_RATING}">{'Rating'|@translate}</a></li>
- <li><a href="{$U_TAGS}">{'Tags'|@translate}</a></li>
- <li><a href="{$U_CADDIE}">{'Caddie'|@translate}</a></li>
- </ul>
- </dd>
- </dl>
- <dl>
- <dt class="rdion">{'identification'|@translate}</dt>
- <dd>
- <ul>
- <li><a href="{$U_USERS}">{'users'|@translate}</a></li>
- <li><a href="{$U_GROUPS}">{'groups'|@translate}</a></li>
- <li><a href="{$U_NOTIFICATION_BY_MAIL}">{'nbm_item_notification'|@translate}</a></li>
- </ul>
- </dd>
- </dl>
- <dl>
- <dt class="rdion">{'special_admin_menu'|@translate}</dt>
- <dd>
- <ul>
- <li><a href="{$U_HISTORY_STAT}">{'History'|@translate}</a></li>
- <li><a href="{$U_MAINTENANCE}">{'Maintenance'|@translate}</a></li>
- <li><a href="{$U_ADVANCED_FEATURE}">{'Advanced_features'|@translate}</a></li>
- {if isset($U_WS_CHECKER) }
- <li><a href="{$U_WS_CHECKER}">{'web_services'|@translate}</a></li>
- {/if}
- <li>
- {'Plugins'|@translate}
- <ul>
-{foreach from=$plugin_menu_items item=menu_item}
- <li><a href="{$menu_item.URL}">{$menu_item.NAME}</a></li>
-{/foreach}
- </ul>
- </li>
- </ul>
- </dd>
- </dl>
-</div> <!-- menubar -->
-
-<div id="content" class="content">
- {if isset($errors)}
- <div class="errors">
- <ul>
- {foreach from=$errors item=error}
- <li>{$error}</li>
- {/foreach}
- </ul>
- </div>
- {/if}
-
- {if isset($infos)}
- <div class="infos">
- <ul>
- {foreach from=$infos item=info}
- <li>{$info}</li>
- {/foreach}
- </ul>
- </div>
- {/if}
-
- {$ADMIN_CONTENT}
-</div>
diff --git a/BSF/template/yoga/admin/advanced_feature.tpl b/BSF/template/yoga/admin/advanced_feature.tpl
deleted file mode 100644
index 128428ba1..000000000
--- a/BSF/template/yoga/admin/advanced_feature.tpl
+++ /dev/null
@@ -1,13 +0,0 @@
-{* $Id$ *}
-<div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
- </ul>
- <h2>{'Advanced_features'|@translate}</h2>
-</div>
-
-<ul>
- {foreach from=$advanced_features item=feature}
- <li><a href="{$feature.URL}" {$TAG_INPUT_ENABLED}>{$feature.CAPTION}</a></li>
- {/foreach}
-</ul>
diff --git a/BSF/template/yoga/admin/cat_list.tpl b/BSF/template/yoga/admin/cat_list.tpl
deleted file mode 100644
index b408a5a50..000000000
--- a/BSF/template/yoga/admin/cat_list.tpl
+++ /dev/null
@@ -1,65 +0,0 @@
-{* $Id$ *}
-<h2>{'title_categories'|@translate}</h2>
-
-<h3>{$CATEGORIES_NAV}</h3>
-
-<form id="addVirtual" action="{$F_ACTION}" method="post">
- <p>
- {'cat_add'|@translate} : <input type="text" name="virtual_name" />
- <input class="submit" type="submit" value="{'Submit'|@translate}" name="submitAdd" {$TAG_INPUT_ENABLED} />
- {if count($categories)>9 }
- <a href="#EoP" class="button"><img src="{$themeconf.icon_dir}/page_end.png" class="button" alt="page_end" /></a>
- {/if}
- </p>
-</form>
-
-{if count($categories) }
-<form id="categoryOrdering" action="{$F_ACTION}" method="post">
- <p>
- <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}" {$TAG_INPUT_ENABLED} />
- <input class="submit" name="submitOrderAlphaNum" type="submit" value="{'Order alphanumerically'|@translate}" {$TAG_INPUT_ENABLED} />
- </p>
- <ul class="categoryUl">
-
- {foreach from=$categories item=category}
- <li class="categoryLi{if $category.IS_VIRTUAL} virtual_cat{/if}">
- <!-- category {$category.ID} -->
- <ul class="categoryActions">
- <li><a href="{$category.U_JUMPTO}" title="{'jump to category'|@translate}"><img src="{$themeconf.icon_dir}/category_jump-to.png" class="button" alt="{'jump to category'|@translate}" /></a></li>
- <li><a href="{$category.U_EDIT}" title="{'edit category informations'|@translate}"><img src="{$themeconf.icon_dir}/category_edit.png" class="button" alt="{'edit'|@translate}"/></a></li>
- {if isset($category.U_MANAGE_ELEMENTS) }
- <li><a href="{$category.U_MANAGE_ELEMENTS}" title="{'manage category elements'|@translate}"><img src="{$themeconf.icon_dir}/category_elements.png" class="button" alt="{'elements'|@translate}" /></a></li>
- {/if}
- <li><a href="{$category.U_CHILDREN}" title="{'manage sub-categories'|@translate}"><img src="{$themeconf.icon_dir}/category_children.png" class="button" alt="{'sub-categories'|@translate}" /></a></li>
- {if isset($category.U_MANAGE_PERMISSIONS) }
- <li><a href="{$category.U_MANAGE_PERMISSIONS}" title="{'edit category permissions'|@translate}" ><img src="{$themeconf.icon_dir}/category_permissions.png" class="button" alt="{'permissions'|@translate}" /></a></li>
- {/if}
- {if isset($category.U_DELETE) }
- <li><a href="{$category.U_DELETE}" title="{'delete category'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:javascript}');"><img src="{$themeconf.icon_dir}/category_delete.png" class="button" alt="{'delete'|@translate}" /></a></li>
- {/if}
- </ul>
-
- <p>
- <strong><a href="{$category.U_CHILDREN}" title="{'manage sub-categories'|@translate}">{$category.NAME}</a></strong>
- {if $category.IS_VIRTUAL}
- <img src="{$themeconf.icon_dir}/virt_category.png" class="button" alt="{'virtual_category'|@translate}" />
- {/if}
- </p>
-
- <p>
- <label>
- {'Position'|@translate} :
- <input type="text" size="4" name="catOrd[{$category.ID}]" maxlength="4" value="{$category.RANK}" />
- </label>
- </p>
-
- </li>
- {/foreach}
- </ul>
- <p>
- <input class="submit" name="submitOrder" type="submit" value="{'Save order'|@translate}" {$TAG_INPUT_ENABLED} />
- <input class="submit" name="submitOrderAlphaNum" type="submit" value="{'Order alphanumerically'|@translate}" {$TAG_INPUT_ENABLED} />
- </p>
-
-</form>
-{/if}
diff --git a/BSF/template/yoga/admin/cat_modify.tpl b/BSF/template/yoga/admin/cat_modify.tpl
deleted file mode 100644
index 88e07e329..000000000
--- a/BSF/template/yoga/admin/cat_modify.tpl
+++ /dev/null
@@ -1,229 +0,0 @@
-{* $Id$ *}
-<div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
- </ul>
- <h2>{'title_edit_cat'|@translate}</h2>
-</div>
-
-<h3>{$CATEGORIES_NAV}</h3>
-
-<ul class="categoryActions">
- <li><a href="{$U_JUMPTO}" title="{'jump to category'|@translate}"><img src="{$themeconf.icon_dir}/category_jump-to.png" class="button" alt="{'jump to category'|@translate}" /></a></li>
- {if isset($U_MANAGE_ELEMENTS) }
- <li><a href="{$U_MANAGE_ELEMENTS}" title="{'manage category elements'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/category_elements.png" class="button" alt="{'elements'|@translate}" /></a></li>
- {/if}
- <li><a href="{$U_CHILDREN}" title="{'manage sub-categories'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/category_children.png" class="button" alt="{'sub-categories'|@translate}" /></a></li>
- {if isset($U_MANAGE_PERMISSIONS) }
- <li><a href="{$U_MANAGE_PERMISSIONS}" title="{'edit category permissions'|@translate}" ><img src="{$ROOT_URL}{$themeconf.icon_dir}/category_permissions.png" class="button" alt="{'permissions'|@translate}" /></a></li>
- {/if}
- {if isset($U_DELETE) }
- <li><a href="{$U_DELETE}" title="{'delete category'|@translate}" onclick="return confirm('{'Are you sure?'|@translate|@escape:'javascript'}');"><img src="{$ROOT_URL}{$themeconf.icon_dir}/category_delete.png" class="button" alt="{'delete'|@translate}" /></a></li>
- {/if}
-</ul>
-
-<form action="{$F_ACTION}" method="POST" id="catModify">
-
-<fieldset>
- <legend>{'Informations'|@translate}</legend>
- <table>
-
- {if isset($CAT_FULL_DIR) }
- <tr>
- <td><strong>{'storage'|@translate}</strong></td>
- <td class="row1">{$CAT_FULL_DIR}</td>
- </tr>
- {/if}
-
- <tr>
- <td><strong>{'name'|@translate}</strong></td>
- <td>
- <input type="text" name="name" value="{$CAT_NAME}" maxlength="60"/>
- </td>
- </tr>
- <tr>
- <td><strong>{'description'|@translate}</strong></td>
- <td>
- <textarea cols="50" rows="5" name="comment" class="description">{$CAT_COMMENT}</textarea>
- </td>
- </tr>
- </table>
-</fieldset>
-
-{if isset($move_cat_options) }
-<fieldset id="move">
- <legend>{'Move'|@translate}</legend>
- {'Parent category'|@translate}
- <select class="categoryDropDown" name="parent">
- <option value="0">------------</option>
- {html_options options=$move_cat_options selected=$move_cat_options_selected }
- </select>
-</fieldset>
-{/if}
-
-<fieldset id="options">
- <legend>{'Options'|@translate}</legend>
- <table>
- <tr>
- <td><strong>{'conf_access'|@translate}</strong>
- <td>
- {html_radios name='status' values=$status_values output=$status_values|translate selected=$CAT_STATUS}
- </td>
- </tr>
- <tr>
- <td><strong>{'lock'|@translate}</strong>
- <td>
- {html_radios name='visible' values='false,true'|@explode output='No,Yes'|@explode|translate selected=$CAT_VISIBLE}
- </td>
- </tr>
- <tr>
- <td><strong>{'comments'|@translate}</strong>
- <td>
- {html_radios name='commentable' values='false,true'|@explode output='No,Yes'|@explode|translate selected=$CAT_COMMENTABLE}
- </td>
- </tr>
- {if isset($SHOW_UPLOADABLE) }
- <tr>
- <td><strong>{'editcat_uploadable'|@translate}</strong>
- <td>
- {html_radios name='uploadable' values='false,true'|@explode output='No,Yes'|@explode|translate selected=$CAT_UPLOADABLE}
- </td>
- </tr>
- {/if}
- </table>
-</fieldset>
-
-<fieldset id="image_order">
- <legend>{'Sort order'|@translate}</legend>
- <input type="checkbox" name="image_order_default" id="image_order_default" {$IMG_ORDER_DEFAULT} />
- <label for="image_order_default">{'Use default sort order'|@translate}</label>
- <br/>
- <input type="checkbox" name="image_order_subcats" id="image_order_subcats" />
- <label for="image_order_subcats">{'Apply to subcategories'|@translate}</label>
- <br/>
-
- {foreach from=$image_orders item=order}
- <select name="order_field_{$order.ID}">
- {html_options options=$image_order_field_options selected=$order.FIELD }}
- </select>
- <select name="order_direction_{$order.ID}">
- {html_options options=$image_order_direction_options selected=$order.DIRECTION }}
- </select><br/>
- {/foreach}
-
-</fieldset>
-
-<p style="text-align:center;">
- <input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" {$TAG_INPUT_ENABLED}/>
- <input class="submit" type="reset" value="{'Reset'|@translate}" name="reset" />
-</p>
-
-{if isset($representant) }
-<fieldset id="representant">
- <legend>{'Representant'|@translate}</legend>
- <table>
- <tr>
- <td align="center">
- {if isset($representant.picture) }
- <a href="{$representant.picture.URL}"><img src="{$representant.picture.SRC}" alt="" class="miniature" /></a>
- {else}
- <img src="{$ROOT_URL}{$themeconf.icon_dir}/category_representant_random.png" class="button" alt="{'Random picture'|@translate}" class="miniature" />
- {/if}
- </td>
- <td>
- {if $representant.ALLOW_SET_RANDOM }
- <p><input class="submit" type="submit" name="set_random_representant" value="{'cat_representant'|@translate}" {$TAG_INPUT_ENABLED}/></p>
- {/if}
-
- {if isset($representant.ALLOW_DELETE) }
- <p><input class="submit" type="submit" name="delete_representant" value="{'Delete Representant'|@translate}" /></p>
- {/if}
- </td>
- </tr>
- </table>
-</fieldset>
-{/if}
-
-</form>
-
-<form action="{$F_ACTION}" method="POST" id="links">
-
-<fieldset id="linkAllNew">
- <legend>{'Link all category elements to a new category'|@translate}</legend>
-
- <table>
- <tr>
- <td>{'Virtual category name'|@translate}</td>
- <td><input type="text" name="virtual_name"></td>
- </tr>
-
- <tr>
- <td>{'Parent category'|@translate}</td>
- <td>
- <select class="categoryDropDown" name="parent">
- <option value="0">------------</option>
- {html_options options=$create_new_parent_options }
- </select>
- </td>
- </tr>
- </table>
-
- <p>
- <input class="submit" type="submit" value="{'Submit'|@translate}" name="submitAdd" {$TAG_INPUT_ENABLED}/>
- <input class="submit" type="reset" value="{'Reset'|@translate}" name="reset" />
- </p>
-
-</fieldset>
-
-<fieldset id="linkAllExist">
- <legend>{'Link all category elements to some existing categories'|@translate}</legend>
-
- <table>
- <tr>
- <td>{'Categories'|@translate}</td>
- <td>
- <select class="categoryList" name="destinations[]" multiple="multiple" size="5">
- {html_options options=$category_destination_options }
- </select>
- </td>
- </tr>
- </table>
-
- <p>
- <input class="submit" type="submit" value="{'Submit'|@translate}" name="submitDestinations" {$TAG_INPUT_ENABLED}/>
- <input class="submit" type="reset" value="{'Reset'|@translate}" name="reset" />
- </p>
-
-</fieldset>
-
-{if isset($group_mail_options)}
-<fieldset id="emailCatInfo">
- <legend>{'Send an information email to group members'|@translate}</legend>
-
- <table>
- <tr>
- <td><strong>{'Group'|@translate}</strong></td>
- <td>
- <select name="group">
- {html_options options=$group_mail_options}
- </select>
- </td>
- </tr>
- <tr>
- <td><strong>{'mail_content'|@translate}</strong></td>
- <td>
- <textarea cols="50" rows="5" name="mail_content" class="description">{$MAIL_CONTENT}</textarea>
- </td>
- </tr>
-
- </table>
-
- <p>
- <input class="submit" type="submit" value="{'Submit'|@translate}" name="submitEmail" {$TAG_INPUT_ENABLED}/>
- <input class="submit" type="reset" value="{'Reset'|@translate}" name="reset" />
- </p>
-
-</fieldset>
-{/if}
-
-</form>
diff --git a/BSF/template/yoga/admin/cat_move.tpl b/BSF/template/yoga/admin/cat_move.tpl
deleted file mode 100644
index 318a025ab..000000000
--- a/BSF/template/yoga/admin/cat_move.tpl
+++ /dev/null
@@ -1,38 +0,0 @@
-{* $Id$ *}
-
-<div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
- </ul>
- <h2>{'Move categories'|@translate}</h2>
-</div>
-
-<form method="post" action="{$F_ACTION}" class="filter" id="catMove">
- <fieldset>
- <legend>{'Virtual categories movement'|@translate}</legend>
-
- <label>
- {'Virtual categories to move'|@translate}
-
- <select class="categoryList" name="selection[]" multiple="multiple">
- {html_options options=$category_to_move_options}
- </select>
- </label>
-
- <label>
- {'New parent category'|@translate}
-
- <select class="categoryDropDown" name="parent">
- <option value="0">------------</option>
- {html_options options=$category_parent_options}
- </select>
- </label>
-
- </fieldset>
-
- <p>
- <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}>
- <input class="submit" type="reset" name="reset" value="{'Reset'|@translate}">
- </p>
-
-</form>
diff --git a/BSF/template/yoga/admin/cat_options.tpl b/BSF/template/yoga/admin/cat_options.tpl
deleted file mode 100644
index f9087648a..000000000
--- a/BSF/template/yoga/admin/cat_options.tpl
+++ /dev/null
@@ -1,16 +0,0 @@
-{* $Id$ *}
-<div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
- </ul>
- <h2>{'cat_options_title'|@translate} {$TABSHEET_TITLE}</h2>
- {$TABSHEET}
-</div>
-
-<form method="post" action="{$F_ACTION}" id="cat_options">
- <fieldset>
- <legend>{$L_SECTION}</legend>
- {$DOUBLE_SELECT}
- </fieldset>
-</form>
-
diff --git a/BSF/template/yoga/admin/cat_perm.tpl b/BSF/template/yoga/admin/cat_perm.tpl
deleted file mode 100644
index 857448112..000000000
--- a/BSF/template/yoga/admin/cat_perm.tpl
+++ /dev/null
@@ -1,68 +0,0 @@
-{* $Id$ *}
-<div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
- </ul>
- <h2>{'Manage permissions for a category'|@translate}</h2>
-</div>
-
-<h3>{$CATEGORIES_NAV}</h3>
-
-<form action="{$F_ACTION}" method="post" id="categoryPermissions">
-
- <h4>{'Groups'|@translate}</h4>
-
- <fieldset>
- <legend>{'Permission granted'|@translate}</legend>
- <ul>
- {foreach from=$group_granted_ids item=id}
- <li><label><input type="checkbox" name="deny_groups[]" value="{$id}" /> {$all_groups[$id]}</label></li>
- {/foreach}
- </ul>
- <input class="submit" type="submit" name="deny_groups_submit" value="{'Deny selected groups'|@translate}" {$TAG_INPUT_ENABLED}/>
- </fieldset>
-
- <fieldset>
- <legend>{'Permission denied'|@translate}</legend>
- <ul>
- {foreach from=$group_denied_ids item=id}
- <li><label><input type="checkbox" name="grant_groups[]" value="{$id}"> {$all_groups[$id]}</label></li>
- {/foreach}
- </ul>
- <input class="submit" type="submit" name="grant_groups_submit" value="{'Grant selected groups'|@translate}" {$TAG_INPUT_ENABLED}/>
- </fieldset>
-
- <h4>{'Users'|@translate}</h4>
-
- <fieldset>
- <legend>{'Permission granted'|@translate}</legend>
- <ul>
- {foreach from=$user_granted_direct_ids item=id}
- <li><label><input type="checkbox" name="deny_users[]" value="{$id}" /> {$all_users[$id]}</label></li>
- {/foreach}
- </ul>
- <input class="submit" type="submit" name="deny_users_submit" value="{'Deny selected users'|@translate}" {$TAG_INPUT_ENABLED}/>
- </fieldset>
-
- <fieldset>
- <legend>{'Permission granted thanks to a group'|@translate}</legend>
- {if isset($user_granted_indirects) }
- <ul>
- {foreach from=$user_granted_indirects item=user_group}
- <li>{$user_group.USER} ({$user_group.GROUP})</li>
- {/foreach}
- </ul>
- {/if}
- </fieldset>
-
- <fieldset>
- <legend>{'Permission denied'|@translate}</legend>
- <ul>
- {foreach from=$user_denied_ids item=id}
- <li><label><input type="checkbox" name="grant_users[]" value="{$id}"> {$all_users[$id]}</label></li>
- {/foreach}
- </ul>
- <input class="submit" type="submit" name="grant_users_submit" value="{'Grant selected users'|@translate}" {$TAG_INPUT_ENABLED}/>
- </fieldset>
-
-</form>
diff --git a/BSF/template/yoga/admin/check_integrity.tpl b/BSF/template/yoga/admin/check_integrity.tpl
deleted file mode 100644
index 1783e69e2..000000000
--- a/BSF/template/yoga/admin/check_integrity.tpl
+++ /dev/null
@@ -1,84 +0,0 @@
-{* $Id$ *}
-<dl>
- <dt>{'c13y_title'|@translate}</dt>
- <dd>
- <ul>
- <form method="post" name="c13y" id="c13y" action="{$F_C13Y_ACTION}">
- <fieldset>
- <table class="table2">
- <tr class="throw">
- <th></th>
- <th>{'c13y_Anomaly'|@translate}</th>
- <th>{'c13y_Correction'|@translate}</th>
- </tr>
- {if isset($c13y_list)}
- {foreach from=$c13y_list item=c13y name=c13y_loop}
- <tr class="{if $smarty.foreach.c13y_loop.index is odd}row1{else}row2{/if}">
- <td>
- {if $c13y.can_select}
- <input type="checkbox" name="c13y_selection[]" value="{$c13y.id}" id="c13y_selection-{$c13y.id}" /><label for="c13y_selection-{$c13y.id}"></label>
- {/if}
- </td>
- <td><label for="c13y_selection-{$c13y.id}">{$c13y.anomaly}</label></td>
- <td>
- <label for="c13y_selection-{$c13y.id}">
- {if $c13y.show_ignore_msg}
- {'c13y_ignore_msg1'|@translate}
- <br />
- {'c13y_ignore_msg2'|@translate}
- {/if}
- {if $c13y.show_correction_fct}
- {'c13y_Automatic_correction'|@translate}
- {/if}
- {if $c13y.show_correction_bad_fct}
- {'c13y_Impossible_automatic_correction'|@translate}
- {/if}
- {if $c13y.show_correction_success_fct}
- {'c13y_Correction_applied_success'|@translate}
- {/if}
- {if !empty($c13y.correction_error_fct)}
- {'c13y_Correction_applied_error'|@translate}
- <br />
- {$c13y.c13y.correction_error_fct}
- {/if}
- {if !empty($c13y.correction_msg)}
- {if $c13y.show_correction_success_fct or !empty($c13y.correction_error_fct) or $c13y.show_correction_fct or $c13y.show_correction_bad_fct }
- <br />
- {/if}
- {$c13y.correction_msg|@nl2br}
- {/if}
- </label>
- </td>
- </tr>
- {/foreach}
- {/if}
- </table>
-
- <p>
- {if $c13y_show_submit_ignore}
- <a href="#" onclick="SelectAll(document.getElementById('c13y')); return false;">{'Check all'|@translate}</a>
- / <a href="#" onclick="DeselectAll(document.getElementById('c13y')); return false;">{'Uncheck all'|@translate}</a>
- {/if}
- {if isset($c13y_do_check)}
- / <a href="#" onclick="DeselectAll(document.getElementById('c13y'));
- {foreach from=$c13y_do_check item=ID}
- document.getElementById('c13y_selection-{$ID}').checked = true;
- {/foreach}
- return false;">{'c13y_check_auto'|@translate}</a>
- {/if}
- </p>
-
- <p>
- {if $c13y_show_submit_automatic_correction}
- <input class="submit" type="submit" value="{'c13y_submit_correction'|@translate}" name="c13y_submit_correction" {$TAG_INPUT_ENABLED} />
- {/if}
- {if $c13y_show_submit_ignore}
- <input class="submit" type="submit" value="{'c13y_submit_ignore'|@translate}" name="c13y_submit_ignore" {$TAG_INPUT_ENABLED} />
- {/if}
- <input class="submit" type="submit" value="{'c13y_submit_refresh'|@translate}" name="c13y_submit_refresh" />
- </p>
-
- </fieldset>
- </form>
- </ul>
- </dd>
diff --git a/BSF/template/yoga/admin/comments.tpl b/BSF/template/yoga/admin/comments.tpl
deleted file mode 100644
index 84b1677c6..000000000
--- a/BSF/template/yoga/admin/comments.tpl
+++ /dev/null
@@ -1,33 +0,0 @@
-{* $Id$ *}
-<div class="titrePage">
- <h2>{'waiting'|@translate} {$TABSHEET_TITLE}</h2>
- {$TABSHEET}
-</div>
-
-<h3>{'User comments validation'|@translate}</h3>
-
-{if !empty($comments) }
-<form method="post" action="{$F_ACTION}">
-
- {foreach from=$comments item=comment}
- <div class="comment">
- <a class="illustration" href="{$comment.U_PICTURE}"><img src="{$comment.TN_SRC}" /></a>
- <p class="commentHeader"><strong>{$comment.AUTHOR}</strong> - <em>{$comment.DATE}</em></p>
- <blockquote>{$comment.CONTENT}</blockquote>
- <ul class="actions">
- <li><label><input type="radio" name="action-{$comment.ID}" value="reject" />{'Reject'|@translate}</label></li>
- <li><label><input type="radio" name="action-{$comment.ID}" value="validate" />{'Validate'|@translate}</label></li>
- </ul>
- </div>
- {/foreach}
-
- <p class="bottomButtons">
- <input type="hidden" name="list" value="{$LIST}" />
- <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}/>
- <input class="submit" type="submit" name="validate-all" value="{'Validate All'|@translate}" {$TAG_INPUT_ENABLED}/>
- <input class="submit" type="submit" name="reject-all" value="{'Reject All'|@translate}" {$TAG_INPUT_ENABLED}/>
- <input class="submit" type="reset" value="{'Reset'|@translate}" />
- </p>
-
-</form>
-{/if} \ No newline at end of file
diff --git a/BSF/template/yoga/admin/configuration.tpl b/BSF/template/yoga/admin/configuration.tpl
deleted file mode 100644
index 04d8c7855..000000000
--- a/BSF/template/yoga/admin/configuration.tpl
+++ /dev/null
@@ -1,179 +0,0 @@
-{* $Id$ *}
-<div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
- </ul>
- <h2>{'title_configuration'|@translate} {$TABSHEET_TITLE}</h2>
- {$TABSHEET}
-</div>
-
-<form method="post" action="{$F_ACTION}" class="properties">
-
-{if isset($main)}
-<fieldset id="mainConf">
- <ul>
- <li>
- <span class="property">
- <label for="gallery_title">{'Gallery title'|@translate}</label>
- </span>
- <input type="text" maxlength="255" size="50" name="gallery_title" id="gallery_title" value="{$main.CONF_GALLERY_TITLE}" />
- </li>
-
- <li>
- <span class="property">
- <label for="page_banner">{'Page banner'|@translate}</label>
- </span>
- <textarea class="description" name="page_banner" id="page_banner">{$main.CONF_PAGE_BANNER}</textarea>
- </li>
-
- <li>
- <span class="property">
- <label for="gallery_url">{'Gallery URL'|@translate}</label>
- </span>
- <input type="text" maxlength="255" size="50" name="gallery_url" id="gallery_url" value="{$main.CONF_GALLERY_URL}" />
- </li>
- </ul>
-</fieldset>
-
-<fieldset id="mainConfCheck">
- <ul>
-
- <li>
- <label>
- <span class="property">{'Lock gallery'|@translate}</span>
- <input type="checkbox" name="gallery_locked" {if ($main.gallery_locked)}checked="checked"{/if} />
- </label>
- </li>
-
- <li>
- <label>
- <span class="property">{'Rating'|@translate}</span>
- <input type="checkbox" name="rate" {if ($main.rate)}checked="checked"{/if} />
- </label>
- </li>
-
- <li>
- <label>
- <span class="property">{'Rating by guests'|@translate}</span>
- <input type="checkbox" name="rate_anonymous" {if ($main.rate_anonymous)}checked="checked"{/if} />
- </label>
- </li>
-
- <li>
- <label>
- <span class="property">{'Allow user registration'|@translate}</span>
- <input type="checkbox" name="allow_user_registration" {if ($main.allow_user_registration)}checked="checked"{/if} />
- </label>
- </li>
-
- <li>
- <label>
- <span class="property">{'obligatory_user_mail_address'|@translate}</span>
- <input type="checkbox" name="obligatory_user_mail_address" {if ($main.obligatory_user_mail_address)}checked="checked"{/if} />
- </label>
- </li>
-
- <li>
- <label>
- <span class="property">{'Email administrators when a new user registers'|@translate}</span>
- <input type="checkbox" name="email_admin_on_new_user" {if ($main.email_admin_on_new_user)}checked="checked"{/if} />
- </label>
- </li>
- </ul>
-</fieldset>
-{/if}
-
-{if isset($history)}
-<fieldset id="historyConf">
- <ul>
- <li>
- <label><span class="property">{'conf_history_guest'|@translate}</span><input type="checkbox" name="history_guest" {if ($history.history_guest)}checked="checked"{/if} /></label>
- </li>
-
- <li>
- <label><span class="property">{'conf_history_user'|@translate}</span><input type="checkbox" name="log" {if ($history.log)}checked="checked"{/if} /></label>
- </li>
-
- <li>
- <label><span class="property">{'conf_history_admin'|@translate}</span><input type="checkbox" name="history_admin" {if ($history.history_admin)}checked="checked"{/if} /></label>
- </li>
- </ul>
-</fieldset>
-{/if}
-
-
-{if isset($comments)}
-<fieldset id="commentsConf">
- <ul>
- <li>
- <label>
- <span class="property">{'Comments for all'|@translate}</span>
- <input type="checkbox" name="comments_forall" {if ($comments.comments_forall)}checked="checked"{/if} />
- </label>
- </li>
-
- <li>
- <span class="property">
- <label for="nb_comment_page">{'Number of comments per page'|@translate}</label>
- </span>
- <input type="text" size="3" maxlength="4" name="nb_comment_page" id="nb_comment_page" value="{$comments.NB_COMMENTS_PAGE}" />
- </li>
-
- <li>
- <label>
- <span class="property">{'Validation'|@translate}</span>
- <input type="checkbox" name="comments_validation" {if ($comments.comments_validation)}checked="checked"{/if} />
- </label>
- </li>
-
-
- <li>
- <label>
- <span class="property">{'Email administrators when a valid comment is entered'|@translate}</span>
- <input type="checkbox" name="email_admin_on_comment" {if ($comments.email_admin_on_comment)}checked="checked"{/if} />
- </label>
- </li>
-
- <li>
- <label>
- <span class="property">{'Email administrators when a comment requires validation'|@translate}</span>
- <input type="checkbox" name="email_admin_on_comment_validation" {if ($comments.email_admin_on_comment_validation)}checked="checked"{/if} />
- </label>
- </li>
-
- </ul>
-</fieldset>
-{/if}
-
-{if isset($upload)}
-<fieldset id="uploadConf">
- <ul>
- <li>
- <label><span class="property">{'Show upload link every time'|@translate}</span>
- <input type="checkbox" name="upload_link_everytime" {if ($upload.upload_link_everytime)}checked="checked"{/if} /></label>
- </li>
- <li>
- <label><span class="property">{'User access level to upload'|@translate}</span>
- {html_options name="upload_user_access" options=$upload.upload_user_access_options selected=$upload.upload_user_access_options_selected}
- </li>
- <li>
- <label>
- <span class="property">{'Email administrators when a picture is uploaded'|@translate}</span>
- <input type="checkbox" name="email_admin_on_picture_uploaded" {if ($upload.email_admin_on_picture_uploaded)}checked="checked"{/if} />
- </label>
- </li>
- </ul>
-</fieldset>
-{/if}
-
-{if isset($default)}
-{$PROFILE_CONTENT}
-{/if}
-
-{if !isset($default)}
- <p>
- <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}>
- <input class="submit" type="reset" name="reset" value="{'Reset'|@translate}">
- </p>
-{/if}
-</form>
diff --git a/BSF/template/yoga/admin/default-layout.css b/BSF/template/yoga/admin/default-layout.css
deleted file mode 100644
index 45e352606..000000000
--- a/BSF/template/yoga/admin/default-layout.css
+++ /dev/null
@@ -1,245 +0,0 @@
-/* $Id: */
-BODY#theAdminPage #theHeader P {
- display: none;
-}
-
-/* History tables */
-TABLE.table2 {
- border: 1px solid black;
- margin: 1em auto;
- padding: 0;
-}
-
-TABLE.table2 TD, TABLE.table2 TH {
- padding: 0 0.8em;
-}
-
-TABLE.table2 TR {
- text-align: left;
-}
-
-TABLE.table2 TR.throw {
- text-align: center;
-}
-
-.hour {
- white-space: pre;
-}
-
-.number {
- text-align: right;
-}
-
-TABLE#dailyStats {
- width: 60%;
-}
-
-TABLE#detailedStats {
- width: 99%;
-}
-
-/* categoryOrdering */
-SELECT.categoryList {
- width: 100%;
-}
-
-FORM#categoryOrdering {
- padding-left: 1em; /* same as FIELDSET margin (there is no fieldset in this form) */
- padding-right: 1em; /* same as FIELDSET margin (there is no fieldset in this form) */
-}
-FORM#categoryOrdering p {
- text-align: left;
- margin-top: 1em;
- margin-bottom: 1em;
-}
-UL.categoryUl {
- list-style: none;
- padding: 0;
- margin: 0;
-}
-
-LI.categoryLi {
- border: 1px solid gray;
- padding: 0px 5px;
- margin-bottom: 5px;
-}
-
-FORM#categoryOrdering UL.categoryActions {
- float: right;
- margin-top: 5px;
-}
-/* */
-
-FORM#catModify TABLE { width: auto; }
-
-FIELDSET.elementEdit A {
- display: block;
- float: right;
-}
-
-TABLE.doubleSelect {
- text-align: center;
- margin: 0 auto;
- width: 100%;
-}
-
-TABLE.doubleSelect TD {
- padding: 0 5px;
- width: 50%;
-}
-
-TABLE.doubleSelect SELECT.categoryList {
- width: 100%;
-}
-
-FORM#categoryPermissions LI {
- display:inline;
- white-space: nowrap;
-}
-
-FIELDSET#mainConfCheck SPAN.property,
-FIELDSET#historyConf SPAN.property,
-FIELDSET#commentsConf SPAN.property,
-FIELDSET#uploadConf SPAN.property {
- float: right;
- text-align: left;
-}
-FIELDSET#mainConfCheck INPUT,
-FIELDSET#historyConf INPUT,
-FIELDSET#commentsConf INPUT,
-FIELDSET#uploadConf INPUT {
- float: none;
-}
-
-FIELDSET#mainConf SPAN.property {
- width: 25%;
-}
-FIELDSET#mainConf TEXTAREA.description {
- width: 70%;
-}
-
-FIELDSET#mainConfCheck SPAN.property,
-FIELDSET#historyConf SPAN.property {
- width: 90%;
-}
-FIELDSET#mainConfCheck INPUT,
-FIELDSET#historyConf INPUT,
-FIELDSET#commentsConf INPUT,
-FIELDSET#uploadConf SELECT,
-FIELDSET#uploadConf INPUT {
- margin-left: 5%;
-}
-
-FIELDSET#commentsConf SPAN.property {
- width: 85%;
-}
-
-FIELDSET#uploadConf SPAN.property {
- width: 75%;
-}
-
-/* PWG Links Menu is fixed Graphic charts */
-.pwgmenu {
- display: table;
- list-style-type: none;
- list-style-image: none; /* for firefox */
- white-space: nowrap;
- position: relative;
- text-decoration : none;
- font-family: verdana, arial, helvetica, sans-serif;
- font-size: 70%;
- line-height: 1.1em;
- width: 66em;
- margin: 1px 8px 1px auto;
- padding: 3px;
- background: transparent;
-}
-.pwgmenu li {
- float: left;
- width: 10em !important;
- text-align: center;
- margin: 0 6px;
- padding: 0;
-
-}
-.pwgmenu a {
- width: 9em !important;
- display: block;
- padding: 4px 8px;
- background: #69c; /* PWG Graphic charts */
- color: white;
- text-align: center;
- text-decoration: none;
- font-weight: bold;
- border: 1px solid #fff; /* Why bordered? in case of #69c background */
-}
-.pwgmenu a:hover {
- background: #f92;
- color: white;
-} /* PWG Graphic charts */
-
-
-.statBar {
- height: 10px;
- background-color: #66f;
- border: 1px solid black;
-}
-
-/* Tabsheet */
-UL.tabsheet {
- list-style: none;
- white-space: nowrap;
- text-decoration: none;
- border-bottom: 1px solid #fff;
- margin-left: 5px; margin-right: 5px;
- padding: 3px 5px;
-}
-
-UL.tabsheet LI {
- display: inline;
- margin: 0px 6px;
- font-size: 120%;
- font-weight: normal;
- border: 1px solid #fff;
- border-bottom: none;
- padding: 3px 2em;
-}
-
-UL.tabsheet LI.selected_tab {
- font-weight: bold;
- position: relative;
- top: 1px;
- padding-top: 4px;
-}
-
-.over{
-position: relative;
-z-index: 0;
-}
-
-.over:hover{
-background-color: transparent;
-z-index: 50;
-}
-
-.over span{ /*CSS for enlarged image*/
-position: absolute;
-background-color: #eee;
-padding: 5px;
-left: -1000px;
-border: 1px solid #69c;
-visibility: hidden;
-color: black;
-text-decoration: none;
-}
-
-.over span img{ /*CSS for enlarged image*/
-border-width: 0;
-padding: 2px;
-}
-
-.over:hover span{ /*CSS for enlarged image on hover*/
-visibility: visible;
-top: 0;
-left: 60px; /*position where enlarged image should offset horizontally */
-}
diff --git a/BSF/template/yoga/admin/double_select.tpl b/BSF/template/yoga/admin/double_select.tpl
deleted file mode 100644
index aeed8500a..000000000
--- a/BSF/template/yoga/admin/double_select.tpl
+++ /dev/null
@@ -1,20 +0,0 @@
-{* $Id$ *}
-<table class="doubleSelect">
- <tr>
- <td>
- <h3>{$L_CAT_OPTIONS_TRUE}</h3>
- <select class="categoryList" name="cat_true[]" multiple="multiple" size="30">
- {html_options options=$category_option_true selected=$category_option_true_selected}
- </select>
- <p><input class="submit" type="submit" value="&raquo;" name="falsify" style="font-size:15px;" {$TAG_INPUT_ENABLED}/></p>
- </td>
-
- <td>
- <h3>{$L_CAT_OPTIONS_FALSE}</h3>
- <select class="categoryList" name="cat_false[]" multiple="multiple" size="30">
- {html_options options=$category_option_false selected=$category_option_false_selected}
- </select>
- <p><input class="submit" type="submit" value="&laquo;" name="trueify" style="font-size:15px;" {$TAG_INPUT_ENABLED}/></p>
- </td>
- </tr>
-</table>
diff --git a/BSF/template/yoga/admin/element_set_global.tpl b/BSF/template/yoga/admin/element_set_global.tpl
deleted file mode 100644
index fc5a92e70..000000000
--- a/BSF/template/yoga/admin/element_set_global.tpl
+++ /dev/null
@@ -1,190 +0,0 @@
-{* $Id$ *}
-
-<h2>{'Batch management'|@translate}</h2>
-
-<h3>{$CATEGORIES_NAV}</h3>
-
-{if !empty($thumbnails)}
- <p style="text-align:center;">
- {'global mode'|@translate}
- | <a href="{$U_UNIT_MODE}">{'unit mode'|@translate}</a>
- </p>
-
- <fieldset>
-
- <legend>{'Display options'|@translate}</legend>
-
- <p>{'elements per page'|@translate}:
- <a href="{$U_DISPLAY}&amp;display=20">20</a>
- | <a href="{$U_DISPLAY}&amp;display=50">50</a>
- | <a href="{$U_DISPLAY}&amp;display=100">100</a>
- | <a href="{$U_DISPLAY}&amp;display=all">{'all'|@translate}</a>
- </p>
-
- </fieldset>
-
- <form action="{$F_ACTION}" method="post">
-
- <fieldset>
-
- <legend>{'Elements'|@translate}</legend>
-
- {if !empty($NAV_BAR)}<div class="navigationBar">{$NAV_BAR}</div>{/if}
-
- {if !empty($thumbnails)}
- <ul class="thumbnails">
- {foreach from=$thumbnails item=thumbnail}
- <li><span class="wrap1">
- <label>
- <span class="wrap2">
- {if $thumbnail.LEVEL > 0}
- <em class="levelIndicatorB">{$thumbnail.LEVEL}</em>
- <em class="levelIndicatorF" title="{$pwg->l10n($pwg->sprintf('Level %d',$thumbnail.LEVEL))}">{$thumbnail.LEVEL}</em>
- {/if}
- <span>
- <img src="{$thumbnail.TN_SRC}"
- alt="{$thumbnail.FILE}"
- title="{$thumbnail.TITLE}"
- class="thumbnail" />
- </span></span>
- <input type="checkbox" name="selection[]" value="{$thumbnail.ID}" />
- </label>
- </span>
- </li>
- {/foreach}
- </ul>
- {/if}
-
- </fieldset>
-
- <fieldset>
-
- <legend>{'Form'|@translate}</legend>
-
- <table>
-
- <tr>
- <td>{'associate to category'|@translate}</td>
- <td>
- <select style="width:400px" name="associate" size="1">
- <option value="0">------------</option>
- {html_options options=$associate_options }
- </select>
- </td>
- </tr>
-
- <tr>
- <td>{'dissociate from category'|@translate}</td>
- <td>
- <select style="width:400px" name="dissociate" size="1">
- <option value="0">------------</option>
- {if !empty($dissociate_options)}{html_options options=$dissociate_options }{/if}
- </select>
- </td>
- </tr>
-
- <tr>
- <td>{'add tags'|@translate}</td>
- <td>{if !empty($ADD_TAG_SELECTION)}{$ADD_TAG_SELECTION}{else}<p>{'No tag defined. Use Administration>Pictures>Tags'|@translate}</p>{/if}</td>
- </tr>
-
- {if !empty($DEL_TAG_SELECTION)}
- <tr>
- <td>{'remove tags'|@translate}</td>
- <td>{$DEL_TAG_SELECTION}</td>
- </tr>
- {/if}
-
- <tr>
- <td>{'Author'|@translate}</td>
- <td>
- <label><input type="radio" name="author_action" value="leave" checked="checked" /> {'leave'|@translate}</label>
- <label><input type="radio" name="author_action" value="unset" /> {'unset'|@translate}</label>
- <label><input type="radio" name="author_action" value="set" id="author_action_set" /> {'set to'|@translate}</label>
- <input onchange="document.getElementById('author_action_set').checked = true;" type="text" name="author" value="" />
- </td>
- </tr>
-
- <tr>
- <td>{'title'|@translate}</td>
- <td>
- <label><input type="radio" name="name_action" value="leave" checked="checked" /> {'leave'|@translate}</label>
- <label><input type="radio" name="name_action" value="unset" /> {'unset'|@translate}</label>
- <label><input type="radio" name="name_action" value="set" id="name_action_set" /> {'set to'|@translate}</label>
- <input onchange="document.getElementById('name_action_set').checked = true;" type="text" name="name" value="" />
- </td>
- </tr>
-
- <tr>
- <td>{'Creation date'|@translate}</td>
- <td>
- <label><input type="radio" name="date_creation_action" value="leave" checked="checked" /> {'leave'|@translate}</label>
- <label><input type="radio" name="date_creation_action" value="unset" /> {'unset'|@translate}</label>
- <label><input type="radio" name="date_creation_action" value="set" id="date_creation_action_set" /> {'set to'|@translate}</label>
- <select onchange="document.getElementById('date_creation_action_set').checked = true;" name="date_creation_day">
- <option value="0">--</option>
- {section name=day start=1 loop=32}
- <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$DATE_CREATION_DAY}selected="selected"{/if}>{$smarty.section.day.index}</option>
- {/section}
- </select>
- <select onchange="document.getElementById('date_creation_action_set').checked = true;" name="date_creation_month">
- {html_options options=$month_list selected=$DATE_CREATION_MONTH}
- </select>
- <input onchange="document.getElementById('date_creation_action_set').checked = true;"
- name="date_creation_year"
- type="text"
- size="4"
- maxlength="4"
- value="{$DATE_CREATION_YEAR}" />
- </td>
- </tr>
-
- <tr>
- <td>{'Minimum privacy level'|@translate}</td>
- <td>
- <label><input type="radio" name="level_action" value="leave" checked="checked" />{'leave'|@translate}</label>
- <label><input type="radio" name="level_action" value="set" id="level_action_set" />{'set to'|@translate}</label>
- <select onchange="document.getElementById('level_action_set').checked = true;" name="level" size="1">
- {html_options options=$level_options}
- </select>
- </td>
- </tr>
-
- </table>
-
- <p>
- {'target'|@translate}
- <label><input type="radio" name="target" value="all" /> {'all'|@translate}</label>
- <label><input type="radio" name="target" value="selection" checked="checked" /> {'selection'|@translate}</label>
- </p>
-
-
- <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" {$TAG_INPUT_ENABLED}/></p>
-
- </fieldset>
-
- <fieldset>
-
- <legend>{'Caddie management'|@translate}</legend>
-
- <ul style="list-style-type:none;">
- {if ($IN_CADDIE)}
- <li><label><input type="radio" name="caddie_action" value="empty_all" /> {'Empty caddie'|@translate}</label></li>
- <li><label><input type="radio" name="caddie_action" value="empty_selected" /> {'Take selected elements out of caddie'|@translate}</label></li>
- {else}
- <li><label><input type="radio" name="caddie_action" value="add_selected" /> {'Add selected elements to caddie'|@translate}</label></li>
- {/if}
-
- <li><label><input type="radio" name="caddie_action" value="export" /> {'Export data'|@translate}</label></li>
-
- </ul>
-
- <p><input class="submit" type="submit" value="{'Submit'|@translate}" name="submit_caddie" /></p>
-
- </fieldset>
-
- </form>
-
-{else}
- <div class="infos"><p>{'Caddie is currently empty'|@translate}</p></div>
-{/if}
diff --git a/BSF/template/yoga/admin/element_set_unit.tpl b/BSF/template/yoga/admin/element_set_unit.tpl
deleted file mode 100644
index 34366fada..000000000
--- a/BSF/template/yoga/admin/element_set_unit.tpl
+++ /dev/null
@@ -1,93 +0,0 @@
-{* $Id$ *}
-
-<h2>{'Batch management'|@translate}</h2>
-
-<h3>{$CATEGORIES_NAV}</h3>
-
-<p style="text-align:center;">
- <a href="{$U_GLOBAL_MODE}">{'global mode'|@translate}</a>
- | {'unit mode'|@translate}
-</p>
-
-<form action="{$F_ACTION}" method="POST">
-<fieldset>
- <legend>{'Display options'|@translate}</legend>
- <p>{'elements per page'|@translate} :
- <a href="{$U_ELEMENTS_PAGE}&amp;display=5">5</a>
- | <a href="{$U_ELEMENTS_PAGE}&amp;display=10">10</a>
- | <a href="{$U_ELEMENTS_PAGE}&amp;display=50">50</a>
- | <a href="{$U_ELEMENTS_PAGE}&amp;display=all">{'all'|@translate}</a>
- </p>
-
-</fieldset>
-
-{if !empty($NAV_BAR) }
-<div class="navigationBar">{$NAV_BAR}</div>
-{/if}
-
-{if !empty($elements) }
-<input type="hidden" name="element_ids" value="{$ELEMENT_IDS}" />
-{foreach from=$elements item=element}
-<fieldset class="elementEdit">
- <legend>{$element.LEGEND}</legend>
-
- <a href="{$element.U_EDIT}"><img src="{$element.TN_SRC}" alt="" title="{'Edit all picture informations'|@translate}" /></a>
-
- <table>
-
- <tr>
- <td><strong>{'Name'|@translate}</strong></td>
- <td><input type="text" name="name-{$element.ID}" value="{$element.NAME}" /></td>
- </tr>
-
- <tr>
- <td><strong>{'Author'|@translate}</strong></td>
- <td><input type="text" name="author-{$element.ID}" value="{$element.AUTHOR}" /></td>
- </tr>
-
- <tr>
- <td><strong>{'Creation date'|@translate}</strong></td>
- <td>
- <label><input type="radio" name="date_creation_action-{$element.ID}" value="unset" /> {'unset'|@translate}</label>
- <label><input type="radio" name="date_creation_action-{$element.ID}" value="set" id="date_creation_action_set-{$element.ID}" /> {'set to'|@translate}</label>
-
- <select onmousedown="document.getElementById('date_creation_action_set-{$element.ID}').checked = true;" name="date_creation_day-{$element.ID}">
- <option value="0">--</option>
- {section name=day start=1 loop=32}
- <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$element.DATE_CREATION_DAY}selected="selected"{/if}>{$smarty.section.day.index}</option>
- {/section}
- </select>
- <select onmousedown="document.getElementById('date_creation_action_set-{$element.ID}').checked = true;" name="date_creation_month-{$element.ID}">
- {html_options options=$month_list selected=$element.DATE_CREATION_MONTH}
- </select>
- <input onmousedown="document.getElementById('date_creation_action_set-{$element.ID}').checked = true;"
- name="date_creation_year-{$element.ID}"
- type="text"
- size="4"
- maxlength="4"
- value="{$element.DATE_CREATION_YEAR}" />
- </td>
- </tr>
-
- <tr>
- <td><strong>{'Tags'|@translate}</strong></td>
- <td>{$element.TAG_SELECTION}</td>
- </tr>
-
- <tr>
- <td><strong>{'Description'|@translate}</strong></td>
- <td><textarea name="description-{$element.ID}" class="description">{$element.DESCRIPTION}</textarea></td>
- </tr>
-
- </table>
-
-</fieldset>
-{/foreach}
-
-<p>
- <input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" {$TAG_INPUT_ENABLED}/>
- <input class="submit" type="reset" value="{'Reset'|@translate}" />
-</p>
-{/if}
-
-</form>
diff --git a/BSF/template/yoga/admin/group_list.tpl b/BSF/template/yoga/admin/group_list.tpl
deleted file mode 100644
index 274445f4b..000000000
--- a/BSF/template/yoga/admin/group_list.tpl
+++ /dev/null
@@ -1,46 +0,0 @@
-{* $Id$ *}
-<div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
- </ul>
- <h2>{'title_groups'|@translate}</h2>
-</div>
-
-<form method="post" name="add_user" action="{$F_ADD_ACTION}" class="properties">
- <fieldset>
- <legend>{'Add group'|@translate}</legend>
-
- <span class="property">
- <label for="groupname">{'Group name'|@translate}</label>
- </span>
- <input type="text" id="groupname" name="groupname" maxlength="50" size="20" />
-
- <p>
- <input class="submit" type="submit" name="submit_add" value="{'Add'|@translate}" {$TAG_INPUT_ENABLED}/>
- </p>
- </fieldset>
-</form>
-
-<table class="table2">
- <tr class="throw">
- <th>{'Group name'|@translate}</th>
- <th>{'Members'|@translate}</th>
- <th>{'Actions'|@translate}</th>
- </tr>
- {if not empty($groups)}
- {foreach from=$groups item=group name=group_loop}
- <tr class="{if $smarty.foreach.group_loop.index is odd}row1{else}row2{/if}">
- <td>{$group.NAME}<i><small>{$group.IS_DEFAULT}</small></i></td>
- <td><a href="{$group.U_MEMBERS}">{$group.MEMBERS}</a></td>
- <td style="text-align:center;">
- <a href="{$group.U_PERM}">
- <img src="{$ROOT_URL}{$themeconf.icon_dir}/permissions.png" class="button" style="border:none" id="btn_permissions" alt="{'permissions'|@translate}" title="{'permissions'|@translate}" /></a>
- <a href="{$group.U_DELETE}" onclick="return confirm( document.getElementById('btn_delete').title + '\n\n' + '{'Are you sure?'|@translate|@escape:'javascript'}');">
- <img src="{$ROOT_URL}{$themeconf.icon_dir}/delete.png" class="button" style="border:none" id="btn_delete" alt="{'delete'|@translate}" title="{'delete'|@translate}" {$TAG_INPUT_ENABLED}/></a>
- <a href="{$group.U_ISDEFAULT}" onclick="return confirm( document.getElementById('btn_toggle_is_default_group').title + '\n\n' + '{'Are you sure?'|@translate|@escape:'javascript'}');">
- <img src="{$ROOT_URL}{$themeconf.icon_dir}/toggle_is_default_group.png" class="button" style="border:none" id="btn_toggle_is_default_group" alt="{'toggle_is_default_group'|@translate}" title="{'toggle_is_default_group'|@translate}" {$TAG_INPUT_ENABLED}/></a>
- </td>
- </tr>
- {/foreach}
- {/if}
-</table>
diff --git a/BSF/template/yoga/admin/group_perm.tpl b/BSF/template/yoga/admin/group_perm.tpl
deleted file mode 100644
index 1dded1291..000000000
--- a/BSF/template/yoga/admin/group_perm.tpl
+++ /dev/null
@@ -1,8 +0,0 @@
-{* $Id *}
-<h2>{$TITLE}</h2>
-
-<form method="post" action="{$F_ACTION}">
- {$DOUBLE_SELECT}
-</form>
-
-<p>{'Only private categories are listed'|@translate}</p>
diff --git a/BSF/template/yoga/admin/history.tpl b/BSF/template/yoga/admin/history.tpl
deleted file mode 100644
index a8b7701dc..000000000
--- a/BSF/template/yoga/admin/history.tpl
+++ /dev/null
@@ -1,151 +0,0 @@
-{* $Id$ *}
-<div class="titrePage">
- <ul class="categoryActions">
- <li>
- <a
- href="{$U_HELP}"
- onclick="popuphelp(this.href); return false;"
- title="{'Help'|@translate}"
- >
- <img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)">
- </a>
- </li>
- </ul>
- <h2>{'History'|@translate} {$TABSHEET_TITLE}</h2>
- {$TABSHEET}
-</div>
-
-<form class="filter" method="post" name="filter" action="{$F_ACTION}">
-<fieldset>
- <legend>{'Filter'|@translate}</legend>
- <ul>
- <li><label>{'search_date_from'|@translate}</label></li>
- <li>
- <select name="start_day">
- <option value="0">--</option>
- {section name=day start=1 loop=32}
- <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$START_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
- {/section}
- </select>
- <select name="start_month">
- {html_options options=$month_list selected=$START_MONTH_SELECTED}
- </select>
- <input name="start_year" value="{$START_YEAR}" type="text" size="4" maxlength="4" >
- </li>
- </ul>
- <ul>
- <li><label>{'search_date_to'|@translate}</label></li>
- <li>
- <select name="end_day">
- <option value="0">--</option>
- {section name=day start=1 loop=32}
- <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$END_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
- {/section}
- </select>
- <select name="end_month">
- {html_options options=$month_list selected=$END_MONTH_SELECTED}
- </select>
- <input name="end_year" value="{$END_YEAR}" type="text" size="4" maxlength="4" >
- </li>
- </ul>
-
- <label>
- {'Element type'|@translate}
- <select name="types[]" multiple="multiple" size="4">
- {html_options values=$type_option_values output=$type_option_values|translate selected=$type_option_selected}
- </select>
- </label>
-
- <label>
- {'User'|@translate}
- <select name="user">
- <option value="-1">------------</option>
- {html_options options=$user_options selected=$user_options_selected}
- </select>
- </label>
-
- <label>
- {'Image id'|@translate}
- <input name="image_id" value="{$IMAGE_ID}" type="text" size="5">
- </label>
-
- <label>
- {'File name'|@translate}
- <input name="filename" value="{$FILENAME}" type="text">
- </label>
-
- <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" />
-</fieldset>
-<fieldset>
- <legend>{'Display'|@translate}</legend>
- <ul>
- <li>
- {'Thumbnails'|@translate}
- <select name="display_thumbnail">
- {html_options values=$display_thumbnail_values output=$display_thumbnail_values|translate selected=$display_thumbnail_selected}
- </select>
- </li>
- </ul>
-</fieldset>
-</form>
-
-{if isset($search_summary)}
-<fieldset>
- <legend>{'Summary'|@translate}</legend>
-
- <ul>
- <li>{$search_summary.NB_LINES}, {$search_summary.FILESIZE}</li>
- <li>
- {$search_summary.USERS}
- <ul>
- <li>{$search_summary.MEMBERS}</li>
- <li>{$search_summary.GUESTS}</li>
- </ul>
- </li>
- </ul>
-</fieldset>
-{/if}
-
-
-{if !empty($NAV_BAR)}
-<div class="navigationBar">
- {$NAV_BAR}
-</div>
-{/if}
-
-
-<table class="table2" id="detailedStats">
-<tr class="throw">
- <th>{'Date'|@translate}</th>
- <th>{'time'|@translate}</th>
- <th>{'user'|@translate}</th>
- <th>{'IP'|@translate}</th>
- <th>{'image'|@translate}</th>
- <th>{'Element type'|@translate}</th>
- <th>{'section'|@translate}</th>
- <th>{'category'|@translate}</th>
- <th>{'tags'|@translate}</th>
-</tr>
-{if !empty($search_results) }
-{foreach from=$search_results item=detail name=res_loop}
-<tr class="{if $smarty.foreach.res_loop.index is odd}row1{else}row2{/if}">
- <td class="hour">{$detail.DATE}</td>
- <td class="hour">{$detail.TIME}</td>
- <td>{$detail.USER}</td>
- <td>{$detail.IP}</td>
- <td>{$detail.IMAGE}</td>
- <td>{$detail.TYPE}</td>
- <td>{$detail.SECTION}</td>
- <td>{$detail.CATEGORY}</td>
- <td>{$detail.TAGS}</td>
-</tr>
-{/foreach}
-{/if}
-</table>
-
-
-{if !empty($NAV_BAR)}
-<div class="navigationBar">
- {$NAV_BAR}
-</div>
-{/if}
diff --git a/BSF/template/yoga/admin/index.php b/BSF/template/yoga/admin/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/admin/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/admin/intro.tpl b/BSF/template/yoga/admin/intro.tpl
deleted file mode 100644
index 069940ecf..000000000
--- a/BSF/template/yoga/admin/intro.tpl
+++ /dev/null
@@ -1,46 +0,0 @@
-{* $Id$ *}
-<h2>{'title_default'|@translate}</h2>
-<dl>
- <dt>{'Piwigo version'|@translate}</dt>
- <dd>
- <ul>
- <li>Piwigo {$PWG_VERSION}</li>
- <li><a href="{$U_CHECK_UPGRADE}">{'Check for upgrade'|@translate}</a></li>
- </ul>
- </dd>
-
- <dt>{'Environment'|@translate}</dt>
- <dd>
- <ul>
- <li>{'Operating system'|@translate}: {$OS}</li>
- <li>PHP: {$PHP_VERSION} (<a href="{$U_PHPINFO}">{'Show info'|@translate}</a>) [{$PHP_DATATIME}]</li>
- <li>MySQL: {$MYSQL_VERSION} [{$DB_DATATIME}]</li>
- </ul>
- </dd>
-
- <dt>{'Database'|@translate}</dt>
- <dd>
- <ul>
- <li>
- {$DB_ELEMENTS}
- {if isset($waiting)}
- (<a href="{$waiting.URL}">{$waiting.INFO}</a>)
- {/if}
-
- {if isset($first_added)}
- ({$first_added.DB_DATE})
- {/if}
- </li>
- <li>{$DB_CATEGORIES} ({$DB_IMAGE_CATEGORY})</li>
- <li>{$DB_TAGS} ({$DB_IMAGE_TAG})</li>
- <li>{$DB_USERS}</li>
- <li>{$DB_GROUPS}</li>
- <li>
- {$DB_COMMENTS}
- {if isset($unvalidated)}
- (<a href="{$unvalidated.URL}">{$unvalidated.INFO}</a>)
- {/if}
- </li>
- </ul>
- </dd>
-</dl>
diff --git a/BSF/template/yoga/admin/maintenance.tpl b/BSF/template/yoga/admin/maintenance.tpl
deleted file mode 100644
index 59cf4ff82..000000000
--- a/BSF/template/yoga/admin/maintenance.tpl
+++ /dev/null
@@ -1,25 +0,0 @@
-{* $Id$ *}
-<div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
- </ul>
- <h2>{'Maintenance'|@translate}</h2>
-</div>
-
-<ul>
- <li><a href="{$U_MAINT_CATEGORIES}" {$TAG_INPUT_ENABLED}>{'update categories informations'|@translate}</a></li>
- <li><a href="{$U_MAINT_IMAGES}" {$TAG_INPUT_ENABLED}>{'update images informations'|@translate}</a></li>
- <li><a href="{$U_MAINT_DATABASE}" {$TAG_INPUT_ENABLED}>{'repair and optimize database'|@translate}</a></li>
-</ul>
-
-<ul>
- <li><a href="{$U_MAINT_HISTORY_DETAIL}" onclick="return confirm('{'Are you sure?'|@translate}');" {$TAG_INPUT_ENABLED}>{'purge history detail'|@translate}</a></li>
- <li><a href="{$U_MAINT_HISTORY_SUMMARY}" onclick="return confirm('{'Are you sure?'|@translate}');" {$TAG_INPUT_ENABLED}>{'purge history summary'|@translate}</a></li>
- <li><a href="{$U_MAINT_SESSIONS}" {$TAG_INPUT_ENABLED}>{'purge sessions'|@translate}</a></li>
- <li><a href="{$U_MAINT_FEEDS}" {$TAG_INPUT_ENABLED}>{'purge never used notification feeds'|@translate}</a></li>
- <li><a href="{$U_MAINT_COMPILED_TEMPLATES}" {$TAG_INPUT_ENABLED}>{'Purge compiled templates'|@translate}</a></li>
-</ul>
-
-<ul>
- <li><a href="{$U_MAINT_C13Y}" {$TAG_INPUT_ENABLED}>{'c13y_maintenance'|@translate}</a></li>
-</ul>
diff --git a/BSF/template/yoga/admin/notification_by_mail.tpl b/BSF/template/yoga/admin/notification_by_mail.tpl
deleted file mode 100644
index eb5e2a0f9..000000000
--- a/BSF/template/yoga/admin/notification_by_mail.tpl
+++ /dev/null
@@ -1,124 +0,0 @@
-{* $Id$ *}
-
-<div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
- </ul>
- <h2>{'nbm_send_mail_to_users'|@translate} {$TABSHEET_TITLE}</h2>
- {$TABSHEET}
-</div>
-
-<form method="post" name="notification_by_mail" id="notification_by_mail" action="{$F_ACTION}">
- {if isset($REPOST_SUBMIT_NAME)}
- <fieldset>
- <div class="infos">
- <input class="submit" type="submit" value="{'nbm_repost_submit'|@translate}" name="{$REPOST_SUBMIT_NAME}" {$TAG_INPUT_ENABLED}/>
- </div>
- </fieldset>
- {/if}
-
- {if isset($param)}
- <fieldset>
- <legend>{'nbm_title_param'|@translate}</legend>
- <table>
- <tr>
- <td><label>{'nbm_send_html_mail'|@translate}</label></td>
- <td>
- <label><input type="radio" name="nbm_send_html_mail" value="true" {if $param.SEND_HTML_MAIL}checked="checked"{/if}/>{'Yes'|@translate}</label>
- <label><input type="radio" name="nbm_send_html_mail" value="false" {if not $param.SEND_HTML_MAIL}checked="checked"{/if}/>{'No'|@translate}</label>
- </td>
- </tr>
- <tr>
- <td>
- <label for="send_mail_as">{'nbm_send_mail_as'|@translate}</label>
- <br/><i><small>{'nbm_info_send_mail_as'|@translate}</small></i>
- </td>
- <td><input type="text" maxlength="35" size="35" name="nbm_send_mail_as" id="send_mail_as" value="{$param.SEND_MAIL_AS}"/></td>
- </tr>
- <tr>
- <td><label>{'nbm_send_detailed_content'|@translate}</label></td>
- <td>
- <label><input type="radio" name="nbm_send_detailed_content" value="true" {if $param.SEND_DETAILED_CONTENT}checked="checked"{/if}/>{'Yes'|@translate}</label>
- <label><input type="radio" name="nbm_send_detailed_content" value="false" {if not $param.SEND_DETAILED_CONTENT}checked="checked"{/if}/>{'No'|@translate}</label>
- </td>
- </tr>
- <tr>
- <td><label for="complementary_mail_content">{'nbm_complementary_mail_content'|@translate}</label></td>
- <td><textarea cols="50" rows="5" name="nbm_complementary_mail_content" id="complementary_mail_content">{$param.COMPLEMENTARY_MAIL_CONTENT}</textarea></td>
- </tr>
- <tr>
- <td>
- <label>{'nbm_send_recent_post_dates'|@translate}</label>
- <br/><i><small>{'nbm_info_send_recent_post_dates'|@translate}</small></i>
- </td>
- <td>
- <label><input type="radio" name="nbm_send_recent_post_dates" value="true" {if $param.SEND_RECENT_POST_DATES}checked="checked"{/if}/>{'Yes'|@translate}</label>
- <label><input type="radio" name="nbm_send_recent_post_dates" value="false" {if not $param.SEND_RECENT_POST_DATES}checked="checked"{/if}/>{'No'|@translate}</label>
- </td>
- </tr>
- </table>
- </fieldset>
-
- <p>
- <input class="submit" type="submit" value="{'Submit'|@translate}" name="param_submit" {$TAG_INPUT_ENABLED}/>
- <input class="submit" type="reset" value="{'Reset'|@translate}" name="param_reset"/>
- </p>
- {/if}{* isset $param*}
-
- {if isset($subscribe)}
- <fieldset>
- <legend>{'nbm_title_subscribe'|@translate}</legend>
- <p><i>{'nbm_warning_subscribe_unsubscribe'|@translate}</i></p>
- {$DOUBLE_SELECT}
- </fieldset>
- {/if}{* isset $subscribe*}
-
- {if isset($send)}
- {if empty($send.users)}
- <p>{'nbm_no_user_available_to_send_L1'|@translate}</p>
- <p>
- {'nbm_no_user_available_to_send_L2'|@translate}<br>
- {'nbm_no_user_available_to_send_L3'|@translate}
- </p>
- {else}
- <fieldset>
- <legend>{'nbm_title_send'|@translate}</legend>
- <table class="table2">
- <tr class="throw">
- <th>{'nbm_col_user'|@translate}</th>
- <th>{'nbm_col_mail'|@translate}</th>
- <th>{'nbm_col_last_send'|@translate}</th>
- <th>{'nbm_col_check_user_send_mail'|@translate}</th>
- </tr>
- {foreach from=$send.users item=u name=user_loop}
- <tr class="{if $smarty.foreach.user_loop.index is odd}row1{else}row2{/if}">
- <td><label for="send_selection-{$u.ID}">{$u.USERNAME}</label></td>
- <td><label for="send_selection-{$u.ID}">{$u.EMAIL}</label></td>
- <td><label for="send_selection-{$u.ID}">{$u.LAST_SEND}</label></td>
- <td><input type="checkbox" name="send_selection[]" value="{$u.ID}" {$u.CHECKED} id="send_selection-{$u.ID}"/></td>
- </tr>
- {/foreach}
- </table>
- <p>
- <a href="#" onclick="SelectAll(document.getElementById('notification_by_mail')); return false;">{'Check all'|@translate}</a>
- / <a href="#" onclick="DeselectAll(document.getElementById('notification_by_mail')); return false;">{'Uncheck all'|@translate}</a>
- </p>
- </fieldset>
-
- <fieldset>
- <legend>{'nbm_send_options'|@translate}</legend>
- <table>
- <tr>
- <td><label for="send_customize_mail_content">{'nbm_send_complementary_mail_content'|@translate}</label></td>
- <td><textarea cols="50" rows="5" name="send_customize_mail_content" id="send_customize_mail_content">{$send.CUSTOMIZE_MAIL_CONTENT}</textarea></td>
- </tr>
- </table>
- </fieldset>
-
- <p>
- <input class="submit" type="submit" value="{'nbm_send_submit'|@translate}" name="send_submit" {$TAG_INPUT_ENABLED}/>
- </p>
- {/if}
- {/if}{* isset $send*}
-
-</form>
diff --git a/BSF/template/yoga/admin/permalinks.tpl b/BSF/template/yoga/admin/permalinks.tpl
deleted file mode 100644
index f6a1d72ac..000000000
--- a/BSF/template/yoga/admin/permalinks.tpl
+++ /dev/null
@@ -1,70 +0,0 @@
-{* $Id$ *}
-<div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
- </ul>
- <h2>{'Permalinks'|@translate}</h2>
-</div>
-
-<form method="post" action="{$F_ACTION}">
-<fieldset><legend>{'Add/delete a permalink'|@translate}</legend>
- <label>{'Category'|@translate}:
- <select name="cat_id">
- <option value="0">------</option>
- {html_options options=$categories selected=$categories_selected}
- </select>
- </label>
-
- <label>{'Permalink'|@translate}:
- <input name="permalink" />
- </label>
-
- <label>{'Save to permalink history'|@translate}:
- <input type="checkbox" name="save" checked="checked" />
- </label>
-
- <p>
- <input type="submit" class="submit" name="set_permalink" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}/>
- </p>
- </fieldset>
-</form>
-
-<h3>{'Permalinks'|@translate}</h3>
-<table class="table2">
- <tr class="throw">
- <td>Id {$SORT_ID}</td>
- <td>{'Category'|@translate} {$SORT_NAME}</td>
- <td>{'Permalink'|@translate} {$SORT_PERMALINK}</td>
- </tr>
-{foreach from=$permalinks item=permalink name="permalink_loop"}
- <tr class="{if $smarty.foreach.permalink_loop.index is odd}row1{else}row2{/if}">
- <td>{$permalink.id}</td>
- <td>{$permalink.name}</td>
- <td>{$permalink.permalink}</td>
- </tr>
-{/foreach}
-</table>
-
-<h3>{'Permalink history'|@translate} <a name="old_permalinks"></a></h3>
-<table class="table2">
- <tr class="throw">
- <td>Id {$SORT_OLD_CAT_ID}</td>
- <td>{'Category'|@translate}</td>
- <td>{'Permalink'|@translate} {$SORT_OLD_PERMALINK}</td>
- <td>Deleted on {$SORT_OLD_DATE_DELETED}</td>
- <td>Last hit {$SORT_OLD_LAST_HIT}</td>
- <td>Hit {$SORT_OLD_HIT}</td>
- <td></td>
- </tr>
-{foreach from=$deleted_permalinks item=permalink}
- <tr>
- <td>{$permalink.cat_id}</td>
- <td>{$permalink.name}</td>
- <td>{$permalink.permalink}</td>
- <td>{$permalink.date_deleted}</td>
- <td>{$permalink.last_hit}</td>
- <td>{$permalink.hit}</td>
- <td><a href="{$permalink.U_DELETE}" {$TAG_INPUT_ENABLED}><img src="{$ROOT_URL}{$themeconf.icon_dir}/delete.png" alt="[{'delete'|@translate}]" class="button"></a></td>
- </tr>
-{/foreach}
-</table>
diff --git a/BSF/template/yoga/admin/picture_modify.tpl b/BSF/template/yoga/admin/picture_modify.tpl
deleted file mode 100644
index f6243acb9..000000000
--- a/BSF/template/yoga/admin/picture_modify.tpl
+++ /dev/null
@@ -1,190 +0,0 @@
-{* $Id$ *}
-<h2>{'title_picmod'|@translate}</h2>
-
-<img src="{$TN_SRC}" alt="{'thumbnail'|@translate}" class="thumbnail" />
-
-<ul class="categoryActions">
- {if isset($U_JUMPTO) }
- <li><a href="{$U_JUMPTO}" title="{'jump to image'|@translate}"><img src="{$themeconf.icon_dir}/category_jump-to.png" class="button" alt="{'jump to image'|@translate}" /></a></li>
- {/if}
- <li><a href="{$U_SYNC}" title="{'synchronize metadata'|@translate}" {$TAG_INPUT_ENABLED}><img src="{$themeconf.icon_dir}/sync_metadata.png" class="button" alt="{'synchronize'|@translate}" /></a></li>
-</ul>
-
-<form action="{$F_ACTION}" method="post" id="properties">
-
- <fieldset>
- <legend>{'Informations'|@translate}</legend>
-
- <table>
-
- <tr>
- <td><strong>{'Path'|@translate}</strong></td>
- <td>{$PATH}</td>
- </tr>
-
- <tr>
- <td><strong>{'Post date'|@translate}</strong></td>
- <td>{$REGISTRATION_DATE}</td>
- </tr>
-
- <tr>
- <td><strong>{'Dimensions'|@translate}</strong></td>
- <td>{$DIMENSIONS}</td>
- </tr>
-
- <tr>
- <td><strong>{'Filesize'|@translate}</strong></td>
- <td>{$FILESIZE}</td>
- </tr>
-
-{if isset($HIGH_FILESIZE) }
- <tr>
- <td><strong>{'High filesize'|@translate}</strong></td>
- <td>{$HIGH_FILESIZE}</td>
- </tr>
-{/if}
-
- <tr>
- <td><strong>{'Storage category'|@translate}</strong></td>
- <td>{$STORAGE_CATEGORY}</td>
- </tr>
-
- {if isset($related_categories) }
- <tr>
- <td><strong>{'Linked categories'|@translate}</strong></td>
- <td>
- <ul>
- {foreach from=$related_categories item=name}
- <li>{$name}</li>
- {/foreach}
- </ul>
- </td>
- </tr>
- {/if}
-
- </table>
-
- </fieldset>
-
- <fieldset>
- <legend>{'Properties'|@translate}</legend>
-
- <table>
-
- <tr>
- <td><strong>{'Name'|@translate}</strong></td>
- <td><input type="text" name="name" value="{$NAME}" /></td>
- </tr>
-
- <tr>
- <td><strong>{'Author'|@translate}</strong></td>
- <td><input type="text" name="author" value="{$AUTHOR}" /></td>
- </tr>
-
- <tr>
- <td><strong>{'Creation date'|@translate}</strong></td>
- <td>
- <label><input type="radio" name="date_creation_action" value="unset" /> {'unset'|@translate}</label>
- <input type="radio" name="date_creation_action" value="set" id="date_creation_action_set" /> {'set to'|@translate}
- <select onmousedown="document.getElementById('date_creation_action_set').checked = true;" name="date_creation_day">
- <option value="0">--</option>
- {section name=day start=1 loop=32}
- <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$DATE_CREATION_DAY_VALUE}selected="selected"{/if}>{$smarty.section.day.index}</option>
- {/section}
- </select>
- <select onmousedown="document.getElementById('date_creation_action_set').checked = true;" name="date_creation_month">
- {html_options options=$month_list selected=$DATE_CREATION_MONTH_VALUE}
- </select>
- <input onmousedown="document.getElementById('date_creation_action_set').checked = true;"
- name="date_creation_year"
- type="text"
- size="4"
- maxlength="4"
- value="{$DATE_CREATION_YEAR_VALUE}" />
- </td>
- </tr>
-
- <tr>
- <td><strong>{'Tags'|@translate}</strong></td>
- <td>{$TAG_SELECTION}</td>
- </tr>
-
-
- <tr>
- <td><strong>{'Description'|@translate}</strong></td>
- <td><textarea name="description" class="description">{$DESCRIPTION}</textarea></td>
- </tr>
-
- <tr>
- <td><strong>{'Minimum privacy level'|@translate}</strong></td>
- <td>
- <select name="level" size="1">
- {html_options options=$level_options selected=$level_options_selected}
- </select>
- </td>
- </tr>
-
- </table>
-
- <p style="text-align:center;">
- <input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" {$TAG_INPUT_ENABLED}/>
- <input class="submit" type="reset" value="{'Reset'|@translate}" name="reset" />
- </p>
-
- </fieldset>
-
-</form>
-
-<form id="associations" method="post" action="{$F_ACTION}#associations">
- <fieldset>
- <legend>{'Association to categories'|@translate}</legend>
-
- <table class="doubleSelect">
- <tr>
- <td>
- <h3>{'Associated'|@translate}</h3>
- <select class="categoryList" name="cat_associated[]" multiple="multiple" size="30">
- {html_options options=$associated_options}
- </select>
- <p><input class="submit" type="submit" value="&raquo;" name="dissociate" style="font-size:15px;" {$TAG_INPUT_ENABLED}/></p>
- </td>
-
- <td>
- <h3>{'Dissociated'|@translate}</h3>
- <select class="categoryList" name="cat_dissociated[]" multiple="multiple" size="30">
- {html_options options=$dissociated_options}
- </select>
- <p><input class="submit" type="submit" value="&laquo;" name="associate" style="font-size:15px;" {$TAG_INPUT_ENABLED}/></p>
- </td>
- </tr>
- </table>
-
- </fieldset>
-</form>
-
-<form id="representation" method="post" action="{$F_ACTION}#representation">
- <fieldset>
- <legend>{'Representation of categories'|@translate}</legend>
-
- <table class="doubleSelect">
- <tr>
- <td>
- <h3>{'Represents'|@translate}</h3>
- <select class="categoryList" name="cat_elected[]" multiple="multiple" size="30">
- {html_options options=$elected_options}
- </select>
- <p><input class="submit" type="submit" value="&raquo;" name="dismiss" style="font-size:15px;" {$TAG_INPUT_ENABLED}/></p>
- </td>
-
- <td>
- <h3>{'Does not represent'|@translate}</h3>
- <select class="categoryList" name="cat_dismissed[]" multiple="multiple" size="30">
- {html_options options=$dismissed_options}
- </select>
- <p><input class="submit" type="submit" value="&laquo;" name="elect" style="font-size:15px;" {$TAG_INPUT_ENABLED}/></p>
- </td>
- </tr>
- </table>
-
- </fieldset>
-</form>
diff --git a/BSF/template/yoga/admin/plugins_list.tpl b/BSF/template/yoga/admin/plugins_list.tpl
deleted file mode 100644
index abba01861..000000000
--- a/BSF/template/yoga/admin/plugins_list.tpl
+++ /dev/null
@@ -1,51 +0,0 @@
-<div class="titrePage">
- <h2>{'Plugins'|@translate}</h2>
-{$TABSHEET}
-</div>
-
-{'Sort order'|@translate} :
- <select onchange="document.location = this.options[this.selectedIndex].value;" style="width:100px">
- {html_options options=$order_options selected=$order_selected}
- </select>
-
-{if isset($plugins)}
-<table class="table2">
-<thead>
- <tr class="throw">
- <td>{'Name'|@translate}</td>
- <td>{'Version'|@translate}</td>
- <td>{'Description'|@translate}</td>
- <td>{'Actions'|@translate}</td>
- </tr>
-</thead>
-{html_head} {*add the style to html head for strict standard compliance*}
-<style type="text/css">
-TABLE.table2 TR TD.pluginState {ldelim}
- padding-left:16px;
-}
-TABLE.table2 TR TD.active {ldelim}
- background: url({$ROOT_URL}{$themeconf.admin_icon_dir}/plugin_active.gif) no-repeat center left
-}
-TABLE.table2 TR TD.inactive {ldelim}
- background: url({$ROOT_URL}{$themeconf.admin_icon_dir}/plugin_inactive.gif) no-repeat center left
-}
-</style>
-{/html_head}
-{foreach from=$plugins item=plugin name=plugins_loop}
- <tr class="{if $smarty.foreach.plugins_loop.index is odd}row1{else}row2{/if}">
- <td class="pluginState{if not empty($plugin.STATE)} {$plugin.STATE}{/if}">
- {$plugin.NAME}
- </td>
- <td>{$plugin.VERSION}</td>
- <td>{$plugin.DESCRIPTION}</td>
- <td>
- {foreach from=$plugin.actions item=action}
- <a href="{$action.U_ACTION}"
- {if isset($action.CONFIRM)} onclick="return confirm('{$action.CONFIRM|@escape:'javascript'}');"{/if}
- {$TAG_INPUT_ENABLED}>{$action.L_ACTION}</a>
- {/foreach}
- </td>
- </tr>
-{/foreach}
-</table>
-{/if}
diff --git a/BSF/template/yoga/admin/plugins_new.tpl b/BSF/template/yoga/admin/plugins_new.tpl
deleted file mode 100644
index fa22aaa26..000000000
--- a/BSF/template/yoga/admin/plugins_new.tpl
+++ /dev/null
@@ -1,37 +0,0 @@
-<div class="titrePage">
- <h2>{'Plugins'|@translate}</h2>
-{$TABSHEET}
-</div>
-
-{'Sort order'|@translate} :
- <select onchange="document.location = this.options[this.selectedIndex].value;" style="width:150px">
- {html_options options=$order_options selected=$order_selected}
- </select>
-
-{if isset($plugins)}
-<br>
-<table class="table2">
-<thead>
- <tr class="throw">
- <td>{'Name'|@translate}</td>
- <td>{'Version'|@translate}</td>
- <td>{'Date'|@translate}</td>
- <td>{'Author'|@translate}</td>
- <td>{'Actions'|@translate}</td>
- </tr>
-</thead>
-{foreach from=$plugins item=plugin name=plugins_loop}
- <tr class="{if $smarty.foreach.plugins_loop.index is odd}row1{else}row2{/if}">
- <td><a href="{$plugin.EXT_URL}" onclick="window.open(this.href); return false;" class="tooltip">{$plugin.EXT_NAME}
- <span>{$plugin.EXT_DESC}</span></a></td>
- <td style="text-align:center;"><a href="{$plugin.VERSION_URL}" onclick="window.open(this.href); return false;" class="tooltip">{$plugin.VERSION}
- <span>{$plugin.VER_DESC}</span></a></td>
- <td>{$plugin.DATE}</td>
- <td>{$plugin.AUTHOR}</td>
- <td style="text-align:center;"><a href="{$plugin.URL_INSTALL}" onclick="return confirm('{'plugins_confirm_install'|@translate|@escape:javascript}');">{'plugins_auto_install'|@translate}</a>
- / <a href="{$plugin.URL_DOWNLOAD}">{'plugins_download'|@translate}</a>
- </td>
- </tr>
-{/foreach}
-</table>
-{/if}
diff --git a/BSF/template/yoga/admin/plugins_update.tpl b/BSF/template/yoga/admin/plugins_update.tpl
deleted file mode 100644
index df0ac4ae0..000000000
--- a/BSF/template/yoga/admin/plugins_update.tpl
+++ /dev/null
@@ -1,71 +0,0 @@
-<div class="titrePage">
- <h2>{'Plugins'|@translate}</h2>
-{$TABSHEET}
-</div>
-
-{if isset($plugins_not_uptodate)}
-<br>
-<b>{'plugins_need_update'|@translate}</b>
-<table class="table2">
-<thead>
- <tr class="throw">
- <td>{'Name'|@translate}</td>
- <td>{'plugins_actual_version'|@translate}</td>
- <td>{'plugins_new_version'|@translate}</td>
- <td>{'Actions'|@translate}</td>
- </tr>
-</thead>
-{foreach from=$plugins_not_uptodate item=plugin name=plugins_loop}
- <tr class="{if $smarty.foreach.plugins_loop.index is odd}row1{else}row2{/if}">
- <td><a href="{$plugin.EXT_URL}" onclick="window.open(this.href); return false;" class="tooltip">{$plugin.EXT_NAME}
- <span>{$plugin.EXT_DESC}</span></a></td>
- <td style="text-align:center;">{$plugin.VERSION}</td>
- <td style="text-align:center;"><a href="{$plugin.VERSION_URL}" onclick="window.open(this.href); return false;" class="tooltip">{$plugin.NEW_VERSION}
- <span>{$plugin.NEW_VER_DESC}</span></a></td>
- <td style="text-align:center;"><a href="{$plugin.URL_UPDATE}" onclick="return confirm('{'plugins_confirm_upgrade'|@translate|@escape:javascript}');">{'plugins_auto_update'|@translate}</a>
- / <a href="{$plugin.URL_DOWNLOAD}">{'plugins_download'|@translate}</a></td>
- </tr>
-{/foreach}
-</table>
-{/if}
-
-
-{if isset($plugins_uptodate)}
-<br>
-<b>{'plugins_dontneed_update'|@translate}</b>
-<table class="table2">
-<thead>
- <tr class="throw">
- <td>{'Name'|@translate}</td>
- <td>{'Version'|@translate}</td>
- </tr>
-</thead>
-{foreach from=$plugins_uptodate item=plugin name=plugins_loop}
- <tr class="{if $smarty.foreach.plugins_loop.index is odd}row1{else}row2{/if}">
- <td><a href="{$plugin.URL}" onclick="window.open(this.href); return false;" class="tooltip">{$plugin.NAME}
- <span>{$plugin.EXT_DESC}</span></a></td>
- <td style="text-align:center;">{$plugin.VERSION}</td>
- </tr>
-{/foreach}
-</table>
-{/if}
-
-
-{if isset($plugins_cant_check)}
-<br>
-<b>{'plugins_cant_check'|@translate}</b>
-<table class="table2">
-<thead>
- <tr class="throw">
- <td>{'Name'|@translate}</td>
- <td>{'Version'|@translate}</td>
- </tr>
-</thead>
-{foreach from=$plugins_cant_check item=plugin name=plugins_loop}
- <tr class="{if $smarty.foreach.plugins_loop.index is odd}row1{else}row2{/if}">
- <td>{$plugin.NAME}</td>
- <td style="text-align:center;">{$plugin.VERSION}</td>
- </tr>
-{/foreach}
-</table>
-{/if}
diff --git a/BSF/template/yoga/admin/profile.tpl b/BSF/template/yoga/admin/profile.tpl
deleted file mode 100644
index f6326319c..000000000
--- a/BSF/template/yoga/admin/profile.tpl
+++ /dev/null
@@ -1,6 +0,0 @@
-{* $Id$ *}
-<div class="titrePage">
- <h2>{'Profile'|@translate}</h2>
-</div>
-
-{$PROFILE_CONTENT}
diff --git a/BSF/template/yoga/admin/rating.tpl b/BSF/template/yoga/admin/rating.tpl
deleted file mode 100644
index aa91892dc..000000000
--- a/BSF/template/yoga/admin/rating.tpl
+++ /dev/null
@@ -1,64 +0,0 @@
-{* $Id$ *}
-<h2>{'Rating'|@translate} [{$NB_ELEMENTS} {'elements'|@translate}]</h2>
-
-<form action="{$F_ACTION}" method="GET" id="update" class="filter">
- <fieldset>
- <legend>{'Filter'|@translate}</legend>
-
- <label>
- {'Sort by'|@translate}
- <select name="order_by">
- {html_options options=$order_by_options selected=$order_by_options_selected}
- </select>
- </label>
-
- <label>
- {'Users'|@translate}
- <select name="users">
- {html_options options=$user_options selected=$user_options_selected}
- </select>
- </label>
-
- <label>
- {'Number of items'|@translate}
- <input type="text" name="display" size="2" value="{$DISPLAY}">
- </label>
-
- <input class="submit" type="submit" name="submit_filter" value="{'Submit'|@translate}" />
- <input type="hidden" name="page" value="rating" />
- </fieldset>
-</form>
-
-<div class="navigationBar">{$NAVBAR}</div>
-<table width="99%">
-<tr class="throw">
- <td>{'File'|@translate}</td>
- <td>{'Number of rates'|@translate}</td>
- <td>{'Average rate'|@translate}</td>
- <td>{'Controversy'|@translate}</td>
- <td>{'Sum of rates'|@translate}</td>
- <td>{'Rate'|@translate}</td>
- <td>{'Username'|@translate}</td>
- <td>{'Rate date'|@translate}</td>
- <td></td>
-</tr>
-{foreach from=$images item=image}
-<tr valign="bottom">
- <td rowspan="{$image.NB_RATES_TOTAL+1}"><a href="{$image.U_URL}"><img src="{$image.U_THUMB}" alt="{$image.FILE}" title="{$image.FILE}"></a></td>
- <td rowspan="{$image.NB_RATES_TOTAL+1}"><strong>{$image.NB_RATES}/{$image.NB_RATES_TOTAL}</strong></td>
- <td rowspan="{$image.NB_RATES_TOTAL+1}"><strong>{$image.AVG_RATE}</strong></td>
- <td rowspan="{$image.NB_RATES_TOTAL+1}"><strong>{$image.STD_RATE}</strong></td>
- <td rowspan="{$image.NB_RATES_TOTAL+1}" style="border-right: 1px solid;" ><strong>{$image.SUM_RATE}</strong></td>
-</tr>
-{foreach from=$image.rates item=rate}
-<tr>
- <td>{$rate.RATE}</td>
- <td><b>{$rate.USER}</b></td>
- <td><span class="date">{$rate.DATE}</span></td>
- <td><a href="{$rate.U_DELETE}" {$TAG_INPUT_ENABLED}><img src="{$themeconf.icon_dir}/delete.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[{'delete'|@translate}]"/></a></td>
-</tr>
-{/foreach} {*rates*}
-{/foreach} {*images*}
-</table>
-
-<div class="navigationBar">{$NAVBAR}</div>
diff --git a/BSF/template/yoga/admin/site_manager.tpl b/BSF/template/yoga/admin/site_manager.tpl
deleted file mode 100644
index 627181c5a..000000000
--- a/BSF/template/yoga/admin/site_manager.tpl
+++ /dev/null
@@ -1,73 +0,0 @@
-{* $Id$ *}
-<div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
- </ul>
- <h2>{'Site manager'|@translate}</h2>
-</div>
-
-{if not empty($remote_output)}
-<div class="remoteOutput">
- <ul>
- {foreach from=$remote_output item=remote_line}
- <li class="{$remote_line.CLASS}">{$remote_line.CONTENT}</li>
- {/foreach}
- </ul>
-</div>
-{/if}
-
-{if isset($local_listing)}
-{'remote_site_local_found'|@translate} {$local_listing.URL}
-{if isset($local_listing.CREATE)}
-<form action="{$F_ACTION}" method="post">
- <p>
- {'remote_site_local_create'|@translate}:
- <input type="hidden" name="no_check" value="1"/>
- <input type="hidden" name="galleries_url" value="{$local_listing.URL}" />
- <input type="submit" name="submit" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED} />
- </p>
-</form>
-{/if}
-{if isset($local_listing.U_SYNCHRONIZE)}
-&nbsp;<a href="{$local_listing.U_SYNCHRONIZE}" title="{'remote_site_local_update'|@translate}">{'site_synchronize'|@translate}</a>
-<br/><br/>
-{/if}
-{/if}
-
-{if not empty($sites)}
-<table border="1" cellpadding="0" cellspacing="0">
- {foreach from=$sites item=site}
- <tr style="text-align:left"><td>
- <a href="{$site.NAME}">{$site.NAME}</a><br/>({$site.TYPE}, {$site.CATEGORIES} {'Categories'|@translate}, {$pwg->l10n_dec('%d element','%d elements',$site.IMAGES)})
- </td><td>
- [<a href="{$site.U_SYNCHRONIZE}" title="{'site_synchronize_hint'|@translate}">{'site_synchronize'|@translate}</a>]
- {if isset($site.U_DELETE)}
- [<a href="{$site.U_DELETE}" onclick="return confirm('{'Are you sure?'|@translate|escape:'javascript'}');"
- title="{'site_delete_hint'|@translate}" {$TAG_INPUT_ENABLED}>{'site_delete'|@translate}</a>]
- {/if}
- {if isset($site.remote)}
- <br/>
- [<a href="{$site.remote.U_TEST}" title="{'remote_site_test_hint'|@translate}" {$TAG_INPUT_ENABLED}>{'remote_site_test'|@translate}</a>]
- [<a href="{$site.remote.U_GENERATE}" title="{'remote_site_generate_hint'|@translate}" {$TAG_INPUT_ENABLED}>{'remote_site_generate'|@translate}</a>]
- [<a href="{$site.remote.U_CLEAN}" title="{'remote_site_clean_hint'|@translate}" {$TAG_INPUT_ENABLED}>{'remote_site_clean'|@translate}</a>]
- {/if}
- {if not empty($site.plugin_links)}
- <br>
- {foreach from=$site.plugin_links item=plugin_link}
- [<a href="{$plugin_link.U_HREF}" title='{$plugin_link.U_HINT}' {$TAG_INPUT_ENABLED}>{$plugin_link.U_CAPTION}</a>]
- {/foreach}
- {/if}
- </td></tr>
- {/foreach}
-</table>
-{/if}
-
-<form action="{$F_ACTION}" method="post">
- <p>
- <label for="galleries_url" >{'site_create'|@translate}</label>
- <input type="text" name="galleries_url" id="galleries_url" />
- </p>
- <p>
- <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED} />
- </p>
-</form>
diff --git a/BSF/template/yoga/admin/site_update.tpl b/BSF/template/yoga/admin/site_update.tpl
deleted file mode 100644
index fc0899a90..000000000
--- a/BSF/template/yoga/admin/site_update.tpl
+++ /dev/null
@@ -1,109 +0,0 @@
-{* $Id$ *}
-
-<div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
- </ul>
- <h2>{'title_update'|@translate}: <a href="{$SITE_URL}">{$SITE_URL}</a></h2>
-</div>
-
-{if isset($update_result)}
-<h3>{$L_RESULT_UPDATE}</h3>
-<ul>
- <li class="update_summary_new">{$update_result.NB_NEW_CATEGORIES} {'update_nb_new_categories'|@translate}</li>
- <li class="update_summary_new">{$update_result.NB_NEW_ELEMENTS} {'update_nb_new_elements'|@translate}</li>
- <li class="update_summary_del">{$update_result.NB_DEL_CATEGORIES} {'update_nb_del_categories'|@translate}</li>
- <li class="update_summary_del">{$update_result.NB_DEL_ELEMENTS} {'update_nb_del_elements'|@translate}</li>
- <li>{$update_result.NB_UPD_ELEMENTS} {'update_nb_upd_elements'|@translate}</li>
- <li class="update_summary_err">{$update_result.NB_ERRORS} {'update_nb_errors'|@translate}</li>
-</ul>
-{/if}
-
-{if isset($metadata_result)}
-<h3>{$L_RESULT_METADATA}</h3>
-<ul>
- <li>{$metadata_result.NB_ELEMENTS_DONE} {'update_nb_elements_metadata_sync'|@translate}</li>
- <li>{$metadata_result.NB_ELEMENTS_CANDIDATES} {'update_nb_elements_metadata_available'|@translate}</li>
- <li>{'update_used_metadata'|@translate} : {$METADATA_LIST}</li>
-</ul>
-{/if}
-
-
-{if not empty($sync_errors)}
-<h3>{'update_error_list_title'|@translate}</h3>
-<div class="errors">
-<ul>
- {foreach from=$sync_errors item=error}
- <li>[{$error.ELEMENT}] {$error.LABEL}</li>
- {/foreach}
-</ul>
-</div>
-<h3>{'update_errors_caption'|@translate}</h3>
-<ul>
- {foreach from=$sync_error_captions item=caption}
- <li><strong>{$caption.TYPE}</strong>: {$caption.LABEL}</li>
- {/foreach}
-</ul>
-{/if}
-
-{if not empty($sync_infos)}
-<h3>{'update_infos_title'|@translate}</h3>
-<div class="infos">
-<ul>
- {foreach from=$sync_infos item=info}
- <li>[{$info.ELEMENT}] {$info.LABEL}</li>
- {/foreach}
-</ul>
-</div>
-{/if}
-
-{if isset($introduction)}
-<h3>{'update_default_title'|@translate}</h3>
-<form action="" method="post" id="update">
-
- <fieldset id="syncFiles">
- <legend>{'update_sync_files'|@translate}</legend>
- <ul>
- <li><label><input type="radio" name="sync" value="dirs" {if 'dirs'==$introduction.sync}checked="checked"{/if}/> {'update_sync_dirs'|@translate}</label></li>
- <li><label><input type="radio" name="sync" value="files" {if 'files'==$introduction.sync}checked="checked"{/if}/> {'update_sync_all'|@translate}</label></li>
- <li><label><input type="checkbox" name="display_info" value="1" {if $introduction.display_info}checked="checked"{/if}/> {'update_display_info'|@translate}</label></li>
- <li><label><input type="checkbox" name="add_to_caddie" value="1" {if $introduction.add_to_caddie}checked="checked"{/if}/> {'add new elements to caddie'|@translate}</label></li>
- <li><label>{'Minimum privacy level'|@translate} <select name="privacy_level">{html_options options=$introduction.privacy_level_options selected=$introduction.privacy_level_selected}</select></label></li>
- </ul>
- </fieldset>
-
- <fieldset id="syncMetadata">
- <legend>{'update_sync_metadata'|@translate}</legend>
- {'update_used_metadata'|@translate} : {$METADATA_LIST}.<br/>
- <ul>
- <li><label><input type="radio" name="sync" value="metadata_new" {if 'metadata_new'==$introduction.sync}checked="checked"{/if}/> {'update_sync_metadata_new'|@translate}</label></li>
- <li><label><input type="radio" name="sync" value="metadata_all" {if 'metadata_all'==$introduction.sync}checked="checked"{/if}/> {'update_sync_metadata_all'|@translate}</label></li>
- </ul>
- </fieldset>
-
- <fieldset id="syncSimulate">
- <legend></legend>
- <ul><li><label><input type="checkbox" name="simulate" value="1" checked="checked" {$TAG_INPUT_ENABLED} /> {'update_simulate'|@translate}</label></li></ul>
- </fieldset>
-
- <fieldset id="catSubset">
- <legend>{'update_cats_subset'|@translate}</legend>
- <ul>
- <li>
- <select class="categoryList" name="cat" size="10">
- {html_options options=$category_options selected=$category_options_selected}
- </select>
- </li>
-
- <li><label><input type="checkbox" name="subcats-included" value="1" {if $introduction.subcats_included}checked="checked"{/if}/> {'search_subcats_included'|@translate}</label></li>
- </ul>
- </fieldset>
-
- <p class="bottomButtons">
- <input class="submit" type="submit" value="{'Submit'|@translate}" name="submit" />
- <input class="submit" type="reset" value="{'Reset'|@translate}" name="reset" />
- </p>
-</form>
-{/if}{*isset $introduction*}
-
-<p><a href="{$U_SITE_MANAGER}">{'Site manager'|@translate}</a></p>
diff --git a/BSF/template/yoga/admin/stats.tpl b/BSF/template/yoga/admin/stats.tpl
deleted file mode 100644
index 95331b7ef..000000000
--- a/BSF/template/yoga/admin/stats.tpl
+++ /dev/null
@@ -1,38 +0,0 @@
-{* $Id$ *}
-
-<div class="titrePage">
- <ul class="categoryActions">
- <li>
- <a
- href="{$U_HELP}"
- onclick="popuphelp(this.href); return false;"
- title="{'Help'|@translate}"
- >
- <img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)">
- </a>
- </li>
- </ul>
- <h2>{'History'|@translate} {$TABSHEET_TITLE}</h2>
- {$TABSHEET}
-</div>
-
-<h3>{$L_STAT_TITLE}</h3>
-
-<table class="table2" id="dailyStats">
- <tr class="throw">
- <th>{$PERIOD_LABEL}</th>
- <th>{'Pages seen'|@translate}</th>
- <th></th>
- </tr>
-
-{if not empty($statrows)}
-{foreach from=$statrows item=row}
- <tr>
- <td style="white-space: nowrap">{$row.VALUE}</td>
- <td class="number">{$row.PAGES}</td>
- <td><div class="statBar" style="width:{$row.WIDTH}px"></div></td>
- </tr>
-{/foreach}
-{/if}
-
-</table>
diff --git a/BSF/template/yoga/admin/tabsheet.tpl b/BSF/template/yoga/admin/tabsheet.tpl
deleted file mode 100644
index a89adfd8d..000000000
--- a/BSF/template/yoga/admin/tabsheet.tpl
+++ /dev/null
@@ -1,8 +0,0 @@
-{* $Id$ *}
-{if isset($tabsheet) and count($tabsheet)}
-<ul class="tabsheet">
-{foreach from=$tabsheet key=name item=sheet}
- <li class="{if ($name == $tabsheet_selected)}selected_tab{else}normal_tab{/if}"><a href="{$sheet.url}">{$sheet.caption}</a></li>
-{/foreach}
-</ul>
-{/if} \ No newline at end of file
diff --git a/BSF/template/yoga/admin/tags.tpl b/BSF/template/yoga/admin/tags.tpl
deleted file mode 100644
index b2ce57341..000000000
--- a/BSF/template/yoga/admin/tags.tpl
+++ /dev/null
@@ -1,54 +0,0 @@
-{* $Id$ *}
-<div class="titrePage">
- <h2>{'Manage tags'|@translate}</h2>
-</div>
-
-<form action="{$F_ACTION}" method="post">
-
- {if isset($EDIT_TAGS_LIST)}
- <fieldset>
- <legend>{'Edit tags'|@translate}</legend>
- <input type="hidden" name="edit_list" value="{$EDIT_TAGS_LIST}" />
- <table class="table2">
- <tr class="throw">
- <th>{'Current name'|@translate}</th>
- <th>{'New name'|@translate}</th>
- </tr>
- {foreach from=$tags item=tag}
- <tr>
- <td>{$tag.NAME}</td>
- <td><input type="text" name="tag_name-{$tag.ID}" value="{$tag.NAME}" /></td>
- </tr>
- {/foreach}
- </table>
-
- <p>
- <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED} />
- <input class="submit" type="reset" value="{'Reset'|@translate}" />
- </p>
- </fieldset>
- {/if}
-
- <fieldset>
- <legend>{'Add a tag'|@translate}</legend>
-
- <label>
- {'New tag'|@translate}
- <input type="text" name="add_tag" />
- </label>
-
- <p><input class="submit" type="submit" name="add" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}/></p>
- </fieldset>
-
- <fieldset>
- <legend>{'Tag selection'|@translate}</legend>
-
- {$TAG_SELECTION}
-
- <p>
- <input class="submit" type="submit" name="edit" value="{'Edit selected tags'|@translate}"/>
- <input class="submit" type="submit" name="delete" value="{'Delete selected tags'|@translate}" onclick="return confirm('{'Are you sure?'|@translate}');" {$TAG_INPUT_ENABLED}/>
- </p>
- </fieldset>
-
-</form>
diff --git a/BSF/template/yoga/admin/thumbnail.tpl b/BSF/template/yoga/admin/thumbnail.tpl
deleted file mode 100644
index 6bb652caa..000000000
--- a/BSF/template/yoga/admin/thumbnail.tpl
+++ /dev/null
@@ -1,123 +0,0 @@
-{* $Id$ *}
-<div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
- </ul>
- <h2>{'title_thumbnails'|@translate}</h2>
-</div>
-
-{if isset($results) }
-<div class="admin">{'tn_results_title'|@translate}</div>
-<table style="width:100%;">
- <tr class="throw">
- <td>{'path'|@translate}</td>
- <td>{'thumbnail'|@translate}</td>
- <td>{'tn_results_gen_time'|@translate}</td>
- <td>{'filesize'|@translate}</td>
- <td>{'Dimensions'|@translate}</td>
- </tr>
- {foreach from=$results.elements item=elt}
- <tr>
- <td>{$elt.PATH}</td>
- <td><img src="{$elt.TN_FILE_IMG}" /></td>
- <td style="text-align:right;">{$elt.GEN_TIME}</td>
- <td style="text-align:right;">{$elt.TN_FILESIZE_IMG}</td>
- <td style="text-align:right;">{$elt.TN_WIDTH_IMG} x {$elt.TN_HEIGHT_IMG}</td>
- </tr>
- {/foreach}
-</table>
-
-<table class="table2">
- <tr class="throw">
- <td colspan="2">{'tn_stats'|@translate}</td>
- </tr>
- <tr>
- <td>{'tn_stats_nb'|@translate}</td>
- <td style="text-align:center;">{$results.TN_NB}</td>
- </tr>
- <tr>
- <td>{'tn_stats_total'|@translate}</td>
- <td style="text-align:right;">{$results.TN_TOTAL}</td>
- </tr>
- <tr>
- <td>{'tn_stats_max'|@translate}</td>
- <td style="text-align:right;">{$results.TN_MAX}</td>
- </tr>
- <tr>
- <td>{'tn_stats_min'|@translate}</td>
- <td style="text-align:right;">{$results.TN_MIN}</td>
- </tr>
- <tr>
- <td>{'tn_stats_mean'|@translate}</td>
- <td style="text-align:right;">{$results.TN_AVERAGE}</td>
- </tr>
-</table>
-<br />
-{/if}
-
-{if isset($params) }
-<form method="post" action="{$params.F_ACTION}" class="properties">
-
- <fieldset>
- <legend>{'tn_params_title'|@translate}</legend>
-
- <ul>
- <li>
- <span class="property">{'tn_params_GD'|@translate}</span>
- <label>
- <input type="radio" name="gd" value="2" {if $params.GD_SELECTED==2}checked="checked"{/if} />2.x
- </label>
- <label>
- <input type="radio" name="gd" value="1" {if $params.GD_SELECTED==1}checked="checked"{/if} />1.x
- </label>
- </li>
-
- <li>
- <span class="property">
- <label for="width">{'maximum width'|@translate}</label>
- </span>
- <input type="text" id="width" name="width" value="{$params.WIDTH_TN}" />
- </li>
-
- <li>
- <span class="property">
- <label for="height">{'maximum height'|@translate}</label>
- </span>
- <input type="text" id="height" name="height" value="{$params.HEIGHT_TN}" />
- </li>
-
- <li>
- <span class="property">{'Number of thumbnails to create'|@translate}</span>
- <label><input type="radio" name="n" value="5" {if $params.N_SELECTED==5}checked="checked"{/if} /> 5</label>
- <label><input type="radio" name="n" value="10" {if $params.N_SELECTED==10}checked="checked"{/if} /> 10</label>
- <label><input type="radio" name="n" value="20" {if $params.N_SELECTED==20}checked="checked"{/if} /> 20</label>
- <label><input type="radio" name="n" value="all" {if $params.N_SELECTED=='all'}checked="checked"{/if} /> {'tn_all'|@translate}</label>
- </li>
- </ul>
- </fieldset>
-
- <p><input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}/></p>
-</form>
-{/if} {*isset params*}
-
-{if !empty($remainings) }
-<div class="admin">{$TOTAL_NB_REMAINING} {'tn_alone_title'|@translate}</div>
-<table style="width:100%;">
- <tr class="throw">
- <td>&nbsp;</td>
- <td style="width:60%;">{'path'|@translate}</td>
- <td>{'filesize'|@translate}</td>
- <td>{'Dimensions'|@translate}</td>
- </tr>
- {foreach from=$remainings item=elt name=remain_loop}
- <tr class="{if $smarty.foreach.remain_loop.index is odd}row1{else}row2{/if}">
- <td>{$smarty.foreach.remain_loop.iteration}</td>
- <td><div style="margin-left:10px;">{$elt.PATH}</div></td>
- <td><div style="margin-left:10px;">{$elt.FILESIZE_IMG}</div></td>
- <td><div style="margin-left:10px;">{$elt.WIDTH_IMG} x {$elt.HEIGHT_IMG}</div></td>
- </tr>
- {/foreach}
-</table>
-{else}
-<div style="text-align:center;font-weight:bold;margin:10px;"> [ {'tn_no_missing'|@translate} ]</div>
-{/if}
diff --git a/BSF/template/yoga/admin/upload.tpl b/BSF/template/yoga/admin/upload.tpl
deleted file mode 100644
index f95609316..000000000
--- a/BSF/template/yoga/admin/upload.tpl
+++ /dev/null
@@ -1,53 +0,0 @@
-{* $Id$ *}
-<div class="titrePage">
- <h2>{'waiting'|@translate} {$TABSHEET_TITLE}</h2>
- {$TABSHEET}
-</div>
-
-<h3>{'title_upload'|@translate}</h3>
-
-<form action="{$F_ACTION}" method="post" id="waiting">
- <table style="width:99%;" >
- <tr class="throw">
- <th style="width:20%;">{'category'|@translate}</th>
- <th style="width:20%;">{'Date'|@translate}</th>
- <th style="width:20%;">{'file'|@translate}</th>
- <th style="width:20%;">{'thumbnail'|@translate}</th>
- <th style="width:20%;">{'Author'|@translate}</th>
- <th style="width:1px;">&nbsp;</th>
- </tr>
-
- {if not empty($pictures) }
- {foreach from=$pictures item=picture name=picture_loop}
- <tr class="{if $smarty.foreach.picture_loop.index is odd}row1{else}row2{/if}">
- <td style="white-space:nowrap;">{$picture.CATEGORY_IMG}</td>
- <td style="white-space:nowrap;">{$picture.DATE_IMG}</td>
- <td style="white-space:nowrap;">
- <a href="{$picture.PREVIEW_URL_IMG}" title="{$picture.FILE_TITLE}">{$picture.FILE_IMG}</a>
- </td>
- <td style="white-space:nowrap;">
- {if not empty($picture.thumbnail) }
- <a href="{$picture.thumbnail.PREVIEW_URL_TN_IMG}" title="{$picture.thumbnail.FILE_TN_TITLE}">{$picture.thumbnail.FILE_TN_IMG}</a>
- {/if}
- </td>
- <td style="white-space:nowrap;">
- <a href="mailto:{$picture.UPLOAD_EMAIL}">{$picture.UPLOAD_USERNAME}</a>
- </td>
- <td style="white-space:nowrap;">
- <label><input type="radio" name="action-{$picture.ID_IMG}" value="validate" /> {'Validate'|@translate}</label>
- <label><input type="radio" name="action-{$picture.ID_IMG}" value="reject" /> {'Reject'|@translate}</label>
- </td>
- </tr>
- {/foreach}
- {/if}
- </table>
-
- <p class="bottomButtons">
- <input type="hidden" name="list" value="{$LIST}" />
- <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}/>
- <input class="submit" type="submit" name="validate-all" value="{'Validate All'|@translate}" {$TAG_INPUT_ENABLED}/>
- <input class="submit" type="submit" name="reject-all" value="{'Reject All'|@translate}" {$TAG_INPUT_ENABLED}/>
- <input class="submit" type="reset" value="{'Reset'|@translate}" />
- </p>
-
-</form>
diff --git a/BSF/template/yoga/admin/user_list.tpl b/BSF/template/yoga/admin/user_list.tpl
deleted file mode 100644
index db67093f6..000000000
--- a/BSF/template/yoga/admin/user_list.tpl
+++ /dev/null
@@ -1,312 +0,0 @@
-{* $Id$ *}
-<div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
- </ul>
- <h2>{'title_liste_users'|@translate}</h2>
-</div>
-
-<form class="filter" method="post" name="add_user" action="{$F_ADD_ACTION}">
- <fieldset>
- <legend>{'Add a user'|@translate}</legend>
- <label>{'Username'|@translate} <input type="text" name="login" maxlength="50" size="20" /></label>
- <label>{'Password'|@translate} <input type="text" name="password" /></label>
- <label>{'Email address'|@translate} <input type="text" name="email" /></label>
- <input class="submit" type="submit" name="submit_add" value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED} />
- </fieldset>
-</form>
-
-<form class="filter" method="get" name="filter" action="{$F_FILTER_ACTION}">
-<fieldset>
- <legend>{'Filter'|@translate}</legend>
- <input type="hidden" name="page" value="user_list" />
-
- <label>{'Username'|@translate} <input type="text" name="username" value="{$F_USERNAME}" /></label>
-
- <label>
- {'status'|@translate}
- {html_options name=status options=$status_options selected=$status_selected}
- </label>
-
- <label>
- {'group'|@translate}
- {html_options name=group options=$group_options selected=$group_selected}
- </label>
-
- <label>
- {'Sort by'|@translate}
- {html_options name=order_by options=$order_options selected=$order_selected}
- </label>
-
- <label>
- {'Sort order'|@translate}
- {html_options name=direction options=$direction_options selected=$direction_selected}
- </label>
-
- <input class="submit" type="submit" value="{'Submit'|@translate}" />
-
-</fieldset>
-
-</form>
-
-<form method="post" name="preferences" action="">
-
-<table class="table2">
- <tr class="throw">
- <th>&nbsp;</th>
- <th>{'Username'|@translate}</th>
- <th>{'user_status'|@translate}</th>
- <th>{'Email address'|@translate}</th>
- <th>{'Groups'|@translate}</th>
- <th>{'properties'|@translate}</th>
- {if not empty($plugin_user_list_column_titles)}
- {foreach from=$plugin_user_list_column_titles item=title}
- <th>{$title}</th>
- {/foreach}
- {/if}
- <th>{'Actions'|@translate}</th>
- </tr>
- {foreach from=$users item=user name=users_loop}
- <tr class="{if $smarty.foreach.users_loop.index is odd}row1{else}row2{/if}">
- <td><input type="checkbox" name="selection[]" value="{$user.ID}" {$user.CHECKED} id="selection-{$user.ID}" /></td>
- <td><label for="selection-{$user.ID}">{$user.USERNAME}</label></td>
- <td>{$user.STATUS}</td>
- <td>{$user.EMAIL}</td>
- <td>{$user.GROUPS}</td>
- <td>{$user.PROPERTIES}</td>
- {foreach from=$user.plugin_columns item=data}
- <td>{$data}</td>
- {/foreach}
- <td style="text-align:center;">
- <a href="{$user.U_PERM}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/permissions.png" class="button" style="border:none" alt="{'permissions'|@translate}" title="{'permissions'|@translate}" /></a>
- <a href="{$user.U_PROFILE}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/edit_s.png" class="button" style="border:none" alt="{'Profile'|@translate}" title="{'Profile'|@translate}" /></a>
- {foreach from=$user.plugin_actions item=data}
- {$data}
- {/foreach}
- </td>
- </tr>
- {/foreach}
-</table>
-
-<div class="navigationBar">{$NAVBAR}</div>
-
-{* delete the selected users ? *}
-<fieldset>
- <legend>{'Deletions'|@translate}</legend>
- <label><input type="checkbox" name="confirm_deletion" value="1" /> {'confirm'|@translate}</label>
- <input class="submit" type="submit" value="{'Delete selected users'|@translate}" name="delete" {$TAG_INPUT_ENABLED}/>
-</fieldset>
-
-<fieldset>
- <legend>{'Status'|@translate}</legend>
-
- <table>
- <tr>
- <td>{'Status'|@translate}</td>
- <td>
- <label><input type="radio" name="status_action" value="leave" checked="checked" /> {'leave'|@translate}</label>
- <label><input type="radio" name="status_action" value="set" id="status_action_set" /> {'set to'|@translate}</label>
- <select onchange="document.getElementById('status_action_set').checked = true;" name="status" size="1">
- {html_options options=$pref_status_options selected=$pref_status_selected}
- </select>
- </td>
- </tr>
-
- {if isset($adviser)}
- <tr>
- <td>{'adviser'|@translate}</td>
- <td>
- <label><input type="radio" name="adviser" value="leave" checked="checked" /> {'leave'|@translate}</label>
- / {'set to'|@translate}
- <label><input type="radio" name="adviser" value="true" />{'Yes'|@translate}</label>
- <label><input type="radio" name="adviser" value="false" />{'No'|@translate}</label>
- </td>
- </tr>
- {/if}
-
- </table>
-</fieldset>
-
-{* form to set properties for many users at once *}
-<fieldset>
- <legend>{'Groups'|@translate}</legend>
-
-<table>
-
- <tr>
- <td>{'associate to group'|@translate}</td>
- <td>
- {html_options name=associate options=$association_options selected=$associate_selected}
- </td>
- </tr>
-
- <tr>
- <td>{'dissociate from group'|@translate}</td>
- <td>
- {html_options name=dissociate options=$association_options selected=$dissociate_selected}
- </td>
- </tr>
-
-</table>
-
-</fieldset>
-
-{* Properties *}
-<fieldset>
- <legend>{'properties'|@translate}</legend>
-
- <table>
-
- <tr>
- <td>{'enabled_high'|@translate}</td>
- <td>
- <label><input type="radio" name="enabled_high" value="leave" checked="checked" /> {'leave'|@translate}</label>
- / {'set to'|@translate}
- <label><input type="radio" name="enabled_high" value="true" />{'Yes'|@translate}</label>
- <label><input type="radio" name="enabled_high" value="false" />{'No'|@translate}</label>
- </td>
- </tr>
-
- <tr>
- <td>{'Privacy level'|@translate}</td>
- <td>
- <label><input type="radio" name="level_action" value="leave" checked="checked" />{'leave'|@translate}</label>
- <label><input type="radio" name="level_action" value="set" id="level_action_set" />{'set to'|@translate}</label>
- <select onchange="document.getElementById('level_action_set').checked = true;" name="level" size="1">
- {html_options options=$level_options selected=$level_selected}
- </select>
- </td>
- </tr>
-
- </table>
-
-</fieldset>
-
-{* preference *}
-<fieldset>
- <legend>{'Preferences'|@translate}</legend>
-
-<table>
-
- <tr>
- <td>{'nb_image_per_row'|@translate}</td>
- <td>
- <label><input type="radio" name="nb_image_line_action" value="leave" checked="checked" /> {'leave'|@translate}</label>
- <label><input type="radio" name="nb_image_line_action" value="set" id="nb_image_line_action_set" /> {'set to'|@translate}</label>
- <input onmousedown="document.getElementById('nb_image_line_action_set').checked = true;"
- size="3" maxlength="2" type="text" name="nb_image_line" value="{$NB_IMAGE_LINE}" />
- </td>
- </tr>
-
- <tr>
- <td>{'nb_row_per_page'|@translate}</td>
- <td>
- <label><input type="radio" name="nb_line_page_action" value="leave" checked="checked" /> {'leave'|@translate}</label>
- <label><input type="radio" name="nb_line_page_action" value="set" id="nb_line_page_action_set" /> {'set to'|@translate}</label>
- <input onmousedown="document.getElementById('nb_line_page_action_set').checked = true;"
- size="3" maxlength="2" type="text" name="nb_line_page" value="{$NB_LINE_PAGE}" />
- <td>
- </tr>
-
- <tr>
- <td>{'theme'|@translate}</td>
- <td>
- <label><input type="radio" name="template_action" value="leave" checked="checked" /> {'leave'|@translate}</label>
- <label><input type="radio" name="template_action" value="set" id="template_action_set" /> {'set to'|@translate}</label>
- <select onchange="document.getElementById('template_action_set').checked = true;" name="template" size="1">
- {html_options values=$template_options output=$template_options selected=$template_selected}
- </select>
- </td>
- </tr>
-
- <tr>
- <td>{'language'|@translate}</td>
- <td>
- <label><input type="radio" name="language_action" value="leave" checked="checked" /> {'leave'|@translate}</label>
- <label><input type="radio" name="language_action" value="set" id="language_action_set" /> {'set to'|@translate}</label>
- <select onchange="document.getElementById('language_action_set').checked = true;" name="language" size="1">
- {html_options options=$language_options selected=$language_selected}
- </select>
- </td>
- </tr>
-
- <tr>
- <td>{'recent_period'|@translate}</td>
- <td>
- <label><input type="radio" name="recent_period_action" value="leave" checked="checked" /> {'leave'|@translate}</label>
- <label><input type="radio" name="recent_period_action" value="set" id="recent_period_action_set" /> {'set to'|@translate}</label>
- <input onmousedown="document.getElementById('recent_period_action_set').checked = true;"
- type="text" size="3" maxlength="2" name="recent_period" value="{$RECENT_PERIOD}" />
- </td>
- </tr>
-
- <tr>
- <td>{'auto_expand'|@translate}</td>
- <td>
- <label><input type="radio" name="expand" value="leave" checked="checked" /> {'leave'|@translate}</label>
- / {'set to'|@translate}
- <label><input type="radio" name="expand" value="true" />{'Yes'|@translate}</label>
- <label><input type="radio" name="expand" value="false" />{'No'|@translate}</label>
- </td>
- </tr>
-
- <tr>
- <td>{'show_nb_comments'|@translate}</td>
- <td>
- <label><input type="radio" name="show_nb_comments" value="leave" checked="checked" /> {'leave'|@translate}</label>
- / {'set to'|@translate}
- <label><input type="radio" name="show_nb_comments" value="true" />{'Yes'|@translate}</label>
- <label><input type="radio" name="show_nb_comments" value="false" />{'No'|@translate}</label>
- </td>
- </tr>
-
- <tr>
- <td>{'show_nb_hits'|@translate}</td>
- <td>
- <label><input type="radio" name="show_nb_hits" value="leave" checked="checked" /> {'leave'|@translate}</label>
- / {'set to'|@translate}
- <label><input type="radio" name="show_nb_hits" value="true" />{'Yes'|@translate}</label>
- <label><input type="radio" name="show_nb_hits" value="false" />{'No'|@translate}</label>
- </td>
- </tr>
-
- <tr>
- <td>{'maxwidth'|@translate}</td>
- <td>
- <label><input type="radio" name="maxwidth_action" value="leave" checked="checked" /> {'leave'|@translate}</label>
- <label><input type="radio" name="maxwidth_action" value="unset" /> {'unset'|@translate}</label>
- <label><input type="radio" name="maxwidth_action" value="set" id="maxwidth_action_set" /> {'set to'|@translate}</label>
- <input onmousedown="document.getElementById('maxwidth_action_set').checked = true;"
- type="text" size="4" maxlength="4" name="maxwidth" value="{$MAXWIDTH}" />
- </td>
- </tr>
-
-
- <tr>
- <td>{'maxheight'|@translate}</td>
- <td>
- <label><input type="radio" name="maxheight_action" value="leave" checked="checked" /> {'leave'|@translate}</label>
- <label><input type="radio" name="maxheight_action" value="unset" /> {'unset'|@translate}</label>
- <label><input type="radio" name="maxheight_action" value="set" id="maxheight_action_set" /> {'set to'|@translate}</label>
- <input onmousedown="document.getElementById('maxheight_action_set').checked = true;"
- type="text" size="4" maxlength="4" name="maxheight" value="{$MAXHEIGHT}" />
- </td>
- </tr>
-
-
-</table>
-
-</fieldset>
-
-<p>
- {'target'|@translate}
- <label><input type="radio" name="target" value="all" /> {'all'|@translate}</label>
- <label><input type="radio" name="target" value="selection" checked="checked" /> {'selection'|@translate}</label>
-</p>
-
-<p>
- <input class="submit" type="submit" value="{'Submit'|@translate}" name="pref_submit" {$TAG_INPUT_ENABLED} />
- <input class="submit" type="reset" value="{'Reset'|@translate}" name="pref_reset" />
-</p>
-
-</form>
diff --git a/BSF/template/yoga/admin/user_perm.tpl b/BSF/template/yoga/admin/user_perm.tpl
deleted file mode 100644
index 3183c82e7..000000000
--- a/BSF/template/yoga/admin/user_perm.tpl
+++ /dev/null
@@ -1,23 +0,0 @@
-{* $Id$ *}
-<h2>{$TITLE}</h2>
-
-{if isset($categories_because_of_groups) }
-<fieldset>
- <legend>{'Categories authorized thanks to group associations'|@translate}</legend>
-
- <ul>
- {foreach from=$categories_because_of_groups item=cat }
- <li>{$cat}</li>
- {/foreach}
- </ul>
-</fieldset>
-{/if}
-
-
-<fieldset>
- <legend>{'Other private categories'|@translate}</legend>
-
- <form method="post" action="{$F_ACTION}">
- {$DOUBLE_SELECT}
- </form>
-</fieldset>
diff --git a/BSF/template/yoga/admin/ws_checker.tpl b/BSF/template/yoga/admin/ws_checker.tpl
deleted file mode 100644
index cce3c7f49..000000000
--- a/BSF/template/yoga/admin/ws_checker.tpl
+++ /dev/null
@@ -1,218 +0,0 @@
-{* $Id$ *}
-
-<div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}"><img src="{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
- </ul>
- <h2>{'title_wscheck'|@translate} - {'web_services'|@translate}</h2>
-</div>
-
-{if !empty($update_results)}
-<ul>
- {foreach from=$update_results item=result}
- <li>$result</li>
- {/foreach}
-</ul>
-{/if}
-
-{* Add Access *}
-<form method="post" name="adding_access" action="{$F_STATUS_ACTION}">
- <!-- Current Default -->
- <fieldset>
- <legend>{'ws_adding_legend'|@translate}</legend>
- <table>
- {* Access key *}
- <tr>
- <td>
- <label for="KeyName">{'Confidential partner key'|@translate} </label>
- </td>
- <td>
- <input type="text" maxlength="35" size="35" name="add_partner"
- id="add_partner" value="{$F_ADD_PARTNER}"
- title="{'Basis of access key calculation'|@translate}" />
- </td>
- </tr>
-
- {* Target (cat/ids, tag/ids, or list/ids ids=id,id-id,...) *}
- <tr>
- <td>
- <label for="Access">{'Target'|@translate}</label>
- </td>
- <td>
- <input type="text" maxlength="128" size="35" name="add_target"
- id="add_target" value="{$F_ADD_ACCESS}"
- title="{'Facultative and restrictive option'|@translate}" />
- <i><small> ({'Access: see help text for more'|@translate})
- </small></i>
- </td>
- </tr>
-
- {* Restricted access to specific request *}
- <tr>
- <td>
- <label for="add_request">{'Restrict access to'|@translate}</label>
- </td>
- <td>
- <select name="add_request" id="add_request" style="width: 18em"
- onfocus="this.className='focus';"
- onblur="this.className='nofocus';">
- <option value=""></option>
- {html_options values=$add_requests output=$add_requests}
- </select>
- <i><small> ({'ws_Methods'|@translate})</small></i>
- </td>
- </tr>
-
- {* Limit number of images information to be return *}
- <tr>
- <td>
- <label for="add_limit">{'Returned images limit'|@translate}</label>
- </td>
- <td>
- <select name="add_limit" id="add_limit" style="width: 10em"
- onfocus="this.className='focus';"
- onblur="this.className='nofocus';">
- {html_options values=$add_limits output=$add_limits}
- </select>
- </td>
- </tr>
-
- {* Open service is postponed by n days *}
- {* In comment currently
- <tr>
- <td>
- <label for="add_start">{'Postponed availability in days'|@translate}</label>
- </td>
- <td>
- <select name="add_start" id="add_start" style="width: 10em"
- onfocus="this.className='focus';"
- onblur="this.className='nofocus';">
- <!-- BEGIN add_start -->
- <option value="{add_start.VALUE}"
- {add_start.SELECTED}>{add_start.CONTENT}
- </option>
- <!-- END add_start -->
- </select>
- </td>
- </tr>
- *}
-
- {* Opened service only for n days *}
- <tr>
- <td>
- <label for="add_end">{'Duration in days'|@translate}</label>
- </td>
- <td>
- <select name="add_end" id="add_end" style="width: 10em"
- onfocus="this.className='focus';"
- onblur="this.className='nofocus';">
- {html_options values=$add_ends output=$add_ends}
- </select>
- </td>
- </tr>
-
- {* Idendify your partner (name / website / phone) as you want *}
- <tr>
- <td>
- <label for="add_Comment">{'ws_Comment'|@translate}</label>
- <br />
- </td>
- <td>
- <textarea name="add_comment" id="add_comment"
- rows="4" cols="80">{'Comment to identify your partner clearly'|@translate}</textarea>
- </td>
- </tr>
-
- {* Add submit button *}
- <tr>
- <td>
- </td>
- <td>
- <input class="submit" type="submit" name="wsa_submit" style="width: 10em; padding-top: 3px;"
- value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}
- title="{'Add this access definition'|@translate}" />
- </td>
- </tr>
- </table>
- </fieldset>
-</form>
-
-{if !empty($access_list)}
-<!-- Access list -->
-<form method="post" name="preferences" action="{$F_STATUS_ACTION}">
- <input type="hidden" name="partner_prev" value="{$F_PREV_PARTNER}">
- <input type="hidden" name="request_prev" value="{$F_PREV_REQUEST}">
- <input type="hidden" name="high_prev" value="{$F_PREV_HIGH}">
- <input type="hidden" name="normal_prev" value="{$F_PREV_NORMAL}">
- <input type="hidden" name="order_prev" value="{$F_PREV_ORDER}">
- <input type="hidden" name="dir5n_prev" value="{$F_PREV_DIR5N}">
- <!-- Delete / Update Selected -->
- <fieldset>
- <legend>{'ws_update_legend'|@translate}</legend>
- <table class="table2">
- <tr class="throw">
- <th>&nbsp;</th>
- <th>{'ws_KeyName'|@translate}</th>
- <th>{'ws_Access'|@translate}</th>
- <th>{'ws_End'|@translate}</th>
- <th>{'ws_Request'|@translate}</th>
- <th>{'ws_Limit'|@translate}</th>
- <th>{'ws_Comment'|@translate}</th>
- </tr>
- {foreach from=$access_list item=access name=access_loop}
- <tr class="{if $smarty.foreach.access_loop.index is odd}row1{else}row2{/if}">
- <td>
- <input type="radio" name="selection"
- value="{$access.ID}" id="selection-{$access.ID}">
- </td>
- <td><label for="selection-{$access.ID}">{$access.NAME}</label></td>
- <td>{$access.TARGET}</td>
- <td>{$access.END}</td>
- <td>{$access.REQUEST}</td>
- <td>{$access.LIMIT}</td>
- <td>{$access.COMMENT}</td>
- </tr>
- {/foreach}
- </table>
-
- <table>
- <tr>
- <td>
- {'ws_delete_legend'|@translate}
- </td>
- <td>
- <input type="radio" name="delete_confirmation"
- value="true">
- <input class="submit" type="submit" name="wsX_submit" style="width: 10em; padding-top: 3px;"
- value="{'Delete'|@translate}" {$TAG_INPUT_ENABLED}>
- </td>
- </tr>
- </table>
- <hr>
- <table>
- <tr>
- <td>
- <span class="property">
- <label for="upd_end">{'Modify End from Now +'|@translate} </label>
- </span>
- <select name="upd_end" id="upd_end" style="width: 10em"
- onfocus="this.className='focus';"
- onblur="this.className='nofocus';">
- {html_options values=$add_ends output=$add_ends}
- </select>
- <input class="submit" type="submit" name="wsu_submit" style="width: 10em; padding-top: 3px;"
- value="{'Submit'|@translate}" {$TAG_INPUT_ENABLED}>
- </td>
- <td>
- <i><small> ({'Web Services availability duration in days'|@translate})</small></i>
- </td>
- </tr>
- </table>
-
- </fieldset>
-</form>
-{/if}
-
-{if isset($WS_STATUS)}
- <h3>{$WS_STATUS}</h3>
-{/if}
diff --git a/BSF/template/yoga/comments.tpl b/BSF/template/yoga/comments.tpl
deleted file mode 100644
index 2e2beaf34..000000000
--- a/BSF/template/yoga/comments.tpl
+++ /dev/null
@@ -1,99 +0,0 @@
-{* $Id$ *}
-<div id="content" class="content">
-
- <div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HOME}" title="{'return to homepage'|@translate}"><img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
- </ul>
- <h2>{'User comments'|@translate}</h2>
- </div>
-
-<form class="filter" action="{$F_ACTION}" method="get">
-
- <fieldset>
- <legend>{'Filter'|@translate}</legend>
-
- <label>{'Keyword'|@translate}<input type="text" name="keyword" value="{$F_KEYWORD}" /></label>
-
- <label>{'Author'|@translate}<input type="text" name="author" value="{$F_AUTHOR}" /></label>
-
- <label>
- {'Category'|@translate}
- <select name="cat">
- <option value="0">------------</option>
- {html_options options=$categories selected=$categories_selected}
- </select>
- </label>
-
- <label>
- {'Since'|@translate}
- <select name="since">
- {html_options options=$since_options selected=$since_options_selected}
- </select>
- </label>
-
- </fieldset>
-
- <fieldset>
-
- <legend>{'Display'|@translate}</legend>
-
- <label>
- {'Sort by'|@translate}
- <select name="sort_by">
- {html_options options=$sort_by_options selected=$sort_by_options_selected}
- </select>
- </label>
-
- <label>
- {'Sort order'|@translate}
- <select name="sort_order">
- {html_options options=$sort_order_options selected=$sort_order_options_selected}
- </select>
- </label>
-
- <label>
- {'Number of items'|@translate}
- <select name="items_number">
- {html_options options=$item_number_options selected=$item_number_options_selected}
- </select>
- </label>
-
- </fieldset>
-
- <p><input class="submit" type="submit" value="{'Filter and display'|@translate}"></p>
-
-</form>
-
-<div class="navigationBar">{$NAVBAR}</div>
-
-{if isset($comments)}
-<div id="comments">
-
- {foreach from=$comments item=comment}
- <div class="comment">
- <a class="illustration" href="{$comment.U_PICTURE}"><img src="{$comment.TN_SRC}" alt="{$comment.ALT}" /></a>
- <p class="commentHeader"><span class="author">{$comment.AUTHOR}</span> - <span class="date">{$comment.DATE}</span>
-
- {if isset($comment.U_DELETE)}
- <a href="{$comment.U_DELETE}" title="{'comments_del'|@translate}">
- <img src="{$ROOT_URL}{$themeconf.icon_dir}/delete.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[{'delete'|@translate}]"/>
- </a>
- {/if}
-
- {if isset($comment.U_VALIDATE)}
- <a href="{$comment.U_VALIDATE}" title="validate this comment">
- <img src="{$ROOT_URL}{$themeconf.icon_dir}/validate_s.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[validate]"/>
- </a>
- {/if}
-
- </p>
- <blockquote>{$comment.CONTENT}</blockquote>
- <hr class="separation">
- </div>
-
- {/foreach}
-</div>
-{/if}
-
-</div> <!-- content -->
diff --git a/BSF/template/yoga/content.css b/BSF/template/yoga/content.css
deleted file mode 100644
index 05e246069..000000000
--- a/BSF/template/yoga/content.css
+++ /dev/null
@@ -1,241 +0,0 @@
-/* $Id$ */
-.content {
- margin-right: 1em;
- margin-bottom: 1em; /* when it's longer than menu bar */
-}
-
-BODY#theCommentsPage .content,
-BODY#theUploadPage .content,
-BODY#theRegisterPage .content,
-BODY#theIdentificationPage .content,
-BODY#theProfilePage .content,
-BODY#theSearchPage .content,
-BODY#theAboutPage .content,
-BODY#thePopuphelpPage .content,
-BODY#thePasswordPage .content,
-BODY#theNotificationPage .content,
-BODY#theTagsPage .content,
-BODY#theNBMPage .content
-{
- margin: 1em;
-}
-
-.content H3 {
- margin-bottom: 1ex;
-}
-
-.content H2 { margin-bottom: 3px;} /*<- for IE otherwise calendar select is displaced to middle of page*/
-
-.content H3 {
- text-align: center;
-}
-
-.content .navigationBar, .content .additional_info {
- margin: 10px 0;
- text-align: center;
-}
-
-.content .pageNumberSelected {
- font-style: italic;
- font-weight: bold;
-}
-
-.content .additional_info {
- font-size: 110%;
-}
-
-.content FORM {
- text-align: left;
-}
-
-/* content defaults */
-.content DL, DD { margin: 10px; }
-.content DT {
- margin-bottom: 5px;
- font-style: italic;
- font-size: 110%;
-}
-
-/* actions */
-UL.categoryActions {
- margin: 0 2px;
- width: auto;
- padding: 0;
- text-indent: 0;
- list-style: none;
- text-align: center;
-}
-
-.content DIV.titrePage UL.categoryActions {
- float: right;
- text-align: center;
-}
-
-.content DIV.titrePage {
- padding: 0 0 3px;
-}
-
-.content UL.categoryActions LI {
- display: inline;
-}
-
-.content UL.categoryActions A IMG, UL.categoryActions A {
- border: none;
- margin-bottom: -5px;
-}
-
-/* User comments */
-
-.content DIV#comments {
- padding-left: 5px;
- padding-right: 5px;
-}
-.content DIV.comment {
- margin: 0 0 0.5em 0;
- padding: 0;
- overflow: hidden; /* these 2 lines keep the floating child in the DIV */
- width: 100%; /* don't ask why. It's a very usefull trick */
-}
-
-.content DIV.comment A.illustration {
- display: block;
- float: left;
- margin: 0.5em 0 0 0.5em;
-}
-
-.content DIV.comment P.commentHeader {
- text-align: right;
- margin: 0.5em 0.5em 0 0;
-}
-
-.content DIV.comment UL.actions {
- text-align: center;
- margin: 0.2em;
-}
-
-.content DIV.comment BLOCKQUOTE {
- margin-right: 0.5em;
- overflow: visible; /*avoid a very strange margin behaviour (all browsers) */
-}
-
-/* begin chronology/calendar elements*/
-.content DIV.calendarViews {
- display: block;
- float: right;
- margin: 2px 0 0;
-}
-
-.content DIV.calendarBar { margin: 8px 4px; }
-
-SPAN.calItem, SPAN.calItemEmpty {
- font-weight: bold;
- margin: 0 1px;
-}
-
-SPAN.calItem A { border:0 }
-
-.content DIV.calendarCalBar {
- margin: 10px 10px;
- text-align: left;
-}
-
-SPAN.calCalHead {
- font-weight: bold;
- font-size: 110%;
- margin: 0 2px;
-}
-
-SPAN.calCal { margin: 0 2px; }
-
-/* nice looking month calendar*/
-TABLE.calMonth {
- border: none;
- border-collapse: collapse;
- margin-bottom: 10px; /*<-IE ignores this */
-}
-
-TD.calDayCellFull, TD.calDayCellEmpty, TD.calDayCellBlank {
- text-align:left;
- vertical-align: top;
- font: bold 18px Arial, Helvetica, sans-serif;
-}
-
-TD.calDayHead { font: bold 12px Arial, Helvetica, sans-serif; }
-
-DIV.calImg {
- overflow: hidden;
- vertical-align: bottom;
- z-index: 1;
- position: relative; /*<- this required by IE*/
-}
-
-.calImg img {
- position: relative;
- border: 0;
-}
-
-.calBackDate {
- padding-left: 4px;
- padding-top: 0px;
- z-index: 2;
- position: absolute;
- text-align: left;
- vertical-align: top;
- color: #000;
-}
-
-.calForeDate {
- padding-left: 5px;
- padding-top: 1px;
- z-index: 3;
- position: absolute;
- text-align: left;
- vertical-align: top;
- color: #fff;
-}
-
-/* Category thumbnails on main page, CSS code inspired from MOD subcatify */
-.content UL.thumbnailCategories {
- margin: 0;
- padding: 0;
- list-style: none;
- text-align: center;
- overflow: hidden;
- width: 100%;
-}
-
-.content UL.thumbnailCategories LI {
- margin:0;
- padding:0;
- float:left;
-}
-
-.content DIV.thumbnailCategory {
- display:block;
- padding: 2px 0px 0px 2px;
- margin: 5px;
-}
-
-.content DIV.thumbnailCategory DIV.description {
- font-size: 90%;
- overflow: auto;
- /*width: inherit;*/
-}
-
-.content DIV.thumbnailCategory DIV.description H3 {
- text-align: left;
- background: transparent;
- margin: 0;
- padding: 0.1em;
- font-size: 120%;
-}
-
-.content DIV.thumbnailCategory DIV.description P {
- margin: 0;
-}
-
-.content DIV.thumbnailCategory DIV.illustration {
- text-align: left;
- margin: 2px 0 0 2px;
- float: left;
-}
diff --git a/BSF/template/yoga/default-colors.css b/BSF/template/yoga/default-colors.css
deleted file mode 100644
index 1534e4f11..000000000
--- a/BSF/template/yoga/default-colors.css
+++ /dev/null
@@ -1,112 +0,0 @@
-/* $Id$ */
-
-/* others */
-
-#imageToolBar * {
- background: inherit;
-}
-
-/* So that non-links are slightly greyed out */
-.content .navigationBar, SPAN.calItemEmpty, TD.calDayCellEmpty {
- color: #b0b0b0;
-}
-
-/* Tables & forms */
-
-/* IE <= 6 is so bad with this that you can't merge with the following rule */
-INPUT[type="text"], INPUT[type="password"], INPUT[type="button"],
-INPUT[type="submit"], INPUT[type="reset"], INPUT[type="file"] {
- color:black;
- background-color: #d3d3d3; /* lightgrey */
-}
-
-INPUT.text, INPUT.password, INPUT.button,
-INPUT.submit, INPUT.reset, INPUT.file,
-SELECT, TEXTAREA {
- color:black;
- background-color: #d3d3d3; /* lightgrey */
-}
-
-INPUT:focus, SELECT:focus, TEXTAREA:focus, INPUT.focus, FORM .focus {
- background-color: #f5f5f5; /* whitesmoke */
-}
-
-/* some theme set a border on INPUT which is not pretty for radio/checkbox */
-INPUT[type="radio"], INPUT[type="checkbox"] {
- border: none; /* <= Opera needs this */
-}
-
-INPUT.radio, INPUT.checkbox {
- border: none; /* <= IE6 needs this */
-}
-
-/* rate buttons displayed like links */
-INPUT.rateButton, INPUT.rateButtonSelected, INPUT.rateButtonStarFull, INPUT.rateButtonStarEmpty {
- color:inherit;
- background-color:transparent; /* Konqueror doesn't accept transparent here */
-}
-
-.errors { /* Errors display */
- color: red;
- background-color: #ffe1e1;
- font-weight: bold;
- text-align: left;
- margin: 5px;
- border: 1px solid red;
- background-image: url(icon/admin/errors.png);
- background-repeat: no-repeat;
- background-position: top right;
- padding: 10px 50px 10px 10px;
-}
-
-/**
- * Informations box in administration
- */
-.infos {
- text-align: left;
- color: #002000;
- background-color: #98fb98; /* palegreen */
- background-image: url(icon/admin/infos.png);
- background-repeat: no-repeat;
- background-position: top right;
- margin: 5px;
- padding: 10px 50px 10px 10px;
-}
-
-/**
- * Header message like upgrade or adviser mode
- */
-.header_msgs {
- text-align:center;
- font-weight: bold;
- color:#696969; /* dimgray */
- background-color: #d3d3d3;
- margin: 1px;
- padding: 1px;
-}
-
-/**
- * Header notes box in public/administration
- */
-.header_notes {
- border: 1px solid #aaaaaa; /* border color and style */
- text-align: center;
- background-image: url(icon/note.png);
- background-repeat: no-repeat;
- background-position: top left;
- font-weight: bold;
- margin: 14px;
- padding: 5px 00px 0px 0px;
-}
-
-LEGEND {
- font-style: italic;
-}
-
-/*calendar*/
-SPAN.calItem, SPAN.calItemEmpty,
-TD.calDayCellEmpty, TD.calDayCellFull {
- border: 1px solid gray;
-}
-
-
diff --git a/BSF/template/yoga/default-layout.css b/BSF/template/yoga/default-layout.css
deleted file mode 100644
index c6b229481..000000000
--- a/BSF/template/yoga/default-layout.css
+++ /dev/null
@@ -1,270 +0,0 @@
-/* $Id$ */
-@import "admin/default-layout.css";
-BODY {
- margin: 5px;
- padding: 0;
- font-size: 0.8em;
- font-family: Univers, Helvetica, Optima, "Bitstream Vera Sans", sans-serif;
- text-align: center; /* be nice to IE5 */
-}
-
-#the_page {
- /* Just in case another template needs an inner frame */
-}
-
-H1 {
- text-align: center;
- font-size: 150%;
- font-weight: bold;
- padding: 0;
- margin: 0.5em 0 1em 0;
-}
-
-H2 {
- margin: 0;
- padding: 5px 0.5em 5px 0.5em;
- text-align: left;
- font-size: 120%;
-}
-
-A {
- text-decoration:none;
- border-bottom: 1px dotted #005e89;
-}
-A:hover {
- border-bottom: 1px solid #858460;
-}
-A.button, A.button:hover {
- border: 0;
-}
-IMG {
- border: none;
-}
-
-HR.separation {
- visibility: hidden;
- clear: both;
-}
-
-#copyright {
- clear: both;
- font-size: 83%;
- text-align: center;
- margin: 0 0 10px 0;
-}
-
-/** General defaults **/
-INPUT, SELECT {
- margin: 0;
- font-size: 1em; /* <= some browsers don't set it correctly */
-}
-UL, DL, LI { text-align: left;}
-TABLE { /* horizontaly centered */
- margin-left: auto;
- margin-right: auto;
-}
-/* for debugging purpose */
-PRE { text-align:left; }
-
-/** forms **/
-
-FORM { padding: 0em; }
-
-FORM P {
- text-align: center;
- margin-top: 2em;
- margin-bottom: 2em;
-}
-
-FORM FIELDSET P {
- margin-top: 1em;
- margin-bottom: 0;
-}
-
-.small {
- font-size: 80%;
-}
-
-TEXTAREA.description {
- height: 6em;
- width: 40em;
- overflow: auto;
-}
-
-SELECT.categoryList {
- height: 20em;
- width: auto;
-}
-
-DIV.comment BLOCKQUOTE {
- padding: 0.5em;
- overflow: auto; /* no solution for IE6 */
- min-height: 2.75em; /* fix a Gecko bug whith scrollbar and 1 line only */
-}
-
-
-/**
- * Filter forms are displayed label by label with the input (or select...)
- * below the label. Use an UL to make a group (radiobox for instance).
- * Use a SPAN to group objects in line
- */
-FIELDSET {
- padding: 1em;
- margin: 1em;
- overflow: hidden; /* <- makes Opera happy */
-}
-
-FORM.filter FIELDSET UL {
- margin: 0;
-}
-FORM.filter FIELDSET UL,
-FORM.filter FIELDSET LABEL {
- display: block;
- float: left;
- margin-right: 1em;
- padding: 0;
-}
-
-FORM.filter FIELDSET LI {
- list-style: none;
- margin-bottom: 0.5em;
-}
-
-FORM.filter FIELDSET LI LABEL {
- display: inline;
- float: none;
-}
-
-FORM.filter FIELDSET UL.tagSelection LABEL {
- display: inline;
- float: none;
- margin-right:0.5em;/*reduce from above*/
-}
-
-/* cannot use FIELDSET>LABEL because of IE<=6 */
-FORM.filter FIELDSET LABEL INPUT,
-FORM.filter FIELDSET LABEL SELECT,
-FORM.filter FIELDSET LABEL SPAN,
-FORM.filter FIELDSET LABEL TEXTAREA {
- display: block;
- margin: 0.5em 0;
-}
-FORM.filter FIELDSET * LABEL INPUT,
-FORM.filter FIELDSET * LABEL SELECT,
-FORM.filter FIELDSET * LABEL TEXTAREA,
-FORM.filter FIELDSET LABEL SPAN INPUT,
-FORM.filter FIELDSET LABEL SPAN SELECT,
-FORM.filter FIELDSET LABEL SPAN TEXTAREA {
- display: inline;
- vertical-align: top;
- margin: 0 0.5em 0 0;
-}
-
-FORM.filter FIELDSET UL.tagSelection LI LABEL INPUT {
- margin-right:0;
-}
-
-/* following declaration is important to avoid strange FF behaviour */
-FORM.filter FIELDSET LABEL SPAN SELECT {
- margin: 0;
-}
-
-FORM.filter FIELDSET P
-{
- clear: left;
- display: block;
-}
-
-FORM.filter INPUT[type="submit"] {
- margin-top: 1em;
-}
-
-FORM.properties UL, FORM#update UL {
- list-style-type: none;
- margin: 0;
- padding: 0;
-}
-
-FORM.properties LI, FORM#update UL {
- margin-bottom: 0.5em;
- padding: 0;
- line-height: 1.8em;
- clear: left;
-}
-
-FORM.properties SPAN.property {
- font-weight: bold;
- float: left;
- width: 50%;
- text-align: right;
- margin: 0;
- padding: 0 0.5em 0 0;
-}
-
-#theHeader H1 {
- margin-bottom: 0.5em;
-}
-
-/* button tools */
-UL.actions {
- text-indent: 0;
- list-style: none;
-}
-UL.actions LI {
- display: inline;
-}
-UL.actions A {
- border: none;
-}
-
-UL.tagSelection {
- width: 99%;
- margin: 1em 0 1em 0;
- padding: 0;
-}
-
-UL.tagSelection LI {
- display: inline;
- white-space: nowrap;
-}
-
-#fullTagCloud {
- font-size: 120%;
- text-align: justify;
- padding: 0;
- margin: 1em 2em 1em 2em;
-}
-
-#fullTagCloud LI {
- display: inline;
- white-space: nowrap;
- margin: 0 2px;
-}
-
-
-.tagLevel5 { font-size: 150%; }
-.tagLevel4 { font-size: 140%; }
-.tagLevel3 { font-size: 120%; }
-.tagLevel2 { font-size: 100%; }
-.tagLevel1 { font-size: 90%; }
-
-
-/* Popup help page */
-BODY#thePopuphelpPage #copyright {
- display: none;
-}
-
-BODY#thePopuphelpPage .content P {
- text-align: justify;
- padding: 0.5em;
-}
-
-BODY#thePopuphelpPage .content OL LI,
-BODY#thePopuphelpPage .content UL LI
-{
- margin-bottom: 0.5em;
-}
-
-BODY#thePopuphelpPage P#pageBottomActions A {
- border: none;
-}
diff --git a/BSF/template/yoga/fix-ie5-ie6.css b/BSF/template/yoga/fix-ie5-ie6.css
deleted file mode 100644
index b78bc7bf4..000000000
--- a/BSF/template/yoga/fix-ie5-ie6.css
+++ /dev/null
@@ -1,23 +0,0 @@
-/* $Id$ */
-/* Issues in IE from 5 to 6 only not to be used with IE7 */
-
-@import "thumbnails-fix-ie5-ie6.css";
-
-/* to avoid vanishing objects in IE6 */
-H1, #theHeader {
- width: 100%; /* <- useless but seems to make IE6 happy */
-}
-.content {
- height: 1em; /* for IE6 it's like min-height */
-}
-
-/* fix category thumbnails on main page */
-.content UL.thumbnailCategories {
- width: 99%; /* buggy IE box model */
-}
-
-
-/* fix quickconnect layout */
-FORM#quickconnect FIELDSET {
- width: 99%; /* correct an ugly 1 or 2 px misalignement with IE */
-}
diff --git a/BSF/template/yoga/fix-ie7.css b/BSF/template/yoga/fix-ie7.css
deleted file mode 100644
index 33599dd18..000000000
--- a/BSF/template/yoga/fix-ie7.css
+++ /dev/null
@@ -1,22 +0,0 @@
-/* $Id$ */
-/* fix IE with another layout for thumbnails */
-
-.content UL.thumbnails SPAN.wrap2 {
- display: block;
- position: relative;
- text-align: left;
-}
-.content UL.thumbnails SPAN.wrap2 A,
-.content UL.thumbnails SPAN.wrap2 SPAN {
- overflow: visible;
- position: absolute;
- top: 50%;
- text-align: center;
-}
-
-.content UL.thumbnails IMG.thumbnail {
- position: relative;
- top: -50%;
- margin-top: 2%;
-}
-
diff --git a/BSF/template/yoga/fix-khtml.css b/BSF/template/yoga/fix-khtml.css
deleted file mode 100644
index 29ffd1877..000000000
--- a/BSF/template/yoga/fix-khtml.css
+++ /dev/null
@@ -1,20 +0,0 @@
-/* $Id$ */
-/* Issue in Safari/Konqueror only */
-/* If H2 has a 0 margin-top categoryActions doesn't float right but overwrites H2 */
-.content>DIV.titrePage>H2 {
- margin: 1px 0 0 0; /* add an arbitrary margin-top */
-}
-
-.content>div.titrePage {
- position: relative;
- top: -1px; /* move the container up by the same amount */
- margin-bottom: 5px;
-}
-
-#menubar #menuTagCloud LI
-{
- display: inline-block;/* required for Safari 3.1 - otherwise overflows on the right */
-}
-
-/* end Safari/Konqueror */
-
diff --git a/BSF/template/yoga/footer.tpl b/BSF/template/yoga/footer.tpl
deleted file mode 100644
index fff70e1f1..000000000
--- a/BSF/template/yoga/footer.tpl
+++ /dev/null
@@ -1,32 +0,0 @@
-{* $Id$ *}
-<div id="copyright">
- <a name="EoP"></a> <!-- End of Page -->
- {if isset($debug.TIME) }
- {'generation_time'|@translate} {$debug.TIME} ({$debug.NB_QUERIES} {'sql_queries_in'|@translate} {$debug.SQL_TIME}) -
- {/if}
-
- {* Please, do not remove this copyright. If you really want to,
- contact us on http://piwigo.org to find a solution on how
- to show the origin of the script...
- *}
-
- {'powered_by'|@translate}
- <a href="http://piwigo.org" class="PWG">
- <span class="P">Php</span><span class="W">Web</span><span class="G">Gallery</span></a>
- {$VERSION}
- {if isset($CONTACT_MAIL)}
- - {'send_mail'|@translate}
- <a href="mailto:{$CONTACT_MAIL}?subject={'title_send_mail'|@translate|@escape:url}">{'Webmaster'|@translate}</a>
- {/if}
-
-</div> <!-- copyright -->
-{if isset($footer_elements)}
-{foreach from=$footer_elements item=v}
-{$v}
-{/foreach}
-{/if}
-</div> <!-- the_page -->
-
-{if isset($debug.QUERIES_LIST)}{$debug.QUERIES_LIST}{/if}
-</body>
-</html> \ No newline at end of file
diff --git a/BSF/template/yoga/header.tpl b/BSF/template/yoga/header.tpl
deleted file mode 100644
index d0bec5e61..000000000
--- a/BSF/template/yoga/header.tpl
+++ /dev/null
@@ -1,84 +0,0 @@
-{* $Id$ *}
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-"http://www.w3.org/TR/html4/strict.dtd">
-<html lang="{$LANG}" dir="{$DIR}">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset={$CONTENT_ENCODING}">
-<meta name="generator" content="Piwigo (aka PWG), see piwigo.org">
-<title>{$GALLERY_TITLE} :: {$PAGE_TITLE}</title>
-<link rel="shortcut icon" type="image/x-icon" href="{$ROOT_URL}template-common/favicon.ico">
-
-<link rel="start" title="{'home'|@translate}" href="{$U_HOME}" >
-<link rel="search" title="{'Search'|@translate}" href="{$ROOT_URL}search.php" >
-{if isset($first.U_IMG) }<link rel="first" title="{'first_page'|@translate}" href="{$first.U_IMG}" >{/if}
-{if isset($previous.U_IMG)}<link rel="prev" title="{'previous_page'|@translate}" href="{$previous.U_IMG}" >{/if}
-{if isset($next.U_IMG) }<link rel="next" title="{'next_page'|@translate}" href="{$next.U_IMG}" >{/if}
-{if isset($last.U_IMG) }<link rel="last" title="{'last_page'|@translate}" href="{$last.U_IMG}" >{/if}
-{if isset($U_UP) }<link rel="up" title="{'thumbnails'|@translate}" href="{$U_UP}" >{/if}
-
-<link rel="stylesheet" type="text/css" href="{$ROOT_URL}template/{$themeconf.template}/layout.css">
-{* the next css is used to fix khtml (Konqueror/Safari) issue the "text/nonsense" prevents gecko based browsers to load it *}
-<link rel="stylesheet" type="text/nonsense" href="{$ROOT_URL}template/{$themeconf.template}/fix-khtml.css">
-<!--[if lt IE 7]>
- <link rel="stylesheet" type="text/css" href="{$ROOT_URL}template/{$themeconf.template}/fix-ie5-ie6.css">
-<![endif]-->
-<!--[if gt IE 6]>
- <link rel="stylesheet" type="text/css" href="{$ROOT_URL}template/{$themeconf.template}/fix-ie7.css">
-<![endif]-->
-<!--[if !IE]> <-->
- <link rel="stylesheet" href="{$ROOT_URL}template/{$themeconf.template}/not-ie.css" type="text/css">
-<!--> <![endif]-->
-<link rel="stylesheet" type="text/css" media="print" href="{$ROOT_URL}template/{$themeconf.template}/print.css">
-<link rel="stylesheet" type="text/css" href="{$ROOT_URL}template/{$themeconf.template}/default-colors.css">
-<link rel="stylesheet" type="text/css" href="{$ROOT_URL}template/{$themeconf.template}/theme/{$themeconf.theme}/theme.css">
-{$themeconf.local_head}
-{if isset($U_PREFETCH) }<link rel="prefetch" href="{$U_PREFETCH}">{/if}
-
-{if not empty($page_refresh) }<meta http-equiv="refresh" content="{$page_refresh.TIME};url={$page_refresh.U_REFRESH}">{/if}
-
-<script type="text/javascript" src="{$ROOT_URL}template-common/scripts.js"></script>
-<!--[if lt IE 7]>
-<style>
- {* only because we need {$ROOT_URL} otherwise use fix-ie5-ie6.css *}
- BODY {ldelim} behavior:url("{$ROOT_URL}template-common/csshover.htc"); }
- A IMG, .button, .icon {ldelim}
- behavior:url("{$ROOT_URL}template-common/tooltipfix.htc");
- }
- FORM {ldelim} behavior: url("{$ROOT_URL}template-common/inputfix.htc"); }
-</style>
-<script type="text/javascript" src="{$ROOT_URL}template-common/pngfix.js"></script>
-<![endif]-->
-
-{if not empty($head_elements)}
- {foreach from=$head_elements item=elt}{$elt}{/foreach}
-{/if}
-
-</head>
-
-<body id="{$BODY_ID}">
-<div id="the_page">
-
-{if not empty($header_msgs)}
-<div class="header_msgs">
- {foreach from=$header_msgs item=elt}
- <p>{$elt}</p>
- {/foreach}
-</div>
-{/if}
-
-<div id="theHeader">{$PAGE_BANNER}</div>
-{if isset($pwgmenu)}
-<ul class="pwgmenu">
- <li><a href="{$pwgmenu.HOME}" onclick="window.open(this.href, ''); return false;"><span class="bg">{'HOME'|@translate}</span></a></li>
- <li><a href="{$pwgmenu.WIKI}" onclick="window.open(this.href, ''); return false;"><span class="bg">{'WIKI / DOC'|@translate}</span></a></li>
- <li><a href="{$pwgmenu.FORUM}" onclick="window.open(this.href, ''); return false;"><span class="bg">{'FORUM'|@translate}</span></a></li>
- <li><a href="{$pwgmenu.EXTENSIONS}" onclick="window.open(this.href, ''); return false;"><span class="bg">{'EXTENSIONS'|@translate}</span></a></li>
-</ul>
-{/if}
-{if not empty($header_notes)}
-<div class="header_notes">
- {foreach from=$header_notes item=elt}
- <p>{$elt}</p>
- {/foreach}
-</div>
-{/if}
diff --git a/BSF/template/yoga/icon/add_tag.png b/BSF/template/yoga/icon/add_tag.png
deleted file mode 100644
index 9051a1d26..000000000
--- a/BSF/template/yoga/icon/add_tag.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/admin/errors.png b/BSF/template/yoga/icon/admin/errors.png
deleted file mode 100644
index 3c8a37df5..000000000
--- a/BSF/template/yoga/icon/admin/errors.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/admin/index.php b/BSF/template/yoga/icon/admin/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/icon/admin/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/icon/admin/infos.png b/BSF/template/yoga/icon/admin/infos.png
deleted file mode 100644
index dc8c8a457..000000000
--- a/BSF/template/yoga/icon/admin/infos.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/admin/plugin_active.gif b/BSF/template/yoga/icon/admin/plugin_active.gif
deleted file mode 100644
index fe49227da..000000000
--- a/BSF/template/yoga/icon/admin/plugin_active.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/admin/plugin_inactive.gif b/BSF/template/yoga/icon/admin/plugin_inactive.gif
deleted file mode 100644
index 19d551865..000000000
--- a/BSF/template/yoga/icon/admin/plugin_inactive.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/caddie_add.png b/BSF/template/yoga/icon/caddie_add.png
deleted file mode 100644
index eb20f4e06..000000000
--- a/BSF/template/yoga/icon/caddie_add.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/calendar.png b/BSF/template/yoga/icon/calendar.png
deleted file mode 100644
index e0a44a13d..000000000
--- a/BSF/template/yoga/icon/calendar.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/calendar_created.png b/BSF/template/yoga/icon/calendar_created.png
deleted file mode 100644
index 14a84c43c..000000000
--- a/BSF/template/yoga/icon/calendar_created.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/category_children.png b/BSF/template/yoga/icon/category_children.png
deleted file mode 100644
index 7205c3f61..000000000
--- a/BSF/template/yoga/icon/category_children.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/category_delete.png b/BSF/template/yoga/icon/category_delete.png
deleted file mode 100644
index da796da11..000000000
--- a/BSF/template/yoga/icon/category_delete.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/category_edit.png b/BSF/template/yoga/icon/category_edit.png
deleted file mode 100644
index 0f3b619ed..000000000
--- a/BSF/template/yoga/icon/category_edit.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/category_elements.png b/BSF/template/yoga/icon/category_elements.png
deleted file mode 100644
index 1d367b38f..000000000
--- a/BSF/template/yoga/icon/category_elements.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/category_jump-to.png b/BSF/template/yoga/icon/category_jump-to.png
deleted file mode 100644
index 62db1f4ee..000000000
--- a/BSF/template/yoga/icon/category_jump-to.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/category_permissions.png b/BSF/template/yoga/icon/category_permissions.png
deleted file mode 100644
index 4780841ae..000000000
--- a/BSF/template/yoga/icon/category_permissions.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/category_representant_random.png b/BSF/template/yoga/icon/category_representant_random.png
deleted file mode 100644
index dfa69846f..000000000
--- a/BSF/template/yoga/icon/category_representant_random.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/check.png b/BSF/template/yoga/icon/check.png
deleted file mode 100644
index d9abf2763..000000000
--- a/BSF/template/yoga/icon/check.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/dec_period.png b/BSF/template/yoga/icon/dec_period.png
deleted file mode 100644
index 107cd16ec..000000000
--- a/BSF/template/yoga/icon/dec_period.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/dec_period_unactive.png b/BSF/template/yoga/icon/dec_period_unactive.png
deleted file mode 100644
index 5bc67affd..000000000
--- a/BSF/template/yoga/icon/dec_period_unactive.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/del_favorite.png b/BSF/template/yoga/icon/del_favorite.png
deleted file mode 100644
index cfc609749..000000000
--- a/BSF/template/yoga/icon/del_favorite.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/delete.png b/BSF/template/yoga/icon/delete.png
deleted file mode 100644
index af10be03e..000000000
--- a/BSF/template/yoga/icon/delete.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/edit_s.png b/BSF/template/yoga/icon/edit_s.png
deleted file mode 100644
index e4951d22f..000000000
--- a/BSF/template/yoga/icon/edit_s.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/exit.png b/BSF/template/yoga/icon/exit.png
deleted file mode 100644
index 2aafbb4cb..000000000
--- a/BSF/template/yoga/icon/exit.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/favorite.png b/BSF/template/yoga/icon/favorite.png
deleted file mode 100644
index 58befd9e3..000000000
--- a/BSF/template/yoga/icon/favorite.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/first.png b/BSF/template/yoga/icon/first.png
deleted file mode 100644
index 2b8db1cff..000000000
--- a/BSF/template/yoga/icon/first.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/first_unactive.png b/BSF/template/yoga/icon/first_unactive.png
deleted file mode 100644
index f0c0364f2..000000000
--- a/BSF/template/yoga/icon/first_unactive.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/flat.png b/BSF/template/yoga/icon/flat.png
deleted file mode 100644
index 43584e825..000000000
--- a/BSF/template/yoga/icon/flat.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/help.png b/BSF/template/yoga/icon/help.png
deleted file mode 100644
index c76f68292..000000000
--- a/BSF/template/yoga/icon/help.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/home.png b/BSF/template/yoga/icon/home.png
deleted file mode 100644
index cce450d85..000000000
--- a/BSF/template/yoga/icon/home.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/inc_period.png b/BSF/template/yoga/icon/inc_period.png
deleted file mode 100644
index 28fef3d1b..000000000
--- a/BSF/template/yoga/icon/inc_period.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/inc_period_unactive.png b/BSF/template/yoga/icon/inc_period_unactive.png
deleted file mode 100644
index f45507dce..000000000
--- a/BSF/template/yoga/icon/inc_period_unactive.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/index.php b/BSF/template/yoga/icon/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/icon/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/icon/last.png b/BSF/template/yoga/icon/last.png
deleted file mode 100644
index 12e1367a7..000000000
--- a/BSF/template/yoga/icon/last.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/last_unactive.png b/BSF/template/yoga/icon/last_unactive.png
deleted file mode 100644
index 90469d5c4..000000000
--- a/BSF/template/yoga/icon/last_unactive.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/left.png b/BSF/template/yoga/icon/left.png
deleted file mode 100644
index 63d306c9c..000000000
--- a/BSF/template/yoga/icon/left.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/left_unactive.png b/BSF/template/yoga/icon/left_unactive.png
deleted file mode 100644
index 0aefc64e4..000000000
--- a/BSF/template/yoga/icon/left_unactive.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/lost_password.png b/BSF/template/yoga/icon/lost_password.png
deleted file mode 100644
index ad6d71422..000000000
--- a/BSF/template/yoga/icon/lost_password.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/metadata.png b/BSF/template/yoga/icon/metadata.png
deleted file mode 100644
index d5d8fa6dc..000000000
--- a/BSF/template/yoga/icon/metadata.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/mimetypes/avi.png b/BSF/template/yoga/icon/mimetypes/avi.png
deleted file mode 100644
index 065f0b282..000000000
--- a/BSF/template/yoga/icon/mimetypes/avi.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/mimetypes/index.php b/BSF/template/yoga/icon/mimetypes/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/icon/mimetypes/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/icon/mimetypes/mp3.png b/BSF/template/yoga/icon/mimetypes/mp3.png
deleted file mode 100644
index afb7e1b0a..000000000
--- a/BSF/template/yoga/icon/mimetypes/mp3.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/mimetypes/mpg.png b/BSF/template/yoga/icon/mimetypes/mpg.png
deleted file mode 100644
index f7dbd2388..000000000
--- a/BSF/template/yoga/icon/mimetypes/mpg.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/mimetypes/ogg.png b/BSF/template/yoga/icon/mimetypes/ogg.png
deleted file mode 100644
index ead3f62c3..000000000
--- a/BSF/template/yoga/icon/mimetypes/ogg.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/mimetypes/zip.png b/BSF/template/yoga/icon/mimetypes/zip.png
deleted file mode 100644
index 1f08fe1a3..000000000
--- a/BSF/template/yoga/icon/mimetypes/zip.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/normal_mode.png b/BSF/template/yoga/icon/normal_mode.png
deleted file mode 100644
index 92d27a234..000000000
--- a/BSF/template/yoga/icon/normal_mode.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/note.png b/BSF/template/yoga/icon/note.png
deleted file mode 100644
index 5849f791b..000000000
--- a/BSF/template/yoga/icon/note.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/page_end.png b/BSF/template/yoga/icon/page_end.png
deleted file mode 100644
index c8f54fb91..000000000
--- a/BSF/template/yoga/icon/page_end.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/page_top.png b/BSF/template/yoga/icon/page_top.png
deleted file mode 100644
index 8b18f13c3..000000000
--- a/BSF/template/yoga/icon/page_top.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/pause.png b/BSF/template/yoga/icon/pause.png
deleted file mode 100644
index 6a3928c51..000000000
--- a/BSF/template/yoga/icon/pause.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/permissions.png b/BSF/template/yoga/icon/permissions.png
deleted file mode 100644
index 33091eb85..000000000
--- a/BSF/template/yoga/icon/permissions.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/play.png b/BSF/template/yoga/icon/play.png
deleted file mode 100644
index dfde7e96a..000000000
--- a/BSF/template/yoga/icon/play.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/preferences.png b/BSF/template/yoga/icon/preferences.png
deleted file mode 100644
index 0f3b619ed..000000000
--- a/BSF/template/yoga/icon/preferences.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/rating-stars.gif b/BSF/template/yoga/icon/rating-stars.gif
deleted file mode 100644
index 535443e06..000000000
--- a/BSF/template/yoga/icon/rating-stars.gif
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/recent.png b/BSF/template/yoga/icon/recent.png
deleted file mode 100644
index 78c1428ca..000000000
--- a/BSF/template/yoga/icon/recent.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/recent_by_child.png b/BSF/template/yoga/icon/recent_by_child.png
deleted file mode 100644
index 48e2b4bf7..000000000
--- a/BSF/template/yoga/icon/recent_by_child.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/register.png b/BSF/template/yoga/icon/register.png
deleted file mode 100644
index d1dd3c834..000000000
--- a/BSF/template/yoga/icon/register.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/remove_s.png b/BSF/template/yoga/icon/remove_s.png
deleted file mode 100644
index c78c38f17..000000000
--- a/BSF/template/yoga/icon/remove_s.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/representative.png b/BSF/template/yoga/icon/representative.png
deleted file mode 100644
index f1141d91b..000000000
--- a/BSF/template/yoga/icon/representative.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/right.png b/BSF/template/yoga/icon/right.png
deleted file mode 100644
index f998098e4..000000000
--- a/BSF/template/yoga/icon/right.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/right_unactive.png b/BSF/template/yoga/icon/right_unactive.png
deleted file mode 100644
index cf2f9614c..000000000
--- a/BSF/template/yoga/icon/right_unactive.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/save.png b/BSF/template/yoga/icon/save.png
deleted file mode 100644
index b4b9da08b..000000000
--- a/BSF/template/yoga/icon/save.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/search_rules.png b/BSF/template/yoga/icon/search_rules.png
deleted file mode 100644
index 300186647..000000000
--- a/BSF/template/yoga/icon/search_rules.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/start_filter.png b/BSF/template/yoga/icon/start_filter.png
deleted file mode 100644
index 3d81a4d2e..000000000
--- a/BSF/template/yoga/icon/start_filter.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/start_repeat.png b/BSF/template/yoga/icon/start_repeat.png
deleted file mode 100644
index 74272979e..000000000
--- a/BSF/template/yoga/icon/start_repeat.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/start_slideshow.png b/BSF/template/yoga/icon/start_slideshow.png
deleted file mode 100644
index 9733eb445..000000000
--- a/BSF/template/yoga/icon/start_slideshow.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/stop_filter.png b/BSF/template/yoga/icon/stop_filter.png
deleted file mode 100644
index 1ff012e96..000000000
--- a/BSF/template/yoga/icon/stop_filter.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/stop_repeat.png b/BSF/template/yoga/icon/stop_repeat.png
deleted file mode 100644
index f1cc1b564..000000000
--- a/BSF/template/yoga/icon/stop_repeat.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/stop_slideshow.png b/BSF/template/yoga/icon/stop_slideshow.png
deleted file mode 100644
index 7b8d3ac26..000000000
--- a/BSF/template/yoga/icon/stop_slideshow.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/sync_metadata.png b/BSF/template/yoga/icon/sync_metadata.png
deleted file mode 100644
index 03570ead6..000000000
--- a/BSF/template/yoga/icon/sync_metadata.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/toggle_is_default_group.png b/BSF/template/yoga/icon/toggle_is_default_group.png
deleted file mode 100644
index 9eaa3c601..000000000
--- a/BSF/template/yoga/icon/toggle_is_default_group.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/uncheck.png b/BSF/template/yoga/icon/uncheck.png
deleted file mode 100644
index 2f7df3503..000000000
--- a/BSF/template/yoga/icon/uncheck.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/up.png b/BSF/template/yoga/icon/up.png
deleted file mode 100644
index 0c9cda5b1..000000000
--- a/BSF/template/yoga/icon/up.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/validate_s.png b/BSF/template/yoga/icon/validate_s.png
deleted file mode 100644
index 400bf8a24..000000000
--- a/BSF/template/yoga/icon/validate_s.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/icon/virt_category.png b/BSF/template/yoga/icon/virt_category.png
deleted file mode 100644
index 15f4f2267..000000000
--- a/BSF/template/yoga/icon/virt_category.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/identification.tpl b/BSF/template/yoga/identification.tpl
deleted file mode 100644
index 71ba02750..000000000
--- a/BSF/template/yoga/identification.tpl
+++ /dev/null
@@ -1,71 +0,0 @@
-{* $Id$ *}
-<div id="content" class="content">
-
- <div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/lost_password.png" class="button" alt="{'Forgot your password?'|@translate}"></a></li>
- {if isset($U_REGISTER) }
- <li><a href="{$U_REGISTER}" title="{'Create a new account'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/register.png" class="button" alt="{'Register'|@translate}"/></a></li>
- {/if}
- <li><a href="{$U_HOME}" title="{'Go through the gallery as a visitor'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
- </ul>
- <h2>{'Identification'|@translate}</h2>
- </div>
-
- {if isset($errors) }
- <div class="errors">
- <ul>
- {foreach from=$errors item=error}
- <li>{$error}</li>
- {/foreach}
- </ul>
- </div>
- {/if}
-
-<form action="{$F_LOGIN_ACTION}" method="post" name="login_form" class="properties">
- <fieldset>
- <legend>{'Connection settings'|@translate}</legend>
-
- <input type="hidden" name="redirect" value="{$U_REDIRECT}">
-
- <ul>
- <li>
- <span class="property">
- <label for="username">{'Username'|@translate}</label>
- </span>
- <input tabindex="1" class="login" type="text" name="username" id="username" size="25" maxlength="40" />
- </li>
-
- <li>
- <span class="property">
- <label for="password">{'Password'|@translate}</label>
- </span>
- <input tabindex="2" class="login" type="password" name="password" id="password" size="25" maxlength="25" />
- </li>
-
- {if $authorize_remembering }
- <li>
- <span class="property">
- <label for="remember_me">{'remember_me'|@translate}</label>
- </span>
- <input tabindex="3" type="checkbox" name="remember_me" id="remember_me" value="1">
- </li>
- {/if}
- </ul>
- </fieldset>
-
- <p><input class="submit" tabindex="4" type="submit" name="login" value="{'Submit'|@translate}"></p>
-</form>
-
-<script type="text/javascript"><!--
-document.login_form.username.focus();
-//--></script>
-
- <p>
- {if isset($U_REGISTER) }
- <a href="{$U_REGISTER}" title="{'Create a new account'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/register.png" class="button" alt="{'Register'|@translate}"> {'Register'|@translate}</a>
- {/if}
- <a href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/lost_password.png" class="button" alt="{'Forgot your password?'|@translate}"> {'Forgot your password?'|@translate}</a>
- </p>
-
-</div> <!-- content -->
diff --git a/BSF/template/yoga/index.php b/BSF/template/yoga/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/index.tpl b/BSF/template/yoga/index.tpl
deleted file mode 100644
index 814cce81f..000000000
--- a/BSF/template/yoga/index.tpl
+++ /dev/null
@@ -1,119 +0,0 @@
-{* $Id$ *}
-{$MENUBAR}
-{if !empty($PLUGIN_INDEX_CONTENT_BEFORE)}{$PLUGIN_INDEX_CONTENT_BEFORE}{/if}
-<div id="content" class="content">
- <div class="titrePage">
- <ul class="categoryActions">
- <li>&nbsp;</li>
- {if !empty($image_orders) }
- <li>
- {'Sort order'|@translate}:
- <select onchange="document.location = this.options[this.selectedIndex].value;">
- {foreach from=$image_orders item=image_order }
- <option value="{$image_order.URL}"{if $image_order.SELECTED} selected="selected"{/if}}>{$image_order.DISPLAY}</option>
- {/foreach}
- </select>
- </li>
- {/if}
-
- {if isset($U_CADDIE) }
- <li><a href="{$U_CADDIE}" title="{'add to caddie'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/caddie_add.png" class="button" alt="{'caddie'|@translate}"/></a></li>
- {/if}
-
- {if isset($U_EDIT) }
- <li><a href="{$U_EDIT}" title="{'edit category informations'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/category_edit.png" class="button" alt="{'edit'|@translate}"/></a></li>
- {/if}
-
- {if isset($U_SEARCH_RULES) }
- <li><a href="{$U_SEARCH_RULES}" style="border:none;" onclick="popuphelp(this.href); return false;" title="{'Search rules'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/search_rules.png" class="button" alt="(?)"></a></li>
- {/if}
-
- {if isset($U_SLIDESHOW) }
- <li><a href="{$U_SLIDESHOW}" title="{'slideshow'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/start_slideshow.png" class="button" alt="{'slideshow'|@translate}"/></a></li>
- {/if}
-
- {if isset($U_MODE_FLAT) }
- <li><a href="{$U_MODE_FLAT}" title="{'mode_flat_hint'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/flat.png" class="button" alt="{'mode_flat_hint'|@translate}"></a></li>
- {/if}
-
- {if isset($U_MODE_NORMAL) }
- <li><a href="{$U_MODE_NORMAL}" title="{'mode_normal_hint'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/normal_mode.png" class="button" alt="{'mode_normal_hint'|@translate}"></a></li>
- {/if}
-
- {if isset($U_MODE_POSTED) }
- <li><a href="{$U_MODE_POSTED}" title="{'mode_posted_hint'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/calendar.png" class="button" alt="{'mode_posted_hint'|@translate}"></a></li>
- {/if}
-
- {if isset($U_MODE_CREATED) }
- <li><a href="{$U_MODE_CREATED}" title="{'mode_created_hint'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/calendar_created.png" class="button" alt="{'mode_created_hint'|@translate}"></a></li>
- {/if}
-
- {if !empty($PLUGIN_INDEX_ACTIONS)}{$PLUGIN_INDEX_ACTIONS}{/if}
- </ul>
-
- <h2>{$TITLE}</h2>
-
- {if isset($chronology_views) }
- <div class="calendarViews">{'calendar_view'|@translate}:
- <select onchange="document.location = this.options[this.selectedIndex].value;">
- {foreach from=$chronology_views item=view}
- <option value="{$view.VALUE}"{if $view.SELECTED} selected="selected"{/if}>{$view.CONTENT}</option>
- {/foreach}
- </select>
- </div>
- {/if}
-
- {if isset($chronology.TITLE) }
- <h2>{$chronology.TITLE}</h2>
- {/if}
-
- </div> <!-- titrePage -->
-
-{if !empty($PLUGIN_INDEX_CONTENT_BEGIN)}{$PLUGIN_INDEX_CONTENT_BEGIN}{/if}
-
-{if !empty($category_search_results) }
-<div style="font-size:16px;text-align:left;margin:10px">{'Category results for'|@translate} <strong>{$QUERY_SEARCH}</strong> :
- <em><strong>
- {foreach from=$category_search_results item=res name=res_loop}
- {if !$smarty.foreach.res_loop.first} &mdash; {/if}
- {$res}
- {/foreach}
- </strong></em>
-</div>
-{/if}
-
-{if !empty($tag_search_results) }
-<div style="font-size:16px;text-align:left;margin:10px">{'Tag results for'|@translate} <strong>{$QUERY_SEARCH}</strong> :
- <em><strong>
- {foreach from=$tag_search_results item=res name=res_loop}
- {if !$smarty.foreach.res_loop.first} &mdash; {/if}
- {$res}
- {/foreach}
- </strong></em>
-</div>
-{/if}
-
-{if isset($FILE_CHRONOLOGY_VIEW) }
-{include file=$FILE_CHRONOLOGY_VIEW}
-{/if}
-
-{if !empty($CATEGORIES) }{$CATEGORIES}{/if}
-{if !empty($THUMBNAILS) }{$THUMBNAILS}{/if}
-
-
-{if !empty($NAV_BAR) }
-<div class="navigationBar">
- {$NAV_BAR}
-</div>
-{/if}
-
-{if !empty($CONTENT_DESCRIPTION) }
-<div class="additional_info">
- {$CONTENT_DESCRIPTION}
-</div>
-{/if}
-
-{if !empty($PLUGIN_INDEX_CONTENT_END) }{$PLUGIN_INDEX_CONTENT_END}{/if}
-</div> <!-- content -->
-
-{if !empty($PLUGIN_INDEX_CONTENT_AFTER)}{$PLUGIN_INDEX_CONTENT_AFTER}{/if}
diff --git a/BSF/template/yoga/install.tpl b/BSF/template/yoga/install.tpl
deleted file mode 100644
index 9f73c6320..000000000
--- a/BSF/template/yoga/install.tpl
+++ /dev/null
@@ -1,255 +0,0 @@
-{* $Id$ *}
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-"http://www.w3.org/TR/html4/strict.dtd">
-<html lang="fr">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset={$T_CONTENT_ENCODING}">
-<meta http-equiv="Content-script-type" content="text/javascript">
-<meta http-equiv="Content-Style-Type" content="text/css">
-<title>Piwigo {$RELEASE}</title>
-{literal}
-<style type="text/css">
-
-body, input, select {
- background-color:#cde;
-}
-
-body {
- margin: 5px;
- padding: 0;
- font-size: 0.8em;
- font-family: Univers, Helvetica, Optima, "Bitstream Vera Sans", sans-serif;
-}
-
-body, table, input, form, select {
- color:#369;
- text-align:left;
-}
-
-a {
- text-decoration: none;
- color: #c60;
-}
-
-a:hover {
- color: #f92;
-}
-
-table {
- border-collapse:separate;
-}
-
-.title {
- letter-spacing: 0.2em;
- text-align : center;
- font-size: 150%;
- font-weight: bold;
- padding: 0;
- margin: 0.5em 0 1em 0;
-}
-
-.contenucellule {
- border-color: #69c;
- background-color:#eee;
- margin:12px 20px;
- border-width: 3px;
- border-style: solid ;
-}
-
-.error_copy {
- color: #900;
-}
-
-th, .submit {
- text-align: center;
- font-weight: bold;
- background-color: #369;
-}
-
-th {
- font-size: 120%;
- margin-bottom:10px;
- color:#fff;
-}
-
-td.row {
- font-size: 90%;
-}
-
-.submit {
- color: #cde
-}
-
-.header {
- font-weight: normal;
- text-align: center;
- margin: 20px;
-}
-
-.infos {
- padding: 15px;
- font-weight: normal;
- text-align: left;
-}
-
-.infos_title {
- font-size: 150%;
- padding: 15px;
- font-weight: bold;
- text-align: left;
-}
-
-.errors {
- text-align: left;
- margin: 25px;
- color: #900;
- background-color: #ffe1e1;
- border:1px solid red;
-}
-</style>
-{/literal}
-</head>
-<body>
- <table style="width:100%;height:100%">
- <tr align="center" valign="middle">
- <td>
- <div class="title">Piwigo {$RELEASE}</div>
- <table class="table1">
- {if isset($errors)}
- <tr>
- <td class="contenucellule" colspan="3">
- <div class="errors">
- <ul>
- {foreach from=$errors item=error}
- <li>{$error}</li>
- {/foreach}
- </ul>
- </div>
- </td>
- </tr>
- {/if}
- {if isset($infos)}
- <tr>
- <td class="contenucellule" colspan="3">
- <div class="infos">
- <ul>
- {foreach from=$infos item=info}
- <li>{$info}</li>
- {/foreach}
- </ul>
- </div>
- </td>
- </tr>
- {/if}
- <tr>
- <td class="contenucellule">
-
-{if isset($error_copy)}
-{'step1_err_copy'|@translate} :
-<br />-----------------------------------------------------<br />
-<div class="error_copy">{$error_copy}</div>
------------------------------------------------------<br />
-{/if}
-
-{if isset($install)}
-<form method="POST" action="{$F_ACTION}" name="install_form">
- <table>
- <tr>
- <th colspan="3">{'Initial_config'|@translate}</th>
- </tr>
- <tr>
- <td style="width:30%;">{'Default_lang'|@translate}</td>
- <td colspan="2" align="left">
- <select name="language" onchange="document.location = 'install.php?language='+this.options[this.selectedIndex].value;">
- {html_options options=$language_options selected=$language_selection}
- </select>
- </td>
- </tr>
- <tr>
- <td colspan="3">&nbsp;</td>
- </tr>
- <tr>
- <th colspan="3">{'step1_title'|@translate}</th>
- </tr>
- <tr>
- <td>{'step1_host'|@translate}</td>
- <td align=center><input type="text" name="dbhost" value="{$F_DB_HOST}" /></td>
- <td class="row">{'step1_host_info'|@translate}</td>
- </tr>
- <tr>
- <td>{'step1_user'|@translate}</td>
- <td align=center><input type="text" name="dbuser" value="{$F_DB_USER}" /></td>
- <td class="row">{'step1_user_info'|@translate}</td>
- </tr>
- <tr>
- <td>{'step1_pass'|@translate}</td>
- <td align=center><input type="password" name="dbpasswd" value="" /></td>
- <td class="row">{'step1_pass_info'|@translate}</td>
- </tr>
- <tr>
- <td>{'step1_database'|@translate}</td>
- <td align=center><input type="text" name="dbname" value="{$F_DB_NAME}" /></td>
- <td class="row">{'step1_database_info'|@translate}</td>
- </tr>
- <tr>
- <td>{'step1_prefix'|@translate}</td>
- <td align=center><input type="text" name="prefix" value="{$F_DB_PREFIX}" /></td>
- <td class="row">{'step1_prefix_info'|@translate}</td>
- </tr>
- <tr>
- <td colspan="3">&nbsp;</td>
- </tr>
- <tr>
- <th colspan="3">{'step2_title'|@translate}</th>
- </tr>
- <tr>
- <td>{'install_webmaster'|@translate}</td>
- <td align="center"><input type="text" name="admin_name" value="{$F_ADMIN}" /></td>
- <td class="row">{'install_webmaster_info'|@translate}</td>
- </tr>
- <tr>
- <td>{'step2_pwd'|@translate}</td>
- <td align="center"><input type="password" name="admin_pass1" value="" /></td>
- <td class="row">{'step2_pwd_info'|@translate}</td>
- </tr>
- <tr>
- <td>{'step2_pwd_conf'|@translate}</td>
- <td align="center"><input type="password" name="admin_pass2" value="" /></td>
- <td class="row">{'step2_pwd_conf_info'|@translate}</td>
- </tr>
- <tr>
- <td>{'conf_mail_webmaster'|@translate}</td>
- <td align="center"><input type="text" name="admin_mail" value="{$F_ADMIN_EMAIL}" /></td>
- <td class="row">{'conf_mail_webmaster_info'|@translate}</td>
- </tr>
- <tr>
- <td colspan="3">&nbsp;</td>
- </tr>
- <tr>
- <td colspan="3" align="center">
- <input class="submit" type="submit" name="install" value="{'Start_Install'|@translate}" />
- </td>
- </tr>
- <tr>
- <td colspan="3">&nbsp;</td>
- </tr>
- </table>
-</form>
-{else}
-<div class="infos_title">
-{'install_end_title'|@translate}
-</div>
-<div class="infos">
-{'install_end_message'|@translate}
-</div>
-{/if}
-
- </td>
- </tr>
- </table>
- <div class="header">{$L_INSTALL_HELP}</div>
- </td>
- </tr>
- </table>
- </body>
-</html>
diff --git a/BSF/template/yoga/layout.css b/BSF/template/yoga/layout.css
deleted file mode 100644
index 348ea2f4c..000000000
--- a/BSF/template/yoga/layout.css
+++ /dev/null
@@ -1,15 +0,0 @@
-/* $Id$ */
-
-/* template css */
-@import "menubar.css";
-@import "content.css";
-@import "thumbnails.css";
-@import "picture.css";
-@import "default-layout.css";
-/* Override properties with import local file */
-@import "local-layout.css";
-/* common css */
-@import "../../template-common/default-layout.css";
-/* Override properties with import local file */
-@import "../../template-common/local-layout.css";
-
diff --git a/BSF/template/yoga/mail/index.php b/BSF/template/yoga/mail/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/mail/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/mail/text/html/admin/cat_group_info.tpl b/BSF/template/yoga/mail/text/html/admin/cat_group_info.tpl
deleted file mode 100644
index 2c8c45d6a..000000000
--- a/BSF/template/yoga/mail/text/html/admin/cat_group_info.tpl
+++ /dev/null
@@ -1,9 +0,0 @@
-{* $Id$ *}
-<div id="cat_group_info">
-<h2>{'Informations'|@translate}</h2>
-<p>{$IMG_URL}</p>
-<p>{'Hello,'|@translate}</p>
-<p>{'Come to discover the category:'|@translate} <a href="{$LINK}">{$CAT_NAME}</a></p>
-<p>{$CPL_CONTENT}</p>
-<p>{'See you soon.'|@translate}</p>
-</div>
diff --git a/BSF/template/yoga/mail/text/html/admin/index.php b/BSF/template/yoga/mail/text/html/admin/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/mail/text/html/admin/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/mail/text/html/admin/notification_by_mail.tpl b/BSF/template/yoga/mail/text/html/admin/notification_by_mail.tpl
deleted file mode 100644
index 52627ebe4..000000000
--- a/BSF/template/yoga/mail/text/html/admin/notification_by_mail.tpl
+++ /dev/null
@@ -1,57 +0,0 @@
-{* $Id$ *}
-<div id="nbm_message">
-<h2>{'Notification'|@translate}</h2>
-<p>{'nbm_content_hello_1'|@translate}{$USERNAME}{'nbm_content_hello_2'|@translate}</p>
-
-{if isset($subscribe_by_admin)}
-<p>{'nbm_content_subscribe_by_admin'|@translate}</p>
-{/if}
-{if isset($subscribe_by_himself)}
-<p>{'nbm_content_subscribe_by_himself'|@translate}</p>
-{/if}
-{if isset($unsubscribe_by_admin)}
-<p>{'nbm_content_unsubscribe_by_admin'|@translate}</p>
-{/if}
-{if isset($unsubscribe_by_himself)}
-<p>{'nbm_content_unsubscribe_by_himself'|@translate}</p>
-{/if}
-{if isset($content_new_elements_single)}
-<p>{'nbm_content_new_elements'|@translate}{'nbm_content_new_elements_single'|@translate}{$content_new_elements_single.DATE_SINGLE}.</p>
-{/if}
-{if isset($content_new_elements_between)}
-<p>{'nbm_content_new_elements'|@translate}{'nbm_content_new_elements_between_1'|@translate}{$content_new_elements_between.DATE_BETWEEN_1}{'nbm_content_new_elements_between_2'|@translate}{$content_new_elements_between.DATE_BETWEEN_2}.</p>
-{/if}
-
-{if not empty($global_new_lines)}
-<ul id="nbm_new_line">
-{foreach from=$global_new_lines item=line}
- <li>{$line}</li>
-{/foreach}
-</ul>
-{/if}
-
-{if not empty($custom_mail_content)}
-<p>{$custom_mail_content}</p>
-{/if}
-
-{if not empty($GOTO_GALLERY_TITLE)}
-<p>{'nbm_content_goto_1'|@translate}<a href="{$GOTO_GALLERY_URL}">{$GOTO_GALLERY_TITLE}</a>{'nbm_content_goto_2'|@translate}</p>
-{/if}
-<p>{'nbm_content_byebye'|@translate}</p>
-<p style="text-align:center">{$SEND_AS_NAME}</p>
-<p>
-<br/><hr/>
-{'nbm_content_unsubscribe_link'|@translate}{'nbm_content_click_on'|@translate}<a href="{$UNSUBSCRIBE_LINK}">{$UNSUBSCRIBE_LINK}</a><br/>
-{'nbm_content_subscribe_link'|@translate}{'nbm_content_click_on'|@translate}<a href="{$SUBSCRIBE_LINK}">{$SUBSCRIBE_LINK}</a><br/>
-{'nbm_content_problem_contact'|@translate}<a href="mailto:{$CONTACT_EMAIL}?subject={'nbm_content_pb_contact_object'|@translate}">{$CONTACT_EMAIL}</a><br/>
-<hr/><br/>
-</p>
-{if not empty($recent_posts)}
-</div>
-<div id="nbm_recent_post">
- {foreach from=$recent_posts item=recent_post }
- <h2>{$recent_post.TITLE}</h2>
- {$recent_post.HTML_DATA}
- {/foreach}
-{/if}
-</div>
diff --git a/BSF/template/yoga/mail/text/html/footer.tpl b/BSF/template/yoga/mail/text/html/footer.tpl
deleted file mode 100644
index e09201a4f..000000000
--- a/BSF/template/yoga/mail/text/html/footer.tpl
+++ /dev/null
@@ -1,20 +0,0 @@
-{* $Id$ *}
-</div> <!-- content -->
-<div id="copyright">
-<hr/>
- {* Please, do not remove this copyright. If you really want to,
- contact us on http://piwigo.org to find a solution on how
- to show the origin of the script...*}
-
- {'powered_by'|@translate}
- <a href="http://piwigo.org" class="PWG">
- <span class="P">Pi</span><span class="W">wi</span><span class="G">go</span></a>
- {$VERSION}
- - {'send_mail'|@translate}
- <a href="mailto:{$MAIL}?subject={$TITLE_MAIL}">{'Webmaster'|@translate}</a>
-
-</div> <!-- copyright -->
-</div> <!-- the_page -->
-
-</body>
-</html>
diff --git a/BSF/template/yoga/mail/text/html/global-mail-css.tpl b/BSF/template/yoga/mail/text/html/global-mail-css.tpl
deleted file mode 100644
index 29b34f375..000000000
--- a/BSF/template/yoga/mail/text/html/global-mail-css.tpl
+++ /dev/null
@@ -1,12 +0,0 @@
-{* $Id$ *}
-/* Global mail css */
-
-body {ldelim} font-family: Univers, Helvetica, Optima; font-size:12px; margin:0px; padding:0px; }
-#the_page {ldelim} margin:0px; padding:0px; text-align:left;}
-#content {ldelim} margin:0px; padding:82px 0px 0px 62px; width:732px;}
-hr {ldelim} width:632px; margin-left:0;}
-#copyright {ldelim} font-size:10px; margin:0px; padding:48px 0px 32px 62px;}
-.PWG {ldelim} font-family:verdana, sans-serif !important; font-size:0.9em; font-weight:normal; letter-spacing:0px;}
-h2 {ldelim} padding:7px 15px; width:617px; font-weight:bold;}
-img {ldelim} margin:16px; border:16px solid #aaa; -moz-border-radius: 4px; border-radius: 4px 4px; }
-img:hover {ldelim} padding: 15px; border: 1px solid yellow; -moz-border-radius: 4px; border-radius: 4px 4px; }
diff --git a/BSF/template/yoga/mail/text/html/header.tpl b/BSF/template/yoga/mail/text/html/header.tpl
deleted file mode 100644
index 2aeb2b434..000000000
--- a/BSF/template/yoga/mail/text/html/header.tpl
+++ /dev/null
@@ -1,19 +0,0 @@
-{* $Id$ *}
------={$BOUNDARY_KEY}
-Content-Type: {$CONTENT_TYPE}; charset="{$CONTENT_ENCODING}";
-Content-Transfer-Encoding: 8bit
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html lang="{$LANG}" dir="{$DIR}">
-<head>
-<title>Piwigo Mail</title>
-<meta http-equiv="Content-Type" content="text/html; charset={$CONTENT_ENCODING}">
-<style><!-- /* Mini style for mails */
-{if isset($GLOBAL_MAIL_CSS)}{$GLOBAL_MAIL_CSS}{/if}
-{if isset($MAIL_CSS)}{$MAIL_CSS}{/if}
-{if isset($LOCAL_MAIL_CSS)}{$LOCAL_MAIL_CSS}{/if}
---></style>
-</head>
-<body>
-<div id="the_page">
-<div id="content" class="content">
diff --git a/BSF/template/yoga/mail/text/html/images/footer-bg.png b/BSF/template/yoga/mail/text/html/images/footer-bg.png
deleted file mode 100644
index fd3c2925f..000000000
--- a/BSF/template/yoga/mail/text/html/images/footer-bg.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/mail/text/html/images/header-bg.png b/BSF/template/yoga/mail/text/html/images/header-bg.png
deleted file mode 100644
index 1770a3ddc..000000000
--- a/BSF/template/yoga/mail/text/html/images/header-bg.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/mail/text/html/images/index.php b/BSF/template/yoga/mail/text/html/images/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/mail/text/html/images/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/mail/text/html/images/mailbody-bg.png b/BSF/template/yoga/mail/text/html/images/mailbody-bg.png
deleted file mode 100644
index 722a24f63..000000000
--- a/BSF/template/yoga/mail/text/html/images/mailbody-bg.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/mail/text/html/index.php b/BSF/template/yoga/mail/text/html/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/mail/text/html/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/mail/text/index.php b/BSF/template/yoga/mail/text/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/mail/text/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/mail/text/plain/admin/cat_group_info.tpl b/BSF/template/yoga/mail/text/plain/admin/cat_group_info.tpl
deleted file mode 100644
index d91c0ebcc..000000000
--- a/BSF/template/yoga/mail/text/plain/admin/cat_group_info.tpl
+++ /dev/null
@@ -1,9 +0,0 @@
-{* $Id$ *}
-{'Hello,'|@translate}
-
-{'Come to discover the category:'|@translate} {$CAT_NAME}
-{$LINK}
-
-{$CPL_CONTENT}
-
-{'See you soon.'|@translate}
diff --git a/BSF/template/yoga/mail/text/plain/admin/index.php b/BSF/template/yoga/mail/text/plain/admin/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/mail/text/plain/admin/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/mail/text/plain/admin/notification_by_mail.tpl b/BSF/template/yoga/mail/text/plain/admin/notification_by_mail.tpl
deleted file mode 100644
index 256232f37..000000000
--- a/BSF/template/yoga/mail/text/plain/admin/notification_by_mail.tpl
+++ /dev/null
@@ -1,42 +0,0 @@
-{* $Id$ *}
-{'nbm_content_hello_1'|@translate}{$USERNAME}{'nbm_content_hello_2'|@translate}
-
-{if isset($subscribe_by_admin)}
-{'nbm_content_subscribe_by_admin'|@translate}
-{/if}
-{if isset($subscribe_by_himself)}
-{'nbm_content_subscribe_by_himself'|@translate}
-{/if}
-{if isset($unsubscribe_by_admin)}
-{'nbm_content_unsubscribe_by_admin'|@translate}
-{/if}
-{if isset($unsubscribe_by_himself)}
-{'nbm_content_unsubscribe_by_himself'|@translate}
-{/if}
-{if isset($content_new_elements_single)}
-{'nbm_content_new_elements'|@translate}{'nbm_content_new_elements_single'|@translate}{$content_new_elements_single.DATE_SINGLE}.
-{/if}
-{if isset($content_new_elements_between)}
-{'nbm_content_new_elements'|@translate}{'nbm_content_new_elements_between_1'|@translate}{$content_new_elements_between.DATE_BETWEEN_1}{'nbm_content_new_elements_between_2'|@translate}{$content_new_elements_between.DATE_BETWEEN_2}.
-{/if}
-{if not empty($global_new_lines)}
-{foreach from=$global_new_lines item=line}
- o {$line}
-{/foreach}
-{/if}
-{if not empty($custom_mail_content)}
-{$custom_mail_content}
-{/if}
-{if not empty($GOTO_GALLERY_TITLE)}
-{'nbm_content_goto_1'|@translate}{$GOTO_GALLERY_TITLE} {$GOTO_GALLERY_URL} {'nbm_content_goto_2'|@translate}
-{/if}
-
-{'nbm_content_byebye'|@translate}
- {$SEND_AS_NAME}
-
-______________________________________________________________________________
-
-{'nbm_content_unsubscribe_link'|@translate}{'nbm_content_click_on'|@translate}{$UNSUBSCRIBE_LINK}
-{'nbm_content_subscribe_link'|@translate}{'nbm_content_click_on'|@translate}{$SUBSCRIBE_LINK}
-{'nbm_content_problem_contact'|@translate}{$CONTACT_EMAIL}
-______________________________________________________________________________
diff --git a/BSF/template/yoga/mail/text/plain/footer.tpl b/BSF/template/yoga/mail/text/plain/footer.tpl
deleted file mode 100644
index 86ac31e3e..000000000
--- a/BSF/template/yoga/mail/text/plain/footer.tpl
+++ /dev/null
@@ -1,4 +0,0 @@
-{* $Id$ *}
-
-------------------------
-Piwigo {$VERSION}
diff --git a/BSF/template/yoga/mail/text/plain/header.tpl b/BSF/template/yoga/mail/text/plain/header.tpl
deleted file mode 100644
index 7471010c9..000000000
--- a/BSF/template/yoga/mail/text/plain/header.tpl
+++ /dev/null
@@ -1,4 +0,0 @@
-{* $Id$ *}
------={$BOUNDARY_KEY}
-Content-Type: {$CONTENT_TYPE}; charset="{$CONTENT_ENCODING}";
-Content-Transfer-Encoding: 8bit
diff --git a/BSF/template/yoga/mail/text/plain/index.php b/BSF/template/yoga/mail/text/plain/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/mail/text/plain/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/mainpage_categories.tpl b/BSF/template/yoga/mainpage_categories.tpl
deleted file mode 100644
index b28c619fb..000000000
--- a/BSF/template/yoga/mainpage_categories.tpl
+++ /dev/null
@@ -1,27 +0,0 @@
-{* $Id$ *}
-
-<ul class="thumbnailCategories">
- {foreach from=$category_thumbnails item=cat}
- <li>
- <div class="thumbnailCategory">
- <div class="illustration">
- <a href="{$cat.URL}">
- <img src="{$cat.TN_SRC}" alt="{$cat.ALT}" title="{'hint_category'|@translate}">
- </a>
- </div>
- <div class="description">
- <h3>
- <a href="{$cat.URL}">{$cat.NAME}</a>
- {$cat.ICON}
- </h3>
- {if isset($cat.INFO_DATES) }
- <p>{$cat.INFO_DATES}</p>
- {/if}
- <p>{$cat.CAPTION_NB_IMAGES}</p>
- <p>{$cat.DESCRIPTION}</p>
- </div>
- </div>
- </li>
- {/foreach}
-</ul>
-
diff --git a/BSF/template/yoga/menubar.css b/BSF/template/yoga/menubar.css
deleted file mode 100644
index e676d5784..000000000
--- a/BSF/template/yoga/menubar.css
+++ /dev/null
@@ -1,149 +0,0 @@
-#menubar {
- float: left;
- margin: 0 0 10px 1em;
- padding: 0;
- /* Fix against the "double margin of a floated item" IE bug */
- /* Damned: that screws up top_navbar in opera 7.54/Linux! */
- display: inline;
- text-align: left; /* follow-up of the "be nice to IE5" rule */
-}
-
-#menubar DL, #menubar DT, #menubar DD {
- margin: 0; padding: 0; display: block;
-}
-
-#menubar .button {
- margin: 0 2px;
- width: auto;
- padding: 0;
- text-indent: 0;
- list-style: none;
- text-align: center;
- float: right;
-}
-
-/* H2 properties copied here */
-#menubar DT {
- font-weight: bold; /* default for h2 */
- margin: 0;
- padding: 5px 5px 5px 5px;
- font-size: 120%;
- text-align: center;
-}
-
-#menubar UL,
-#menubar HR,
-#menubar FORM,
-#menubar P, /* ooh, careful... */
-#menubar .totalImages {
- font-size: 92%;
- margin: 10px 0 10px 10px;
-}
-#menubar UL {
- list-style-type: square;
- list-style-position: inside;
- padding: 0 0 0 2px;
-}
-#menubar UL UL {
- font-size: 100%;
- margin-top: 0;
- margin-bottom: 0;
-}
-
-#menubar LI.selected A {
- font-weight: bold;
-}
-
-#menubar LI.selected LI A {
- font-weight: normal;
-}
-
-#menubar .menuInfoCatByChild {
- font-size: 80%;
- font-style: italic;
-}
-
-#menubar HR {
- display: block;
- margin: 10px auto;
- width: 90%;
-}
-#menubar INPUT {
- text-indent: 2px;
-}
-
-/* quickconnect form */
-FORM#quickconnect {
- margin: 0;
- padding: 5px;
-}
-
-FORM#quickconnect FIELDSET {
- margin: 0;
- padding: 0 0 0.5em 0;
-}
-
-FORM#quickconnect P {
- margin-left: 0;
- font-size: 100%;
- float: left;
- clear: left;
-}
-
-FORM#quickconnect P INPUT {
- margin: 0;
-}
-
-FORM#quickconnect UL.actions {
- display: inline;
- float: right;
- padding: 0;
- text-align: right; /* Opera 7.5 */
-}
-FORM#quickconnect FIELDSET>UL.actions {
- width: 40%; /* Opera 7.5 cannot find why width:auto fails :-( */
-}
-
-FORM#quickconnect UL.actions,
-FORM#quickconnect P,
-FORM#quickconnect LABEL {
- padding: 0 0.5em 0 0.5em;
-}
-
-FORM#quickconnect LABEL {
- margin:0;
- width: 100%;
- box-sizing: border-box; /* CSS3 */
-}
-
-FORM#quickconnect INPUT[type=text],
-FORM#quickconnect INPUT[type=password] {
- width: 100%; /* mozilla can handle 100% */
-}
-/* same as above for IE with inputfix.htc */
-/* unfortunately IE doesn't handle that correctly */
-/* so you should set a width in em in local_layout.css */
-/*FORM#quickconnect INPUT.text,
-FORM#quickconnect INPUT.password {
- width: 95%;
-}*/
-
-FORM#quicksearch {
- margin-top: 4px;
- margin-bottom: 1px;
-}
-input#qsearchInput {
- width: 90%;
-}
-#menubar #mbMenu p { margin: 0px; padding: 0px; }
-
-#menubar #menuTagCloud {
- text-align: center;
- margin: 5px 0;
-}
-
-#menubar #menuTagCloud LI
-{
- display: inline;
- white-space: nowrap; /* No line break in the LI but Opera set nowrap to */
-}
diff --git a/BSF/template/yoga/menubar.tpl b/BSF/template/yoga/menubar.tpl
deleted file mode 100644
index fda136c29..000000000
--- a/BSF/template/yoga/menubar.tpl
+++ /dev/null
@@ -1,165 +0,0 @@
-{* $Id$ *}
-
-<div id="menubar">
-{if not empty($links)}
-<dl id="mbLinks">
- <dt>{'Links'|@translate}</dt>
- <dd>
- <ul>
- {foreach from=$links item=link}
- <li>
- <a href="{$link.URL}"
- {if isset($link.new_window) }onclick="window.open(this.href, '{$link.new_window.NAME|@escape:'javascript'}','{$link.new_window.FEATURES|@escape:'javascript'}'); return false;"{/if}
- >
- {$link.LABEL}
- </a>
- </li>
- {/foreach}{*links*}
- </ul>
- </dd>
-</dl>
-{/if}{*links*}
-
- {if isset($U_START_FILTER)}
- <a href="{$U_START_FILTER}" title="{'start_filter_hint'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/start_filter.png" class="button" alt="{'start_filter_hint'|@translate}"></a>
- {/if}
- {if isset($U_STOP_FILTER)}
- <a href="{$U_STOP_FILTER}" title="{'stop_filter_hint'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_filter.png" class="button" alt="{'stop_filter_hint'|@translate}"></a>
- {/if}
-
-<dl id="mbCategories">
- <dt><a href="{$U_CATEGORIES}">{'Categories'|@translate}</a></dt>
- <dd>
- {$MENU_CATEGORIES_CONTENT}
- {if isset($U_UPLOAD)}
- <ul><li>
- <a href="{$U_UPLOAD}">{'upload_picture'|@translate}</a>
- </li></ul>
- {/if}
- <p class="totalImages">{$pwg->l10n_dec('%d element', '%d elements', $NB_PICTURE)}</p>
- </dd>
-</dl>
-
-
-{if not empty($related_tags)}
-<dl id="mbTags">
- <dt>{'Related tags'|@translate}</dt>
- <dd>
- <ul id="menuTagCloud">
- {foreach from=$related_tags item=tag}
- <li>
- {if !empty($tag.add) }
- <a href="{$tag.add.URL}"
- title="{$pwg->l10n_dec('%d element are also linked to current tags', '%d elements are also linked to current tags', $tag.add.COUNTER)}"
- rel="nofollow">
- <img src="{$ROOT_URL}{$themeconf.icon_dir}/add_tag.png" alt="+" />
- </a>
- {/if}
- <a href="{$tag.U_TAG}" class="{$tag.CLASS}" title="{'See elements linked to this tag only'|@translate}">{$tag.NAME}</a>
- </li>
- {/foreach}
- </ul>
- </dd>
-</dl>
-{/if}
-
-
-<dl id="mbSpecial">
- <dt>{'special_categories'|@translate}</dt>
- <dd>
- <ul>
- {foreach from=$special_categories item=cat}
- <li><a href="{$cat.URL}" title="{$cat.TITLE}" {if isset($cat.REL)}{$cat.REL}{/if}>{$cat.NAME}</a></li>
- {/foreach}
- </ul>
- </dd>
-</dl>
-
-
-<dl id="mbMenu">
- <dt>{'title_menu'|@translate}</dt>
- <dd>
- <form action="{$ROOT_URL}qsearch.php" method="get" id="quicksearch">
- <p>
- <input type="text" name="q" id="qsearchInput" onfocus="if (value==qsearch_prompt) value='';" onblur="if (value=='') value=qsearch_prompt;" />
- </p>
- </form>
- <script type="text/javascript">var qsearch_prompt="{'qsearch'|@translate|@escape:'javascript'}"; document.getElementById('qsearchInput').value=qsearch_prompt;</script>
-
- <ul>
- {foreach from=$summaries item=sum}
- <li><a href="{$sum.U_SUMMARY}" title="{$sum.TITLE}" {if isset($sum.REL)}{$sum.REL}{/if}>{$sum.NAME}</a></li>
- {/foreach}
- </ul>
- </dd>
-</dl>
-
-
-<dl id="mbIdentification">
- <dt>{'identification'|@translate}</dt>
- <dd>
- {if isset($USERNAME)}
- <p>{'hello'|@translate}&nbsp;{$USERNAME}&nbsp;!</p>
- {/if}
-
- <ul>
- {if isset($U_REGISTER)}
- <li><a href="{$U_REGISTER}" title="{'Create a new account'|@translate}" rel="nofollow">{'Register'|@translate}</a></li>
- {/if}
-
- {if isset($U_IDENTIFY)}
- <li><a href="{$U_IDENTIFY}" rel="nofollow">{'Connection'|@translate}</a></li>
- {/if}
-
- {if isset($U_LOGOUT)}
- <li><a href="{$U_LOGOUT}">{'logout'|@translate}</a></li>
- {/if}
-
- {if isset($U_PROFILE)}
- <li><a href="{$U_PROFILE}" title="{'hint_customize'|@translate}">{'customize'|@translate}</a></li>
- {/if}
-
- {if isset($U_ADMIN)}
- <li><a href="{$U_ADMIN}" title="{'hint_admin'|@translate}">{'admin'|@translate}</a></li>
- {/if}
- </ul>
-
- {if isset($U_IDENTIFY)}
- <form method="post" action="{$U_IDENTIFY}" class="filter" id="quickconnect">
- <fieldset>
- <legend>{'Quick connect'|@translate}</legend>
-
- <label>
- {'Username'|@translate}
- <input type="text" name="username" size="15" value="">
- </label>
-
- <label>
- {'Password'|@translate}
- <input type="password" name="password" size="15">
- </label>
-
- {if $AUTHORIZE_REMEMBERING}
- <label>
- {'remember_me'|@translate}
- <input type="checkbox" name="remember_me" value="1">
- </label>
- {/if}
- <p>
- <input class="submit" type="submit" name="login" value="{'Submit'|@translate}">
- </p>
-
- <ul class="actions">
- <li><a href="{$U_LOST_PASSWORD}" title="{'Forgot your password?'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/lost_password.png" class="button" alt="{'Forgot your password?'|@translate}"></a></li>
- {if isset($U_REGISTER)}
- <li><a href="{$U_REGISTER}" title="{'Create a new account'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/register.png" class="button" alt="{'Register'|@translate}"/></a></li>
- {/if}
- </ul>
-
- </fieldset>
- </form>
- {/if}
-
- </dd>
-</dl>
-</div> <!-- menubar -->
diff --git a/BSF/template/yoga/month_calendar.tpl b/BSF/template/yoga/month_calendar.tpl
deleted file mode 100644
index 410824b23..000000000
--- a/BSF/template/yoga/month_calendar.tpl
+++ /dev/null
@@ -1,70 +0,0 @@
-{* $Id$ *}
-
-{if !empty($chronology_navigation_bars) }
-{foreach from=$chronology_navigation_bars item=bar}
-<div class="calendarBar">
- {if isset($bar.previous)}
- <div style="float:left">&laquo; <a href="{$bar.previous.URL}">{$bar.previous.LABEL}</a></div>
- {/if}
- {if isset($bar.next)}
- <div style="float:right"><a href="{$bar.next.URL}">{$bar.next.LABEL}</a> &raquo;</div>
- {/if}
- {if isset($bar.CONTENT)}
- {$bar.CONTENT}
- {else}
- &nbsp;
- {/if}
-</div>
-{/foreach}
-{/if}
-
-{if !empty($chronology_calendar.calendar_bars) }
-{foreach from=$chronology_calendar.calendar_bars item=bar}
-<div class="calendarCalBar">
- <span class="calCalHead"><a href="{$bar.U_HEAD}">{$bar.HEAD_LABEL}</a> ({$bar.NB_IMAGES})</span><br/>
- {$bar.NAV_BAR}
-</div>
-{/foreach}
-{/if}
-
-{if isset($chronology_calendar.month_view) }
-<table class="calMonth">
- <thead>
- <tr>
- {foreach from=$chronology_calendar.month_view.wday_labels item=wday}
- <td class="calDayHead">{$wday}</td>
- {/foreach}
- </tr>
- </thead>
-{html_head} {*add the style to html head for strict standard compliance*}
-<style type="text/css">
-TABLE.calMonth TBODY TD, TABLE.calMonth TBODY TD DIV.calImg {ldelim}
- width:{$chronology_calendar.month_view.CELL_WIDTH}px;height:{$chronology_calendar.month_view.CELL_HEIGHT}px;
-}
-</style>
-{/html_head}
- {foreach from=$chronology_calendar.month_view.weeks item=week}
- <tr>
- {foreach from=$week item=day}
- {if !empty($day)}
- {if isset($day.IMAGE)}
- <td class="calDayCellFull">
- <div class="calBackDate">{$day.DAY}</div><div class="calForeDate">{$day.DAY}</div>
- <div class="calImg">
- <a href="{$day.U_IMG_LINK}">
- <img style="{$day.IMAGE_STYLE}" src="{$day.IMAGE}" alt="{$day.IMAGE_ALT}" title="{$pwg->l10n_dec('%d element','%d elements', $day.NB_ELEMENTS)}" />
- </a>
- </div>
- {else}
- <td class="calDayCellEmpty">{$day.DAY}
- {/if}
- {else}
- <td class="calDayCellBlank">
- {/if}
- </td>
- {/foreach} {*day in week*}
- </tr>
- {/foreach} {*week in month*}
-</table>
-{/if}
-
diff --git a/BSF/template/yoga/nbm.tpl b/BSF/template/yoga/nbm.tpl
deleted file mode 100644
index 7fa2845eb..000000000
--- a/BSF/template/yoga/nbm.tpl
+++ /dev/null
@@ -1,31 +0,0 @@
-{* $Id$ *}
-
-<div id="content" class="content">
- <div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HOME}" title="{'Go through the gallery as a visitor'|@translate}"><img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
- </ul>
- <h2>{'nbm_item_notification'|@translate}</h2>
- </div>
-
- {if not empty($errors)}
- <div class="errors">
- <ul>
- {foreach from=$errors item=error}
- <li>{$error}</li>
- {/foreach}
- </ul>
- </div>
- {/if}
-
- {if not empty($infos)}
- <div class="infos">
- <ul>
- {foreach from=$infos item=info}
- <li>{$info}</li>
- {/foreach}
- </ul>
- </div>
- {/if}
-
-</div>
diff --git a/BSF/template/yoga/not-ie.css b/BSF/template/yoga/not-ie.css
deleted file mode 100644
index 9fc85502c..000000000
--- a/BSF/template/yoga/not-ie.css
+++ /dev/null
@@ -1,24 +0,0 @@
-/* $Id$ */
-
-/* All directives not supported by IE */
-/* can be overiden in any theme but not hidden to IE */
-
-.content UL.thumbnails SPAN.wrap2 {
- -moz-border-radius: 4px; /* round corners with Geko */
- -webkit-border-radius: 4px; /* Safari webkit project */
-}
-.content DIV#comments {
- padding-left: 5px;
- padding-right: 5px;
- -moz-box-sizing: padding-box !important;
-}
-FORM#quickconnect LABEL {
- margin:0;
- width: 100%;
- -moz-box-sizing: padding-box !important;
- box-sizing: border-box; /* CSS3 */
-}
-ul.tabsheet li {
- -moz-border-radius: 6px 6px 0px 0px; /* round corners with Geko */
- -webkit-border-radius: 6px 6px 0px 0px; /* Safari webkit project */
-}
diff --git a/BSF/template/yoga/notification.tpl b/BSF/template/yoga/notification.tpl
deleted file mode 100644
index b62db4bc0..000000000
--- a/BSF/template/yoga/notification.tpl
+++ /dev/null
@@ -1,15 +0,0 @@
-{* $Id$ *}
-<div id="content" class="content">
-
- <div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HOME}" title="{'return to homepage'|@translate}"><img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
- </ul>
- <h2>{'Notification'|@translate}</h2>
- </div>
-
- <p>{'The RSS notification feed provides notification on news from this website : new pictures, updated categories, new comments. Use a RSS feed reader.'|@translate}</p>
-
- <p><a href="{$U_FEED_IMAGE_ONLY}">{'Image only RSS feed'|@translate}</a></p>
- <p><a href="{$U_FEED}">{'Complete RSS feed'|@translate}</a></p>
-</div>
diff --git a/BSF/template/yoga/password.tpl b/BSF/template/yoga/password.tpl
deleted file mode 100644
index 8071b16d2..000000000
--- a/BSF/template/yoga/password.tpl
+++ /dev/null
@@ -1,54 +0,0 @@
-{* $Id$ *}
-<div id="content" class="content">
-
- <div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HOME}" title="{'Go through the gallery as a visitor'|@translate}"><img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
- </ul>
- <h2>{'Password forgotten'|@translate}</h2>
- </div>
-
- {if count($errors)}
- <div class="errors">
- <ul>
- {foreach from=$errors item=error}
- <li>{$error}</li>
- {/foreach}
- </ul>
- </div>
- {/if}
-
- {if count($infos)}
- <div class="infos">
- <ul>
- {foreach from=$infos item=info}
- <li>{$info}</li>
- {/foreach}
- </ul>
- </div>
- {/if}
-
-<form action="{$F_ACTION}" method="post" class="properties">
- <fieldset>
- <legend>{'Retrieve password'|@translate}</legend>
-
- <ul>
- <li>
- <span class="property">
- <label for="mail_address">{'Email address'|@translate}</label>
- </span>
- <input class="login" type="text" name="mail_address" id="mail_address" size="40" maxlength="40" >
- </li>
- <li>
- <span class="property">
- <label for="no_mail_address">{'No email address'|@translate}</label>
- </span>
- <input type="checkbox" id="no_mail_address" name="no_mail_address" value="1">
- </li>
- </ul>
- </fieldset>
-
- <p><input class="submit" type="submit" name="submit" value="{'Send new password'|@translate}"></p>
-</form>
-
-</div> <!-- content -->
diff --git a/BSF/template/yoga/picture.css b/BSF/template/yoga/picture.css
deleted file mode 100644
index 839760053..000000000
--- a/BSF/template/yoga/picture.css
+++ /dev/null
@@ -1,143 +0,0 @@
-/* $Id$ */
-#imageHeaderBar {
- padding-top: 2px;
- padding-bottom: 2px;
- margin-top: 4px;
- overflow: hidden;
- width: 100%;
-}
-
-#imageHeaderBar .browsePath {
- float: left;
- margin-left: 10px;
-}
-
-#imageHeaderBar .imageNumber {
- float: right;
- margin-right: 10px;
-}
-
-#imageHeaderBar H2 {
- text-align: center;
- padding: 0;
- clear: both;
-}
-
-#imageToolBar {
- text-align: center;
- position: relative;
- clear: both;
- margin-bottom: 4px;
- padding: 0;
-}
-
-#imageToolBar {
- height: 28px;
-}
-#imageToolBar A, #imageToolBar IMG {
- display: block;
- border: none;
- margin: 0; padding: 0;
-}
-#imageToolBar A { width: 48px; }
-#imageToolBar IMG { margin: 2px auto; }
-#imageToolBar .randomButtons A { float: left; }
-#imageToolBar .navButtons A { float: right; }
-
-#theImage {
- clear: left;
-}
-
-#theImage>IMG {
- display: block;
- margin: 0 auto;
-}
-
-#theImage IMG {
- border-width: 3px;
- border-style: solid;
-}
-
-.navThumb {
- margin-top: 2px;
-}
-#thumbPrev {
- float: left;
-}
-
-#thumbNext {
- float: right;
-}
-
-#linkPrev {
- margin-right: 10px;
- margin-left: 5px;
-}
-
-#linkNext {
- margin-right: 5px;
- margin-left: 10px;
-}
-
-TABLE.infoTable .value {
- text-align: left;
-}
-
-TABLE.infoTable .label {
- font-weight: bold;
- text-align: right;
- padding-right: 0.5em;
-}
-
-TABLE.infoTable TD.value UL {
- margin: 0;
- padding: 0 0 0 1.5em;
- list-style-type: square;
-}
-
-.rateButton, .rateButtonSelected, .rateButtonStarFull, .rateButtonStarEmpty {
- padding:0;
- border:0;
-}
-
-.rateButton, .rateButtonStarFull, .rateButtonStarEmpty {
- cursor: pointer;
-}
-
-.rateButtonSelected {
- font-weight:bold;
- font-size:120%;
-}
-
-.rateButtonStarFull {
- background: url('icon/rating-stars.gif') no-repeat scroll; background-position:-16px center; width:16px;
-}
-
-.rateButtonStarEmpty {
- background: url('icon/rating-stars.gif') no-repeat scroll; background-position:0 center; width:16px;
-}
-
-#comments {
- text-align: left;
-}
-
-#comments .comment {
- margin: 1em 0;
-}
-
-#comments P {
- margin: 0 0.5em 0 1em;
-}
-
-#comments .author {
- font-weight: bold;
-}
-
-#thePicturePage #comments BLOCKQUOTE {
- margin: 0.5em 1em 1em 4em;
-}
-
-#comments P.userCommentDelete {
- float: right;
- margin: 0 0.5em 0 0;
-}
diff --git a/BSF/template/yoga/picture.tpl b/BSF/template/yoga/picture.tpl
deleted file mode 100644
index fc5fce450..000000000
--- a/BSF/template/yoga/picture.tpl
+++ /dev/null
@@ -1,230 +0,0 @@
-{* $Id$ *}
-{if isset($errors)}
-<div class="errors">
- <ul>
- {foreach from=$errors item=error}
- <li>{$error}</li>
- {/foreach}
- </ul>
-</div>
-{/if}
-
-{if isset($infos)}
-<div class="infos">
- <ul>
- {foreach from=$infos item=info}
- <li>{$info}</li>
- {/foreach}
- </ul>
-</div>
-{/if}
-
-<div id="imageHeaderBar">
- <div class="browsePath">
- <a href="{$U_HOME}" rel="home">{'home'|@translate}</a>
- {$LEVEL_SEPARATOR}{$SECTION_TITLE}
- {$LEVEL_SEPARATOR}{$current.TITLE}
- </div>
- <div class="imageNumber">{$PHOTO}</div>
- {if $SHOW_PICTURE_NAME_ON_TITLE }
- <h2>{$current.TITLE}</h2>
- {/if}
-</div>
-
-{if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if}
-<div id="imageToolBar">
- <div class="randomButtons">
- {if isset($U_SLIDESHOW_START) }
- <a href="{$U_SLIDESHOW_START}" title="{'slideshow'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/start_slideshow.png" class="button" alt="{'slideshow'|@translate}"></a>
- {/if}
- {if isset($U_SLIDESHOW_STOP) }
- <a href="{$U_SLIDESHOW_STOP}" title="{'slideshow_stop'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_slideshow.png" class="button" alt="{'slideshow_stop'|@translate}"></a>
- {/if}
- <a href="{$U_METADATA}" title="{'picture_show_metadata'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/metadata.png" class="button" alt="metadata" /></a>
- {if isset($current.U_DOWNLOAD) }
- <a href="{$current.U_DOWNLOAD}" title="{'download_hint'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/save.png" class="button" alt="{'download'|@translate}"></a>
- {/if}
- {if isset($PLUGIN_PICTURE_ACTIONS)}{$PLUGIN_PICTURE_ACTIONS}{/if}
- {if isset($favorite) }
- <a href="{$favorite.U_FAVORITE}" title="{$favorite.FAVORITE_HINT}"><img src="{$favorite.FAVORITE_IMG}" class="button" alt="favorite" title="{$favorite.FAVORITE_HINT}"></a>
- {/if}
- {if !empty($U_SET_AS_REPRESENTATIVE) }
- <a href="{$U_SET_AS_REPRESENTATIVE}" title="{'set as category representative'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/representative.png" class="button" alt="{'representative'|@translate}"></a>
- {/if}
- {if isset($U_ADMIN) }
- <a href="{$U_ADMIN}" title="{'link_info_image'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/preferences.png" class="button" alt="{'edit'|@translate}"></a>
- {/if}
- {if isset($U_CADDIE) }
- <a href="{$U_CADDIE}" title="{'add to caddie'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/caddie_add.png" class="button" alt="{'caddie'|@translate}"></a>
- {/if}
- </div>
- {include file=$FILE_PICTURE_NAV_BUTTONS}
-</div> <!-- imageToolBar -->
-
-<div id="theImage">
-{$ELEMENT_CONTENT}
-
-{if isset($COMMENT_IMG)}
-<p>{$COMMENT_IMG}</p>
-{/if}
-
-{if isset($U_SLIDESHOW_STOP) }
-<p>
- [ <a href="{$U_SLIDESHOW_STOP}">{'slideshow_stop'|@translate}</a> ]
-</p>
-{/if}
-
-</div>
-
-{if isset($previous) }
-<a class="navThumb" id="thumbPrev" href="{$previous.U_IMG}" title="{'previous_page'|@translate} : {$previous.TITLE}" rel="prev">
- <img src="{$previous.THUMB_SRC}" class="thumbLink" id="linkPrev" alt="{$previous.TITLE}">
-</a>
-{/if}
-{if isset($next) }
-<a class="navThumb" id="thumbNext" href="{$next.U_IMG}" title="{'next_page'|@translate} : {$next.TITLE}" rel="next">
- <img src="{$next.THUMB_SRC}" class="thumbLink" id="linkNext" alt="{$next.TITLE}">
-</a>
-{/if}
-
-<table class="infoTable" summary="Some info about this picture">
- <tr>
- <td class="label">{'Author'|@translate}</td>
- <td class="value">{if isset($INFO_AUTHOR)}{$INFO_AUTHOR}{else}{'N/A'|@translate}{/if}</td>
- </tr>
- <tr>
- <td class="label">{'Created on'|@translate}</td>
- <td class="value">{if isset($INFO_CREATION_DATE)}{$INFO_CREATION_DATE}{else}{'N/A'|@translate}{/if}</td>
- </tr>
- <tr>
- <td class="label">{'Posted on'|@translate}</td>
- <td class="value">{$INFO_POSTED_DATE}</td>
- </tr>
- <tr>
- <td class="label">{'Dimensions'|@translate}</td>
- <td class="value">{if isset($INFO_DIMENSIONS)}{$INFO_DIMENSIONS}{else}{'N/A'|@translate}{/if}</td>
- </tr>
- <tr>
- <td class="label">{'File'|@translate}</td>
- <td class="value">{$INFO_FILE}</td>
- </tr>
- <tr>
- <td class="label">{'Filesize'|@translate}</td>
- <td class="value">{if isset($INFO_FILESIZE)}{$INFO_FILESIZE}{else}{'N/A'|@translate}{/if}</td>
- </tr>
- <tr>
- <td class="label">{'Tags'|@translate}</td>
- <td class="value">
- {if isset($related_tags)}
- {foreach from=$related_tags item=tag name=tag_loop}{if !$smarty.foreach.tag_loop.first}, {/if}
- <a href="{$tag.U_TAG}">{$tag.NAME}</a>{/foreach}
- {/if}
- </td>
- </tr>
- <tr>
- <td class="label">{'Categories'|@translate}</td>
- <td class="value">
- {if isset($related_categories)}
- <ul>
- {foreach from=$related_categories item=cat}
- <li>{$cat}</li>
- {/foreach}
- </ul>
- {/if}
- </td>
- </tr>
- <tr>
- <td class="label">{'Visits'|@translate}</td>
- <td class="value">{$INFO_VISITS}</td>
- </tr>
- {if isset($rate_summary) }
- <tr>
- <td class="label">{'Average rate'|@translate}</td>
- <td class="value">
- {if $rate_summary.count}
- {assign var='rate_text' value='%.2f (rated %d times, standard deviation = %.2f)'|@translate }
- {$pwg->sprintf($rate_text, $rate_summary.average, $rate_summary.count, $rate_summary.std) }
- {else}
- {'no_rate'|@translate}
- {/if}
- </td>
- </tr>
- {/if}
-</table>
-
-{if isset($metadata)}
-<table class="infoTable" summary="Some more (technical) info about this picture">
-{foreach from=$metadata item=meta}
- <tr>
- <th colspan="2">{$meta.TITLE}</th>
- </tr>
- {foreach from=$meta.lines item=value key=label}
- <tr>
- <td class="label">{$label}</td>
- <td class="value">{$value}</td>
- </tr>
- {/foreach}
-{/foreach}
-</table>
-{/if}
-
-{if isset($rating)}
-<form action="{$rating.F_ACTION}" method="post" id="rateForm">
-<div>
-{if isset($rating.USER_RATE)}{'update_rate'|@translate}{else}{'new_rate'|@translate}{/if}
-:
-{foreach from=$rating.marks item=mark name=rate_loop}
-{if !$smarty.foreach.rate_loop.first} | {/if}
-{if isset($rating.USER_RATE) && $mark==$rating.USER_RATE}
- <input type="button" name="rate" value="{$mark}" class="rateButtonSelected" />
-{else}
- <input type="submit" name="rate" value="{$mark}" class="rateButton" />
-{/if}
-{/foreach}
-<script type="text/javascript" src="{$ROOT_URL}{$themeconf.template_dir}/rating.js"></script>
-</div>
-</form>
-{/if}
-
-<hr class="separation">
-
-{if isset($COMMENT_COUNT)}
-<div id="comments">
- <h2>[{$COMMENT_COUNT}] {'comments_title'|@translate}</h2>
-
- <div class="navigationBar">{$COMMENT_NAV_BAR}</div>
-
- {if isset($comments)}
- {foreach from=$comments item=comment}
- <div class="comment">
- {if isset($comment.U_DELETE)}
- <p class="userCommentDelete">
- <a href="{$comment.U_DELETE}" title="{'comments_del'|@translate}">
- <img src="{$ROOT_URL}{$themeconf.icon_dir}/delete.png" class="button" style="border:none;vertical-align:middle; margin-left:5px;" alt="[{'delete'|@translate}]"/>
- </a>
- </p>
- {/if}
- <p class="commentInfo"><span class="author">{$comment.AUTHOR}</span> - {$comment.DATE}</p>
- <blockquote>{$comment.CONTENT}</blockquote>
- </div>
- {/foreach}
- {/if}
-
- {if isset($comment_add)}
- <form method="post" action="{$comment_add.F_ACTION}" class="filter" id="addComment">
- <fieldset>
- <legend>{'comments_add'|@translate}</legend>
- {if $comment_add.SHOW_AUTHOR}
- <label>{'upload_author'|@translate}<input type="text" name="author"></label>
- {/if}
- <label>{'comment'|@translate}<textarea name="content" rows="5" cols="80">{$comment_add.CONTENT}</textarea></label>
- <input type="hidden" name="key" value="{$comment_add.KEY}" />
- <input class="submit" type="submit" value="{'Submit'|@translate}">
- </fieldset>
- </form>
- {/if}
-
-</div>
-{/if} {*comments*}
-
-{if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}
diff --git a/BSF/template/yoga/picture_content.tpl b/BSF/template/yoga/picture_content.tpl
deleted file mode 100644
index 7e15a1bb3..000000000
--- a/BSF/template/yoga/picture_content.tpl
+++ /dev/null
@@ -1,9 +0,0 @@
-{* $Id$ *}
-{if isset($high) }
-<a href="javascript:phpWGOpenWindow('{$high.U_HIGH}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')">
-{/if}
- <img src="{$SRC_IMG}" style="width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;" alt="{$ALT_IMG}">
-{if isset($high) }
-</a>
- <p>{'picture_high'|@translate}</p>
-{/if}
diff --git a/BSF/template/yoga/picture_nav_buttons.tpl b/BSF/template/yoga/picture_nav_buttons.tpl
deleted file mode 100644
index 081696ee2..000000000
--- a/BSF/template/yoga/picture_nav_buttons.tpl
+++ /dev/null
@@ -1,103 +0,0 @@
-{* $Id$ *}
- <div class="navButtons">
-
-{if isset($last)}
- <a class="navButton prev" href="{$last.U_IMG}" title="{'last_page'|@translate} : {$last.TITLE}" rel="last"><img src="{$ROOT_URL}{$themeconf.icon_dir}/last.png" class="button" alt="{'last_page'|@translate}"></a>
-{else}
- <a class="navButton prev"><img src="{$ROOT_URL}{$themeconf.icon_dir}/last_unactive.png" class="button" alt=""></a>
-{/if}
-
-{if isset($next)}
- <a class="navButton next" href="{$next.U_IMG}" title="{'next_page'|@translate} : {$next.TITLE}" rel="next"><img src="{$ROOT_URL}{$themeconf.icon_dir}/right.png" class="button" alt="{'next_page'|@translate}"></a>
-{else}
- <a class="navButton next"><img src="{$ROOT_URL}{$themeconf.icon_dir}/right_unactive.png" class="button" alt=""></a>
-{/if}
-
-{if isset($slideshow.U_START_PLAY)}
- <a class="navButton play" href="{$slideshow.U_START_PLAY}" title="{'start_play'|@translate}" rel="play"><img src="{$ROOT_URL}{$themeconf.icon_dir}/play.png" class="button" alt="{'start_play'|@translate}"></a>
-{/if}
-
-{if isset($slideshow.U_STOP_PLAY)}
- <a class="navButton play" href="{$slideshow.U_STOP_PLAY}" title="{'stop_play'|@translate}" rel="play"><img src="{$ROOT_URL}{$themeconf.icon_dir}/pause.png" class="button" alt="{'stop_play'|@translate}"></a>
-{/if}
-
-{if isset($U_UP) and !isset($slideshow)}
- <a class="navButton up" href="{$U_UP}" title="{'thumbnails'|@translate}" rel="up"><img src="{$ROOT_URL}{$themeconf.icon_dir}/up.png" class="button" alt="{'thumbnails'|@translate}"></a>
-{/if}
-
-{if isset($previous)}
- <a class="navButton prev" href="{$previous.U_IMG}" title="{'previous_page'|@translate} : {$previous.TITLE}" rel="prev"><img src="{$ROOT_URL}{$themeconf.icon_dir}/left.png" class="button" alt="{'previous_page'|@translate}"></a>
-{else}
- <a class="navButton prev"><img src="{$ROOT_URL}{$themeconf.icon_dir}/left_unactive.png" class="button" alt=""></a>
-{/if}
-
-{if isset($first)}
- <a class="navButton prev" href="{$first.U_IMG}" title="{'first_page'|@translate} : {$first.TITLE}" rel="first"><img src="{$ROOT_URL}{$themeconf.icon_dir}/first.png" class="button" alt="{'first_page'|@translate}"></a>
-{else}
- <a class="navButton prev"><img src="{$ROOT_URL}{$themeconf.icon_dir}/first_unactive.png" class="button" alt=""></a>
-{/if}
-
-
-{if isset($slideshow.U_START_REPEAT)}
- <a class="navButton repeat" href="{$slideshow.U_START_REPEAT}" title="{'start_repeat'|@translate}" rel="repeat"><img src="{$ROOT_URL}{$themeconf.icon_dir}/start_repeat.png" class="button" alt="{'start_repeat'|@translate}"></a>
-{/if}
-
-{if isset($slideshow.U_STOP_REPEAT)}
- <a class="navButton repeat" href="{$slideshow.U_STOP_REPEAT}" title="{'stop_repeat'|@translate}" rel="repeat"><img src="{$ROOT_URL}{$themeconf.icon_dir}/stop_repeat.png" class="button" alt="{'stop_repeat'|@translate}"></a>
-{/if}
-
-{if isset($slideshow)}
- {if isset($slideshow.U_DEC_PERIOD)}
- <a class="navButton dec_period" href="{$slideshow.U_DEC_PERIOD}" title="{'dec_period'|@translate}" rel="repeat"><img src="{$ROOT_URL}{$themeconf.icon_dir}/dec_period.png" class="button" alt="{'dec_period'|@translate}"></a>
- {else}
- <a class="navButton dec_period"> <img src="{$ROOT_URL}{$themeconf.icon_dir}/dec_period_unactive.png" class="button" alt=""></a>
- {/if}
-
- {if isset($slideshow.U_INC_PERIOD)}
- <a class="navButton inc_period" href="{$slideshow.U_INC_PERIOD}" title="{'inc_period'|@translate}" rel="repeat"><img src="{$ROOT_URL}{$themeconf.icon_dir}/inc_period.png" class="button" alt="{'inc_period'|@translate}"></a>
- {else}
- <a class="navButton inc_period"> <img src="{$ROOT_URL}{$themeconf.icon_dir}/inc_period_unactive.png" class="button" alt=""></a>
- {/if}
-{/if}
-
- </div>
-
-<script type="text/javascript">
-{literal}
-function keyboardNavigation(e)
-{
- if(!e) var e=window.event;
- if (e.altKey) return true;
- var target = e.target || e.srcElement;
- if (target && target.type) return true; //an input editable element
- var keyCode=e.keyCode || e.which;
- var docElem = document.documentElement;
- switch(keyCode) {
-{/literal}
-{if isset($next)}
- case 63235: case 39: if (e.ctrlKey || docElem.scrollLeft==docElem.scrollWidth-docElem.clientWidth ){ldelim}window.location="{$next.U_IMG}".replace( "&amp;", "&" ); return false; } break;
-{/if}
-{if isset($previous)}
- case 63234: case 37: if (e.ctrlKey || docElem.scrollLeft==0){ldelim}window.location="{$previous.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
-{/if}
-{if isset($first)}
- /*Home*/case 36: if (e.ctrlKey){ldelim}window.location="{$first.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
-{/if}
-{if isset($last)}
- /*End*/case 35: if (e.ctrlKey){ldelim}window.location="{$last.U_IMG|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
-{/if}
-{if isset($U_UP) and !isset($slideshow)}
- /*Up*/case 38: if (e.ctrlKey){ldelim}window.location="{$U_UP|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
-{/if}
-
-{if isset($slideshow.U_START_PLAY)}
- /*Pause*/case 32: {ldelim}window.location="{$slideshow.U_START_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
-{/if}
-{if isset($slideshow.U_STOP_PLAY)}
- /*Play*/case 32: {ldelim}window.location="{$slideshow.U_STOP_PLAY|@escape:jasvascript}".replace("&amp;","&"); return false; } break;
-{/if}
- }
- return true;
-}
-document.onkeydown=keyboardNavigation;
-</script>
diff --git a/BSF/template/yoga/popuphelp.tpl b/BSF/template/yoga/popuphelp.tpl
deleted file mode 100644
index af732c554..000000000
--- a/BSF/template/yoga/popuphelp.tpl
+++ /dev/null
@@ -1,6 +0,0 @@
-{* $Id$ *}
-<div id="content" class="content">
-{$HELP_CONTENT}
-</div> <!-- content -->
-
-<p id="pageBottomActions"><a href="#" onclick="window.close();" title="{'Close this window'|@translate}"><img src="{$themeconf.icon_dir}/exit.png" class="button" alt="close"></a></p>
diff --git a/BSF/template/yoga/print.css b/BSF/template/yoga/print.css
deleted file mode 100644
index 8252f7e44..000000000
--- a/BSF/template/yoga/print.css
+++ /dev/null
@@ -1,14 +0,0 @@
-#menubar, .content .navigationBar, UL.categoryActions, .content DIV.calendarViews, .calendarBar,
-#imageToolBar, .navThumb, #addComment {
- display: none;
-}
-
-BODY {
- margin: 0;
- color: #000000;
- background: #ffffff;
-}
-
-.content {
- margin: 0;
-}
diff --git a/BSF/template/yoga/profile.tpl b/BSF/template/yoga/profile.tpl
deleted file mode 100644
index 75ea61d48..000000000
--- a/BSF/template/yoga/profile.tpl
+++ /dev/null
@@ -1,22 +0,0 @@
-{* $Id$ *}
-<div id="content" class="content">
-
-{if isset($errors)}
-<div class="errors">
- <ul>
- {foreach from=$errors item=error}
- <li>{$error}</li>
- {/foreach}
- </ul>
-</div>
-{/if}
-
- <div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HOME}" title="{'return to homepage'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
- </ul>
- <h2>{'Profile'|@translate}</h2>
- </div>
-
-{$PROFILE_CONTENT}
-</div> <!-- content -->
diff --git a/BSF/template/yoga/profile_content.tpl b/BSF/template/yoga/profile_content.tpl
deleted file mode 100644
index 9cabf0a51..000000000
--- a/BSF/template/yoga/profile_content.tpl
+++ /dev/null
@@ -1,109 +0,0 @@
-{* $Id$ *}
-<form method="post" name="profile" action="{$F_ACTION}" id="profile" class="properties">
-
- <fieldset>
- <legend>{'Registration'|@translate}</legend>
- <input type="hidden" name="redirect" value="{$REDIRECT}" />
- <ul>
- <li>
- <span class="property">{'Username'|@translate}</span>
- {$USERNAME}
- </li>
-{if not $SPECIAL_USER} {* can modify password + email*}
- <li>
- <span class="property">
- <label for="mail_address">{'Email address'|@translate}</label>
- </span>
- <input type="text" name="mail_address" id="mail_address" value="{$EMAIL}">
- </li>
-{if not $IN_ADMIN} {* admins do not need old password*}
- <li>
- <span class="property">
- <label for="password">{'Password'|@translate}</label>
- </span>
- <input type="password" name="password" id="password" value="">
- </li>
-{/if}
- <li>
- <span class="property">
- <label for="use_new_pwd">{'new_password'|@translate}</label>
- </span>
- <input type="password" name="use_new_pwd" id="use_new_pwd" value="">
- </li>
- <li>
- <span class="property">
- <label for="passwordConf">{'Confirm Password'|@translate}</label>
- </span>
- <input type="password" name="passwordConf" id="passwordConf" value="">
- </li>
- </ul>
-{/if}
- </fieldset>
-
- <fieldset>
- <legend>{'preferences'|@translate}</legend>
-
- <ul>
- <li>
- <span class="property">
- <label for="nb_image_line">{'nb_image_per_row'|@translate}</label>
- </span>
- <input type="text" size="3" maxlength="2" name="nb_image_line" id="nb_image_line" value="{$NB_IMAGE_LINE}">
- </li>
- <li>
- <span class="property">
- <label for="nb_line_page">{'nb_row_per_page'|@translate}</label>
- </span>
- <input type="text" size="3" maxlength="2" name="nb_line_page" id="nb_line_page" value="{$NB_ROW_PAGE}" >
- </li>
- <li>
- <span class="property">
- <label for="template">{'theme'|@translate}</label>
- </span>
- {html_options name=template options=$template_options selected=$template_selection}
- </li>
- <li>
- <span class="property">
- <label for="language">{'language'|@translate}</label>
- </span>
- {html_options name=language options=$language_options selected=$language_selection}
- </li>
- <li>
- <span class="property">
- <label for="recent_period">{'recent_period'|@translate}</label>
- </span>
- <input type="text" size="3" maxlength="2" name="recent_period" id="recent_period" value="{$RECENT_PERIOD}">
- </li>
- <li>
- <span class="property">{'auto_expand'|@translate}</span>
- {html_radios name='expand' options=$radio_options selected=$EXPAND}
- </li>
- <li>
- <span class="property">{'show_nb_comments'|@translate}</span>
- {html_radios name='show_nb_comments' options=$radio_options selected=$NB_COMMENTS}
- </li>
- <li>
- <span class="property">{'show_nb_hits'|@translate}</span>
- {html_radios name='show_nb_hits' options=$radio_options selected=$NB_HITS}
- </li>
- <li>
- <span class="property">
- <label for="maxwidth">{'maxwidth'|@translate}</label>
- </span>
- <input type="text" size="4" maxlength="4" name="maxwidth" id="maxwidth" value="{$MAXWIDTH}">
- </li>
- <li>
- <span class="property">
- <label for="maxheight">{'maxheight'|@translate}</label>
- </span>
- <input type="text" size="4" maxlength="4" name="maxheight" id="maxheight" value="{$MAXHEIGHT}">
- </li>
- </ul>
- </fieldset>
-
- <p class="bottomButtons">
- <input class="submit" type="submit" name="validate" value="{'Submit'|@translate}">
- <input class="submit" type="reset" name="reset" value="{'Reset'|@translate}">
- </p>
-
-</form>
diff --git a/BSF/template/yoga/rating.js b/BSF/template/yoga/rating.js
deleted file mode 100644
index a4f8f86b8..000000000
--- a/BSF/template/yoga/rating.js
+++ /dev/null
@@ -1,90 +0,0 @@
-makeNiceRatingForm();
-
-function makeNiceRatingForm()
-{
- var form = document.getElementById('rateForm');
- if (!form) return; //? template changed
- gRatingButtons = form.getElementsByTagName('input');
-
- gUserRating = "";
- for (var i=0; i<gRatingButtons.length; i++)
- {
- if ( gRatingButtons[i].type=="button" )
- {
- gUserRating = gRatingButtons[i].value;
- break;
- }
- }
-
- for (var i=0; i<gRatingButtons.length; i++)
- {
- var rateButton = gRatingButtons[i];
- rateButton.initialRateValue = rateButton.value; // save it as a property
-
- rateButton.value = ""; //hide the text IE/Opera
- with (rateButton.style)
- {
- textIndent = "-50px"; //hide the text FF
- marginLeft = marginRight = 0;
- }
-
- if (i!=gRatingButtons.length-1 && rateButton.nextSibling.nodeType == 3 /*TEXT_NODE*/)
- rateButton.parentNode.removeChild(rateButton.nextSibling);
- if (i>0 && rateButton.previousSibling.nodeType == 3 /*TEXT_NODE*/)
- rateButton.parentNode.removeChild(rateButton.previousSibling);
-
- if(window.addEventListener){ // Mozilla, Netscape, Firefox
- rateButton.addEventListener("click", updateRating, false );
- rateButton.addEventListener("mouseout", resetRatingStarDisplay, false );
- rateButton.addEventListener("mouseover", updateRatingStarDisplayEvt, false );
- }
- else if(window.attachEvent) { // IE
- rateButton.attachEvent("onclick", updateRating);
- rateButton.attachEvent("onmouseout", resetRatingStarDisplay);
- rateButton.attachEvent("onmouseover", updateRatingStarDisplayEvt);
- }
- }
- resetRatingStarDisplay();
-}
-
-function resetRatingStarDisplay()
-{
- updateRatingStarDisplay( gUserRating );
-}
-
-function updateRatingStarDisplay(userRating)
-{
- for (i=0; i<gRatingButtons.length; i++)
- {
- var rateButton = gRatingButtons[i];
- if (userRating!=="" && userRating>=rateButton.initialRateValue )
- {
- rateButton.className = "rateButtonStarFull";
- }
- else
- {
- rateButton.className = "rateButtonStarEmpty";
- }
- }
-}
-
-function updateRatingStarDisplayEvt(e)
-{
- if (e.target)
- updateRatingStarDisplay(e.target.initialRateValue);
- else //IE
- updateRatingStarDisplay(e.srcElement.initialRateValue);
-}
-
-function updateRating(e)
-{
- if (e.target)
- var rateButton = e.target;
- else //IE
- var rateButton = e.srcElement;
- if (rateButton.initialRateValue == gUserRating)
- return false; //nothing to do
- // some ajax here one day would be nice
- rateButton.value = rateButton.initialRateValue; // put back real value
- return true;
-} \ No newline at end of file
diff --git a/BSF/template/yoga/redirect.tpl b/BSF/template/yoga/redirect.tpl
deleted file mode 100644
index aa007426f..000000000
--- a/BSF/template/yoga/redirect.tpl
+++ /dev/null
@@ -1,3 +0,0 @@
-{* $Id$ *}
-<p>{$REDIRECT_MSG}</p>
-<p><a href="{$page_refresh.U_REFRESH}">{'click_to_redirect'|@translate}</a></p>
diff --git a/BSF/template/yoga/register.tpl b/BSF/template/yoga/register.tpl
deleted file mode 100644
index 83bfd8c27..000000000
--- a/BSF/template/yoga/register.tpl
+++ /dev/null
@@ -1,69 +0,0 @@
-{* $Id$ *}
-<div id="registerPage">
-
-<div id="content" class="content">
-
- <div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HOME}" title="{'return to homepage'|@translate}"><img src="{$ROOT_URL}{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
- </ul>
- <h2>{'Registration'|@translate}</h2>
- </div>
-
-{if isset($errors)}
- <div class="errors">
- <ul>
- {foreach from=$errors item=error}
- <li>{$error}</li>
- {/foreach}
- </ul>
- </div>
-{/if}
-
-<form method="post" action="{$F_ACTION}" class="properties" name="register_form">
- <fieldset>
- <legend>{'Enter your personnal informations'|@translate}</legend>
-
- <ul>
- <li>
- <span class="property">
- <label for="login">* {'Username'|@translate}</label>
- </span>
- <input type="text" name="login" id="login" value="{$F_LOGIN}" >
- </li>
- <li>
- <span class="property">
- <label for="password">* {'Password'|@translate}</label>
- </span>
- <input type="password" name="password" id="password" >
- </li>
- <li>
- <span class="property">
- <label for="password_conf">* {'Confirm Password'|@translate}</label>
- </span>
- <input type="password" name="password_conf" id="password_conf" >
- </li>
- <li>
- <span class="property">
- <label for="mail_address">{'Mail address'|@translate}</label>
- </span>
- <input type="text" name="mail_address" id="mail_address" value="{$F_EMAIL}" >
- ({'useful when password forgotten'|@translate})
- </li>
- </ul>
-
- </fieldset>
-
- <p class="bottomButtons">
- <input class="submit" type="submit" name="submit" value="{'Register'|@translate}">
- <input class="submit" type="reset" value="{'Reset'|@translate}">
- </p>
-
-</form>
-
-<script type="text/javascript"><!--
-document.register_form.login.focus();
-//--></script>
-
-</div> <!-- content -->
-</div> <!-- registerPage -->
diff --git a/BSF/template/yoga/search.tpl b/BSF/template/yoga/search.tpl
deleted file mode 100644
index f5b72d138..000000000
--- a/BSF/template/yoga/search.tpl
+++ /dev/null
@@ -1,126 +0,0 @@
-{* $Id$ *}
-<div id="content" class="content">
-
- <div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HELP}" onclick="popuphelp(this.href); return false;" title="{'Help'|@translate}" rel="nofollow"><img src="{$ROOT_URL}{$themeconf.icon_dir}/help.png" class="button" alt="(?)"></a></li>
- <li><a href="{$U_HOME}" title="{'return to homepage'|@translate}" rel="home"><img src="{$ROOT_URL}{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
- </ul>
- <h2>{'Search'|@translate}</h2>
- </div>
-
-{if isset($errors) }
-<div class="errors">
- <ul>
- {foreach from=$errors item=error}
- <li>{$error}</li>
- {/foreach}
- </ul>
-</div>
-{/if}
-
-<form class="filter" method="post" name="search" action="{$F_SEARCH_ACTION}">
-<fieldset>
- <legend>{'Filter'|@translate}</legend>
- <label>{'search_keywords'|@translate}
- <input type="text" style="width: 300px" name="search_allwords" size="30" />
- </label>
- <ul>
- <li><label>
- <input type="radio" name="mode" value="AND" checked="checked" />{'search_mode_and'|@translate}
- </label></li>
- <li><label>
- <input type="radio" name="mode" value="OR" />{'search_mode_or'|@translate}
- </label></li>
- </ul>
- <label>{'search_author'|@translate}
- <input type="text" style="width: 300px" name="search_author" size="30" />
- </label>
-</fieldset>
-
-{if isset($TAG_SELECTION)}
-<fieldset>
- <legend>{'Search tags'|@translate}</legend>
- {$TAG_SELECTION}
- <label><span><input type="radio" name="tag_mode" value="AND" checked="checked" /> {'All tags'|@translate}</span></label>
- <label><span><input type="radio" name="tag_mode" value="OR" /> {'Any tag'|@translate}</span></label>
-</fieldset>
-{/if}
-
-<fieldset>
- <legend>{'search_date'|@translate}</legend>
- <ul>
- <li><label>{'search_date_type'|@translate}</label></li>
- <li><label>
- <input type="radio" name="date_type" value="date_creation" checked="checked" />{'Creation date'|@translate}
- </label></li>
- <li><label>
- <input type="radio" name="date_type" value="date_available" />{'Post date'|@translate}
- </label></li>
- </ul>
- <ul>
- <li><label>{'search_date_from'|@translate}</label></li>
- <li>
- <select name="start_day">
- <option value="0">--</option>
- {section name=day start=1 loop=32}
- <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$START_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
- {/section}
- </select>
- <select name="start_month">
- {html_options options=$month_list selected=$START_MONTH_SELECTED}
- </select>
- <input name="start_year" type="text" size="4" maxlength="4" >
- </li>
- <li>
- <a href="#" onClick="document.search.start_day.value={$smarty.now|date_format:"%d"};document.search.start_month.value={$smarty.now|date_format:"%m"};document.search.start_year.value={$smarty.now|date_format:"%Y"};return false;">{'today'|@translate}</a>
- </li>
- </ul>
- <ul>
- <li><label>{'search_date_to'|@translate}</label></li>
- <li>
- <select name="end_day">
- <option value="0">--</option>
- {section name=day start=1 loop=32}
- <option value="{$smarty.section.day.index}" {if $smarty.section.day.index==$END_DAY_SELECTED}selected="selected"{/if}>{$smarty.section.day.index}</option>
- {/section}
- </select>
- <select name="end_month">
- {html_options options=$month_list selected=$END_MONTH_SELECTED}
- </select>
- <input name="end_year" type="text" size="4" maxlength="4" >
- </li>
- <li>
- <a href="#" onClick="document.search.end_day.value={$smarty.now|date_format:"%d"};document.search.end_month.value={$smarty.now|date_format:"%m"};document.search.end_year.value={$smarty.now|date_format:"%Y"};return false;">{'today'|@translate}</a>
- </li>
- </ul>
-</fieldset>
-
-<fieldset>
- <legend>{'search_options'|@translate}</legend>
- <label>{'search_categories'|@translate}
- <select class="categoryList" name="cat[]" multiple="multiple" >
- {html_options options=$category_options selected=$category_options_selected}
- </select>
- </label>
- <ul>
- <li><label>{'search_subcats_included'|@translate}</label></li>
- <li><label>
- <input type="radio" name="subcats-included" value="1" checked="checked" />{'Yes'|@translate}
- </label></li>
- <li><label>
- <input type="radio" name="subcats-included" value="0" />{'No'|@translate}
- </label></li>
- </ul>
-</fieldset>
-<p>
- <input class="submit" type="submit" name="submit" value="{'Submit'|@translate}" />
- <input class="submit" type="reset" value="{'Reset'|@translate}" />
-</p>
-</form>
-
-<script type="text/javascript"><!--
-document.search.search_allwords.focus();
-//--></script>
-
-</div> <!-- content -->
diff --git a/BSF/template/yoga/search_rules.tpl b/BSF/template/yoga/search_rules.tpl
deleted file mode 100644
index c7b4a8b88..000000000
--- a/BSF/template/yoga/search_rules.tpl
+++ /dev/null
@@ -1,56 +0,0 @@
-{* $Id$ *}
-<div id="content" class="content">
-<h2>{'Search rules'|@translate}</h2>
-
-{if isset($INTRODUCTION) }
-<p>{$INTRODUCTION}</p>
-{/if}
-
-<ul>
-
- {if isset($search_words) }
- {foreach from=$search_words item=v}
- <li>{$v}</li>
- {/foreach}
- {/if}
-
- {if isset($SEARCH_TAGS_MODE) }
- <li>
- <p>{if 'AND'==$SEARCH_TAGS_MODE}{'All tags must match'|@translate}{else}{'At least one tag must match'|@translate}{/if}</p>
- <ul>
- {foreach from=$search_tags item=v}
- <li>{$v}</li>
- {/foreach}
- </ul>
- </li>
- {/if}
-
- {if isset($DATE_CREATION) }
- <li>{$DATE_CREATION}</li>
- {/if}
-
- {if isset($DATE_AVAILABLE) }
- <li>{$DATE_AVAILABLE}</li>
- {/if}
-
- {if isset($search_categories) }
- <li>
- <p>{'Categories'|@translate}</p>
-
- <ul>
- {foreach from=$search_categories item=v}
- <li>{$v}</li>
- {/foreach}
- </ul>
- </li>
- {/if}
-
-</ul>
-
-</div> <!-- content -->
-
-<p id="pageBottomActions">
- <a href="#" onclick="window.close();" title="{'Close this window'|@translate}">
- <img src="{$themeconf.icon_dir}/exit.png" class="button" alt="close">
- </a>
-</p>
diff --git a/BSF/template/yoga/slideshow.tpl b/BSF/template/yoga/slideshow.tpl
deleted file mode 100644
index 1bbc0029f..000000000
--- a/BSF/template/yoga/slideshow.tpl
+++ /dev/null
@@ -1,23 +0,0 @@
-{* $Id$ *}
-<div id="imageHeaderBar">
- <div class="browsePath">
- {if isset($U_SLIDESHOW_STOP) }
- [ <a href="{$U_SLIDESHOW_STOP}">{'slideshow_stop'|@translate}</a> ]
- {/if}
- </div>
- <div class="imageNumber">{$PHOTO}</div>
- {if $SHOW_PICTURE_NAME_ON_TITLE }
- <h2 class="showtitle">{$current.TITLE}</h2>
- {/if}
-</div>
-
-<div id="imageToolBar">
- {include file=$FILE_PICTURE_NAV_BUTTONS}
-</div>
-
-<div id="theImage">
- {$ELEMENT_CONTENT}
- {if isset($COMMENT_IMG)}
- <p class="showlegend">{$COMMENT_IMG}</p>
- {/if}
-</div>
diff --git a/BSF/template/yoga/tags.tpl b/BSF/template/yoga/tags.tpl
deleted file mode 100644
index 98a49cd06..000000000
--- a/BSF/template/yoga/tags.tpl
+++ /dev/null
@@ -1,19 +0,0 @@
-{* $Id$ *}
-<div id="content" class="content">
-
- <div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HOME}" title="{'return to homepage'|@translate}"><img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
- </ul>
- <h2>{'Tags'|@translate}</h2>
- </div>
-
- {if isset($tags)}
- <ul id="fullTagCloud">
- {foreach from=$tags item=tag}
- <li><a href="{$tag.URL}" class="{$tag.CLASS}" title="{$tag.TITLE}">{$tag.NAME}</a></li>
- {/foreach}
- </ul>
- {/if}
-
-</div> <!-- content -->
diff --git a/BSF/template/yoga/theme/admin/images/bottom-left-bg.png b/BSF/template/yoga/theme/admin/images/bottom-left-bg.png
deleted file mode 100644
index ce611dfed..000000000
--- a/BSF/template/yoga/theme/admin/images/bottom-left-bg.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/content-bg.png b/BSF/template/yoga/theme/admin/images/content-bg.png
deleted file mode 100644
index 74ccf81bc..000000000
--- a/BSF/template/yoga/theme/admin/images/content-bg.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/header_bottom.png b/BSF/template/yoga/theme/admin/images/header_bottom.png
deleted file mode 100644
index e4d049881..000000000
--- a/BSF/template/yoga/theme/admin/images/header_bottom.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/index.php b/BSF/template/yoga/theme/admin/images/index.php
deleted file mode 100644
index 547a117bf..000000000
--- a/BSF/template/yoga/theme/admin/images/index.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-// +-----------------------------------------------------------------------+
-// | PhpWebGallery - a PHP based picture gallery |
-// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
-// +-----------------------------------------------------------------------+
-// | file : $Id$
-// | last update : $Date$
-// | last modifier : $Author$
-// | revision : $Revision$
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/theme/admin/images/internal_onglet.png b/BSF/template/yoga/theme/admin/images/internal_onglet.png
deleted file mode 100644
index dd7b1e218..000000000
--- a/BSF/template/yoga/theme/admin/images/internal_onglet.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/list-hover.png b/BSF/template/yoga/theme/admin/images/list-hover.png
deleted file mode 100644
index 73b600269..000000000
--- a/BSF/template/yoga/theme/admin/images/list-hover.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/list-image.png b/BSF/template/yoga/theme/admin/images/list-image.png
deleted file mode 100644
index 1acdf67e4..000000000
--- a/BSF/template/yoga/theme/admin/images/list-image.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/menubar-bg.jpg b/BSF/template/yoga/theme/admin/images/menubar-bg.jpg
deleted file mode 100644
index f99114277..000000000
--- a/BSF/template/yoga/theme/admin/images/menubar-bg.jpg
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/menubar-bg.png b/BSF/template/yoga/theme/admin/images/menubar-bg.png
deleted file mode 100644
index eb998d35c..000000000
--- a/BSF/template/yoga/theme/admin/images/menubar-bg.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/menubar-bottom.png b/BSF/template/yoga/theme/admin/images/menubar-bottom.png
deleted file mode 100644
index be74ddca1..000000000
--- a/BSF/template/yoga/theme/admin/images/menubar-bottom.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/menubar-detail.png b/BSF/template/yoga/theme/admin/images/menubar-detail.png
deleted file mode 100644
index e2d411e95..000000000
--- a/BSF/template/yoga/theme/admin/images/menubar-detail.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/menubar-top.png b/BSF/template/yoga/theme/admin/images/menubar-top.png
deleted file mode 100644
index 7a1195c5f..000000000
--- a/BSF/template/yoga/theme/admin/images/menubar-top.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/onglet_actif.png b/BSF/template/yoga/theme/admin/images/onglet_actif.png
deleted file mode 100644
index 476edb31b..000000000
--- a/BSF/template/yoga/theme/admin/images/onglet_actif.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/onglet_actif_transp.png b/BSF/template/yoga/theme/admin/images/onglet_actif_transp.png
deleted file mode 100644
index fe4b18275..000000000
--- a/BSF/template/yoga/theme/admin/images/onglet_actif_transp.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/onglet_inactif.png b/BSF/template/yoga/theme/admin/images/onglet_inactif.png
deleted file mode 100644
index 8411ed119..000000000
--- a/BSF/template/yoga/theme/admin/images/onglet_inactif.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/onglet_inactif_transp.png b/BSF/template/yoga/theme/admin/images/onglet_inactif_transp.png
deleted file mode 100644
index 9ad96c14e..000000000
--- a/BSF/template/yoga/theme/admin/images/onglet_inactif_transp.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/piwigo_logo_sombre_214x100.png b/BSF/template/yoga/theme/admin/images/piwigo_logo_sombre_214x100.png
deleted file mode 100644
index 106f20add..000000000
--- a/BSF/template/yoga/theme/admin/images/piwigo_logo_sombre_214x100.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/pre-menubar-bg.png b/BSF/template/yoga/theme/admin/images/pre-menubar-bg.png
deleted file mode 100644
index f691a288b..000000000
--- a/BSF/template/yoga/theme/admin/images/pre-menubar-bg.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/tableh1_bg.png b/BSF/template/yoga/theme/admin/images/tableh1_bg.png
deleted file mode 100644
index 38f356b83..000000000
--- a/BSF/template/yoga/theme/admin/images/tableh1_bg.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/tableh2_bg.png b/BSF/template/yoga/theme/admin/images/tableh2_bg.png
deleted file mode 100644
index be06ee428..000000000
--- a/BSF/template/yoga/theme/admin/images/tableh2_bg.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/images/top-left-bg.png b/BSF/template/yoga/theme/admin/images/top-left-bg.png
deleted file mode 100644
index 2650367b0..000000000
--- a/BSF/template/yoga/theme/admin/images/top-left-bg.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/admin/index.php b/BSF/template/yoga/theme/admin/index.php
deleted file mode 100644
index 547a117bf..000000000
--- a/BSF/template/yoga/theme/admin/index.php
+++ /dev/null
@@ -1,54 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-// +-----------------------------------------------------------------------+
-// | PhpWebGallery - a PHP based picture gallery |
-// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
-// +-----------------------------------------------------------------------+
-// | file : $Id$
-// | last update : $Date$
-// | last modifier : $Author$
-// | revision : $Revision$
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/theme/admin/mail-css.tpl b/BSF/template/yoga/theme/admin/mail-css.tpl
deleted file mode 100644
index 5b3e53c3d..000000000
--- a/BSF/template/yoga/theme/admin/mail-css.tpl
+++ /dev/null
@@ -1,19 +0,0 @@
-{* $Id$ *}
-/* Theme wipi mail css */
-
-body {ldelim} background-color:#111; color:#69c;}
-#the_page {ldelim} background: #111 url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/mailbody-bg.png) repeat-y scroll left top;}
-#content {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/header-bg.png) no-repeat scroll left top;}
-#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom;
-color: #69c;}
-h2 {ldelim} background-color: #222;color:#eee;background-image: url({$ROOT_URL}template/{$themeconf.template}/theme/{$themeconf.theme}/images/tableh1_bg.png);}
-img {ldelim} margin: 16px; padding:15px;border:1px solid #eee; -moz-border-radius: 4px; border-radius: 4px 4px; }
-img:hover {ldelim} border:1px solid #69c; -moz-border-radius: 4px; border-radius: 4px 4px; }
-a {ldelim} color: #69c; background: transparent; }
-a:hover {ldelim} color: #f92; }
-a.PWG {ldelim} border: 0px; }
-a.PWG .P {ldelim} color : #f92; }
-a.PWG .W {ldelim} color : #aaa; }
-a.PWG .G {ldelim} color : #69c; }
-a.PWG:hover .P {ldelim} color : #69c; }
-a.PWG:hover .G {ldelim} color : #f92; }
diff --git a/BSF/template/yoga/theme/admin/theme.css b/BSF/template/yoga/theme/admin/theme.css
deleted file mode 100644
index 7b8e63e9a..000000000
--- a/BSF/template/yoga/theme/admin/theme.css
+++ /dev/null
@@ -1,468 +0,0 @@
-/* $Id$ */
-
-/* text color */
-BODY, H1, H3, DT,
-INPUT.rateButtonSelected /* <= why IE doesn't inherit this ? */ {
- color:#e0e0e0;
-}
-#menubar {
- margin : 0px;
- background-color: transparent;
- border: 0px;
-}
-H2, .throw {
- color: #eee;
-}
-#menubar DT, #menubar DT A {
- color: #eee;
- font-weight: lighter;
-}
-#menubar DT A:hover {
- color: #69c;
- font-weight: lighter;
-}
-#menubar .selected A {
- color: #eee;
-}
-#menubar .selected A:hover {
- color: #f92;
-}
-#menubar DT:before {
- content: "__\\_ ";
- color: #f92;
-}
-#menubar DT:after {
- content: " _/__";
- color: #69c;
-}
-#menubar .button {
- margin: 0 2px 0px 8px;
- width: auto;
- padding: 0;
- text-indent: 0;
- list-style: none;
- text-align: center;
- float: left;
-}
-#theAdminPage #menubar DT:before,
-#theAdminPage #menubar DT:after {
- content: '';
-}
-.content .pageNumberSelected {
- color: #f92;
-}
-.content .infos {
- background-color: #69c;
- color: #036;
-}
-.content .errors {
- background-color: #fc5;
- border-color: #f92;
- color: #900;
-}
-/* backgrounds */
-BODY {
- background: #111;
- margin: 0px;
- padding: 0px;
-}
-H3, #imageToolBar A:hover, .row1, .tabsheet li {
- background-color: #222;
-}
-#theAdminPage h2, #theAdminPage h3 { border-bottom: 1px solid #69c; }
-#imageHeaderBar, #theAdminPage #the_page {
- background-color: transparent;
-}
-#imageToolBar, .header_notes {
- background-color: #333;
-}
-.selected_tab { background-color: eee !important; }
-A {
- border-color: #69c;
-}
-A:hover {
- border-color: #f92;
-}
-.content {
- background-color: #181818;
- border: 1px solid #eee;
- padding: 5px;
-}
-#theAdminPage #the_page .content {
- background-color: transparent;
- border-width: 0px;
- padding: 5px;
-}
-H2, #menubar DT, .throw, TD H3, #theAdminPage H3 {
- background-image: url(images/tableh1_bg.png);
- background-repeat: repeat-x;
-}
-.content H2 {
- background: none;
- border: 0px;
- letter-spacing: -0.05em;
- text-indent: 1em;
- text-transform: uppercase;
- font-weight: lighter;
- margin-bottom: 20px;
-}
-.content ul.thumbnailCategories li div.thumbnailCategory .description h3,
-.content h3 { text-align: center; }
-.content ul.thumbnailCategories li div.thumbnailCategory .description p {
- color: #f92; text-indent: 0em;
-}
-.content ul.thumbnailCategories li div.thumbnailCategory .description p + p {
- color: #fff;
-}
-.browsePath A {
- color: #eee;
-}
-.content H2:before, .browsePath:before, .imageNumber:before,
-#imageHeaderBar H2:before {
- content: "____\\_ ";
- color: #69c;
- font-family: Times, Zapf-Chancery, Cottonwood, Helvetica;
- letter-spacing: 0em;
-}
-.content H2:after, .browsePath:after, .imageNumber:after,
-#imageHeaderBar H2:after {
- content: " _/____";
- color: #f92;
- font-family: Times, Zapf-Chancery, Cottonwood, Helvetica;
- letter-spacing: 0em;
-}
-#imageHeaderBar H2 {
- background-image: none;
- background-color: transparent;
- border: none;
-}
-#thePicturePage #the_page {
- background-color: transparent;
-}
-#thePicturePage #imageHeaderBar {
- background-image: url(images/tableh2_bg.png);
- background-repeat: repeat-x;
-}
-#thePicturePage #imageToolBar {
- background-color: transparent;
- border-bottom: 2px solid #69c;
-}
-#thePicturePage #theImage {
- background-color: transparent;
- margin: 0px;
- padding: 3px 0px 15px 0px;
-}
-
-#thePicturePage #comments H2 {
- background-image: none;
- background-color: #222;
- border-top: 2px solid #69c;
- border-bottom: 2px solid #69c;
- color: #69c;
- font-weight: lighter;
-}
-
-/* borders */
-#comments DIV.comment BLOCKQUOTE {
- border: 1px solid #000;
-}
-#imageHeaderBar {
- border-top: 1px solid #000;
- padding: 8px 0px 3px 0px;
-}
-H2, #imageToolBar {
- border-bottom: 1px solid #000;
-}
-
-#theImage IMG {
- border-color: #fff;
-}
-
-.content UL.thumbnail IMG {
- border: 1px solid #a0a0a0;
-}
-.illustration A {
- border: 0px;
-}
-FIELDSET, INPUT, SELECT, TEXTAREA,
-.content DIV.comment A.illustration IMG,
-.content DIV.thumbnailCategory {
- border: 1px solid gray;
-}
-.content DIV.thumbnailCategory {
- border: 1px solid #69c;
- margin: 8px 4px;
-}
-#comments DIV.comment BLOCKQUOTE {
- border-left: 2px solid #696969;
-}
-
-.content UL.thumbnails SPAN.wrap2 {
- border: 1px solid #aaaaaa; /* thumbnails border color and style */
- border-radius: 4px 4px; /* round corners with CSS3 compliant browsers */
-}
-
-.content UL.thumbnails SPAN.wrap2:hover,
-.content UL.thumbnailCategories DIV.thumbnailCategory:hover {
- background-color: #333;
- border-color: #69c; /* thumbnails border color when mouse cursor is over it */
-}
-
-#menubar .buttonmenu {
- margin: 0 2px;
- width: auto;
- padding: 0;
- text-indent: 0;
- list-style: none;
- text-align: center;
- float: left;
-}
-
-
-
-
-
-A:hover {
- color: #f92;
-}
-
-#imageToolBar A, #imageToolBar A:hover {
- border-bottom: none;
-}
-A.navThumb, A.navThumb:hover {
- border-bottom: none;
-}
-#the_page {
- border: 1px dotted #f92;
- padding-top: 5px;
- padding-bottom:30px;
- text-align:center;
- display:block;
- margin: 2px;
-}
-#copyright {
- color: #69c;
-}
-
-label {
- cursor:pointer
-}
-input#qsearchInput {
- color: #58c;
- background-color: #222;
- border: 1px solid #333;
- padding: 1px 3px;
-}
-.zero { display: none }
-.nb-hits { color: #69c; }
-.nb-comments { color: #f92; }
-
-FORM#quickconnect,
-FORM#quickconnect FIELDSET,
-FORM#quickconnect P,
-FORM#quickconnect UL.actions,
-FORM#quickconnect FIELDSET>UL.actions,
-FORM#quickconnect UL.actions,
-FORM#quickconnect P,
-FORM#quickconnect LABEL {
- color: #69c;
-}
-FORM#quickconnect P INPUT,
-FORM#quickconnect INPUT[type=text],
-FORM#quickconnect INPUT[type=password] {
- width: 85%;
- color: #58c;
- background-color: #222;
- border: 1px solid #333;
- padding: 1px 3px;
-}
-
-
-.virtual_cat { background: #222 !important; }
-
-.PWG {
- font-family: verdana, arial, helvetica, sans-serif !important;
- font-size: 0.9em;
- font-weight: normal;
- letter-spacing: 0px;
-}
-a.PWG { border: 0px; }
-a.PWG .P { color : #f92; }
-a.PWG .W { color : #aaa; }
-a.PWG .G { color : #69c; }
-a.PWG:hover .P { color : #69c; }
-a.PWG:hover .G { color : #f92; }
-
-
-
-
-
-
-
-
-.statBar { background-color: #e60; }
-#imageToolBar .randomButtons a:hover,
-#imageToolBar .navButtons a:hover { background-color: transparent; }
-#menubar .menuInfoCat,
-#menubar .menuInfoCatByChild,
-h2.showtitle, #theImage p.showlegend { display: none }
-* { outline-width: 0px; }
-ul.tabsheet, ul.tabsheet li {
- border-color: #69c;
-}
-ul.tabsheet li.normal_tab {
- background-image: url(images/tableh1_bg.png);
- background-repeat: repeat-x;
-}
-ul.tabsheet li.normal_tab:hover { border-color: #f92 }
-ul.tabsheet li {
- -moz-border-radius: 0px 0px 3px 3px;
- border-radius: 0px 0px 12px 12px;
- -webkit-border-radius: 0px 0px 3px 3px;
-}
-/* New in 1.8 : Special Admin */
-body#theAdminPage #menubar {
- background: transparent url(images/menubar-bg.png)
- repeat-y scroll right top;
- border-bottom: #ccc ridge 2px; width:13.5em; padding: 0; margin: 0;
-}
-body#theAdminPage .content { /*default-layout.cs... (line 1)*/
-list-style-type:none; padding: 0px;
- /*default-layout.cs... (line 23) */
-margin: 0px 0px 0px 200px; background-color: transparent;}
-
-#theAdminPage #menubar ul { list-style-image:url(images/list-image.png); }
-#theAdminPage #menubar ul:hover { list-style-image:url(images/list-hover.png); }
-a, input.rateButton, legend { color:#777; }
-#menubar a { border-bottom:0; text-decoration:none; font-style: italic;}
-body#theAdminPage #theHeader {
- background:transparent url(images/piwigo_logo_sombre_214x100.png) no-repeat 230px top; height:105px;
-}
-body#theAdminPage #post-header {
- background-color: transparent;
- width: 60%; height: 4px; margin-left:40%;
-}
-#theHeader h1 { /*default-layout.cs... (line 204) */
- font-size:220%; line-height:4em; margin:auto 2em auto auto; text-align:right;
-}
-#the_page { /*theme.css (line 235) */
-border:0; display:block; margin:0px; padding-bottom:0px;
-padding-top:0px; text-align:center; min-height: 100%; position:relative;
-}
-.pwgmenu { /* default-layout.cs... (line 136) */
-background:transparent none repeat scroll 0%;
-display:table; font-family:verdana,arial,helvetica,sans-serif;
-font-size: 8px; line-height:1.1em; list-style-image:none;
-list-style-type:none; margin:1px 8px 1px auto;
-padding:3px; position:relative;
-text-decoration:none; top:-100px;
-white-space:nowrap; width:66em;
-}
-.pwgmenu a { /* default-layout.cs... (line 159) */
-background:#f36 none repeat scroll 0%;
-border:1px solid #FFFFFF;
-color:white;
-display:block;
-font-weight:bold;
-padding:4px 8px;
-text-align:center;
-text-decoration:none;
-width:9em !important;
-}
-
-
-
-
-
-
-
-#theAdminPage #menubar dt.pre-menubar {
-background:transparent none no-repeat scroll left top;
-height: 22px; overflow: hidden; margin: 0px;
-}
-.pwgmenu { /*theme.css (line 335)*/
-background:transparent url(images/header_bottom.png) repeat-x scroll left 25px;
-float:right;
-font-family:verdana,arial,helvetica,sans-serif;
-font-size:8px;
-line-height:1.1em;
-list-style-image:none;
-list-style-type:none;
-margin:1px 8px 1px 0px;
-padding:3px 3px 3px 101px;
-text-decoration:none; top:-35px;
-width:587px;
-}
-.pwgmenu li { /*default-layout.cs... (line 151)*/
-float:left;
-margin:0px;
-padding:0px;
-text-align:center;
-width:126px !important;
-}
-.pwgmenu a { /*theme.css (line 344)*/
-background:transparent url(images/onglet_inactif_transp.png) no-repeat scroll left 3px;
-border:0px none;
-color:#FF3333;
-display:block;
-font-size:8px; height:33px;
-padding:3px 0px 5px 13px; text-align:left;
-text-decoration:none; width:126px !important;
-}
-.pwgmenu a:hover { /*theme.css (line 344)*/
-background:transparent url(images/onglet_actif_transp.png) no-repeat scroll left 2px;
-color: #ff7700; }
-.content h2:before, .content h2:after,
-#menubar DT:before, #menubar DT:after { content: ""; }
-#theHeader h1 { /*theme.css (line 345) */ color:#441100; }
-.content h2 { /*theme.css (line 100)*/
-letter-spacing:0.1em; margin-right:45px; text-align:right; color: #777777;
-text-transform:none; }
-.content dl, dd { /*content.css (line 52) */ margin:5px; }
-.content h2 { /* default-layout.cs... (line 6) */
-font-weight:bold; margin-right:30px; padding-left:2em; }
-#theAdminPage h3 { /* theme.css (line 96) */
-background: transparent none; margin-right:30px; font-weight: lighter;}
-#theAdminPage h2 { /* theme.css (line 72) */ border-bottom:0px; }
-body#theAdminPage { /*theme.css (line 324) */
-background:#111111 url(images/top-left-bg.png) no-repeat scroll left top;}
-#theAdminPage #the_page { /*theme.css (line 73)*/
-background:transparent url(images/bottom-left-bg.png) no-repeat fixed left bottom; }
-#the_page { /*theme.css (line 348)*/ padding-bottom:0px;}
-.content {background-color:transparent;}
-body#theAdminPage #menubar { /* theme.css (line 324) */
-background:transparent none repeat-y scroll right top; border-bottom:0px; margin-top:110px;
-float: none; position: absolute; left: 0px; top: 160px;}
-#theAdminPage #the_page .content { /*theme.css (line 91)*/
-background-color:transparent; border-width:0px; padding:5px 35px 5px 5px; }
-body#theAdminPage #menubar dl.selected dd { padding-bottom: 145px; }
-.header_notes {/*default-colors.cs... (line 91)*/
-background-image:url(icon/note.png); background-position:left top;
-background-repeat:no-repeat; border:1px solid #AAAAAA; font-weight:bold;
-margin:14px; padding:5px 0px 0px; position:absolute; right:31px;
-text-align:center; top:96px; width:502px; }
-#theAdminPage #menubar dl {/*theme.css (line 372)*/
-background:transparent url(images/menubar-top.png) no-repeat scroll left top; width: 198px;
-border:0; box-shadow: none;
-}
-#theAdminPage #menubar dl.selected {/*theme.css (line 372)*/
-background:transparent url(images/menubar-top.png) no-repeat scroll left top;
-}
-#theAdminPage #menubar dt { background: none; left:10px; position:relative; text-align:left; top:-10px;}
-#theAdminPage #menubar dd { background: transparent url(images/menubar-detail.png) repeat-y top left;
-margin: 0px 0px 0px 4px; padding: 0px;}
-span.bg { background-color: #111111; padding-right: 3px; }
-html, body {
-height:100%;
-}
-ul.tabsheet li.normal_tab, ul.tabsheet li.selected_tab {
-background: transparent none repeat-x top left;
-border:0; }
-ul.tabsheet { border:0;
-background: transparent url(images/internal_onglet.png) repeat-x bottom left; }
-ul.tabsheet a { border:0; font-size: 12px;
-font-family: verdana,arial,helvetica,sans-serif; line-height: 14px; }
-ul.tabsheet li.selected_tab > a { color: #ff3333; }
-ul.tabsheet, ul.tabsheet li { border-bottom: #eee solid 1px; }
-ul.tabsheet li.selected_tab {
-font-weight:bold; padding-top:0px; position:relative; top:0px; } \ No newline at end of file
diff --git a/BSF/template/yoga/theme/admin/themeconf.inc.php b/BSF/template/yoga/theme/admin/themeconf.inc.php
deleted file mode 100644
index 5a6450e82..000000000
--- a/BSF/template/yoga/theme/admin/themeconf.inc.php
+++ /dev/null
@@ -1,72 +0,0 @@
-<?php
-/**
- * Accordion menus need to be stable
- */
-function selected_admin_menu()
-{
- if (isset($_GET['page']))
- {
- switch ($_GET['page']) {
- case 'configuration':
- return 1;
- case 'site_manager':
- case 'site_update':
- case 'cat_list':
- case 'cat_modify':
- case 'cat_move':
- case 'cat_options':
- case 'element_set':
- case 'cat_perm':
- case 'permalinks':
- case 'picture_modify':
- if (isset($_GET['cat']) and $_GET['cat']=='caddie') {
- return 3;
- }
- return 2;
- case 'comments':
- case 'thumbnail':
- case 'rating':
- case 'tags':
- return 3;
- case 'user_list':
- case 'group_list':
- case 'notification_by_mail':
- return 4;
- case 'stats':
- case 'history':
- case 'maintenance':
- case 'advanced_feature':
- case 'ws_checker':
- case 'plugins_list':
- case 'plugin':
- return 5;
- }
- }
- return 0;
-}
-
-$themeconf = array(
- 'template' => 'yoga',
- 'theme' => 'admin',
- 'template_dir' => 'template/yoga',
- 'icon_dir' => 'template/yoga/icon',
- 'admin_icon_dir' => 'template/yoga/icon/admin',
- 'mime_icon_dir' => 'template/yoga/icon/mimetypes/',
- 'local_head' => '
-<!-- Admin Accordion Menus -->
- <script type="text/javascript" src="template-common/lib/jquery.js"></script>
- <script type="text/javascript" src="template-common/lib/chili-1.7.pack.js"></script>
- <script type="text/javascript" src="template-common/lib/jquery.easing.js"></script>
- <script type="text/javascript" src="template-common/lib/jquery.dimensions.js"></script>
- <script type="text/javascript" src="template-common/jquery.accordion.js"></script>
- <script type="text/javascript">
- jQuery().ready(function(){
- jQuery(\'#menubar\').accordion({
- header: "dt.rdion",
- event: "mouseover",
- active: '. selected_admin_menu() . '
- });
- });
- </script>'
-);
-?>
diff --git a/BSF/template/yoga/theme/clear/index.php b/BSF/template/yoga/theme/clear/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/theme/clear/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/theme/clear/mail-css.tpl b/BSF/template/yoga/theme/clear/mail-css.tpl
deleted file mode 100644
index 0bda3d715..000000000
--- a/BSF/template/yoga/theme/clear/mail-css.tpl
+++ /dev/null
@@ -1,13 +0,0 @@
-{* $Id$ *}
-/* Theme clear mail css */
-
-body {ldelim} background-color:#fff; color:#696969;}
-#the_page {ldelim} background: #fff url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/mailbody-bg.png) repeat-y scroll left top;}
-#content {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/header-bg.png) no-repeat scroll left top;}
-#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom;
-color: #333;}
-h2 {ldelim} background-color: #ddd;}
-img {ldelim} margin: 16px; border: 16px solid #aaa; -moz-border-radius: 4px; border-radius: 4px 4px; }
-img:hover {ldelim} padding: 15px; border: 1px solid yellow;background-color:#faebd7; -moz-border-radius: 4px; border-radius: 4px 4px; }
-a {ldelim} color: #369; background: transparent; }
-a:hover {ldelim} color: #ddd; }
diff --git a/BSF/template/yoga/theme/clear/theme.css b/BSF/template/yoga/theme/clear/theme.css
deleted file mode 100644
index cff996521..000000000
--- a/BSF/template/yoga/theme/clear/theme.css
+++ /dev/null
@@ -1,94 +0,0 @@
-/* $Id$ */
-
-/* text color */
-BODY, H1, H2, H3, DT,
-INPUT.rateButtonSelected /* <= why IE doesn't inherit this ? */ {
- color:#696969; /* dimgray */
-}
-
-/* backgrounds */
-BODY, H3, .throw {
- background-color: #ffffff; /* white */
-}
-
-H2, #menubar DT, #imageHeaderBar, #imageToolBar A:hover, .row1 {
- background-color: #d3d3d3;
-}
-
-#menubar DL, .content, #imageToolBar, .header_notes {
- background-color: #eeeeee;
-}
-
-/* borders */
-#menubar DL, .content, #imageToolBar,
-#comments DIV.comment BLOCKQUOTE {
- border: 1px solid #d3d3d3;
-}
-
-#theImage IMG {
- border-color: #d3d3d3;
-}
-
-.content UL.thumbnail IMG {
- border: 1px solid #a0a0a0;
-}
-
-FIELDSET, INPUT, SELECT, TEXTAREA,
-.content DIV.comment A.illustration IMG,
-.content DIV.thumbnailCategory {
- border: 1px solid gray;
-}
-
-#comments DIV.comment BLOCKQUOTE {
- border-left: 2px solid #696969;
- background-color: #eee;
-}
-
-.content UL.thumbnails SPAN.wrap2 {
- border: 1px solid #aaaaaa; /* thumbnails border color and style */
- border-radius: 4px 4px; /* round corners with CSS3 compliant browsers */
-}
-
-.content UL.thumbnails SPAN.wrap2:hover,
-.content UL.thumbnailCategories DIV.thumbnailCategory:hover,
-.content UL.thumbnailCategories DIV.thumbnailCategory:hover A {
- background-color: #faebd7;
- border-color: yellow; /* thumbnails border color when mouse cursor is over it */
- color: black;
-}
-
-/* links */
-A, INPUT.rateButton {
- color: #005e89;
- background: transparent;
-}
-
-A:hover, INPUT.rateButton:hover {
- color: #858460;
-}
-
-#imageToolBar A, #imageToolBar A:hover {
- border-bottom: none;
-}
-
-A.navThumb, A.navThumb:hover {
- border-bottom: none;
-}
-
-/*calendar elements*/
-SPAN.calItem, SPAN.calItemEmpty
-{
- border: 1px solid silver;
-}
-
-.virtual_cat { background: #fff !important; }
-#mbMenu #quicksearch > p { text-align: left; }
-#qsearchInput { color: #d3d3d3; }
-#qsearchInput:focus { color: #005e89; }
-
-
-UL.tabsheet LI.normal_tab { background-color: #d3d3d3; }
-UL.tabsheet LI.selected_tab { background-color: #eeeeee; }
-
-UL.tabsheet, UL.tabsheet LI {border-color: gray;}
-UL.tabsheet LI.normal_tab:hover { border-color: black; }
diff --git a/BSF/template/yoga/theme/clear/themeconf.inc.php b/BSF/template/yoga/theme/clear/themeconf.inc.php
deleted file mode 100644
index 5e3aef9a0..000000000
--- a/BSF/template/yoga/theme/clear/themeconf.inc.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-$themeconf = array(
- 'template' => 'yoga',
- 'theme' => 'clear',
- 'template_dir' => 'template/yoga',
- 'icon_dir' => 'template/yoga/icon',
- 'admin_icon_dir' => 'template/yoga/icon/admin',
- 'mime_icon_dir' => 'template/yoga/icon/mimetypes/',
- 'local_head' => '<!-- no theme specific head content -->',
-);
-?>
diff --git a/BSF/template/yoga/theme/dark/images/index.php b/BSF/template/yoga/theme/dark/images/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/theme/dark/images/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/theme/dark/images/tableh1_bg.png b/BSF/template/yoga/theme/dark/images/tableh1_bg.png
deleted file mode 100644
index c7785d0f6..000000000
--- a/BSF/template/yoga/theme/dark/images/tableh1_bg.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/dark/images/tableh2_bg.png b/BSF/template/yoga/theme/dark/images/tableh2_bg.png
deleted file mode 100644
index d8c29f93d..000000000
--- a/BSF/template/yoga/theme/dark/images/tableh2_bg.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/dark/index.php b/BSF/template/yoga/theme/dark/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/theme/dark/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/theme/dark/mail-css.tpl b/BSF/template/yoga/theme/dark/mail-css.tpl
deleted file mode 100644
index b17d6c964..000000000
--- a/BSF/template/yoga/theme/dark/mail-css.tpl
+++ /dev/null
@@ -1,13 +0,0 @@
-{* $Id$ *}
-/* Theme dark mail css */
-
-body {ldelim} background-color:#444; color:#fff;}
-#the_page {ldelim} background: #444 url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/mailbody-bg.png) repeat-y scroll left top;}
-#content {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/header-bg.png) no-repeat scroll left top;}
-#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom;
-color: #69c;}
-h2 {ldelim} background-color: #333;color:#fff48e;background-image: url({$ROOT_URL}template/{$themeconf.template}/theme/{$themeconf.theme}/images/tableh1_bg.png);}
-img {ldelim} margin: 16px; border: 16px solid #111; -moz-border-radius: 4px; border-radius: 4px 4px; }
-img:hover {ldelim} padding: 15px; border: 1px solid yellow;background-color:#444;-moz-border-radius: 4px; border-radius: 4px 4px; }
-a {ldelim} color: #fff48e; background: transparent;border-bottom:1px dotted #005e89; }
-a:hover {ldelim} color: #fff48e;}
diff --git a/BSF/template/yoga/theme/dark/theme.css b/BSF/template/yoga/theme/dark/theme.css
deleted file mode 100644
index 690bdda1d..000000000
--- a/BSF/template/yoga/theme/dark/theme.css
+++ /dev/null
@@ -1,92 +0,0 @@
-/* $Id$ */
-
-/* text color */
-BODY, H1, H3, DT,
-INPUT.rateButtonSelected /* <= why IE doesn't inherit this ? */ {
- color:#d0d0d0;
-}
-
-H2, #menubar DT, .throw {
- color: #fff48e;
-}
-
-
-/* backgrounds */
-
-BODY, H3, #imageHeaderBar, #imageToolBar A:hover, .row1, UL.tabsheet LI.normal_tab {
- background-color: #2f2f2f;
-}
-
-#menubar DL, .content, #imageToolBar, .header_notes, UL.tabsheet LI.selected_tab {
- background-color: #505050;
-}
-
-H2, #menubar DT, .throw {
- background-image: url(images/tableh1_bg.png);
-}
-
-#imageHeaderBar H2 {
- background-image: none;
- background-color: transparent;
- border: none;
-}
-
-#imageHeaderBar {
- background-image: url(images/tableh2_bg.png);
- background-repeat: repeat-x;
- background-position: center;
-}
-
-/* borders */
-#menubar DL, .content,
-#comments DIV.comment BLOCKQUOTE {
- border: 1px solid #000000;
-}
-
-#imageHeaderBar {
- border-top: 1px solid #000000;
-}
-H2, #menubar DT, #imageToolBar {
- border-bottom: 1px solid #000000;
-}
-
-#theImage IMG {
- border-color: #000000;
-}
-
-FIELDSET, INPUT, SELECT, TEXTAREA,
-.content DIV.comment A.illustration IMG,
-.content DIV.thumbnailCategory {
- border: 1px solid gray;
-}
-
-#comments DIV.comment BLOCKQUOTE {
- border-left: 2px solid #696969;
-}
-
-.content UL.thumbnails SPAN.wrap2 {
- border: 1px solid #aaaaaa; /* thumbnails border color and style */
- border-radius: 4px 4px; /* round corners with CSS3 compliant browsers */
-}
-
-.content UL.thumbnails SPAN.wrap2:hover,
-.content UL.thumbnailCategories DIV.thumbnailCategory:hover,
-.content UL.thumbnailCategories DIV.thumbnailCategory:hover A {
- background-color: #faebd7;
- border-color: yellow; /* thumbnails border color when mouse cursor is over it */
- color: black;
-}
-
-UL.tabsheet LI.normal_tab:hover { border-color: #fff48e; }
-
-/* links */
-A, INPUT.rateButton {
- color: #FFFFFF;
- border: none;
-}
-
-A:hover {
- color: #FFF48E;
-}
-
-.virtual_cat { background: #3f3f3f; }
diff --git a/BSF/template/yoga/theme/dark/themeconf.inc.php b/BSF/template/yoga/theme/dark/themeconf.inc.php
deleted file mode 100644
index bdee2e443..000000000
--- a/BSF/template/yoga/theme/dark/themeconf.inc.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-$themeconf = array(
- 'template' => 'yoga',
- 'theme' => 'dark',
- 'template_dir' => 'template/yoga',
- 'icon_dir' => 'template/yoga/icon',
- 'admin_icon_dir' => 'template/yoga/icon/admin',
- 'mime_icon_dir' => 'template/yoga/icon/mimetypes/',
- 'local_head' => '<!-- no theme specific head content -->',
-);
-?>
diff --git a/BSF/template/yoga/theme/index.php b/BSF/template/yoga/theme/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/theme/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/theme/p0w0/images/button-bg.png b/BSF/template/yoga/theme/p0w0/images/button-bg.png
deleted file mode 100644
index 1ea3b3bd0..000000000
--- a/BSF/template/yoga/theme/p0w0/images/button-bg.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/p0w0/images/index.php b/BSF/template/yoga/theme/p0w0/images/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/theme/p0w0/images/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/theme/p0w0/index.php b/BSF/template/yoga/theme/p0w0/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/theme/p0w0/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/theme/p0w0/mail-css.tpl b/BSF/template/yoga/theme/p0w0/mail-css.tpl
deleted file mode 100644
index ffff7c9d8..000000000
--- a/BSF/template/yoga/theme/p0w0/mail-css.tpl
+++ /dev/null
@@ -1,12 +0,0 @@
-{* $Id$ *}
-/* Theme p0w0 mail css */
-
-body {ldelim} background-color:#cde; color:#369;}
-#the_page {ldelim} background: #cde url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/mailbody-bg.png) repeat-y scroll left top;}
-#content {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/header-bg.png) no-repeat scroll left top;}
-#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom;
-color: #69c;}
-h2 {ldelim} color:#fff;background: #369 url({$ROOT_URL}template/{$themeconf.template}/theme/{$themeconf.theme}/images/button-bg.png);}
-img {ldelim} margin:16px;padding:15px;border:1px solid #69c;background-color:#eef;-moz-border-radius:4px; border-radius:4px 4px; }
-img:hover {ldelim} border: 1px solid #c60; -moz-border-radius:4px; border-radius:4px 4px; }
-a {ldelim} color: #f92; background: transparent; }
diff --git a/BSF/template/yoga/theme/p0w0/theme.css b/BSF/template/yoga/theme/p0w0/theme.css
deleted file mode 100644
index 4a04cf44c..000000000
--- a/BSF/template/yoga/theme/p0w0/theme.css
+++ /dev/null
@@ -1,269 +0,0 @@
-/* $Id$ */
-
-/**
- * Color scheme (Remember #6699cc = #69c)
- * #000000 #336699 #4477aa #6699cc (Black -> Blues)
- * #cc6600 #ff9933 (Oranges)
- * #cccccc
- * #ccddee #dfe8ff #eeeeff #ffffff (Light colors -> White)
- * */
-/**
- * Logic
- * - Texts
- * - Backgrounds
- * - Borders, Margins, Padding
- * - Visibility / Display
- */
-
-/******************************************************************************/
-/* Texts Only */
-BODY, H1, H3, DT, H2, .throw { color: #369; }
-H2, #menubar DT, .throw, TD H3, #theAdminPage H3 {
- color: #fff;
-}
-#menubar DT, #menubar DT A {
- color: #fff;
- font-weight: bold;
-}
-.content .titrePage .categoryActions li { color: #cde;}
-#menubar DT A:hover {
- color: #f92;
- font-weight: bold;
-}
-h1 { font-weight: bold; letter-spacing: 0.2em; }
-#mbIdentification dd p,
-#menubar .selected A { color: #c60; font-weight: bold; }
-#copyright { color: #c60; }
-.content .pageNumberSelected,
-A, INPUT.rateButton, legend { color: #369; }
-A:hover { color: #f92; }
-INPUT.rateButtonSelected /* <= why IE doesn't inherit this ? */ {
- color:#69c;
-}
-.infoTable,
-#theAdminPage .content,
-input#qsearchInput { color: #369; }
-.content .infos { color: #036; }
-.content .errors { color: #900; }
-.content .titrePage H2 A { color: #dfe8ff; }
-input.rateButtonSelected,
-.content .titrePage H2 A:hover { color: #f92; }
-.content H2 {
- letter-spacing: 0.01em;
- text-indent: 1em;
- font-weight: normal;
-}
-.content ul.thumbnailCategories li div.thumbnailCategory .description h3,
-.content h3 { text-align: center; }
-.browsePath, .imageNumber,
-#imageHeaderBar H2,
-.browsePath A {
- color: #eef;
- font-weight: bold;
-}
-.browsePath A:hover { color: #fff; }
-.content H2:before, .browsePath:before, .imageNumber:before,
-#imageHeaderBar H2:before,
-.content H2:after, .browsePath:after, .imageNumber:after,
-#imageHeaderBar H2:after {
- content: " ";
- color: #fff;
- font-family: sans-serif;
- font-weight: normal;
- letter-spacing: 0em;
-}
-#thePicturePage #comments H2 {
- color: #69c;
-}
-.content ul.thumbnailCategories li div.thumbnailCategory .description p {
- color: #c60;
-}
-.content ul.thumbnailCategories li div.thumbnailCategory .description p + p {
- color: #369;
-}
-.tabsheet li, .tabsheet li a, #theAdminPage h3 a,
-.content div.thumbnailCategory .description h3 a {
- color: #fff;
-}
-.tabsheet li a:hover, .content div.thumbnailCategory .description h3 a:hover {
- color: #f92;
-}
-
-
-/******************************************************************************/
-/* Backgrounds Only */
-BODY { background: #cde; }
-.header_notes,
-#thePicturePage #the_page,
-#thePicturePage #theImage,
-#theAdminPage #the_page,
-.content { background-color: #dfe8ff; }
-#the_page { background-color: #dfe8ff; }
-#menubar, H3, #imageHeaderBar,
-.row1 { background-color: #eef; }
-H2, #menubar DT, .throw, TD H3,
-#imageToolBar,
-#imageHeaderBar, #imageHeaderBar H2, .tabsheet li,
-#theAdminPage H3 { background-color: #369; }
-.content H2 { background-color: #369; }
-.content .infos { background-color: #47a; ;}
-.content .errors { background-color: #fc5; ;}
-#thePicturePage #comments H2 { background-color: #eef; ;}
-.content ul.thumbnailCategories li div.thumbnailCategory .description h3 {
- background-color: #69c;
-}
-.content ul.thumbnailCategories li div.thumbnailCategory,
-.content UL.thumbnails SPAN.wrap2 { background-color: #eef; }
-.content ul.thumbnailCategories li div.thumbnailCategory:hover,
-#theImage IMG, .navThumb IMG,
-.content UL.thumbnails SPAN.wrap2:hover { background-color: #fff; }
-.content UL.thumbnails SPAN.wrap2:active img {
- outline: 3px ridge #f92;
-}
-input#qsearchInput { background-color: #cde; }
-.virtual_cat { background: #fff !important; }
-.selected_tab { background-color: #69c !important; }
-/******************************************************************************/
-/* Borders, Margins, Padding Only */
-BODY { margin: 0px; padding: 0px; }
-#menubar {
- margin : 0px 0px 0px 8px;
- border: 0px;
- text-decoration: none;
- border: 1px solid #369;
-}
-A { border: 0px; text-decoration: none; }
-A:hover { text-decoration: none; border: 0px; }
-.content {
- border: 1px solid #369;
- padding: 0px;
-}
-#menubar DT, .content H2 {
- background-image: url(images/button-bg.png);
- border: 0px;
- margin-bottom: 3px;
-}
-.content ul.thumbnailCategories li div.thumbnailCategory .description h3 {
- background-image: url(images/button-bg.png);
- border-width: 1px;
- border-style: outset;
- border-color: #369;
-}
-.content ul.thumbnailCategories li div.thumbnailCategory .description h3:active
-{
- background: #69c;
- border: 1px inset #369;
-}
-.content .errors { border-color: #f92; }
-#imageHeaderBar H2 { border: 0px; }
-#thePicturePage #imageToolBar { padding: 0px 25px 5px 25px; }
-#thePicturePage #theImage {
- margin: 0px;
- padding: 3px 0px 15px 0px;
-}
-#thePicturePage #comments H2 {
- border-top: 2px solid #69c;
- border-bottom: 1px solid #369;
-}
-#comments DIV.comment BLOCKQUOTE {
- border: 1px solid #fff;
-}
-H2, #imageToolBar {
- border-bottom: 1px solid #fff;
-}
-.navThumb IMG { border: 1px solid #c60; padding: 1px; opacity: 0.8; }
-.navThumb:hover IMG { border: 1px solid #f92; padding: 1px; opacity: 1; }
-#theImage IMG {
- border: 3px solid #369;
- margin: 2px auto;
- padding: 1px;
- box-shadow: 0.2em 0.2em #ccc;
-}
-.content UL.thumbnail IMG {
- border: 1px solid #666;
-}
-.illustration A {
- border: 0px;
-}
-FIELDSET, INPUT, SELECT, TEXTAREA,
-.content DIV.comment A.illustration IMG,
-.content DIV.thumbnailCategory {
- border: 1px solid #69c;
- background-color: #dfe8ff;
- margin: 3px;
-}
-.content DIV.thumbnailCategory:hover {
- border: 1px solid #f92;
-}
-.content UL.thumbnails SPAN.wrap2 {
- border: 1px solid #69c; /* thumbnails border color and style */
- border-radius: 4px 4px; /* round corners with CSS3 compliant browsers */
-}
-.content UL.thumbnails SPAN.wrap2:hover {
- border-color: #f92; /* thumbnails border color when mouse cursor is over it */
-}
-A.navThumb, A.navThumb:hover,
-#imageToolBar A, #imageToolBar A:hover {
- border-bottom: none;
-}
-#the_page {
- border: 0px;
- padding: 5px 0px 30px 0px;
- margin: 0px;
-}
-#theAdminPage .content table td { padding: 2px 8px; }
-ul.tabsheet, ul.tabsheet li { border-color: #369 !important; }
-.tabsheet li:hover { border-color: #f92 !important; }
-
-/******************************************************************************/
-/* Display, Visibility, buttons and others */
-label { cursor:pointer }
-.zero { display: none }
-
-#the_page {
- text-align:center;
- display:block;
-}
-
-input[type="text"], input[type="password"], input.button,
-input.submit, input.reset, input.file,
-select, textarea {
- color: #369;
- border: 1px solid #369;
- background-color: #eeeeff;
-}
-input.submit[type="reset"]:focus,
-input.submit:focus {
- background-color: #369;
-}
-input.submit[type="reset"],
-input.submit {
- background-image: url(images/button-bg.png);
- height:22px;
- font-weight: bold;
- color: #fff;
- border-width: 1px;
- border-style: outset;
- border-color: #369;
- padding-left: 2em;
- padding-right: 2em;
-}
-input.submit[type="reset"]:active,
-input.submit:active {
- background: #69c;
- height:22px;
- border: 1px inset #369;
-}
-#addComment fieldset input.submit[type="submit"] {
- height: 38px;
- padding-left: 4em;
- padding-right: 4em;
-}
-#menubar .menuInfoCat, #menubar .menuInfoCatByChild {
- font-size: 80%;
- font-style: normal;
-}
-* { outline: none; }
-
-tr.throw td a { color: #fff; }
-tr.throw td a:focus { color: #f92; } \ No newline at end of file
diff --git a/BSF/template/yoga/theme/p0w0/themeconf.inc.php b/BSF/template/yoga/theme/p0w0/themeconf.inc.php
deleted file mode 100644
index d24b701ca..000000000
--- a/BSF/template/yoga/theme/p0w0/themeconf.inc.php
+++ /dev/null
@@ -1,11 +0,0 @@
-<?php
-$themeconf = array(
- 'template' => 'yoga',
- 'theme' => 'p0w0',
- 'template_dir' => 'template/yoga',
- 'icon_dir' => 'template/yoga/icon',
- 'admin_icon_dir' => 'template/yoga/icon/admin',
- 'mime_icon_dir' => 'template/yoga/icon/mimetypes/',
- 'local_head' => '<!-- no theme specific head content -->',
-);
-?>
diff --git a/BSF/template/yoga/theme/wipi/images/index.php b/BSF/template/yoga/theme/wipi/images/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/theme/wipi/images/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/theme/wipi/images/tableh1_bg.png b/BSF/template/yoga/theme/wipi/images/tableh1_bg.png
deleted file mode 100644
index 8163e23bf..000000000
--- a/BSF/template/yoga/theme/wipi/images/tableh1_bg.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/wipi/images/tableh2_bg.png b/BSF/template/yoga/theme/wipi/images/tableh2_bg.png
deleted file mode 100644
index be06ee428..000000000
--- a/BSF/template/yoga/theme/wipi/images/tableh2_bg.png
+++ /dev/null
Binary files differ
diff --git a/BSF/template/yoga/theme/wipi/index.php b/BSF/template/yoga/theme/wipi/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/template/yoga/theme/wipi/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/template/yoga/theme/wipi/mail-css.tpl b/BSF/template/yoga/theme/wipi/mail-css.tpl
deleted file mode 100644
index 5b3e53c3d..000000000
--- a/BSF/template/yoga/theme/wipi/mail-css.tpl
+++ /dev/null
@@ -1,19 +0,0 @@
-{* $Id$ *}
-/* Theme wipi mail css */
-
-body {ldelim} background-color:#111; color:#69c;}
-#the_page {ldelim} background: #111 url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/mailbody-bg.png) repeat-y scroll left top;}
-#content {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/header-bg.png) no-repeat scroll left top;}
-#copyright {ldelim} background: transparent url({$ROOT_URL}template/{$themeconf.template}/mail/text/html/images/footer-bg.png) no-repeat scroll left bottom;
-color: #69c;}
-h2 {ldelim} background-color: #222;color:#eee;background-image: url({$ROOT_URL}template/{$themeconf.template}/theme/{$themeconf.theme}/images/tableh1_bg.png);}
-img {ldelim} margin: 16px; padding:15px;border:1px solid #eee; -moz-border-radius: 4px; border-radius: 4px 4px; }
-img:hover {ldelim} border:1px solid #69c; -moz-border-radius: 4px; border-radius: 4px 4px; }
-a {ldelim} color: #69c; background: transparent; }
-a:hover {ldelim} color: #f92; }
-a.PWG {ldelim} border: 0px; }
-a.PWG .P {ldelim} color : #f92; }
-a.PWG .W {ldelim} color : #aaa; }
-a.PWG .G {ldelim} color : #69c; }
-a.PWG:hover .P {ldelim} color : #69c; }
-a.PWG:hover .G {ldelim} color : #f92; }
diff --git a/BSF/template/yoga/theme/wipi/theme.css b/BSF/template/yoga/theme/wipi/theme.css
deleted file mode 100644
index 9c0deea14..000000000
--- a/BSF/template/yoga/theme/wipi/theme.css
+++ /dev/null
@@ -1,322 +0,0 @@
-/* $Id$ */
-
-/* text color */
-BODY, H1, H3, DT,
-INPUT.rateButtonSelected /* <= why IE doesn't inherit this ? */ {
- color:#e0e0e0;
-}
-#menubar {
- margin : 0px;
- background-color: transparent;
- border: 0px;
-}
-H2, .throw {
- color: #eee;
-}
-#menubar DT, #menubar DT A {
- color: #eee;
- font-weight: lighter;
-}
-#menubar DT A:hover {
- color: #69c;
- font-weight: lighter;
-}
-#menubar .selected A {
- color: #eee;
-}
-#menubar .selected A:hover {
- color: #f92;
-}
-#menubar DT:before {
- content: "__\\_ ";
- color: #f92;
-}
-#menubar DT:after {
- content: " _/__";
- color: #69c;
-}
-#menubar .button {
- margin: 0 2px 0px 8px;
- width: auto;
- padding: 0;
- text-indent: 0;
- list-style: none;
- text-align: center;
- float: left;
-}
-#theAdminPage #menubar DT:before,
-#theAdminPage #menubar DT:after {
- content: '';
-}
-.content .pageNumberSelected {
- color: #f92;
-}
-.content .infos {
- background-color: #69c;
- color: #036;
-}
-.content .errors {
- background-color: #fc5;
- border-color: #f92;
- color: #900;
-}
-/* backgrounds */
-BODY {
- background: #111;
- margin: 0px;
- padding: 0px;
-}
-H3, #imageToolBar A:hover, .row1, .tabsheet li {
- background-color: #222;
-}
-#theAdminPage h2, #theAdminPage h3 { border-bottom: 1px solid #69c; }
-#imageHeaderBar, #theAdminPage #the_page {
- background-color: #111;
-}
-#imageToolBar, .header_notes {
- background-color: #333;
-}
-.selected_tab { background-color: eee !important; }
-A {
- border-color: #69c;
-}
-A:hover {
- border-color: #f92;
-}
-.content {
- background-color: #181818;
- border: 1px solid #eee;
- padding: 5px;
-}
-#theAdminPage #the_page .content {
- background-color: #111;
- border-width: 0px;
- padding: 5px;
-}
-H2, #menubar DT, .throw, TD H3, #theAdminPage H3 {
- background-image: url(images/tableh1_bg.png);
- background-repeat: repeat-x;
-}
-.content H2 {
- background: none;
- border: 0px;
- letter-spacing: -0.05em;
- text-indent: 1em;
- text-transform: uppercase;
- font-weight: lighter;
- margin-bottom: 20px;
-}
-.content ul.thumbnailCategories li div.thumbnailCategory .description h3,
-.content h3 { text-align: center; }
-.content ul.thumbnailCategories li div.thumbnailCategory .description p {
- color: #f92; text-indent: 0em;
-}
-.content ul.thumbnailCategories li div.thumbnailCategory .description p + p {
- color: #fff;
-}
-.browsePath A {
- color: #eee;
-}
-.content H2:before, .browsePath:before, .imageNumber:before,
-#imageHeaderBar H2:before {
- content: "____\\_ ";
- color: #69c;
- font-family: Times, Zapf-Chancery, Cottonwood, Helvetica;
- letter-spacing: 0em;
-}
-.content H2:after, .browsePath:after, .imageNumber:after,
-#imageHeaderBar H2:after {
- content: " _/____";
- color: #f92;
- font-family: Times, Zapf-Chancery, Cottonwood, Helvetica;
- letter-spacing: 0em;
-}
-#imageHeaderBar H2 {
- background-image: none;
- background-color: transparent;
- border: none;
-}
-#thePicturePage #the_page {
- background-color: #111;
-}
-#thePicturePage #imageHeaderBar {
- background-image: url(images/tableh2_bg.png);
- background-repeat: repeat-x;
-}
-#thePicturePage #imageToolBar {
- background-color: #111;
- border-bottom: 2px solid #69c;
-}
-#thePicturePage #theImage {
- background-color: #111;
- margin: 0px;
- padding: 3px 0px 15px 0px;
-}
-
-#thePicturePage #comments H2 {
- background-image: none;
- background-color: #222;
- border-top: 2px solid #69c;
- border-bottom: 2px solid #69c;
- color: #69c;
- font-weight: lighter;
-}
-
-/* borders */
-#comments DIV.comment BLOCKQUOTE {
- border: 1px solid #000;
-}
-#imageHeaderBar {
- border-top: 1px solid #000;
- padding: 8px 0px 3px 0px;
-}
-H2, #imageToolBar {
- border-bottom: 1px solid #000;
-}
-
-#theImage IMG {
- border-color: #fff;
-}
-
-.content UL.thumbnail IMG {
- border: 1px solid #a0a0a0;
-}
-.illustration A {
- border: 0px;
-}
-FIELDSET, INPUT, SELECT, TEXTAREA,
-.content DIV.comment A.illustration IMG,
-.content DIV.thumbnailCategory {
- border: 1px solid gray;
-}
-.content DIV.thumbnailCategory {
- border: 1px solid #69c;
- margin: 8px 4px;
-}
-#comments DIV.comment BLOCKQUOTE {
- border-left: 2px solid #696969;
-}
-
-.content UL.thumbnails SPAN.wrap2 {
- border: 1px solid #aaaaaa; /* thumbnails border color and style */
- border-radius: 4px 4px; /* round corners with CSS3 compliant browsers */
-}
-
-.content UL.thumbnails SPAN.wrap2:hover,
-.content UL.thumbnailCategories DIV.thumbnailCategory:hover {
- background-color: #333;
- border-color: #69c; /* thumbnails border color when mouse cursor is over it */
-}
-
-#menubar .buttonmenu {
- margin: 0 2px;
- width: auto;
- padding: 0;
- text-indent: 0;
- list-style: none;
- text-align: center;
- float: left;
-}
-/* links */
-A, INPUT.rateButton, legend {
- color: #69c;
-}
-
-A:hover {
- color: #f92;
-}
-
-#imageToolBar A, #imageToolBar A:hover {
- border-bottom: none;
-}
-A.navThumb, A.navThumb:hover {
- border-bottom: none;
-}
-#the_page {
- border: 1px dotted #f92;
- padding-top: 5px;
- padding-bottom:30px;
- text-align:center;
- display:block;
- margin: 2px;
-}
-#copyright {
- color: #69c;
-}
-
-label {
- cursor:pointer
-}
-input#qsearchInput {
- color: #58c;
- background-color: #222;
- border: 1px solid #333;
- padding: 1px 3px;
-}
-.zero { display: none }
-.nb-hits { color: #69c; }
-.nb-comments { color: #f92; }
-
-FORM#quickconnect,
-FORM#quickconnect FIELDSET,
-FORM#quickconnect P,
-FORM#quickconnect UL.actions,
-FORM#quickconnect FIELDSET>UL.actions,
-FORM#quickconnect UL.actions,
-FORM#quickconnect P,
-FORM#quickconnect LABEL {
- color: #69c;
-}
-FORM#quickconnect P INPUT,
-FORM#quickconnect INPUT[type=text],
-FORM#quickconnect INPUT[type=password] {
- width: 85%;
- color: #58c;
- background-color: #222;
- border: 1px solid #333;
- padding: 1px 3px;
-}
-
-
-.virtual_cat { background: #222 !important; }
-
-.PWG {
- font-family: verdana, arial, helvetica, sans-serif !important;
- font-size: 0.9em;
- font-weight: normal;
- letter-spacing: 0px;
-}
-a.PWG { border: 0px; }
-a.PWG .P { color : #f92; }
-a.PWG .W { color : #aaa; }
-a.PWG .G { color : #69c; }
-a.PWG:hover .P { color : #69c; }
-a.PWG:hover .G { color : #f92; }
-#menubar DT {
- border-top: 1px solid #eef;
- border-right: 1px solid #69c;
- border-bottom: 1px solid #69c;
- border-bottom-right-radius: 12px;
- -moz-border-radius-bottomright: 12px;
- box-shadow: 5px 5px #69c;
-}
-.statBar { background-color: #e60; }
-#imageToolBar .randomButtons a:hover,
-#imageToolBar .navButtons a:hover { background-color: #111; }
-#menubar .menuInfoCat,
-#menubar .menuInfoCatByChild,
-h2.showtitle, #theImage p.showlegend { display: none }
-* { outline-width: 0px; }
-ul.tabsheet, ul.tabsheet li {
- border-color: #69c;
-}
-ul.tabsheet li.normal_tab {
- background-image: url(images/tableh1_bg.png);
- background-repeat: repeat-x;
-}
-ul.tabsheet li.normal_tab:hover { border-color: #f92 }
-ul.tabsheet li {
- -moz-border-radius: 0px 0px 3px 3px;
- border-radius: 0px 0px 12px 12px;
- -webkit-border-radius: 0px 0px 3px 3px;
-}
diff --git a/BSF/template/yoga/theme/wipi/themeconf.inc.php b/BSF/template/yoga/theme/wipi/themeconf.inc.php
deleted file mode 100644
index 4ac750e46..000000000
--- a/BSF/template/yoga/theme/wipi/themeconf.inc.php
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-$themeconf = array(
- 'template' => 'yoga',
- 'theme' => 'wipi',
- 'template_dir' => 'template/yoga',
- 'icon_dir' => 'template/yoga/icon',
- 'admin_icon_dir' => 'template/yoga/icon/admin',
- 'mime_icon_dir' => 'template/yoga/icon/mimetypes/',
- 'local_head' => '<!-- no theme specific head content -->',
-);
-if ( !isset($lang['Theme: wipi']) )
-{
- $lang['Theme: wipi'] = 'The site is displayed with wipi theme based ' .
- ' on yoga template, a standard template/theme of PhpWebgallery.';
-}
-?>
diff --git a/BSF/template/yoga/thumbnails-fix-ie5-ie6.css b/BSF/template/yoga/thumbnails-fix-ie5-ie6.css
deleted file mode 100644
index dbffaefc9..000000000
--- a/BSF/template/yoga/thumbnails-fix-ie5-ie6.css
+++ /dev/null
@@ -1,27 +0,0 @@
-/* $Id$ */
-/* fix IE with another layout for thumbnails */
-.content UL.thumbnails SPAN.wrap2 {
- display: block;
- position: relative;
- text-align: left;
-}
-.content UL.thumbnails SPAN.wrap2 A,
-.content UL.thumbnails SPAN.wrap2 SPAN {
- overflow: visible;
- position: absolute;
- top: 50%;
- text-align: center;
-}
-
-.content UL.thumbnails IMG.thumbnail {
- position: relative;
- top: -50%;
- /*\*//*/
- margin-top: -40%;
- /**/
-}
-.content UL.thumbnails INPUT {
- position: absolute;
- left: 2px;
- top: 2px; /* same as other browsers but not so pretty */
-}
diff --git a/BSF/template/yoga/thumbnails.css b/BSF/template/yoga/thumbnails.css
deleted file mode 100644
index 8d02e7742..000000000
--- a/BSF/template/yoga/thumbnails.css
+++ /dev/null
@@ -1,60 +0,0 @@
-/* $Id$ */
-
-/* Thumbnails customization */
-.content UL.thumbnails SPAN.thumbLegend {
- font-size: 80%; /* font size */
- overflow: hidden; /* oversized legend is clipped */
-}
-
-/* Thumbnail "elastic" layout */
-.content UL.thumbnails {
- margin: 0;
- padding: 0;
- list-style: none;
- text-align: center; /* to center the whole collection in .content */
-}
-.content UL.thumbnails LI { display: inline }
-
-.content UL.thumbnails SPAN.wrap1 {
- margin: 0 5px 5px 5px;
- display: table-cell; display: inline-table;
- display: inline-block; /* Why 3 display option ??? */
- vertical-align: top; /* OK with Opera and IE6 not Geko */
- text-align: center; /* to center the thumbnail and legend in Geko/Opera */
-}
-.content UL.thumbnails SPAN.wrap2 {
- margin: 0; /* important reset the margins */
- display: table-cell; /* block prevents vertical-align here */
- vertical-align: middle; /* Ok with Opera and Geko not IE6 */
-}
-.content UL.thumbnails SPAN.wrap2 A,
-.content UL.thumbnails LABEL {
- display: block;
- border-bottom: none;
-}
-.content UL.thumbnails IMG {
- margin-bottom: -4px; /* why ??? something wrong with Geko and Opera ignored by IE6*/
-}
-
-/* label and input used for caddie in admin section */
-.content UL.thumbnails LABEL {
- position: relative;
-}
-
-.content UL.thumbnails INPUT {
- position: relative; /* <= Opera can handle relative here */
- top: -20px;
-}
-:root .content UL.thumbnails INPUT { /* hide from Opera */
- position: absolute; /* <= Opera hide 1 checkbox over 2 !!! */
- left: 2px;
- top: 2px;
-}
-
-UL.thumbnails .levelIndicatorB {
-display:block; position:absolute; z-index:100;padding:0px 0 0 14px; color:black; font-weight:bold; fontsize:120%;
-}
-
-UL.thumbnails .levelIndicatorF {
-display:block; position:absolute; z-index:101;padding:1px 0 0 15px; color:white; font-weight:bold; fontsize:120%;
-} \ No newline at end of file
diff --git a/BSF/template/yoga/thumbnails.tpl b/BSF/template/yoga/thumbnails.tpl
deleted file mode 100644
index 2fd37f649..000000000
--- a/BSF/template/yoga/thumbnails.tpl
+++ /dev/null
@@ -1,38 +0,0 @@
-{* $Id$ *}
-
-{if !empty($thumbnails)}
-<ul class="thumbnails">
-{foreach from=$thumbnails item=thumbnail}
- <li>
- <span class="wrap1">
- <span class="wrap2">
- <a href="{$thumbnail.U_IMG_LINK}">
- <img class="thumbnail" src="{$thumbnail.IMAGE}" alt="{$thumbnail.IMAGE_ALT}" title="{$thumbnail.IMAGE_TITLE}" />
- </a>
- </span>
- <span class="thumbLegend">
-
- {if !empty($thumbnail.ELEMENT_NAME)}{$thumbnail.ELEMENT_NAME}{/if}
- {if !empty($thumbnail.IMAGE_TS)}{$thumbnail.IMAGE_TS}{/if}
-
- {if isset($thumbnail.NB_COMMENTS)}
- <span class="{if 0==$thumbnail.NB_COMMENTS}zero {/if}nb-comments">
- <br />
- {$pwg->l10n_dec('%d comment', '%d comments',$thumbnail.NB_COMMENTS)}
- </span>
- {/if}
-
- {if isset($thumbnail.NB_HITS)}
- <span class="{if 0==$thumbnail.NB_HITS}zero {/if}nb-hits">
- <br />
- {$pwg->l10n_dec('%d hit', '%d hits',$thumbnail.NB_HITS)}
- </span>
- {/if}
- </span>
- </span>
- </li>
-{/foreach}
-</ul>
-{/if}
-
-
diff --git a/BSF/template/yoga/upgrade.tpl b/BSF/template/yoga/upgrade.tpl
deleted file mode 100644
index 2af91c70e..000000000
--- a/BSF/template/yoga/upgrade.tpl
+++ /dev/null
@@ -1,44 +0,0 @@
-{* $Id$ *}
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <title>Piwigo : Upgrade to {$RELEASE}</title>
- </head>
-
- <body>
- {if isset($introduction)}
- <h1>Welcome to Piwigo upgrade page.</h1>
-
- <p>This page proposes to upgrade your database corresponding to your old
-version of Piwigo to the current version. The upgrade assistant
-thinks you are currently running a
-<strong>release {$introduction.CURRENT_RELEASE}</strong> (or equivalent).</p>
-
- <p><a href="{$introduction.RUN_UPGRADE_URL}">Upgrade from release
-{$introduction.CURRENT_RELEASE} to {$RELEASE}</a></p>
- {/if}
-
- {if isset($upgrade)}
- <h1>Upgrade from version {$upgrade.VERSION} to {$RELEASE}</h1>
-
- <p>Statistics</p>
- <ul>
- <li>total upgrade time : {$upgrade.TOTAL_TIME}</li>
- <li>total SQL time : {$upgrade.SQL_TIME}</li>
- <li>SQL queries : {$upgrade.NB_QUERIES}</li>
- </ul>
-
- <p>Upgrade informations</p>
-
- <ul>
- {foreach from=$infos item=info}
- <li>{$info}</li>
- {/foreach}
- </ul>
-
- {/if}
- </body>
-
-</html>
diff --git a/BSF/template/yoga/upload.tpl b/BSF/template/yoga/upload.tpl
deleted file mode 100644
index b92c918fd..000000000
--- a/BSF/template/yoga/upload.tpl
+++ /dev/null
@@ -1,110 +0,0 @@
-{* $Id$ *}
-
-<div id="content" class="content">
-
- <div class="titrePage">
- <ul class="categoryActions">
- <li><a href="{$U_HOME}" title="{'return to homepage'|@translate}"><img src="{$themeconf.icon_dir}/home.png" class="button" alt="{'home'|@translate}"/></a></li>
- </ul>
- <h2>{'upload_title'|@translate}</h2>
- </div>
-
- {if !empty($errors)}
- <div class="errors">
- <ul>
- {foreach from=$errors item=error}
- <li>{$error}</li>
- {/foreach}
- </ul>
- </div>
- {/if}
-
- {if not $UPLOAD_SUCCESSFUL }
- <form enctype="multipart/form-data" method="post" action="{$F_ACTION}">
- <table style="width:80%;margin-left:auto;margin-right:auto;">
- <tr>
- <td colspan="2" class="menu">
- <div style="text-align:center;">{$ADVISE_TITLE}</div>
- {if not empty($advises)}
- <ul>
- {foreach from=$advises item=advise}
- <li>{$advise}</li>
- {/foreach}
- </ul>
- {/if}
- </td>
- </tr>
- <tr>
- <td colspan="2" align="center">
- <input name="picture" type="file" value="" />
- </td>
- </tr>
- {if isset($SHOW_FORM_FIELDS) and $SHOW_FORM_FIELDS}
- <!-- category -->
- <tr>
- <td>{'Category'|@translate}</td>
- <td>
- {html_options name="category" options=$categories selected=$categories_selected}
- </td>
- </tr>
- <!-- username -->
- <tr>
- <td>{'Username'|@translate} <span style="color:red;">*</span></td>
- <td>
- <input name="username" type="text" value="{$NAME}" />
- </td>
- </tr>
- <!-- mail address -->
- <tr>
- <td>{'mail_address'|@translate} <span style="color:red;">*</span></td>
- <td>
- <input name="mail_address" type="text" value="{$EMAIL}" />
- </td>
- </tr>
- <!-- name of the picture -->
- <tr>
- <td>{'upload_name'|@translate}</td>
- <td>
- <input name="name" type="text" value="{$NAME_IMG}" />
- </td>
- </tr>
- <!-- author -->
- <tr>
- <td>{'upload_author'|@translate}</td>
- <td>
- <input name="author" type="text" value="{$AUTHOR_IMG}" />
- </td>
- </tr>
- <!-- date of creation -->
- <tr>
- <td>{'Creation date'|@translate} (DD/MM/YYYY)</td>
- <td>
- <input name="date_creation" type="text" value="{$DATE_IMG}" />
- </td>
- </tr>
- <!-- comment -->
- <tr>
- <td>{'comment'|@translate}</td>
- <td>
- <textarea name="comment" rows="3" cols="40" style="overflow:auto">{$COMMENT_IMG}</textarea>
- </td>
- </tr>
- {/if}
- <tr>
- <td colspan="2" align="center">
- <input class="submit" name="submit" type="submit" value="{'Submit'|@translate}" />
- </td>
- </tr>
- </table>
- </form>
- {else}
- {'upload_successful'|@translate}<br />
- <div style="text-align:center;">
- <a href="{$U_RETURN}">[ {'home'|@translate} ]</a>
- </div>
- {/if}
-
- {if isset($SHOW_FORM_FIELDS) and $SHOW_FORM_FIELDS}
- <div style="text-align:left;"><span style="color:red;">*</span> : {'mandatory'|@translate}</div>
- {/if}
-</div> <!-- content -->
diff --git a/BSF/tools/config_local.inc.php b/BSF/tools/config_local.inc.php
deleted file mode 100644
index 6e74538fb..000000000
--- a/BSF/tools/config_local.inc.php
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-// this file is provided as an example. It does not modify the configuration
-// as long as it remains in "tools" directory. Move it to "include"
-// directory if you want to modify default configuration.
-
-$conf['prefix_thumbnail'] = 'thumb_';
-$conf['show_gt'] = true;
-?> \ No newline at end of file
diff --git a/BSF/tools/create_listing_file.php b/BSF/tools/create_listing_file.php
deleted file mode 100644
index 8b1ee34ee..000000000
--- a/BSF/tools/create_listing_file.php
+++ /dev/null
@@ -1,1696 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// +-----------------------------------------------------------------------+
-// | User configuration |
-// +-----------------------------------------------------------------------+
-
-// ****** Gallery configuration ****** //
-// Script version
-$conf['version'] = 'branch 1.7';
-
-// URL of main gallery
-// Example : http://www.my.domain/my/directory
-$conf['gallery'] = 'http://demo.piwigo.net/';
-
-// prefix for thumbnails in "thumbnail" sub directories
-$conf['prefix_thumbnail'] = 'TN-';
-
-// $conf['file_ext'] lists all extensions (case insensitive) allowed
-// for your Piwigo installation
-$conf['file_ext'] = array('jpg','JPG','jpeg','JPEG',
- 'png','PNG','gif','GIF','mpg','zip',
- 'avi','mp3','ogg');
-
-
-// $conf['picture_ext'] must be a subset of $conf['file_ext']
-$conf['picture_ext'] = array('jpg','JPG','jpeg','JPEG',
- 'png','PNG','gif','GIF');
-
-// ****** Time limitation functionality ****** //
-// max execution time before refresh in seconds
-$conf['max_execution_time'] = (5*ini_get('max_execution_time'))/6; // 25 seconds with default PHP configuration
-// force the use of refresh method
-// in order to have live informations
-// or
-// to fix system witch are not safe mode but not autorized set_time_limit
-$conf['force_refresh_method'] = true;
-
-// refresh delay is seconds
-$conf['refresh_delay'] = 0;
-
-// ****** EXIF support functionality ****** //
-// $conf['use_exif'] set to true if you want to use Exif information
-$conf['use_exif'] = true;
-
-// use_exif_mapping: same behaviour as use_iptc_mapping
-$conf['use_exif_mapping'] = array(
- 'date_creation' => 'DateTimeOriginal'
- );
-
-// ****** IPTC support functionality ****** //
-// $conf['use_iptc'] set to true if you want to use IPTC informations of the
-// element according to get_sync_iptc_data function mapping, otherwise, set
-// to false
-$conf['use_iptc'] = false;
-
-// use_iptc_mapping : in which IPTC fields will Piwigo find image
-// information ? This setting is used during metadata synchronisation. It
-// associates a piwigo_images column name to a IPTC key
-$conf['use_iptc_mapping'] = array(
- 'keywords' => '2#025',
- 'date_creation' => '2#055',
- 'author' => '2#122',
- 'name' => '2#005',
- 'comment' => '2#120');
-
-// ****** Directory protection functionality ****** //
-// Define if directories have to be protected if they are not
-$conf['protect'] = false;
-
-// true/false : show/hide warnings
-$conf['protect_warnings'] = true;
-
-// ****** Thumbnails generation functionality ****** //
-// Define if images have to be reduced if they are not
-$conf['thumbnail'] = false;
-
-// Define method to generate thumbnails :
-// - fixed (width and height required);
-// - width (only width required);
-// - height (only height required);
-// - ratio (only ratio is required)
-// - exif (no other parameter required)
-$conf['thumbnail_method'] = 'ratio';
-
-// Height in pixels (greater than 0)
-$conf['thumbnail_height'] = 128;
-
-// Width in pixels (greater than 0)
-$conf['thumbnail_width'] = 128;
-
-// Ratio between original and thumbnail size (strictly between 0 and 1)
-$conf['thumbnail_ratio'] = 0.2;
-
-// Define thumbnail format : jpeg, png or gif (will be verified)
-$conf['thumbnail_format'] = 'jpeg';
-
-// ****** Directory mapping ****** //
-// directories names
-$conf['thumbs'] = 'thumbnail'; // thumbnails
-$conf['high'] = 'pwg_high'; // high resolution
-$conf['represent'] = 'pwg_representative'; // non pictures representative files
-
-
-// +-----------------------------------------------------------------------+
-// | Overload configurations |
-// +-----------------------------------------------------------------------+
-@include(dirname(__FILE__).'/'.basename(__FILE__, '.php').'_local.inc.php');
-
-
-// +-----------------------------------------------------------------------+
-// | Advanced script configuration |
-// +-----------------------------------------------------------------------+
-
-// url of icon directory in yoga template
-$pwg_conf['icon_dir'] = $conf['gallery'].'/template/yoga/icon/';
-
-// list of actions managed by this script
-$pwg_conf['scan_action'] = array('clean', 'test', 'generate');
-
-// url of this script
-$pwg_conf['this_url'] =
- (empty($_SERVER['HTTPS']) ? 'http://' : 'https://')
- .str_replace(':'.$_SERVER['SERVER_PORT'], '', $_SERVER['HTTP_HOST'])
- .($_SERVER['SERVER_PORT'] != 80 ? ':'.$_SERVER['SERVER_PORT'] : '')
- .$_SERVER['PHP_SELF'];
-
-// list of reserved directory names
-$pwg_conf['reserved_directory_names'] = array($conf['thumbs'], $conf['high'], $conf['represent'], ".", "..", ".svn");
-
-// content of index.php generated in protect action
-$pwg_conf['protect_content'] = '<?php header("Location: '.$conf['gallery'].'") ?>';
-
-// backup of PHP safe_mode INI parameter (used for time limitation)
-$pwg_conf['safe_mode'] = (ini_get('safe_mode') == '1') ? true : false;
-
-// This parameter will be fixed in pwg_init()
-$pwg_conf['gd_version_major'] = '';
-$pwg_conf['gd_version_full'] = '';
-$pwg_conf['gd_supported_format'] = array();
-
-// +-----------------------------------------------------------------------+
-// | Functions |
-// +-----------------------------------------------------------------------+
-
-/**
- * write line in log file
- *
- * @param string line
- * @return string
- */
-function pwg_log($line)
-{
- $log_file = fopen(__FILE__.'.log', 'a');
- fwrite($log_file, $line);
- fclose($log_file);
-}
-
-/**
- * Check web server graphical capabilities
- *
- * @return string
- */
-function pwg_check_graphics()
-{
- //~ pwg_log('>>>>> pwg_check_graphics() >>>>>'."\n");
-
- global $conf, $pwg_conf;
- $log = '';
-
- // Verify gd library for thumbnail generation
- if ($conf['thumbnail'] and !is_callable('gd_info'))
- {
- $log .= ' <code class="warning">Warning -</code> Your server can not generate thumbnails. Thumbnail creation switched off.<br />'."\n";
- // Switch off thumbnail generation
- $conf['thumbnail'] = false;
- return $log;
- }
-
- // Verify thumnail format
- if ($conf['thumbnail'])
- {
- $info = gd_info();
-
- // Backup GD major version
- $pwg_conf['gd_version_full'] = ereg_replace('[[:alpha:][:space:]()]+', '', $info['GD Version']);
- list($pwg_conf['gd_version_major']) = preg_split('/[.]+/', $pwg_conf['gd_version_full']);
-
- // Backup input/output format support
- array_push($pwg_conf['gd_supported_format'], $info['JPG Support'] ? 'jpeg' : NULL);
- array_push($pwg_conf['gd_supported_format'], $info['PNG Support'] ? 'png' : NULL);
- array_push($pwg_conf['gd_supported_format'], ($info['GIF Read Support'] and $info['GIF Create Support']) ? 'gif' : NULL);
-
- // Check output format support
- if (!in_array($conf['thumbnail_format'], $pwg_conf['gd_supported_format']))
- {
- $log .= ' <code class="warning">Warning -</code> Your server does not support thumbnail\'s <code>';
- $log .= $conf['thumbnail_format'].'</code> format. Thumbnail creation switched off.<br />'."\n";
- }
-
- switch ($conf['thumbnail_method'])
- {
- case 'exif':
- {
- // exif_thumbnail() must be callable
- if (!is_callable('exif_thumbnail'))
- {
- $log .= ' <code class="warning">Warning -</code> Your server does not support thumbnail creation through EXIF datas. Thumbnail creation switched off.<br />'."\n";
- }
- break;
- }
- case 'fixed':
- {
- // $conf['thumbnail_width'] > 0
- if (!is_numeric($conf['thumbnail_width']) or $conf['thumbnail_width'] <= 0)
- {
- $log .= ' <code class="failure">Failure -</code> Bad value <code>thumbnail_width = ';
- $log .= var_export($conf['thumbnail_width'], true).'</code>. Thumbnail creation switched off.<br />'."\n";
- }
- // $conf['thumbnail_height'] > 0
- if (!is_numeric($conf['thumbnail_height']) or $conf['thumbnail_height'] <= 0)
- {
- $log .= ' <code class="failure">Failure -</code> Bad value <code>thumbnail_height = ';
- $log .= var_export($conf['thumbnail_height'], true).'</code>. Thumbnail creation switched off.<br />'."\n";
- }
- break;
- }
- case 'ratio':
- {
- // 0 < $conf['thumbnail_ratio'] < 1
- if (!is_numeric($conf['thumbnail_ratio']) or $conf['thumbnail_ratio'] <= 0 or $conf['thumbnail_ratio'] >= 1)
- {
- $log .= ' <code class="failure">Failure -</code> Bad value <code>thumbnail_ratio = ';
- $log .= var_export($conf['thumbnail_ratio'], true).'</code>. Thumbnail creation switched off.<br />'."\n";
- }
- break;
- }
- case 'width':
- {
- // $conf['thumbnail_width'] > 0
- if (!is_numeric($conf['thumbnail_width']) or $conf['thumbnail_width'] <= 0)
- {
- $log .= ' <code class="failure">Failure -</code> Bad value <code>thumbnail_width = ';
- $log .= var_export($conf['thumbnail_width'], true).'</code>. Thumbnail creation switched off.<br />'."\n";
- }
- break;
- }
- case 'height':
- {
- // $conf['thumbnail_height'] > 0
- if (!is_numeric($conf['thumbnail_height']) or $conf['thumbnail_height'] <= 0)
- {
- $log .= ' <code class="failure">Failure -</code> Bad value <code>thumbnail_height = ';
- $log .= var_export($conf['thumbnail_height'], true).'</code>. Thumbnail creation switched off.<br />'."\n";
- }
- break;
- }
- default:
- {
- // unknown method
- $log .= ' <code class="failure">Failure -</code> Bad value <code>thumbnail_method = ';
- $log .= var_export($conf['thumbnail_method'], true).'</code>. Thumbnail creation switched off.<br />'."\n";
- break;
- }
- }
-
- if (strlen($log))
- {
- $conf['thumbnail'] = false;
- }
- }
-
- //~ pwg_log('<<<<< pwg_check_graphics() returns '.var_export($log, TRUE).' <<<<<'."\n");
- return $log;
-}
-
-/**
- * returns xml </dirX> lines
- *
- * @param integer $dir_start
- * @param integer $dir_number
- * @return string
- */
-function pwg_close_level($dir_start, $dir_number)
-{
- //~ pwg_log('>>>>> pwg_close_level($dir_start = '.var_export($dir_start, TRUE).', $dir_number = '.var_export($dir_number, TRUE).') >>>>>'."\n");
-
- $lines ='';
- do
- {
- $lines .= str_repeat(' ', 2*$dir_start).'</dir'.$dir_start.">\n";
- $dir_number--;
- $dir_start--;
- }
- while(($dir_number > 0) && ($dir_start >= 0));
-
- //~ pwg_log('<<<<< pwg_close_level returns '.var_export($lines, TRUE).' <<<<<'."\n");
- return $lines;
-}
-
-/**
- * return a cleaned IPTC value
- *
- * @param string value
- * @return string
- */
-function pwg_clean_iptc_value($value)
-{
- //~ pwg_log('>>>>> pwg_clean_iptc_value ($value = '.var_export($value, TRUE).') >>>>>'."\n");
-
- // strip leading zeros (weird Kodak Scanner software)
- while (isset($value[0]) and $value[0] == chr(0))
- {
- $value = substr($value, 1);
- }
- // remove binary nulls
- $value = str_replace(chr(0x00), ' ', $value);
-
- //~ pwg_log('<<<<< pwg_clean_iptc_value() returns '.var_export($value, TRUE).' <<<<<'."\n");
- return $value;
-}
-
-/**
- * returns informations from IPTC metadata, mapping is done at the beginning
- * of the function
- *
- * @param string $filename
- * @param string $map
- * @return array
- */
-function pwg_get_iptc_data($filename, $map)
-{
- //~ pwg_log('>>>>> pwg_get_iptc_data ($filename = '.var_export($filename, TRUE).', $map = '.var_export($map, TRUE).') >>>>>'."\n");
-
- $result = array();
-
- // Read IPTC data
- $iptc = array();
-
- $imginfo = array();
- getimagesize($filename, $imginfo);
-
- if (isset($imginfo['APP13']))
- {
- $iptc = iptcparse($imginfo['APP13']);
- if (is_array($iptc))
- {
- $rmap = array_flip($map);
- foreach (array_keys($rmap) as $iptc_key)
- {
- if (isset($iptc[$iptc_key][0]))
- {
- if ($iptc_key == '2#025')
- {
- $value = implode(',', array_map('pwg_clean_iptc_value', $iptc[$iptc_key]));
- }
- else
- {
- $value = pwg_clean_iptc_value($iptc[$iptc_key][0]);
- }
-
- foreach (array_keys($map, $iptc_key) as $pwg_key)
- {
- $result[$pwg_key] = $value;
- }
- }
- }
- }
- }
-
- //~ pwg_log('<<<<< pwg_get_iptc_data() returns '.var_export($result, TRUE).' <<<<<'."\n");
- return $result;
-}
-
-/**
- * returns informations from IPTC metadata
- *
- * @param string $file
- * @return array iptc
- */
-function pwg_get_sync_iptc_data($file)
-{
- //~ pwg_log('>>>>> pwg_get_sync_iptc_data ($file = '.var_export($file, TRUE).') >>>>>'."\n");
-
- global $conf;
-
- $map = $conf['use_iptc_mapping'];
- $datefields = array('date_creation', 'date_available');
-
- $iptc = pwg_get_iptc_data($file, $map);
-
- foreach ($iptc as $pwg_key => $value)
- {
- if (in_array($pwg_key, $datefields))
- {
- if ( preg_match('/(\d{4})(\d{2})(\d{2})/', $value, $matches))
- {
- $value = $matches[1].'-'.$matches[2].'-'.$matches[3];
- }
- }
- if ($pwg_key == 'keywords')
- {
- // official keywords separator is the comma
- $value = preg_replace('/[.;]/', ',', $value);
- $value = preg_replace('/^,+|,+$/', '', $value);
- }
- $iptc[$pwg_key] = htmlentities($value);
- }
-
- $iptc['keywords'] = isset($iptc['keywords']) ? implode(',', array_unique(explode(',', $iptc['keywords']))) : NULL;
-
- //~ pwg_log('<<<<< pwg_get_sync_iptc_data() returns '.var_export($iptc, TRUE).' <<<<<'."\n");
- return $iptc;
-}
-
-/**
- * return extension of the representative file
- *
- * @param string $file_dir
- * @param string $file_short
- * @return string
- */
-function pwg_get_representative_ext($file_dir, $file_short)
-{
- //~ pwg_log('>>>>> pwg_get_representative_ext($file_dir = '.var_export($file_dir, TRUE).', $file_short = '.var_export($file_short, TRUE).') >>>>>'."\n");
-
- global $conf;
-
- $rep_ext = '';
- foreach ($conf['picture_ext'] as $ext)
- {
- if (file_exists($file_dir.'/'.$conf['represent'].'/'.$file_short.'.'.$ext))
- {
- $rep_ext = $ext;
- break;
- }
- }
-
- //~ pwg_log('<<<<< pwg_get_representative_ext() returns '.var_export($rep_ext, TRUE).' <<<<<'."\n");
- return $rep_ext;
-}
-
-/**
- * return 'true' if high resolution picture exists else ''
- *
- * @param string $file_dir
- * @param string $file_base
- * @return boolean
- */
-function pwg_get_high($file_dir, $file_base)
-{
- //~ pwg_log('>>>>> pwg_get_high($file = '.var_export($file_dir, TRUE).', $line = '.var_export($file_base, TRUE).') >>>>>'."\n");
-
- global $conf;
-
- $high = false;
- if (file_exists($file_dir.'/'.$conf['high'].'/'.$file_base))
- {
- $high = true;
- }
-
- //~ pwg_log('<<<<< pwg_get_high() returns '.var_export($high, TRUE).' <<<<<'."\n");
- return $high;
-}
-
-/**
- * return filename without extension
- *
- * @param string $filename
- * @return string
- */
-function pwg_get_filename_wo_extension($filename)
-{
- //~ pwg_log('>>>>> _get_filename_wo_extension($filename = '.var_export($filename, TRUE).') >>>>>'."\n");
-
- $short_name = substr($filename, 0, strrpos($filename, '.'));
-
- //~ pwg_log('<<<<< _get_filename_wo_extension() returns '.var_export($short_name, TRUE).' <<<<<'."\n");
- return $short_name;
-}
-
-/**
- * return extension of the thumbnail and complete error_log
- *
- * @param string $file_dir
- * @param string $file_short
- * @param string $file_ext
- * @param string &$error_log
- * @return string
- */
-function pwg_get_thumbnail_ext($file_dir, $file_short, $file_ext, &$error_log)
-{
- //~ pwg_log('>>>>> pwg_get_thumbnail_ext($file_dir = '.var_export($file_dir, TRUE).', $file_short = '.var_export($file_short, TRUE).') >>>>>'."\n");
-
- global $conf;
-
- $thumb_ext = '';
- foreach ($conf['picture_ext'] as $ext)
- {
- if (file_exists($file_dir.'/'.$conf['thumbs'].'/'.$conf['prefix_thumbnail'].$file_short.'.'.$ext))
- {
- $thumb_ext = $ext;
- break;
- }
- }
-
- if ($thumb_ext == '')
- {
- if ($conf['thumbnail'])
- {
- $log = pwg_icon_file($file_dir, $file_short, $file_ext);
- if (strpos($log, 'success'))
- {
- $thumb_ext = $conf['thumbnail_format'];
- }
- $error_log .= $log;
- }
- }
-
- //~ pwg_log('<<<<< pwg_get_thumbnail_ext() returns '.var_export($thumb_ext, TRUE).' <<<<<'."\n");
- return $thumb_ext;
-}
-
-
-/**
- * return error logs
- *
- * @param string $file_dir
- * @param string $file_short
- * @param string $file_ext
- * @return string
- */
-function pwg_icon_file($file_dir, $file_short, $file_ext)
-{
- //~ pwg_log('>>>>> pwg_icon_file($file_dir = '.var_export($file_dir, TRUE).', $file_short = '.var_export($file_short, TRUE).') >>>>>'."\n");
-
- global $conf, $pwg_conf;
-
- $error_log = '';
-
- // Get original properties (width, height)
- if ($image_size = getimagesize($file_dir.'/'.$file_short.'.'.$file_ext))
- {
- $src_width = $image_size[0];
- $src_height = $image_size[1];
- }
- else
- {
- $error_log .= ' <code class="failure">Failure -</code> Can not generate icon for <code>';
- $error_log .= $file_dir.'/'.$file_short.'.'.$file_ext.'</code>';
- $error_log .= ' <img src="'.$pwg_conf['icon_dir'].'add_tag.png" title="width/height are unreadable" /><br />'."\n";
- return $error_log;
- }
-
- // Check input format
- $dst_format = $conf['thumbnail_format'];
- $src_format = ($file_ext == 'jpg' or $file_ext == 'JPG') ? 'jpeg' : strtolower($file_ext);
- if (!in_array($src_format, $pwg_conf['gd_supported_format']))
- {
- $error_log .= ' <code class="failure">Failure -</code> Can not generate icon for <code>';
- $error_log .= $file_dir.'/'.$file_short.'.'.$file_ext.'</code>';
- $error_log .= ' <img src="'.$pwg_conf['icon_dir'].'add_tag.png" title="format not supported" /><br />'."\n";
- return $error_log;
- }
-
- // Calculate icon properties (width, height)
- switch ($conf['thumbnail_method'])
- {
- case 'fixed':
- {
- $dst_width = $conf['thumbnail_width'];
- $dst_height = $conf['thumbnail_height'];
- break;
- }
- case 'width':
- {
- $dst_width = $conf['thumbnail_width'];
- $dst_height = $dst_width * $src_height / $src_width;
- break;
- }
- case 'height':
- {
- $dst_height = $conf['thumbnail_height'];
- $dst_width = $dst_height * $src_width / $src_height;
- break;
- }
- case 'ratio':
- {
- $dst_width = round($src_width * $conf['thumbnail_ratio']);
- $dst_height = round($src_height * $conf['thumbnail_ratio']);
- break;
- }
- case 'exif':
- default:
- {
- // Nothing to do
- }
- }
-
- // Creating icon
- if ($conf['thumbnail_method'] == 'exif')
- {
- $src = exif_thumbnail($file_dir.'/'.$file_short.'.'.$file_ext, $width, $height, $imagetype);
- if ($src === false)
- {
- $error_log .= ' <code class="failure">Failure -</code> No EXIF thumbnail in <code>';
- $error_log .= $file_dir.'/'.$file_short.'.'.$file_ext.'</code><br />'."\n";
- return $error_log;
- }
- $dst = imagecreatefromstring($src);
- if ($src === false)
- {
- $error_log .= ' <code class="failure">Failure -</code> EXIF thumbnail format not supported in <code>';
- $error_log .= $file_dir.'/'.$file_short.'.'.$file_ext.'</code><br />'."\n";
- return $error_log;
- }
- }
- else
- {
- if (($pwg_conf['gd_version_major'] != 2)) // or ($conf['thumbnail_format'] == 'gif'))
- {
- $dst = imagecreate($dst_width, $dst_height);
- }
- else
- {
- $dst = imagecreatetruecolor($dst_width, $dst_height);
- }
- $src = call_user_func('imagecreatefrom'.$src_format, $file_dir.'/'.$file_short.'.'.$file_ext);
- if (!$src)
- {
- $error_log .= ' <code class="failure">Failure -</code> Internal error for <code>imagecreatefrom'.$src_format.'()</code>';
- $error_log .= 'with <code>'.$file_dir.'/'.$file_short.'.'.$file_ext.'</code><br />'."\n";
- return $error_log;
- }
-
- if (($pwg_conf['gd_version_major'] != 2))
- {
- if (!imagecopyresized($dst, $src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height))
- {
- $error_log .= ' <code class="failure">Failure -</code> Internal error for <code>imagecopyresized()</code>';
- $error_log .= 'with <code>'.$file_dir.'/'.$file_short.'.'.$file_ext.'</code><br />'."\n";
- return $error_log;
- }
- }
- else
- {
- if (!imagecopyresampled($dst, $src, 0, 0, 0, 0, $dst_width, $dst_height, $src_width, $src_height))
- {
- $error_log .= ' <code class="failure">Failure -</code> Internal error for <code>imagecopyresampled()</code>';
- $error_log .= 'with <code>'.$file_dir.'/'.$file_short.'.'.$file_ext.'</code><br />'."\n";
- return $error_log;
- }
- }
- }
-
- if (!call_user_func('image'.$dst_format, $dst, $file_dir.'/'.$conf['thumbs'].'/'.$conf['prefix_thumbnail'].$file_short.'.'.$conf['thumbnail_format']))
- {
- $error_log .= ' <code class="failure">Failure -</code> Can not write <code>';
- $error_log .= $file_dir.'/'.$conf['thumbs'].'/'.$conf['prefix_thumbnail'].$file_short.'.'.$file_ext.'</code> to generate thumbnail<br />'."\n";
- return $error_log;
- }
-
- $error_log .= ' <code class="success">Success -</code> Thumbnail generated for <code>';
- $error_log .= $file_dir.'/'.$file_short.'.'.$file_ext.'</code><br />'."\n";
-
- //~ pwg_log('<<<<< pwg_icon_file() returns '.var_export($error_log, TRUE).' <<<<<'."\n");
- return $error_log;
-}
-
-/**
- * completes xml line <element .../> and returns error log
- *
- * @param string $file
- * @param string &$line
- * @return string
- */
-function pwg_scan_file($file_full, &$line)
-{
- //~ pwg_log('>>>>> pwg_scan_file($file = '.var_export($file_full, TRUE).', $line = '.var_export($line, TRUE).') >>>>>'."\n");
-
- global $conf, $pwg_conf;
-
- $error_log ='';
-
- $file_base = basename($file_full);
- $file_short = pwg_get_filename_wo_extension($file_base);
- $file_ext = pwg_get_file_extension($file_base);
- $file_dir = dirname($file_full);
-
- $element['file'] = $file_base;
- $element['path'] = dirname($pwg_conf['this_url']).substr($file_dir, 1).'/'.$file_base;
-
- if (in_array($file_ext, $conf['picture_ext']))
- {
- // Here we scan a picture : thumbnail is mandatory, high is optionnal, representative is not scanned
- $element['tn_ext'] = pwg_get_thumbnail_ext($file_dir, $file_short, $file_ext, $error_log);
- if ($element['tn_ext'] != '')
- {
- // picture has a thumbnail, get image width, heigth, size in Mo
- $element['filesize'] = floor(filesize($file_full) / 1024);
- if ($image_size = getimagesize($file_full))
- {
- $element['width'] = $image_size[0];
- $element['height'] = $image_size[1];
- }
-
- // get high resolution
- if (pwg_get_high($file_dir, $file_base))
- {
- $element['has_high'] = 'true';
-
- $high_file = $file_dir.'/'.$conf['high'].'/'.$file_base;
- $element['high_filesize'] = floor(filesize($high_file) / 1024);
- }
-
- // get EXIF meta datas
- if ($conf['use_exif'])
- {
- // Verify activation of exif module
- if (extension_loaded('exif'))
- {
- if ($exif = read_exif_data($file_full))
- {
- foreach ($conf['use_exif_mapping'] as $pwg_key => $exif_key )
- {
- if (isset($exif[$exif_key]))
- {
- if ( in_array($pwg_key, array('date_creation','date_available') ) )
- {
- if (preg_match('/^(\d{4}):(\d{2}):(\d{2})/', $exif[$exif_key], $matches))
- {
- $element[$pwg_key] = $matches[1].'-'.$matches[2].'-'.$matches[3];
- }
- }
- else
- {
- $element[$pwg_key] = $exif[$exif_key];
- }
- }
- }
- }
- }
- }
-
- // get IPTC meta datas
- if ($conf['use_iptc'])
- {
- $iptc = pwg_get_sync_iptc_data($file_full);
- if (count($iptc) > 0)
- {
- foreach (array_keys($iptc) as $key)
- {
- $element[$key] = addslashes($iptc[$key]);
- }
- }
- }
-
- }
- else
- {
- $error_log .= ' <code class="failure">Failure -</code> Thumbnail is missing for <code>'.$file_dir.'/'.$file_base.'</code>';
- $error_log .= ' <img src="'.$pwg_conf['icon_dir'].'add_tag.png" title="'.$file_dir.'/thumbnail/'.$conf['prefix_thumbnail'].$file_short;
- $error_log .= '.xxx ('.implode(', ', $conf['picture_ext']).')" /><br />'."\n";
- }
- }
- else
- {
- // Here we scan a non picture file : thumbnail and high are unused, representative is optionnal
- $element['tn_ext'] = pwg_get_thumbnail_ext($file_dir, $file_short, $file_ext, $log);
- $ext = pwg_get_representative_ext($file_dir, $file_short);
- if ($ext != '')
- {
- $element['representative_ext'] = $ext;
- }
- }
-
- if (strlen($error_log) == 0)
- {
- $line = pwg_get_indent('element').'<element ';
- foreach($element as $key => $value)
- {
- $line .= $key.'="'.$value.'" ';
- }
- $line .= '/>'."\n";
- }
-
- //~ pwg_log('<<<<< pwg_scan_file() returns '.var_export($error_log, TRUE).' <<<<<'."\n");
- return $error_log;
-}
-
-/**
- * returns current level in tree
- *
- * @return integer
- */
-function pwg_get_level($dir)
-{
- //~ pwg_log('>>>>> pwg_get_level($dir = '.var_export($dir, TRUE).') >>>>>'."\n");
-
- $level = substr_count($dir, '/') - 1; // -1 because of ./ at the beginning of path
-
- //~ pwg_log('<<<<< pwg_get_level() returns '.var_export($level, TRUE).' <<<<<'."\n");
- return $level;
-}
-
-/**
- * returns indentation of element
- *
- * @param string $element_type : 'root', 'element', 'dir'
- * @return string
- */
-function pwg_get_indent($element_type)
-{
- //~ pwg_log('>>>>> pwg_get_indent($element_type = '.var_export($element_type, TRUE).') >>>>>'."\n");
-
- $level = substr_count($_SESSION['scan_list_fold'][0], '/') - 1; // because of ./ at the beginning
- switch($element_type)
- {
- case 'dir' :
- {
- $indent = str_repeat(' ', 2*pwg_get_level($_SESSION['scan_list_fold'][0]));
- break;
- }
- case 'root' :
- {
- $indent = str_repeat(' ', 2*pwg_get_level($_SESSION['scan_list_fold'][0])+2);
- break;
- }
- case 'element' :
- {
- $indent = str_repeat(' ', 2*pwg_get_level($_SESSION['scan_list_fold'][0])+4);
- break;
- }
- default :
- {
- $indent = '';
- break;
- }
- }
-
- //~ pwg_log('<<<<< pwg_get_indent() returns '.var_export(strlen($indent), TRUE).' spaces <<<<<'."\n");
- return $indent;
-}
-
-/**
- * create index.php in directory and reserved sub_directories, return logs
- *
- * @param string dir
- * @return string
- */
-function pwg_protect_directories($directory)
-{
- //~ pwg_log('>>>>> pwg_protect_directories($directory = '.var_export($directory, true).') >>>>>'."\n");
-
- global $conf;
-
- $error_log = '';
- $dirlist = array($directory, $directory.'/'.$conf['thumbs'], $directory.'/'.$conf['high'], $directory.'/'.$conf['represent']);
-
- foreach ($dirlist as $dir)
- {
- if (file_exists($dir))
- {
- if (!file_exists($dir.'/index.php'))
- {
- $file = @fopen($dir.'/index.php', 'w');
- if ($file != false)
- {
- fwrite($file, $pwg_conf['protect_content']); // the return code should be verified
- $error_log .= ' <code class="success">Success -</code> index.php created in directory <a href="'.$dir.'">'.$dir."</a><br />\n";
- }
- else
- {
- $error_log .= ' <code class="failure">Failure -</code> Can not create index.php in directory <code>'.$dir."</code><br />\n";
- }
- }
- else
- {
- if ($conf['protect_warnings'])
- {
- $error_log .= ' <code class="warning">Warning -</code> index.php already exists in directory <a href="'.$dir.'">'.$dir."</a><br />\n";
- }
- }
- }
- }
-
- //~ pwg_log('<<<<< pwg_protect_directories() returns '.var_export($error_log, true).' <<<<<'."\n");
- return $error_log;
-}
-
-/**
- * returns file extension (.xxx)
- *
- * @param string $file
- * @return string
- */
-function pwg_get_file_extension($file)
-{
- //~ pwg_log('>>>>> pwg_get_file_extension($file = '.var_export($file, true).') >>>>>'."\n");
-
- $ext = substr(strrchr($file, '.'), 1, strlen ($file));
-
- //~ pwg_log('<<<<< pwg_get_file_extension() returns '.var_export($ext, true).' <<<<<'."\n");
- return $ext;
-}
-
-/**
- * completes directory list of supported files and returns error logs
- *
- * @param string $directory
- * @return string
- */
-function pwg_get_file_list($directory)
-{
- //~ pwg_log('>>>>> pwg_get_file_list($directory = '.var_export($directory, true).') >>>>>'."\n");
-
- global $conf, $pwg_conf;
-
- $errorLog = '';
- $dir = opendir($directory);
- while (($file = readdir($dir)) !== false)
- {
- switch (filetype($directory."/".$file))
- {
- case 'file' :
- {
- if (in_array(pwg_get_file_extension($file), $conf['file_ext']))
- {
- // The file pointed is a regular file with a supported extension
- array_push($_SESSION['scan_list_file'], $directory.'/'.$file);
- //~ pwg_log('--->> Push in $_SESSION[scan_list_file] value "'.$directory.'/'.$file.'"'."\n");
- if (!preg_match('/^[a-zA-Z0-9-_.]+$/', $file))
- {
- $errorLog .= ' <code class="failure">Failure -</code> Invalid file name for <code>'.$file.'</code> in <code>'.$directory.'</code>';
- $errorLog .= ' <img src="'.$pwg_conf['icon_dir'].'add_tag.png"';
- $errorLog .= ' title="Name should be composed of letters, figures, -, _ or . ONLY" /><br />'."\n";
- }
- }
- break; // End of filetype FILE
- }
- case 'dir' :
- {
- if(!in_array($file, $pwg_conf['reserved_directory_names']))
- {
- // The file pointed is a directory but neither system directory nor reserved by PWG
- array_push($_SESSION['scan_list_fold'], $directory.'/'.$file);
- //~ pwg_log('--->> Push in $_SESSION[scan_list_fold] value "'.$directory.'/'.$file.'"'."\n");
- if (!preg_match('/^[a-zA-Z0-9-_.]+$/', $file))
- {
- $errorLog .= ' <code class="failure">Failure -</code> Invalid directory name for <code>'.$directory.'/'.$file.'</code>';
- $errorLog .= ' <img src="'.$pwg_conf['icon_dir'].'add_tag.png"';
- $errorLog .= ' title="Name should be composed of letters, figures, -, _ or . ONLY" /><br />'."\n";
- }
- }
- break; // End of filetype DIR
- }
- case 'fifo' :
- case 'char' :
- case 'block' :
- case 'link' :
- case 'unknown':
- default :
- {
- // PWG does not manage these cases
- break;
- }
- }
- }
- closedir($dir);
-
- //~ pwg_log('<<<<< pwg_get_file_list() returns '.var_export($errorLog, true).' <<<<<'."\n");
-
- return $errorLog;
-}
-
-/**
- * returns a float value coresponding to the number of seconds since the
- * unix epoch (1st January 1970) and the microseconds are precised :
- * e.g. 1052343429.89276600
- *
- * @return float
- */
-function pwg_get_moment()
-{
- //~ pwg_log('>>>>> pwg_get_moment() >>>>>'."\n");
-
- $t1 = explode(' ', microtime());
- $t2 = explode('.', $t1[0]);
- $t2 = $t1[1].'.'.$t2[1];
-
- //~ pwg_log('<<<<< pwg_get_moment() returns '.var_export($t2, true).' <<<<<'."\n");
- return $t2;
-}
-
-/**
- * return true if HTTP_REFERER and PHP_SELF are similar
- *
- * return boolean
- */
-function pwg_referer_is_me()
-{
- global $pwg_conf;
-
- //~ pwg_log('>>>>> pwg_referer_is_me() >>>>>'."\n");
-
- $response = false;
- $caller = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : '';
-
- if (strcasecmp($pwg_conf['this_url'], $caller) == 0) {
- $response = true;
- }
-
- //~ pwg_log('<<<<< pwg_referer_is_me() returns '.var_export($response, true).' <<<<<'."\n");
- return $response;
-}
-
-// +-----------------------------------------------------------------------+
-// | pwg_<ACTION>_<STEP> Functions |
-// +-----------------------------------------------------------------------+
-
-function pwg_test_start()
-{
- //~ pwg_log('>>>>> pwg_test_start() >>>>>'."\n");
-
- global $g_message, $conf;
-
- if (isset($_REQUEST['version']))
- {
- if ($_REQUEST['version'] != $conf['version'])
- {
- $g_message = '0';
- }
- else
- {
- $g_message = '1';
- }
- }
- else
- {
- $g_message = '1';
- }
- $_SESSION['scan_step'] = 'exit';
-
- //~ pwg_log('<<<<< pwg_test_start() <<<<<'."\n");
-}
-
-function pwg_test_exit()
-{
- //~ pwg_log('>>>>> pwg_test_exit() >>>>>'."\n");
-
- global $g_header, $g_message, $g_footer, $conf, $pwg_conf;
-
- if (pwg_referer_is_me())
- {
- $g_header = ' : <span class="success">Test</span>'."\n";
- $g_footer = '<a href="'.$pwg_conf['this_url'].'" title="Main menu"><img src="'.$pwg_conf['icon_dir'].'up.png" /></a>'."\n";
-
- // Write version
- $g_message = ' <h3>Script version</h3>'."\n";
- $g_message .= ' This script is tagged : <code class="failure">'.$conf['version'].'</code>'."\n";
- // write GD support
- if (!is_callable('gd_info'))
- {
- $g_message .= ' <code class="failure">Failure -</code> Your server can not generate imagess<br />'."\n";
- }
- else
- {
- $info = gd_info();
- $gd_full_version = ereg_replace('[[:alpha:][:space:]()]+', '', $info['GD Version']);
- list($gd_version) = preg_split('/[.]+/', $gd_full_version);
-
- $g_message .= ' <h3>Image generation</h3>'."\n";
- $g_message .= ' <code class="success">Success -</code> Your server can generate images<br />'."\n";
- $g_message .= ' <code class="warning">Warning -</code> Your server support GD'.$gd_version.' (v'.$gd_full_version.')<br />'."\n";
- $format_list = array();
- $format = ($info['GIF Create Support']) ? '<code>gif</code>' : NULL;
- array_push($format_list, $format);
- $format = ($info['JPG Support']) ? '<code>jpg</code>' : NULL;
- array_push($format_list, $format);
- $format = ($info['PNG Support']) ? '<code>png</code>' : NULL;
- array_push($format_list, $format);
- $g_message .= ' <code class="warning">Warning -</code> Your server support format: '.implode(', ', $format_list)."\n";
- }
-
- $g_message .= ' <h3>Directory parsing</h3>'."\n";
- if ($pwg_conf['safe_mode'])
- {
- $g_message .= ' <code class="warning">Warning -</code> Your server does not support to resize execution time'."\n";
- }
- else
- {
- $g_message .= ' <code class="success">Success -</code> Your server supports to resize execution time'."\n";
- }
- }
- else
- {
- // compare version in GET parameter with $conf['version']
- if ($g_message == '1')
- {
- exit('<pre>PWG-INFO-2: test successful</pre>');
- }
- else
- {
- exit('<pre>PWG-ERROR-4: Piwigo versions differs</pre>');
- }
- }
-
- //~ pwg_log('<<<<< pwg_test_exit() <<<<<'."\n");
-}
-
-function pwg_clean_start()
-{
- //~ pwg_log('>>>>> pwg_clean_start() >>>>>'."\n");
-
- global $g_message;
-
- if(@unlink('./listing.xml'))
- {
- $g_message = '1';
- }
- else
- {
- $g_message = '0';
- }
-
- $_SESSION['scan_step'] = 'exit';
-
- //~ pwg_log('<<<<< pwg_clean_start() <<<<<'."\n");
-}
-
-function pwg_clean_exit()
-{
- //~ pwg_log('>>>>> pwg_clean_exit() >>>>>'."\n");
-
- global $g_header, $g_message, $g_footer, $conf, $pwg_conf;
-
- if(pwg_referer_is_me())
- {
- $g_header = ' : <span class="success">Clean</span>';
- if ($g_message == '1')
- {
- $g_message = ' <code class="success">Success -</code> <code>listing.xml</code> file deleted'."\n";
- }
- else
- {
- $g_message = ' <code class="failure">Failure -</code> <code>listing.xml</code> does not exist or is read only'."\n";
- }
- $g_footer = '<a href="'.$pwg_conf['this_url'].'" title="Main menu"><img src="'.$pwg_conf['icon_dir'].'up.png" /></a>';
- }
- else
- {
- if ($g_message == '1')
- {
- exit('<pre>PWG-INFO-3 : listing.xml file deleted</pre>');
- }
- else
- {
- exit('<pre>PWG-ERROR-3 : listing.xml does not exist</pre>');
- }
- }
-
- //~ pwg_log('<<<<< pwg_clean_exit() <<<<<'."\n");
-}
-
-function pwg_generate_start()
-{
- //~ pwg_log('>>>>> pwg_generate_start() >>>>>'."\n");
- //~ pwg_log("GENARATE start >>>\n".var_export($_SESSION['scan_list_fold'], true)."\n".var_export($_SESSION['scan_list_file'], true)."\nGENERATE start >>>\n");
-
- global $g_listing, $pwg_conf, $conf;
-
- // Flush line <informations>
- $xml_header_url = dirname($pwg_conf['this_url']);
- $xml_header_date = date('Y-m-d');
- $xml_header_version = htmlentities($conf['version']);
-
- $attrs = array();
- if ($conf['use_iptc'])
- {
- $attrs = array_merge($attrs, array_keys($conf['use_iptc_mapping']) );
- }
- if ($conf['use_exif'])
- {
- $attrs = array_merge($attrs, array_keys($conf['use_exif_mapping']) );
- }
- $xml_header_metadata = implode(',',array_unique($attrs));
-
- $xml_header = '<informations';
- $xml_header .= ' generation_date="'.$xml_header_date.'"';
- $xml_header .= ' phpwg_version="'.$xml_header_version.'"';
- $xml_header .= ' metadata="'.$xml_header_metadata.'"';
- $xml_header .= ' url="'.$xml_header_url.'"';
- $xml_header .= '>'."\n";
-
- fwrite($g_listing, $xml_header);
-
- // Initialization of directory and file lists
- $_SESSION['scan_list_fold'] = array();
- $_SESSION['scan_list_file'] = array();
- $_SESSION['scan_logs'] .= pwg_get_file_list('.');
- sort($_SESSION['scan_list_fold']);
-
- // Erase first file list because root directory does not contain images.
- $_SESSION['scan_list_file'] = array();
-
- // What are we doing at next step
- if(count($_SESSION['scan_list_fold']) > 0)
- {
- $_SESSION['scan_step'] = 'list';
- }
- else
- {
- $_SESSION['scan_step'] = 'stop';
- }
-
- //~ pwg_log("GENARATE start <<<\n".var_export($_SESSION['scan_list_fold'], true)."\n".var_export($_SESSION['scan_list_file'], true)."\nGENERATE start <<<\n");
- //~ pwg_log('<<<<< pwg_generate_start() <<<<<'."\n");
-}
-
-function pwg_generate_list()
-{
- //~ pwg_log('>>>>> pwg_generate_list() >>>>>'."\n");
- //~ pwg_log("GENARATE list >>>\n".var_export($_SESSION['scan_list_fold'], true)."\n".var_export($_SESSION['scan_list_file'], true)."\nGENERATE list >>>\n");
-
- global $g_listing;
-
- // Flush line <dirX name=""> in xml file
- $dirname = basename($_SESSION['scan_list_fold'][0]);
- $line = pwg_get_indent('dir').'<dir'.pwg_get_level($_SESSION['scan_list_fold'][0]).' name="'.$dirname.'">'."\n";
- fwrite($g_listing, $line);
-
- // Get list of files and directories
- $_SESSION['scan_logs'] .= pwg_get_file_list($_SESSION['scan_list_fold'][0]);
- sort($_SESSION['scan_list_fold']); // Mandatory to keep the tree order
- sort($_SESSION['scan_list_file']); // Easier to read when sorted
-
- // Flush line <root>
- $line = pwg_get_indent('root').'<root>'."\n";
- fwrite($g_listing, $line);
-
- // What are we doing at next step
- $_SESSION['scan_step'] = 'scan';
-
- //~ pwg_log("GENARATE list <<<\n".var_export($_SESSION['scan_list_fold'], true)."\n".var_export($_SESSION['scan_list_file'], true)."\nGENERATE list <<<\n");
- //~ pwg_log('<<<<< pwg_generate_list() <<<<<'."\n");
-}
-
-function pwg_generate_scan()
-{
- //~ pwg_log('>>>>> pwg_generate_scan() >>>>>'."\n");
- //~ pwg_log("GENARATE scan >>>\n".var_export($_SESSION['scan_list_fold'], true)."\n".var_export($_SESSION['scan_list_file'], true)."\nGENERATE scan >>>\n");
-
- global $g_listing, $conf;
-
- while (pwg_continue() and count($_SESSION['scan_list_file']) > 0)
- {
- $line = '';
- $_SESSION['scan_logs'] .= pwg_scan_file($_SESSION['scan_list_file'][0], $line);
-
- if (strlen($line) > 0)
- {
- fwrite($g_listing, $line);
- }
- //~ pwg_log('---<< Pull of $_SESSION[scan_list_file] value "'.$_SESSION['scan_list_file'][0].'"'."\n");
- array_shift($_SESSION['scan_list_file']);
- $_SESSION['scan_cnt_file']++;
- }
-
- if (count($_SESSION['scan_list_file']) <= 0)
- {
- $_SESSION['scan_step'] = 'prot';
- }
-
- //~ pwg_log("GENERATE scan <<<\n".var_export($_SESSION['scan_list_fold'], true)."\n".var_export($_SESSION['scan_list_file'], true)."\nGENERATE scan <<<\n");
- //~ pwg_log('<<<<< pwg_generate_scan() <<<<<'."\n");
-}
-
-function pwg_generate_prot()
-{
- //~ pwg_log('>>>>> pwg_generate_prot() >>>>>'."\n");
- //~ pwg_log("GENARATE prot >>>\n".var_export($_SESSION['scan_list_fold'], true)."\n".var_export($_SESSION['scan_list_file'], true)."\nGENERATE prot >>>\n");
-
- global $conf, $g_listing;
-
- // Flush line </root>
- $line = pwg_get_indent('root').'</root>'."\n";
- fwrite($g_listing, $line);
-
- if ($conf['protect'])
- {
- $_SESSION['scan_logs'] .= pwg_protect_directories($_SESSION['scan_list_fold'][0]);
- }
-
- // How many directories to close
- $current_level = pwg_get_level($_SESSION['scan_list_fold'][0]);
- if (isset($_SESSION['scan_list_fold'][1]))
- {
- //~ pwg_log('---<< Pull of $_SESSION[scan_list_fold] value "'.$_SESSION['scan_list_fold'][0].'"'."\n");
- array_shift($_SESSION['scan_list_fold']);
- $_SESSION['scan_cnt_fold']++;
- $next_level = pwg_get_level($_SESSION['scan_list_fold'][0]);
- $_SESSION['scan_step'] = 'list';
- }
- else
- {
- $next_level = -1;
- $_SESSION['scan_cnt_fold']++;
- $_SESSION['scan_step'] = 'stop';
- }
-
- if ($current_level == $next_level)
- {
- fwrite($g_listing, pwg_close_level($current_level, 1));
- }
- else
- {
- if (($current_level > $next_level))
- {
- fwrite($g_listing, pwg_close_level($current_level, $current_level-$next_level+1));
- } // Nothing to do if current_level < next_level
- }
-
- //~ pwg_log("GENERATE prot <<<\n".var_export($_SESSION['scan_list_fold'], true)."\n".var_export($_SESSION['scan_list_file'], true)."\nGENERATE prot <<<\n");
- //~ pwg_log('<<<<< pwg_generate_prot() <<<<<'."\n");
-}
-
-function pwg_generate_stop()
-{
- //~ pwg_log('>>>>> pwg_generate_stop() >>>>>'."\n");
- //~ pwg_log("GENARATE stop >>>\n".var_export($_SESSION['scan_list_fold'], true)."\n".var_export($_SESSION['scan_list_file'], true)."\nGENERATE stop >>>\n");
-
- global $pwg_conf, $g_listing, $g_header, $g_message, $g_footer;
-
- // Flush line </informations>
- fwrite($g_listing, '</informations>'."\n");
-
- // backup error log before cleaning session
- $time_elapsed = number_format(pwg_get_moment() - $_SESSION['scan_time'], 3, '.', ' ');
-
- $g_header = ' : <span class="success">Generate</span>';
- $g_message = ' <div>'."\n".$_SESSION['scan_logs'].' </div>'."\n";
- $g_message .= ' <div><code class="success">'.$_SESSION['scan_cnt_fold'].'</code> directories parsed<br />'."\n";
- $g_message .= ' <code class="success">'.$_SESSION['scan_cnt_file'].'</code> files scanned</div>'."\n";
- $g_message .= ' <div>View <a href="listing.xml">listing.xml</a></div>'."\n";
- $g_message .= ' <div style="{text-align: right;}">Listing generated in : <code>'.$time_elapsed.' s</code></div>';
- $g_footer = '<a href="'.$pwg_conf['this_url'].'" title="Main menu"><img src="'.$pwg_conf['icon_dir'].'up.png" /></a>';
-
- // What are we doing at next step
- $_SESSION['scan_step'] = 'exit';
-
- //~ pwg_log("GENARATE stop <<<\n".var_export($_SESSION['scan_list_fold'], true)."\n".var_export($_SESSION['scan_list_file'], true)."\nGENERATE stop <<<\n");
- //~ pwg_log('<<<<< pwg_generate_stop() <<<<<'."\n");
-}
-
-// +-----------------------------------------------------------------------+
-// | ALWAYS CALLED FUNCTIONS |
-// +-----------------------------------------------------------------------+
-
-/**
- * This function check step and time ellapsed to determine end of loop
- *
- * @return bool
- */
-function pwg_continue()
-{
- //~ pwg_log('>>>>> pwg_continue() >>>>>'."\n");
-
- global $conf, $pwg_conf, $g_refresh, $g_header, $g_message, $g_footer, $start_time;
-
- if (!isset($_SESSION['scan_step']) or $_SESSION['scan_step'] == 'exit')
- {
- // evident end of process
- $return = false;
- }
- else
- {
- if ($pwg_conf['safe_mode'] or $conf['force_refresh_method'])
- {
- // can not reset the time
- $time_elapsed = pwg_get_moment() - $start_time;
- if ($time_elapsed < $conf['max_execution_time'])
- {
- $return = true;
- }
- else
- {
- $start_time = $_SESSION['scan_time'];
- $formated_time = number_format(pwg_get_moment() - $start_time, 3, '.', ' ');
-
- $g_refresh = '<meta http-equiv="Refresh" content="'.$conf['refresh_delay'].'">'."\n";
- $g_header = ' : <span class="success">'.ucfirst($_SESSION['scan_action']).'</span>';
- $g_message = '';
- if ($_SESSION['scan_cnt_fold'] != 0)
- {
- $g_message .= '<code class="success">'.$_SESSION['scan_cnt_fold'].'</code> directories scanned<br />'."\n";
- }
- if ($_SESSION['scan_cnt_file'] != 0)
- {
- $g_message .= '<code class="success">'.$_SESSION['scan_cnt_file'].'</code> files scanned<br />'."\n";
- }
- $nb = count($_SESSION['scan_list_fold']);
- if ($nb > 0)
- {
- $g_message .= '<code class="warning">'.$nb.'</code> directories to scan<br />'."\n";
- }
- $nb = count($_SESSION['scan_list_file']);
- if ($nb > 0)
- {
- $g_message .= '<code class="warning">'.$nb.'</code> files to scan<br />'."\n";
- }
- $g_message .= ' <div style="{text-align: right;}">Time elapsed : <code>'.$formated_time.' s</code></div>';
- $g_footer = '<a href="'.$pwg_conf['this_url'].'?action='.$_SESSION['scan_action'].'" title="Continue"><img src="'.$pwg_conf['icon_dir'].'right.png" /></a>'."\n";
-
- $return = false;
- }
- }
- else
- {
- // reset the time
- set_time_limit(intval(ini_get('max_execution_time')));
- $return = true;
- }
- }
- //~ pwg_log('<<<<< pwg_continue() returns '.var_export($return, true).' <<<<<'."\n");
-
- return $return;
-}
-
-/**
- * This function :
- * -> Verify the script call
- * -> Lock the script
- * -> Open listing.xml if action is 'generate'
- * -> Initialize output and session variables
- *
- * @return nothing
- */
-function pwg_init()
-{
- //~ pwg_log('>>>>> pwg_init() >>>>>'."\n");
-
- global $g_message, $g_listing, $g_footer, $conf, $pwg_conf, $start_time;
- $init_message = '';
-
- // Lock other script sessions, this lock will be remove during 'exit' step
- if (!isset($_SESSION['scan_step']))
- {
- $fp = @fopen(__FILE__.'.lock', 'x+'); // return false if __FILE__.lock exists or if cannot create
- if ($fp == false)
- {
- $g_header = $_SESSION['scan_action'];
- $g_message = ' <code class="failure">Failure -</code> Another script is running';
- $g_message .= ' <img src="'.$pwg_conf['icon_dir'].'add_tag.png" title="Delete file '.__FILE__.'.lock and retry" />';
- $g_message .= "\n";
- $g_footer = '<a href="'.$pwg_conf['this_url'].'" title="Main menu"><img src="'.$pwg_conf['icon_dir'].'up.png" /></a>'."\n";
- $_SESSION['scan_step'] = 'exit';
- //~ pwg_log('<<<<< pwg_init() failure <<<<<'."\n");
- return;
- }
- else
- {
- fwrite($fp, session_id()); // Writing session_id to trace lock
- fclose($fp);
- $_SESSION['scan_step'] = 'init';
- }
- }
-
- // Verify and backup parameter action. This backup will be removed during step 'exit'
- if (isset($_REQUEST['action']))
- {
- if (in_array($_REQUEST['action'], $pwg_conf['scan_action']))
- {
- if (isset($_SESSION['scan_action']))
- {
- if ($_SESSION['scan_action'] != $_REQUEST['action'])
- {
- // Fatal error
- $g_message = ' <code class="failure">Failure -</code> Parameter <code>action</code> differs between url and session';
- $g_message .= "\n";
- $g_footer = '<a href="'.$pwg_conf['this_url'].'" title="Main menu"><img src="'.$pwg_conf['icon_dir'].'up.png" /></a>'."\n";
- $_SESSION['scan_step'] = 'exit';
- //~ pwg_log('<<<<< pwg_init() failure <<<<<'."\n");
- return;
- }
- }
- else
- {
- $_SESSION['scan_action'] = $_REQUEST['action'];
- }
- }
- else
- {
- // Fatal error
- $g_message = ' <code class="failure">Failure -</code> Problem with <code>action</code> parameter';
- $g_message .= ' <img src="'.$pwg_conf['icon_dir'].'add_tag.png" title="empty, '.implode(', ', $pwg_conf['scan_action']).'" />';
- $g_message .= "\n";
- $g_footer = '<a href="'.$pwg_conf['this_url'].'" title="Main menu"><img src="'.$pwg_conf['icon_dir'].'up.png" /></a>'."\n";
- $_SESSION['scan_step'] = 'exit';
- //~ pwg_log('<<<<< pwg_init() failure <<<<<'."\n");
- return;
- }
- }
- else
- {
- // Here we are on welcome page
- $g_message = ' <ul>'."\n";
- $g_message .= ' <li><a href="'.$pwg_conf['this_url'].'?action=test" title="Display/Compare script version">Test</a></li>'."\n";
- $g_message .= ' <li><a href="'.$pwg_conf['this_url'].'?action=clean" title="Delete listing.xml if exists">Clean</a></li>'."\n";
- $g_message .= ' <li><a href="'.$pwg_conf['this_url'].'?action=generate" title="Scan all images from this directory and write informations in listing.xml">Listing</a></li>'."\n";
- $g_message .= ' </ul>'."\n";
- $g_footer = '<a href="'.$conf['gallery'].'/admin.php?page=site_manager" title="Main gallery :: site manager">';
- $g_footer .= '<img src="'.$pwg_conf['icon_dir'].'home.png" /></a>'."\n";
- $_SESSION['scan_step'] = 'exit';
- $_SESSION['scan_action'] = '';
- }
-
- // Actions to do at the init of generate
- if ($_SESSION['scan_action'] == 'generate')
- {
- // Open XML file
- $mode = ($_SESSION['scan_step'] == 'init') ? 'w' : 'a'; // Erase old listing.xml at the beginning of generation (mode w)
- $g_listing = @fopen('listing.xml', $mode);
- if ($g_listing === false)
- {
- $g_header = $_SESSION['scan_action'];
- $g_message = ' <code class="failure">Failure -</code> Can not write file <code>listing.xml</code>';
- $g_message .= "\n";
- $g_footer = '<a href="'.$pwg_conf['this_url'].'" title="Main menu"><img src="'.$pwg_conf['icon_dir'].'up.png" /></a>'."\n";
- $_SESSION['scan_step'] = 'exit';
- //~ pwg_log('<<<<< pwg_init() failure <<<<<'."\n");
- return;
- }
-
- // Check graphical capabilities
- $init_message = pwg_check_graphics();
- }
-
- // Initializing session counters. This counters will be completely unset during step 'exit'
- if ($_SESSION['scan_step'] == 'init')
- {
- $_SESSION['scan_list_file'] = array();
- $_SESSION['scan_list_fold'] = array();
- $_SESSION['scan_cnt_file'] = 0;
- $_SESSION['scan_cnt_fold'] = 0;
- $_SESSION['scan_time'] = $start_time;
- $_SESSION['scan_step'] = 'start';
- $_SESSION['scan_logs'] = $init_message;
- }
-
- //~ pwg_log('<<<<< pwg_init() success <<<<<'."\n");
-}
-
-/**
- * This function :
- * -> Close listing.xml if action is 'generate'
- * -> Unlock the script
- * -> Erase session variables
- *
- * @return nothing
- */
-function pwg_exit()
-{
- //~ pwg_log('>>>>> pwg_exit() >>>>>'."\n");
-
- global $g_listing;
-
- // Close XML file
- if ($_SESSION['scan_action'] == 'generate' and $g_listing != false)
- {
- fclose($g_listing);
- }
-
- // Unlock script
- unlink(__FILE__.'.lock');
-
- // Erase session counters
- unset($_SESSION['scan_list_file']);
- unset($_SESSION['scan_list_fold']);
- unset($_SESSION['scan_cnt_file']);
- unset($_SESSION['scan_cnt_fold']);
- unset($_SESSION['scan_time']);
- unset($_SESSION['scan_step']);
- $local_action = $_SESSION['scan_action'];
- unset($_SESSION['scan_action']);
- unset($_SESSION['scan_logs']);
- session_destroy();
-
- // Call specific action post process
- if (is_callable('pwg_'.$local_action.'_exit'))
- {
- call_user_func('pwg_'.$local_action.'_exit');
- }
-
- //~ pwg_log('<<<<< pwg_exit() <<<<<'."\n");
-}
-
-// +-----------------------------------------------------------------------+
-// | Script |
-// +-----------------------------------------------------------------------+
-session_save_path('.');
-session_start();
-
-$start_time = pwg_get_moment();
-
-// Initializing message for web page
-$g_refresh = '';
-$g_header = '';
-$g_message = '';
-$g_footer = '';
-$g_listing = '';
-
-pwg_init();
-
-while(pwg_continue())
-{
- if (is_callable('pwg_'.$_SESSION['scan_action'].'_'.$_SESSION['scan_step']))
- {
- call_user_func('pwg_'.$_SESSION['scan_action'].'_'.$_SESSION['scan_step']); // Run the step : start, list, scan, stop are available
- }
- else
- {
- $g_header = $_SESSION['scan_action'];
- $g_message = ' <code class="failure">Failure -</code> INTERNAL STEP ERROR : <code>pwg_'.$_SESSION['scan_action'].'_'.$_SESSION['scan_step'].'()</code> undefined';
- $g_message .= "\n";
- $g_footer = '<a href="'.$pwg_conf['this_url'].'" title="Main menu"><img src="'.$pwg_conf['icon_dir'].'up.png" /></a>'."\n";
- $_SESSION['scan_step'] = 'exit';
- }
-}
-
-if ($_SESSION['scan_step'] == 'exit')
-{
- pwg_exit();
-}
-
-?>
-<html>
- <head>
- <?php echo $g_refresh; ?>
- <title>Manage remote gallery</title>
- </head>
- <style type="text/css">
- code {font-weight: bold}
- img {border-style: none; vertical-align: middle}
- ul {list-style-image: url(<?php echo $pwg_conf['icon_dir']; ?>add_tag.png)}
- .success {color: green}
- .warning {color: orange}
- .failure {color: red}
- .header {text-align: center; font-variant: small-caps; font-weight: bold;}
- .p {color: #F93;}
- .w {color: #ccc;}
- .g {color: #69C;}
- .pwg {text-decoration: none; border-bottom-style: dotted; border-bottom-width: 1px;}
- .content {width: 75%; position: absolute; top: 10%; left: 12%;}
- .footer {text-align: right;}
- .pwg_block {float: left;}
- </style>
- <body>
- <div class="content">
- <fieldset class="header">
- <span class="p">Pi</span>
- <span class="w">wi</span>
- <span class="g">go</span>
- &nbsp;remote site<? echo $g_header; ?>
- </fieldset>
- <fieldset>
-<?php echo $g_message; ?>
- </fieldset>
- <fieldset class="footer">
- <div class="pwg_block">
- Powered by <a href="http://piwigo.org" class="pwg"><span class="p">Pi</span><span class="w">wi</span><span class="g">go</span></a>
- </div>
- <?php echo $g_footer; ?>
- </fieldset>
- </div>
- </body>
-</html>
diff --git a/BSF/tools/create_listing_file_local.inc.php b/BSF/tools/create_listing_file_local.inc.php
deleted file mode 100644
index 8d914cf88..000000000
--- a/BSF/tools/create_listing_file_local.inc.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-// this file is provided as an example.
-// Move it to "create_listing_file.php"
-// directory if you want to modify default configuration.
-
-// URL of main gallery
-// Example : http://www.my.domain/my/directory
-$conf['gallery'] = 'http://demo.piwigo.net/';
-
-$conf['file_ext'] = array_merge($conf['file_ext'], array('flv', 'FLV'));
-
-$conf['force_refresh_method'] = true;
-
-?> \ No newline at end of file
diff --git a/BSF/tools/fill_history.pl b/BSF/tools/fill_history.pl
deleted file mode 100644
index 01adacfd2..000000000
--- a/BSF/tools/fill_history.pl
+++ /dev/null
@@ -1,336 +0,0 @@
-#!/usr/bin/perl
-
-use warnings;
-use strict;
-use Getopt::Long;
-use DBI;
-use File::Basename;
-use Time::Local;
-use List::Util qw/shuffle min/;
-
-my %opt;
-GetOptions(
- \%opt,
- qw/dbname=s dbuser=s dbpass=s prefix=s
- total=i start_date=s end_date=s
- help/
- );
-
-if (defined($opt{help}))
-{
- print <<FIN;
-
-Fill the user comments table of Piwigo.
-
-Usage: pwg_fill_comments.pl --dbname=<database_name>
- --dbuser=<username>
- --dbpass=<password>
- --tagfile=<tags filename>
- [--prefix=<tables prefix>]
- [--help]
-
---dbname, --dbuser and --dbpass are connexion parameters.
-
---tagfile
-
---prefix : determines the prefix for your table names.
-
---help : show this help
-
-FIN
-
- exit(0);
-}
-
-my $usage = "\n\n".basename($0)." --help for help\n\n";
-
-foreach my $option (qw/dbname dbuser dbpass start_date end_date/) {
- if (not exists $opt{$option}) {
- die 'Error: '.$option.' is a mandatory option', $usage;
- }
-}
-
-$opt{prefix} = 'piwigo_' if (not defined $opt{prefix});
-my $dbh = DBI->connect(
- 'DBI:mysql:'.$opt{dbname},
- $opt{dbuser},
- $opt{dbpass}
-);
-
-my $query;
-my $sth;
-
-
-# retrieve all available users
-$query = '
-SELECT id
- FROM '.$opt{prefix}.'users
-';
-my @user_ids = keys %{ $dbh->selectall_hashref($query, 'id') };
-
-# set a list of IP addresses for each users
-my %user_IPs = ();
-foreach my $user_id (@user_ids) {
- for (1 .. 1 + int rand 5) {
- push(
- @{ $user_IPs{$user_id} },
- join(
- '.',
- map {1 + int rand 255} 1..4
- )
- );
- }
-}
-
-# use Data::Dumper; print Dumper(\%user_IPs); exit();
-
-# start and end dates
-my ($year,$month,$day,$hour,$min,$sec)
- = ($opt{start_date} =~ m/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/);
-my $start_unixtime = timelocal(0,0,0,$day,$month-1,$year);
-
-($year,$month,$day,$hour,$min,$sec)
- = ($opt{end_date} =~ m/(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})/);
-my $end_unixtime = timelocal(0,0,0,$day,$month-1,$year);
-
-# "tags from image" and "images from tag"
-$query = '
-SELECT image_id, tag_id
- FROM '.$opt{prefix}.'image_tag
-';
-my %image_tags = ();
-my %tag_images = ();
-my %related_tag_of = ();
-my @tags = ();
-$sth = $dbh->prepare($query);
-$sth->execute();
-while (my $row = $sth->fetchrow_hashref()) {
- push(
- @{$image_tags{$row->{image_id}}},
- $row->{tag_id}
- );
-
- push(
- @{$tag_images{$row->{tag_id}}},
- $row->{image_id}
- );
-
- push (
- @tags,
- $row->{tag_id}
- );
-}
-
-# foreach my $tag_id (keys %tag_images) {
-# printf(
-# "tag %5u: %5u images\n",
-# $tag_id,
-# scalar @{$tag_images{$tag_id}}
-# );
-# }
-# exit();
-
-# use Data::Dumper; print Dumper(\%tag_images); exit();
-
-# categories from image_id
-$query = '
-SELECT image_id, category_id
- FROM '.$opt{prefix}.'image_category
-';
-my %image_categories = ();
-my %category_images =();
-my %categories = ();
-$sth = $dbh->prepare($query);
-$sth->execute();
-while (my $row = $sth->fetchrow_hashref()) {
- push(
- @{$image_categories{$row->{image_id}}},
- $row->{category_id}
- );
-
- push(
- @{$category_images{$row->{category_id}}},
- $row->{image_id}
- );
-
- $categories{ $row->{category_id} }++;
-}
-
-my @images = keys %image_categories;
-my @categories = keys %categories;
-
-# use Data::Dumper;
-# print Dumper(\%image_categories);
-
-my @sections = (
- 'categories',
-# 'tags',
-# 'search',
-# 'list',
-# 'favorites',
-# 'most_visited',
-# 'best_rated',
-# 'recent_pics',
-# 'recent_cats',
-);
-
-my @inserts = ();
-
-USER : foreach my $user_id (@user_ids) {
- print 'user_id: ', $user_id, "\n";
-
- my $current_unixtime = $start_unixtime;
- my @IPs = @{ $user_IPs{$user_id} };
-
- VISIT : foreach my $visit_num (1..100_000) {
- print 'visit: ', $visit_num, "\n";
- my @temp_inserts = ();
- my $IP = (@IPs)[int rand @IPs];
- my $current_page = 0;
- my $visit_size = 10 + int rand 90;
- $current_unixtime+= 86_400 + int rand(86_400 * 30);
-
- my $section = $sections[int rand scalar @sections];
- # print 'section: ', $section, "\n";
-
- push(
- @temp_inserts,
- {
- section => $section,
- }
- );
-
- if ($section eq 'categories') {
- CATEGORY : foreach my $category_id (
- (shuffle @categories)[1..int rand scalar @categories]
- ) {
- # print 'category: ', $category_id, "\n";
- push(
- @temp_inserts,
- {
- category_id => $category_id,
- }
- );
-
- my @images = @{$category_images{$category_id}};
- IMAGE : foreach my $image_id (
- (shuffle @images)[1..min(10, scalar @images)]
- ) {
- push(
- @temp_inserts,
- {
- category_id => $category_id,
- image_id => $image_id,
- }
- );
- }
- }
- }
-
- if ($section eq 'tags') {
- # TODO
- }
-
- # transfert @temp_inserts to @inserts
- print 'temp_insert size: ', scalar @temp_inserts, "\n";
- foreach my $temp_insert (@temp_inserts) {
- $current_unixtime+= 5 + int rand 25;
- next VISIT if ++$current_page == $visit_size;
- last VISIT if $current_unixtime >= $end_unixtime;
-
- my $date = unixtime_to_mysqldate($current_unixtime);
- my $time = unixtime_to_mysqltime($current_unixtime);
-
- my ($year, $month, $day) = split '-', $date;
- my ($hour) = split ':', $time;
-
- $temp_insert->{date} = $date;
- $temp_insert->{time} = $time;
- $temp_insert->{year} = $year;
- $temp_insert->{month} = $month;
- $temp_insert->{day} = $day;
- $temp_insert->{hour} = $hour;
- $temp_insert->{IP} = $IP;
- $temp_insert->{section} = $section;
- $temp_insert->{user_id} = $user_id;
-
- push(@inserts, $temp_insert);
- }
- }
-}
-
-@inserts = sort {
- $a->{date} cmp $b->{date}
- or $a->{time} cmp $b->{time}
-} @inserts;
-
-if (scalar @inserts) {
- my @columns =
- qw/
- date time year month day hour
- user_id IP
- section category_id image_id
- /;
-
- my $question_marks_string = '(';
- $question_marks_string.= join(
- ',',
- map {'?'} @columns
- );
- $question_marks_string.= ')';
-
- my $query = '
-INSERT INTO '.$opt{prefix}.'history
- ('.join(', ', @columns).')
- VALUES
-';
- $query.= join(
- ',',
- map {$question_marks_string} (1 .. scalar @inserts)
- );
- $query.= '
-';
-
- # print $query, "\n";
-
- my @values = ();
-
- foreach my $insert (@inserts) {
- push(
- @values,
- map {
- $insert->{$_}
- } @columns
- );
- }
-
- $sth = $dbh->prepare($query);
- $sth->execute(@values)
- or die 'cannot execute insert query';
-}
-
-sub unixtime_to_mysqldate {
- my ($unixtime) = @_;
-
- ($sec,$min,$hour,$day,$month,$year) = localtime($unixtime);
-
- return sprintf(
- '%d-%02d-%02d',
- $year+1900,
- $month+1,
- $day,
- );
-}
-
-sub unixtime_to_mysqltime {
- my ($unixtime) = @_;
-
- ($sec,$min,$hour,$day,$month,$year) = localtime($unixtime);
-
- return sprintf(
- '%d:%d:%d',
- $hour,
- $min,
- $sec
- );
-}
diff --git a/BSF/tools/index.php b/BSF/tools/index.php
deleted file mode 100644
index c15b15795..000000000
--- a/BSF/tools/index.php
+++ /dev/null
@@ -1,30 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-// Recursive call
-$url = '../';
-header( 'Request-URI: '.$url );
-header( 'Content-Location: '.$url );
-header( 'Location: '.$url );
-exit();
-?>
diff --git a/BSF/tools/local-layout.css b/BSF/tools/local-layout.css
deleted file mode 100644
index 3017c7a06..000000000
--- a/BSF/tools/local-layout.css
+++ /dev/null
@@ -1,10 +0,0 @@
-/* Add background picture */
-BODY {
- background-image:url(background.gif);
- background-attachment:fixed;
-}
-
-.content UL.thumbnails SPAN.wrap2 {
- height: 200px; /* max thumbnail height + 2px */
-}
-
diff --git a/BSF/tools/metadata.php b/BSF/tools/metadata.php
deleted file mode 100644
index 871b32986..000000000
--- a/BSF/tools/metadata.php
+++ /dev/null
@@ -1,97 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-$filename = 'sample.jpg';
-echo 'Informations are read from '.$filename.'<br /><br /><br />';
-
-/**
- * return a cleaned IPTC value
- *
- * @param string value
- * @return string
- */
-function clean_iptc_value($value)
-{
- // strip leading zeros (weird Kodak Scanner software)
- while ( isset($value[0]) and $value[0] == chr(0))
- {
- $value = substr($value, 1);
- }
- // remove binary nulls
- $value = str_replace(chr(0x00), ' ', $value);
-
- return $value;
-}
-
-$iptc_result = array();
-$imginfo = array();
-getimagesize($filename, $imginfo);
-if (isset($imginfo['APP13']))
-{
- $iptc = iptcparse($imginfo['APP13']);
- if (is_array($iptc))
- {
- foreach (array_keys($iptc) as $iptc_key)
- {
- if (isset($iptc[$iptc_key][0]))
- {
- if ($iptc_key == '2#025')
- {
- $value = implode(
- ',',
- array_map(
- 'clean_iptc_value',
- $iptc[$iptc_key]
- )
- );
- }
- else
- {
- $value = clean_iptc_value($iptc[$iptc_key][0]);
- }
-
- $iptc_result[$iptc_key] = $value;
- }
- }
- }
-
- echo 'IPTC Fields in '.$filename.'<br />';
- $keys = array_keys($iptc_result);
- sort($keys);
- foreach ($keys as $key)
- {
- echo '<br />'.$key.' = '.$iptc_result[$key];
- }
-}
-else
-{
- echo 'no IPTC information';
-}
-
-echo '<br /><br /><br />';
-echo 'EXIF Fields in '.$filename.'<br />';
-$exif = read_exif_data($filename);
-echo '<pre>';
-print_r($exif);
-echo '</pre>';
-?> \ No newline at end of file
diff --git a/BSF/tools/prototype.js b/BSF/tools/prototype.js
deleted file mode 100644
index c5a9ccc05..000000000
--- a/BSF/tools/prototype.js
+++ /dev/null
@@ -1,3277 +0,0 @@
-/* Prototype JavaScript framework, version 1.5.1.1
- * (c) 2005-2007 Sam Stephenson
- *
- * Prototype is freely distributable under the terms of an MIT-style license.
- * For details, see the Prototype web site: http://www.prototypejs.org/
- *
-/*--------------------------------------------------------------------------*/
-
-var Prototype = {
- Version: '1.5.1.1',
-
- Browser: {
- IE: !!(window.attachEvent && !window.opera),
- Opera: !!window.opera,
- WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
- Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1
- },
-
- BrowserFeatures: {
- XPath: !!document.evaluate,
- ElementExtensions: !!window.HTMLElement,
- SpecificElementExtensions:
- (document.createElement('div').__proto__ !==
- document.createElement('form').__proto__)
- },
-
- ScriptFragment: '<script[^>]*>([\\S\\s]*?)<\/script>',
- JSONFilter: /^\/\*-secure-([\s\S]*)\*\/\s*$/,
-
- emptyFunction: function() { },
- K: function(x) { return x }
-}
-
-var Class = {
- create: function() {
- return function() {
- this.initialize.apply(this, arguments);
- }
- }
-}
-
-var Abstract = new Object();
-
-Object.extend = function(destination, source) {
- for (var property in source) {
- destination[property] = source[property];
- }
- return destination;
-}
-
-Object.extend(Object, {
- inspect: function(object) {
- try {
- if (object === undefined) return 'undefined';
- if (object === null) return 'null';
- return object.inspect ? object.inspect() : object.toString();
- } catch (e) {
- if (e instanceof RangeError) return '...';
- throw e;
- }
- },
-
- toJSON: function(object) {
- var type = typeof object;
- switch(type) {
- case 'undefined':
- case 'function':
- case 'unknown': return;
- case 'boolean': return object.toString();
- }
- if (object === null) return 'null';
- if (object.toJSON) return object.toJSON();
- if (object.ownerDocument === document) return;
- var results = [];
- for (var property in object) {
- var value = Object.toJSON(object[property]);
- if (value !== undefined)
- results.push(property.toJSON() + ': ' + value);
- }
- return '{' + results.join(', ') + '}';
- },
-
- keys: function(object) {
- var keys = [];
- for (var property in object)
- keys.push(property);
- return keys;
- },
-
- values: function(object) {
- var values = [];
- for (var property in object)
- values.push(object[property]);
- return values;
- },
-
- clone: function(object) {
- return Object.extend({}, object);
- }
-});
-
-Function.prototype.bind = function() {
- var __method = this, args = $A(arguments), object = args.shift();
- return function() {
- return __method.apply(object, args.concat($A(arguments)));
- }
-}
-
-Function.prototype.bindAsEventListener = function(object) {
- var __method = this, args = $A(arguments), object = args.shift();
- return function(event) {
- return __method.apply(object, [event || window.event].concat(args));
- }
-}
-
-Object.extend(Number.prototype, {
- toColorPart: function() {
- return this.toPaddedString(2, 16);
- },
-
- succ: function() {
- return this + 1;
- },
-
- times: function(iterator) {
- $R(0, this, true).each(iterator);
- return this;
- },
-
- toPaddedString: function(length, radix) {
- var string = this.toString(radix || 10);
- return '0'.times(length - string.length) + string;
- },
-
- toJSON: function() {
- return isFinite(this) ? this.toString() : 'null';
- }
-});
-
-Date.prototype.toJSON = function() {
- return '"' + this.getFullYear() + '-' +
- (this.getMonth() + 1).toPaddedString(2) + '-' +
- this.getDate().toPaddedString(2) + 'T' +
- this.getHours().toPaddedString(2) + ':' +
- this.getMinutes().toPaddedString(2) + ':' +
- this.getSeconds().toPaddedString(2) + '"';
-};
-
-var Try = {
- these: function() {
- var returnValue;
-
- for (var i = 0, length = arguments.length; i < length; i++) {
- var lambda = arguments[i];
- try {
- returnValue = lambda();
- break;
- } catch (e) {}
- }
-
- return returnValue;
- }
-}
-
-/*--------------------------------------------------------------------------*/
-
-var PeriodicalExecuter = Class.create();
-PeriodicalExecuter.prototype = {
- initialize: function(callback, frequency) {
- this.callback = callback;
- this.frequency = frequency;
- this.currentlyExecuting = false;
-
- this.registerCallback();
- },
-
- registerCallback: function() {
- this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
- },
-
- stop: function() {
- if (!this.timer) return;
- clearInterval(this.timer);
- this.timer = null;
- },
-
- onTimerEvent: function() {
- if (!this.currentlyExecuting) {
- try {
- this.currentlyExecuting = true;
- this.callback(this);
- } finally {
- this.currentlyExecuting = false;
- }
- }
- }
-}
-Object.extend(String, {
- interpret: function(value) {
- return value == null ? '' : String(value);
- },
- specialChar: {
- '\b': '\\b',
- '\t': '\\t',
- '\n': '\\n',
- '\f': '\\f',
- '\r': '\\r',
- '\\': '\\\\'
- }
-});
-
-Object.extend(String.prototype, {
- gsub: function(pattern, replacement) {
- var result = '', source = this, match;
- replacement = arguments.callee.prepareReplacement(replacement);
-
- while (source.length > 0) {
- if (match = source.match(pattern)) {
- result += source.slice(0, match.index);
- result += String.interpret(replacement(match));
- source = source.slice(match.index + match[0].length);
- } else {
- result += source, source = '';
- }
- }
- return result;
- },
-
- sub: function(pattern, replacement, count) {
- replacement = this.gsub.prepareReplacement(replacement);
- count = count === undefined ? 1 : count;
-
- return this.gsub(pattern, function(match) {
- if (--count < 0) return match[0];
- return replacement(match);
- });
- },
-
- scan: function(pattern, iterator) {
- this.gsub(pattern, iterator);
- return this;
- },
-
- truncate: function(length, truncation) {
- length = length || 30;
- truncation = truncation === undefined ? '...' : truncation;
- return this.length > length ?
- this.slice(0, length - truncation.length) + truncation : this;
- },
-
- strip: function() {
- return this.replace(/^\s+/, '').replace(/\s+$/, '');
- },
-
- stripTags: function() {
- return this.replace(/<\/?[^>]+>/gi, '');
- },
-
- stripScripts: function() {
- return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');
- },
-
- extractScripts: function() {
- var matchAll = new RegExp(Prototype.ScriptFragment, 'img');
- var matchOne = new RegExp(Prototype.ScriptFragment, 'im');
- return (this.match(matchAll) || []).map(function(scriptTag) {
- return (scriptTag.match(matchOne) || ['', ''])[1];
- });
- },
-
- evalScripts: function() {
- return this.extractScripts().map(function(script) { return eval(script) });
- },
-
- escapeHTML: function() {
- var self = arguments.callee;
- self.text.data = this;
- return self.div.innerHTML;
- },
-
- unescapeHTML: function() {
- var div = document.createElement('div');
- div.innerHTML = this.stripTags();
- return div.childNodes[0] ? (div.childNodes.length > 1 ?
- $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :
- div.childNodes[0].nodeValue) : '';
- },
-
- toQueryParams: function(separator) {
- var match = this.strip().match(/([^?#]*)(#.*)?$/);
- if (!match) return {};
-
- return match[1].split(separator || '&').inject({}, function(hash, pair) {
- if ((pair = pair.split('='))[0]) {
- var key = decodeURIComponent(pair.shift());
- var value = pair.length > 1 ? pair.join('=') : pair[0];
- if (value != undefined) value = decodeURIComponent(value);
-
- if (key in hash) {
- if (hash[key].constructor != Array) hash[key] = [hash[key]];
- hash[key].push(value);
- }
- else hash[key] = value;
- }
- return hash;
- });
- },
-
- toArray: function() {
- return this.split('');
- },
-
- succ: function() {
- return this.slice(0, this.length - 1) +
- String.fromCharCode(this.charCodeAt(this.length - 1) + 1);
- },
-
- times: function(count) {
- var result = '';
- for (var i = 0; i < count; i++) result += this;
- return result;
- },
-
- camelize: function() {
- var parts = this.split('-'), len = parts.length;
- if (len == 1) return parts[0];
-
- var camelized = this.charAt(0) == '-'
- ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)
- : parts[0];
-
- for (var i = 1; i < len; i++)
- camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);
-
- return camelized;
- },
-
- capitalize: function() {
- return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();
- },
-
- underscore: function() {
- return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();
- },
-
- dasherize: function() {
- return this.gsub(/_/,'-');
- },
-
- inspect: function(useDoubleQuotes) {
- var escapedString = this.gsub(/[\x00-\x1f\\]/, function(match) {
- var character = String.specialChar[match[0]];
- return character ? character : '\\u00' + match[0].charCodeAt().toPaddedString(2, 16);
- });
- if (useDoubleQuotes) return '"' + escapedString.replace(/"/g, '\\"') + '"';
- return "'" + escapedString.replace(/'/g, '\\\'') + "'";
- },
-
- toJSON: function() {
- return this.inspect(true);
- },
-
- unfilterJSON: function(filter) {
- return this.sub(filter || Prototype.JSONFilter, '#{1}');
- },
-
- isJSON: function() {
- var str = this.replace(/\\./g, '@').replace(/"[^"\\\n\r]*"/g, '');
- return (/^[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]*$/).test(str);
- },
-
- evalJSON: function(sanitize) {
- var json = this.unfilterJSON();
- try {
- if (!sanitize || json.isJSON()) return eval('(' + json + ')');
- } catch (e) { }
- throw new SyntaxError('Badly formed JSON string: ' + this.inspect());
- },
-
- include: function(pattern) {
- return this.indexOf(pattern) > -1;
- },
-
- startsWith: function(pattern) {
- return this.indexOf(pattern) === 0;
- },
-
- endsWith: function(pattern) {
- var d = this.length - pattern.length;
- return d >= 0 && this.lastIndexOf(pattern) === d;
- },
-
- empty: function() {
- return this == '';
- },
-
- blank: function() {
- return /^\s*$/.test(this);
- }
-});
-
-if (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, {
- escapeHTML: function() {
- return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
- },
- unescapeHTML: function() {
- return this.replace(/&amp;/g,'&').replace(/&lt;/g,'<').replace(/&gt;/g,'>');
- }
-});
-
-String.prototype.gsub.prepareReplacement = function(replacement) {
- if (typeof replacement == 'function') return replacement;
- var template = new Template(replacement);
- return function(match) { return template.evaluate(match) };
-}
-
-String.prototype.parseQuery = String.prototype.toQueryParams;
-
-Object.extend(String.prototype.escapeHTML, {
- div: document.createElement('div'),
- text: document.createTextNode('')
-});
-
-with (String.prototype.escapeHTML) div.appendChild(text);
-
-var Template = Class.create();
-Template.Pattern = /(^|.|\r|\n)(#\{(.*?)\})/;
-Template.prototype = {
- initialize: function(template, pattern) {
- this.template = template.toString();
- this.pattern = pattern || Template.Pattern;
- },
-
- evaluate: function(object) {
- return this.template.gsub(this.pattern, function(match) {
- var before = match[1];
- if (before == '\\') return match[2];
- return before + String.interpret(object[match[3]]);
- });
- }
-}
-
-var $break = {}, $continue = new Error('"throw $continue" is deprecated, use "return" instead');
-
-var Enumerable = {
- each: function(iterator) {
- var index = 0;
- try {
- this._each(function(value) {
- iterator(value, index++);
- });
- } catch (e) {
- if (e != $break) throw e;
- }
- return this;
- },
-
- eachSlice: function(number, iterator) {
- var index = -number, slices = [], array = this.toArray();
- while ((index += number) < array.length)
- slices.push(array.slice(index, index+number));
- return slices.map(iterator);
- },
-
- all: function(iterator) {
- var result = true;
- this.each(function(value, index) {
- result = result && !!(iterator || Prototype.K)(value, index);
- if (!result) throw $break;
- });
- return result;
- },
-
- any: function(iterator) {
- var result = false;
- this.each(function(value, index) {
- if (result = !!(iterator || Prototype.K)(value, index))
- throw $break;
- });
- return result;
- },
-
- collect: function(iterator) {
- var results = [];
- this.each(function(value, index) {
- results.push((iterator || Prototype.K)(value, index));
- });
- return results;
- },
-
- detect: function(iterator) {
- var result;
- this.each(function(value, index) {
- if (iterator(value, index)) {
- result = value;
- throw $break;
- }
- });
- return result;
- },
-
- findAll: function(iterator) {
- var results = [];
- this.each(function(value, index) {
- if (iterator(value, index))
- results.push(value);
- });
- return results;
- },
-
- grep: function(pattern, iterator) {
- var results = [];
- this.each(function(value, index) {
- var stringValue = value.toString();
- if (stringValue.match(pattern))
- results.push((iterator || Prototype.K)(value, index));
- })
- return results;
- },
-
- include: function(object) {
- var found = false;
- this.each(function(value) {
- if (value == object) {
- found = true;
- throw $break;
- }
- });
- return found;
- },
-
- inGroupsOf: function(number, fillWith) {
- fillWith = fillWith === undefined ? null : fillWith;
- return this.eachSlice(number, function(slice) {
- while(slice.length < number) slice.push(fillWith);
- return slice;
- });
- },
-
- inject: function(memo, iterator) {
- this.each(function(value, index) {
- memo = iterator(memo, value, index);
- });
- return memo;
- },
-
- invoke: function(method) {
- var args = $A(arguments).slice(1);
- return this.map(function(value) {
- return value[method].apply(value, args);
- });
- },
-
- max: function(iterator) {
- var result;
- this.each(function(value, index) {
- value = (iterator || Prototype.K)(value, index);
- if (result == undefined || value >= result)
- result = value;
- });
- return result;
- },
-
- min: function(iterator) {
- var result;
- this.each(function(value, index) {
- value = (iterator || Prototype.K)(value, index);
- if (result == undefined || value < result)
- result = value;
- });
- return result;
- },
-
- partition: function(iterator) {
- var trues = [], falses = [];
- this.each(function(value, index) {
- ((iterator || Prototype.K)(value, index) ?
- trues : falses).push(value);
- });
- return [trues, falses];
- },
-
- pluck: function(property) {
- var results = [];
- this.each(function(value, index) {
- results.push(value[property]);
- });
- return results;
- },
-
- reject: function(iterator) {
- var results = [];
- this.each(function(value, index) {
- if (!iterator(value, index))
- results.push(value);
- });
- return results;
- },
-
- sortBy: function(iterator) {
- return this.map(function(value, index) {
- return {value: value, criteria: iterator(value, index)};
- }).sort(function(left, right) {
- var a = left.criteria, b = right.criteria;
- return a < b ? -1 : a > b ? 1 : 0;
- }).pluck('value');
- },
-
- toArray: function() {
- return this.map();
- },
-
- zip: function() {
- var iterator = Prototype.K, args = $A(arguments);
- if (typeof args.last() == 'function')
- iterator = args.pop();
-
- var collections = [this].concat(args).map($A);
- return this.map(function(value, index) {
- return iterator(collections.pluck(index));
- });
- },
-
- size: function() {
- return this.toArray().length;
- },
-
- inspect: function() {
- return '#<Enumerable:' + this.toArray().inspect() + '>';
- }
-}
-
-Object.extend(Enumerable, {
- map: Enumerable.collect,
- find: Enumerable.detect,
- select: Enumerable.findAll,
- member: Enumerable.include,
- entries: Enumerable.toArray
-});
-var $A = Array.from = function(iterable) {
- if (!iterable) return [];
- if (iterable.toArray) {
- return iterable.toArray();
- } else {
- var results = [];
- for (var i = 0, length = iterable.length; i < length; i++)
- results.push(iterable[i]);
- return results;
- }
-}
-
-if (Prototype.Browser.WebKit) {
- $A = Array.from = function(iterable) {
- if (!iterable) return [];
- if (!(typeof iterable == 'function' && iterable == '[object NodeList]') &&
- iterable.toArray) {
- return iterable.toArray();
- } else {
- var results = [];
- for (var i = 0, length = iterable.length; i < length; i++)
- results.push(iterable[i]);
- return results;
- }
- }
-}
-
-Object.extend(Array.prototype, Enumerable);
-
-if (!Array.prototype._reverse)
- Array.prototype._reverse = Array.prototype.reverse;
-
-Object.extend(Array.prototype, {
- _each: function(iterator) {
- for (var i = 0, length = this.length; i < length; i++)
- iterator(this[i]);
- },
-
- clear: function() {
- this.length = 0;
- return this;
- },
-
- first: function() {
- return this[0];
- },
-
- last: function() {
- return this[this.length - 1];
- },
-
- compact: function() {
- return this.select(function(value) {
- return value != null;
- });
- },
-
- flatten: function() {
- return this.inject([], function(array, value) {
- return array.concat(value && value.constructor == Array ?
- value.flatten() : [value]);
- });
- },
-
- without: function() {
- var values = $A(arguments);
- return this.select(function(value) {
- return !values.include(value);
- });
- },
-
- indexOf: function(object) {
- for (var i = 0, length = this.length; i < length; i++)
- if (this[i] == object) return i;
- return -1;
- },
-
- reverse: function(inline) {
- return (inline !== false ? this : this.toArray())._reverse();
- },
-
- reduce: function() {
- return this.length > 1 ? this : this[0];
- },
-
- uniq: function(sorted) {
- return this.inject([], function(array, value, index) {
- if (0 == index || (sorted ? array.last() != value : !array.include(value)))
- array.push(value);
- return array;
- });
- },
-
- clone: function() {
- return [].concat(this);
- },
-
- size: function() {
- return this.length;
- },
-
- inspect: function() {
- return '[' + this.map(Object.inspect).join(', ') + ']';
- },
-
- toJSON: function() {
- var results = [];
- this.each(function(object) {
- var value = Object.toJSON(object);
- if (value !== undefined) results.push(value);
- });
- return '[' + results.join(', ') + ']';
- }
-});
-
-Array.prototype.toArray = Array.prototype.clone;
-
-function $w(string) {
- string = string.strip();
- return string ? string.split(/\s+/) : [];
-}
-
-if (Prototype.Browser.Opera){
- Array.prototype.concat = function() {
- var array = [];
- for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);
- for (var i = 0, length = arguments.length; i < length; i++) {
- if (arguments[i].constructor == Array) {
- for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)
- array.push(arguments[i][j]);
- } else {
- array.push(arguments[i]);
- }
- }
- return array;
- }
-}
-var Hash = function(object) {
- if (object instanceof Hash) this.merge(object);
- else Object.extend(this, object || {});
-};
-
-Object.extend(Hash, {
- toQueryString: function(obj) {
- var parts = [];
- parts.add = arguments.callee.addPair;
-
- this.prototype._each.call(obj, function(pair) {
- if (!pair.key) return;
- var value = pair.value;
-
- if (value && typeof value == 'object') {
- if (value.constructor == Array) value.each(function(value) {
- parts.add(pair.key, value);
- });
- return;
- }
- parts.add(pair.key, value);
- });
-
- return parts.join('&');
- },
-
- toJSON: function(object) {
- var results = [];
- this.prototype._each.call(object, function(pair) {
- var value = Object.toJSON(pair.value);
- if (value !== undefined) results.push(pair.key.toJSON() + ': ' + value);
- });
- return '{' + results.join(', ') + '}';
- }
-});
-
-Hash.toQueryString.addPair = function(key, value, prefix) {
- key = encodeURIComponent(key);
- if (value === undefined) this.push(key);
- else this.push(key + '=' + (value == null ? '' : encodeURIComponent(value)));
-}
-
-Object.extend(Hash.prototype, Enumerable);
-Object.extend(Hash.prototype, {
- _each: function(iterator) {
- for (var key in this) {
- var value = this[key];
- if (value && value == Hash.prototype[key]) continue;
-
- var pair = [key, value];
- pair.key = key;
- pair.value = value;
- iterator(pair);
- }
- },
-
- keys: function() {
- return this.pluck('key');
- },
-
- values: function() {
- return this.pluck('value');
- },
-
- merge: function(hash) {
- return $H(hash).inject(this, function(mergedHash, pair) {
- mergedHash[pair.key] = pair.value;
- return mergedHash;
- });
- },
-
- remove: function() {
- var result;
- for(var i = 0, length = arguments.length; i < length; i++) {
- var value = this[arguments[i]];
- if (value !== undefined){
- if (result === undefined) result = value;
- else {
- if (result.constructor != Array) result = [result];
- result.push(value)
- }
- }
- delete this[arguments[i]];
- }
- return result;
- },
-
- toQueryString: function() {
- return Hash.toQueryString(this);
- },
-
- inspect: function() {
- return '#<Hash:{' + this.map(function(pair) {
- return pair.map(Object.inspect).join(': ');
- }).join(', ') + '}>';
- },
-
- toJSON: function() {
- return Hash.toJSON(this);
- }
-});
-
-function $H(object) {
- if (object instanceof Hash) return object;
- return new Hash(object);
-};
-
-// Safari iterates over shadowed properties
-if (function() {
- var i = 0, Test = function(value) { this.key = value };
- Test.prototype.key = 'foo';
- for (var property in new Test('bar')) i++;
- return i > 1;
-}()) Hash.prototype._each = function(iterator) {
- var cache = [];
- for (var key in this) {
- var value = this[key];
- if ((value && value == Hash.prototype[key]) || cache.include(key)) continue;
- cache.push(key);
- var pair = [key, value];
- pair.key = key;
- pair.value = value;
- iterator(pair);
- }
-};
-ObjectRange = Class.create();
-Object.extend(ObjectRange.prototype, Enumerable);
-Object.extend(ObjectRange.prototype, {
- initialize: function(start, end, exclusive) {
- this.start = start;
- this.end = end;
- this.exclusive = exclusive;
- },
-
- _each: function(iterator) {
- var value = this.start;
- while (this.include(value)) {
- iterator(value);
- value = value.succ();
- }
- },
-
- include: function(value) {
- if (value < this.start)
- return false;
- if (this.exclusive)
- return value < this.end;
- return value <= this.end;
- }
-});
-
-var $R = function(start, end, exclusive) {
- return new ObjectRange(start, end, exclusive);
-}
-
-var Ajax = {
- getTransport: function() {
- return Try.these(
- function() {return new XMLHttpRequest()},
- function() {return new ActiveXObject('Msxml2.XMLHTTP')},
- function() {return new ActiveXObject('Microsoft.XMLHTTP')}
- ) || false;
- },
-
- activeRequestCount: 0
-}
-
-Ajax.Responders = {
- responders: [],
-
- _each: function(iterator) {
- this.responders._each(iterator);
- },
-
- register: function(responder) {
- if (!this.include(responder))
- this.responders.push(responder);
- },
-
- unregister: function(responder) {
- this.responders = this.responders.without(responder);
- },
-
- dispatch: function(callback, request, transport, json) {
- this.each(function(responder) {
- if (typeof responder[callback] == 'function') {
- try {
- responder[callback].apply(responder, [request, transport, json]);
- } catch (e) {}
- }
- });
- }
-};
-
-Object.extend(Ajax.Responders, Enumerable);
-
-Ajax.Responders.register({
- onCreate: function() {
- Ajax.activeRequestCount++;
- },
- onComplete: function() {
- Ajax.activeRequestCount--;
- }
-});
-
-Ajax.Base = function() {};
-Ajax.Base.prototype = {
- setOptions: function(options) {
- this.options = {
- method: 'post',
- asynchronous: true,
- contentType: 'application/x-www-form-urlencoded',
- encoding: 'UTF-8',
- parameters: ''
- }
- Object.extend(this.options, options || {});
-
- this.options.method = this.options.method.toLowerCase();
- if (typeof this.options.parameters == 'string')
- this.options.parameters = this.options.parameters.toQueryParams();
- }
-}
-
-Ajax.Request = Class.create();
-Ajax.Request.Events =
- ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];
-
-Ajax.Request.prototype = Object.extend(new Ajax.Base(), {
- _complete: false,
-
- initialize: function(url, options) {
- this.transport = Ajax.getTransport();
- this.setOptions(options);
- this.request(url);
- },
-
- request: function(url) {
- this.url = url;
- this.method = this.options.method;
- var params = Object.clone(this.options.parameters);
-
- if (!['get', 'post'].include(this.method)) {
- // simulate other verbs over post
- params['_method'] = this.method;
- this.method = 'post';
- }
-
- this.parameters = params;
-
- if (params = Hash.toQueryString(params)) {
- // when GET, append parameters to URL
- if (this.method == 'get')
- this.url += (this.url.include('?') ? '&' : '?') + params;
- else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))
- params += '&_=';
- }
-
- try {
- if (this.options.onCreate) this.options.onCreate(this.transport);
- Ajax.Responders.dispatch('onCreate', this, this.transport);
-
- this.transport.open(this.method.toUpperCase(), this.url,
- this.options.asynchronous);
-
- if (this.options.asynchronous)
- setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10);
-
- this.transport.onreadystatechange = this.onStateChange.bind(this);
- this.setRequestHeaders();
-
- this.body = this.method == 'post' ? (this.options.postBody || params) : null;
- this.transport.send(this.body);
-
- /* Force Firefox to handle ready state 4 for synchronous requests */
- if (!this.options.asynchronous && this.transport.overrideMimeType)
- this.onStateChange();
-
- }
- catch (e) {
- this.dispatchException(e);
- }
- },
-
- onStateChange: function() {
- var readyState = this.transport.readyState;
- if (readyState > 1 && !((readyState == 4) && this._complete))
- this.respondToReadyState(this.transport.readyState);
- },
-
- setRequestHeaders: function() {
- var headers = {
- 'X-Requested-With': 'XMLHttpRequest',
- 'X-Prototype-Version': Prototype.Version,
- 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'
- };
-
- if (this.method == 'post') {
- headers['Content-type'] = this.options.contentType +
- (this.options.encoding ? '; charset=' + this.options.encoding : '');
-
- /* Force "Connection: close" for older Mozilla browsers to work
- * around a bug where XMLHttpRequest sends an incorrect
- * Content-length header. See Mozilla Bugzilla #246651.
- */
- if (this.transport.overrideMimeType &&
- (navigator.userAgent.match(/Gecko\/(\d{4})/) || [0,2005])[1] < 2005)
- headers['Connection'] = 'close';
- }
-
- // user-defined headers
- if (typeof this.options.requestHeaders == 'object') {
- var extras = this.options.requestHeaders;
-
- if (typeof extras.push == 'function')
- for (var i = 0, length = extras.length; i < length; i += 2)
- headers[extras[i]] = extras[i+1];
- else
- $H(extras).each(function(pair) { headers[pair.key] = pair.value });
- }
-
- for (var name in headers)
- this.transport.setRequestHeader(name, headers[name]);
- },
-
- success: function() {
- return !this.transport.status
- || (this.transport.status >= 200 && this.transport.status < 300);
- },
-
- respondToReadyState: function(readyState) {
- var state = Ajax.Request.Events[readyState];
- var transport = this.transport, json = this.evalJSON();
-
- if (state == 'Complete') {
- try {
- this._complete = true;
- (this.options['on' + this.transport.status]
- || this.options['on' + (this.success() ? 'Success' : 'Failure')]
- || Prototype.emptyFunction)(transport, json);
- } catch (e) {
- this.dispatchException(e);
- }
-
- var contentType = this.getHeader('Content-type');
- if (contentType && contentType.strip().
- match(/^(text|application)\/(x-)?(java|ecma)script(;.*)?$/i))
- this.evalResponse();
- }
-
- try {
- (this.options['on' + state] || Prototype.emptyFunction)(transport, json);
- Ajax.Responders.dispatch('on' + state, this, transport, json);
- } catch (e) {
- this.dispatchException(e);
- }
-
- if (state == 'Complete') {
- // avoid memory leak in MSIE: clean up
- this.transport.onreadystatechange = Prototype.emptyFunction;
- }
- },
-
- getHeader: function(name) {
- try {
- return this.transport.getResponseHeader(name);
- } catch (e) { return null }
- },
-
- evalJSON: function() {
- try {
- var json = this.getHeader('X-JSON');
- return json ? json.evalJSON() : null;
- } catch (e) { return null }
- },
-
- evalResponse: function() {
- try {
- return eval((this.transport.responseText || '').unfilterJSON());
- } catch (e) {
- this.dispatchException(e);
- }
- },
-
- dispatchException: function(exception) {
- (this.options.onException || Prototype.emptyFunction)(this, exception);
- Ajax.Responders.dispatch('onException', this, exception);
- }
-});
-
-Ajax.Updater = Class.create();
-
-Object.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {
- initialize: function(container, url, options) {
- this.container = {
- success: (container.success || container),
- failure: (container.failure || (container.success ? null : container))
- }
-
- this.transport = Ajax.getTransport();
- this.setOptions(options);
-
- var onComplete = this.options.onComplete || Prototype.emptyFunction;
- this.options.onComplete = (function(transport, param) {
- this.updateContent();
- onComplete(transport, param);
- }).bind(this);
-
- this.request(url);
- },
-
- updateContent: function() {
- var receiver = this.container[this.success() ? 'success' : 'failure'];
- var response = this.transport.responseText;
-
- if (!this.options.evalScripts) response = response.stripScripts();
-
- if (receiver = $(receiver)) {
- if (this.options.insertion)
- new this.options.insertion(receiver, response);
- else
- receiver.update(response);
- }
-
- if (this.success()) {
- if (this.onComplete)
- setTimeout(this.onComplete.bind(this), 10);
- }
- }
-});
-
-Ajax.PeriodicalUpdater = Class.create();
-Ajax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), {
- initialize: function(container, url, options) {
- this.setOptions(options);
- this.onComplete = this.options.onComplete;
-
- this.frequency = (this.options.frequency || 2);
- this.decay = (this.options.decay || 1);
-
- this.updater = {};
- this.container = container;
- this.url = url;
-
- this.start();
- },
-
- start: function() {
- this.options.onComplete = this.updateComplete.bind(this);
- this.onTimerEvent();
- },
-
- stop: function() {
- this.updater.options.onComplete = undefined;
- clearTimeout(this.timer);
- (this.onComplete || Prototype.emptyFunction).apply(this, arguments);
- },
-
- updateComplete: function(request) {
- if (this.options.decay) {
- this.decay = (request.responseText == this.lastText ?
- this.decay * this.options.decay : 1);
-
- this.lastText = request.responseText;
- }
- this.timer = setTimeout(this.onTimerEvent.bind(this),
- this.decay * this.frequency * 1000);
- },
-
- onTimerEvent: function() {
- this.updater = new Ajax.Updater(this.container, this.url, this.options);
- }
-});
-function $(element) {
- if (arguments.length > 1) {
- for (var i = 0, elements = [], length = arguments.length; i < length; i++)
- elements.push($(arguments[i]));
- return elements;
- }
- if (typeof element == 'string')
- element = document.getElementById(element);
- return Element.extend(element);
-}
-
-if (Prototype.BrowserFeatures.XPath) {
- document._getElementsByXPath = function(expression, parentElement) {
- var results = [];
- var query = document.evaluate(expression, $(parentElement) || document,
- null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
- for (var i = 0, length = query.snapshotLength; i < length; i++)
- results.push(query.snapshotItem(i));
- return results;
- };
-
- document.getElementsByClassName = function(className, parentElement) {
- var q = ".//*[contains(concat(' ', @class, ' '), ' " + className + " ')]";
- return document._getElementsByXPath(q, parentElement);
- }
-
-} else document.getElementsByClassName = function(className, parentElement) {
- var children = ($(parentElement) || document.body).getElementsByTagName('*');
- var elements = [], child, pattern = new RegExp("(^|\\s)" + className + "(\\s|$)");
- for (var i = 0, length = children.length; i < length; i++) {
- child = children[i];
- var elementClassName = child.className;
- if (elementClassName.length == 0) continue;
- if (elementClassName == className || elementClassName.match(pattern))
- elements.push(Element.extend(child));
- }
- return elements;
-};
-
-/*--------------------------------------------------------------------------*/
-
-if (!window.Element) var Element = {};
-
-Element.extend = function(element) {
- var F = Prototype.BrowserFeatures;
- if (!element || !element.tagName || element.nodeType == 3 ||
- element._extended || F.SpecificElementExtensions || element == window)
- return element;
-
- var methods = {}, tagName = element.tagName, cache = Element.extend.cache,
- T = Element.Methods.ByTag;
-
- // extend methods for all tags (Safari doesn't need this)
- if (!F.ElementExtensions) {
- Object.extend(methods, Element.Methods),
- Object.extend(methods, Element.Methods.Simulated);
- }
-
- // extend methods for specific tags
- if (T[tagName]) Object.extend(methods, T[tagName]);
-
- for (var property in methods) {
- var value = methods[property];
- if (typeof value == 'function' && !(property in element))
- element[property] = cache.findOrStore(value);
- }
-
- element._extended = Prototype.emptyFunction;
- return element;
-};
-
-Element.extend.cache = {
- findOrStore: function(value) {
- return this[value] = this[value] || function() {
- return value.apply(null, [this].concat($A(arguments)));
- }
- }
-};
-
-Element.Methods = {
- visible: function(element) {
- return $(element).style.display != 'none';
- },
-
- toggle: function(element) {
- element = $(element);
- Element[Element.visible(element) ? 'hide' : 'show'](element);
- return element;
- },
-
- hide: function(element) {
- $(element).style.display = 'none';
- return element;
- },
-
- show: function(element) {
- $(element).style.display = '';
- return element;
- },
-
- remove: function(element) {
- element = $(element);
- element.parentNode.removeChild(element);
- return element;
- },
-
- update: function(element, html) {
- html = typeof html == 'undefined' ? '' : html.toString();
- $(element).innerHTML = html.stripScripts();
- setTimeout(function() {html.evalScripts()}, 10);
- return element;
- },
-
- replace: function(element, html) {
- element = $(element);
- html = typeof html == 'undefined' ? '' : html.toString();
- if (element.outerHTML) {
- element.outerHTML = html.stripScripts();
- } else {
- var range = element.ownerDocument.createRange();
- range.selectNodeContents(element);
- element.parentNode.replaceChild(
- range.createContextualFragment(html.stripScripts()), element);
- }
- setTimeout(function() {html.evalScripts()}, 10);
- return element;
- },
-
- inspect: function(element) {
- element = $(element);
- var result = '<' + element.tagName.toLowerCase();
- $H({'id': 'id', 'className': 'class'}).each(function(pair) {
- var property = pair.first(), attribute = pair.last();
- var value = (element[property] || '').toString();
- if (value) result += ' ' + attribute + '=' + value.inspect(true);
- });
- return result + '>';
- },
-
- recursivelyCollect: function(element, property) {
- element = $(element);
- var elements = [];
- while (element = element[property])
- if (element.nodeType == 1)
- elements.push(Element.extend(element));
- return elements;
- },
-
- ancestors: function(element) {
- return $(element).recursivelyCollect('parentNode');
- },
-
- descendants: function(element) {
- return $A($(element).getElementsByTagName('*')).each(Element.extend);
- },
-
- firstDescendant: function(element) {
- element = $(element).firstChild;
- while (element && element.nodeType != 1) element = element.nextSibling;
- return $(element);
- },
-
- immediateDescendants: function(element) {
- if (!(element = $(element).firstChild)) return [];
- while (element && element.nodeType != 1) element = element.nextSibling;
- if (element) return [element].concat($(element).nextSiblings());
- return [];
- },
-
- previousSiblings: function(element) {
- return $(element).recursivelyCollect('previousSibling');
- },
-
- nextSiblings: function(element) {
- return $(element).recursivelyCollect('nextSibling');
- },
-
- siblings: function(element) {
- element = $(element);
- return element.previousSiblings().reverse().concat(element.nextSiblings());
- },
-
- match: function(element, selector) {
- if (typeof selector == 'string')
- selector = new Selector(selector);
- return selector.match($(element));
- },
-
- up: function(element, expression, index) {
- element = $(element);
- if (arguments.length == 1) return $(element.parentNode);
- var ancestors = element.ancestors();
- return expression ? Selector.findElement(ancestors, expression, index) :
- ancestors[index || 0];
- },
-
- down: function(element, expression, index) {
- element = $(element);
- if (arguments.length == 1) return element.firstDescendant();
- var descendants = element.descendants();
- return expression ? Selector.findElement(descendants, expression, index) :
- descendants[index || 0];
- },
-
- previous: function(element, expression, index) {
- element = $(element);
- if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));
- var previousSiblings = element.previousSiblings();
- return expression ? Selector.findElement(previousSiblings, expression, index) :
- previousSiblings[index || 0];
- },
-
- next: function(element, expression, index) {
- element = $(element);
- if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));
- var nextSiblings = element.nextSiblings();
- return expression ? Selector.findElement(nextSiblings, expression, index) :
- nextSiblings[index || 0];
- },
-
- getElementsBySelector: function() {
- var args = $A(arguments), element = $(args.shift());
- return Selector.findChildElements(element, args);
- },
-
- getElementsByClassName: function(element, className) {
- return document.getElementsByClassName(className, element);
- },
-
- readAttribute: function(element, name) {
- element = $(element);
- if (Prototype.Browser.IE) {
- if (!element.attributes) return null;
- var t = Element._attributeTranslations;
- if (t.values[name]) return t.values[name](element, name);
- if (t.names[name]) name = t.names[name];
- var attribute = element.attributes[name];
- return attribute ? attribute.nodeValue : null;
- }
- return element.getAttribute(name);
- },
-
- getHeight: function(element) {
- return $(element).getDimensions().height;
- },
-
- getWidth: function(element) {
- return $(element).getDimensions().width;
- },
-
- classNames: function(element) {
- return new Element.ClassNames(element);
- },
-
- hasClassName: function(element, className) {
- if (!(element = $(element))) return;
- var elementClassName = element.className;
- if (elementClassName.length == 0) return false;
- if (elementClassName == className ||
- elementClassName.match(new RegExp("(^|\\s)" + className + "(\\s|$)")))
- return true;
- return false;
- },
-
- addClassName: function(element, className) {
- if (!(element = $(element))) return;
- Element.classNames(element).add(className);
- return element;
- },
-
- removeClassName: function(element, className) {
- if (!(element = $(element))) return;
- Element.classNames(element).remove(className);
- return element;
- },
-
- toggleClassName: function(element, className) {
- if (!(element = $(element))) return;
- Element.classNames(element)[element.hasClassName(className) ? 'remove' : 'add'](className);
- return element;
- },
-
- observe: function() {
- Event.observe.apply(Event, arguments);
- return $A(arguments).first();
- },
-
- stopObserving: function() {
- Event.stopObserving.apply(Event, arguments);
- return $A(arguments).first();
- },
-
- // removes whitespace-only text node children
- cleanWhitespace: function(element) {
- element = $(element);
- var node = element.firstChild;
- while (node) {
- var nextNode = node.nextSibling;
- if (node.nodeType == 3 && !/\S/.test(node.nodeValue))
- element.removeChild(node);
- node = nextNode;
- }
- return element;
- },
-
- empty: function(element) {
- return $(element).innerHTML.blank();
- },
-
- descendantOf: function(element, ancestor) {
- element = $(element), ancestor = $(ancestor);
- while (element = element.parentNode)
- if (element == ancestor) return true;
- return false;
- },
-
- scrollTo: function(element) {
- element = $(element);
- var pos = Position.cumulativeOffset(element);
- window.scrollTo(pos[0], pos[1]);
- return element;
- },
-
- getStyle: function(element, style) {
- element = $(element);
- style = style == 'float' ? 'cssFloat' : style.camelize();
- var value = element.style[style];
- if (!value) {
- var css = document.defaultView.getComputedStyle(element, null);
- value = css ? css[style] : null;
- }
- if (style == 'opacity') return value ? parseFloat(value) : 1.0;
- return value == 'auto' ? null : value;
- },
-
- getOpacity: function(element) {
- return $(element).getStyle('opacity');
- },
-
- setStyle: function(element, styles, camelized) {
- element = $(element);
- var elementStyle = element.style;
-
- for (var property in styles)
- if (property == 'opacity') element.setOpacity(styles[property])
- else
- elementStyle[(property == 'float' || property == 'cssFloat') ?
- (elementStyle.styleFloat === undefined ? 'cssFloat' : 'styleFloat') :
- (camelized ? property : property.camelize())] = styles[property];
-
- return element;
- },
-
- setOpacity: function(element, value) {
- element = $(element);
- element.style.opacity = (value == 1 || value === '') ? '' :
- (value < 0.00001) ? 0 : value;
- return element;
- },
-
- getDimensions: function(element) {
- element = $(element);
- var display = $(element).getStyle('display');
- if (display != 'none' && display != null) // Safari bug
- return {width: element.offsetWidth, height: element.offsetHeight};
-
- // All *Width and *Height properties give 0 on elements with display none,
- // so enable the element temporarily
- var els = element.style;
- var originalVisibility = els.visibility;
- var originalPosition = els.position;
- var originalDisplay = els.display;
- els.visibility = 'hidden';
- els.position = 'absolute';
- els.display = 'block';
- var originalWidth = element.clientWidth;
- var originalHeight = element.clientHeight;
- els.display = originalDisplay;
- els.position = originalPosition;
- els.visibility = originalVisibility;
- return {width: originalWidth, height: originalHeight};
- },
-
- makePositioned: function(element) {
- element = $(element);
- var pos = Element.getStyle(element, 'position');
- if (pos == 'static' || !pos) {
- element._madePositioned = true;
- element.style.position = 'relative';
- // Opera returns the offset relative to the positioning context, when an
- // element is position relative but top and left have not been defined
- if (window.opera) {
- element.style.top = 0;
- element.style.left = 0;
- }
- }
- return element;
- },
-
- undoPositioned: function(element) {
- element = $(element);
- if (element._madePositioned) {
- element._madePositioned = undefined;
- element.style.position =
- element.style.top =
- element.style.left =
- element.style.bottom =
- element.style.right = '';
- }
- return element;
- },
-
- makeClipping: function(element) {
- element = $(element);
- if (element._overflow) return element;
- element._overflow = element.style.overflow || 'auto';
- if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden')
- element.style.overflow = 'hidden';
- return element;
- },
-
- undoClipping: function(element) {
- element = $(element);
- if (!element._overflow) return element;
- element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;
- element._overflow = null;
- return element;
- }
-};
-
-Object.extend(Element.Methods, {
- childOf: Element.Methods.descendantOf,
- childElements: Element.Methods.immediateDescendants
-});
-
-if (Prototype.Browser.Opera) {
- Element.Methods._getStyle = Element.Methods.getStyle;
- Element.Methods.getStyle = function(element, style) {
- switch(style) {
- case 'left':
- case 'top':
- case 'right':
- case 'bottom':
- if (Element._getStyle(element, 'position') == 'static') return null;
- default: return Element._getStyle(element, style);
- }
- };
-}
-else if (Prototype.Browser.IE) {
- Element.Methods.getStyle = function(element, style) {
- element = $(element);
- style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();
- var value = element.style[style];
- if (!value && element.currentStyle) value = element.currentStyle[style];
-
- if (style == 'opacity') {
- if (value = (element.getStyle('filter') || '').match(/alpha\(opacity=(.*)\)/))
- if (value[1]) return parseFloat(value[1]) / 100;
- return 1.0;
- }
-
- if (value == 'auto') {
- if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none'))
- return element['offset'+style.capitalize()] + 'px';
- return null;
- }
- return value;
- };
-
- Element.Methods.setOpacity = function(element, value) {
- element = $(element);
- var filter = element.getStyle('filter'), style = element.style;
- if (value == 1 || value === '') {
- style.filter = filter.replace(/alpha\([^\)]*\)/gi,'');
- return element;
- } else if (value < 0.00001) value = 0;
- style.filter = filter.replace(/alpha\([^\)]*\)/gi, '') +
- 'alpha(opacity=' + (value * 100) + ')';
- return element;
- };
-
- // IE is missing .innerHTML support for TABLE-related elements
- Element.Methods.update = function(element, html) {
- element = $(element);
- html = typeof html == 'undefined' ? '' : html.toString();
- var tagName = element.tagName.toUpperCase();
- if (['THEAD','TBODY','TR','TD'].include(tagName)) {
- var div = document.createElement('div');
- switch (tagName) {
- case 'THEAD':
- case 'TBODY':
- div.innerHTML = '<table><tbody>' + html.stripScripts() + '</tbody></table>';
- depth = 2;
- break;
- case 'TR':
- div.innerHTML = '<table><tbody><tr>' + html.stripScripts() + '</tr></tbody></table>';
- depth = 3;
- break;
- case 'TD':
- div.innerHTML = '<table><tbody><tr><td>' + html.stripScripts() + '</td></tr></tbody></table>';
- depth = 4;
- }
- $A(element.childNodes).each(function(node) { element.removeChild(node) });
- depth.times(function() { div = div.firstChild });
- $A(div.childNodes).each(function(node) { element.appendChild(node) });
- } else {
- element.innerHTML = html.stripScripts();
- }
- setTimeout(function() { html.evalScripts() }, 10);
- return element;
- }
-}
-else if (Prototype.Browser.Gecko) {
- Element.Methods.setOpacity = function(element, value) {
- element = $(element);
- element.style.opacity = (value == 1) ? 0.999999 :
- (value === '') ? '' : (value < 0.00001) ? 0 : value;
- return element;
- };
-}
-
-Element._attributeTranslations = {
- names: {
- colspan: "colSpan",
- rowspan: "rowSpan",
- valign: "vAlign",
- datetime: "dateTime",
- accesskey: "accessKey",
- tabindex: "tabIndex",
- enctype: "encType",
- maxlength: "maxLength",
- readonly: "readOnly",
- longdesc: "longDesc"
- },
- values: {
- _getAttr: function(element, attribute) {
- return element.getAttribute(attribute, 2);
- },
- _flag: function(element, attribute) {
- return $(element).hasAttribute(attribute) ? attribute : null;
- },
- style: function(element) {
- return element.style.cssText.toLowerCase();
- },
- title: function(element) {
- var node = element.getAttributeNode('title');
- return node.specified ? node.nodeValue : null;
- }
- }
-};
-
-(function() {
- Object.extend(this, {
- href: this._getAttr,
- src: this._getAttr,
- type: this._getAttr,
- disabled: this._flag,
- checked: this._flag,
- readonly: this._flag,
- multiple: this._flag
- });
-}).call(Element._attributeTranslations.values);
-
-Element.Methods.Simulated = {
- hasAttribute: function(element, attribute) {
- var t = Element._attributeTranslations, node;
- attribute = t.names[attribute] || attribute;
- node = $(element).getAttributeNode(attribute);
- return node && node.specified;
- }
-};
-
-Element.Methods.ByTag = {};
-
-Object.extend(Element, Element.Methods);
-
-if (!Prototype.BrowserFeatures.ElementExtensions &&
- document.createElement('div').__proto__) {
- window.HTMLElement = {};
- window.HTMLElement.prototype = document.createElement('div').__proto__;
- Prototype.BrowserFeatures.ElementExtensions = true;
-}
-
-Element.hasAttribute = function(element, attribute) {
- if (element.hasAttribute) return element.hasAttribute(attribute);
- return Element.Methods.Simulated.hasAttribute(element, attribute);
-};
-
-Element.addMethods = function(methods) {
- var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;
-
- if (!methods) {
- Object.extend(Form, Form.Methods);
- Object.extend(Form.Element, Form.Element.Methods);
- Object.extend(Element.Methods.ByTag, {
- "FORM": Object.clone(Form.Methods),
- "INPUT": Object.clone(Form.Element.Methods),
- "SELECT": Object.clone(Form.Element.Methods),
- "TEXTAREA": Object.clone(Form.Element.Methods)
- });
- }
-
- if (arguments.length == 2) {
- var tagName = methods;
- methods = arguments[1];
- }
-
- if (!tagName) Object.extend(Element.Methods, methods || {});
- else {
- if (tagName.constructor == Array) tagName.each(extend);
- else extend(tagName);
- }
-
- function extend(tagName) {
- tagName = tagName.toUpperCase();
- if (!Element.Methods.ByTag[tagName])
- Element.Methods.ByTag[tagName] = {};
- Object.extend(Element.Methods.ByTag[tagName], methods);
- }
-
- function copy(methods, destination, onlyIfAbsent) {
- onlyIfAbsent = onlyIfAbsent || false;
- var cache = Element.extend.cache;
- for (var property in methods) {
- var value = methods[property];
- if (!onlyIfAbsent || !(property in destination))
- destination[property] = cache.findOrStore(value);
- }
- }
-
- function findDOMClass(tagName) {
- var klass;
- var trans = {
- "OPTGROUP": "OptGroup", "TEXTAREA": "TextArea", "P": "Paragraph",
- "FIELDSET": "FieldSet", "UL": "UList", "OL": "OList", "DL": "DList",
- "DIR": "Directory", "H1": "Heading", "H2": "Heading", "H3": "Heading",
- "H4": "Heading", "H5": "Heading", "H6": "Heading", "Q": "Quote",
- "INS": "Mod", "DEL": "Mod", "A": "Anchor", "IMG": "Image", "CAPTION":
- "TableCaption", "COL": "TableCol", "COLGROUP": "TableCol", "THEAD":
- "TableSection", "TFOOT": "TableSection", "TBODY": "TableSection", "TR":
- "TableRow", "TH": "TableCell", "TD": "TableCell", "FRAMESET":
- "FrameSet", "IFRAME": "IFrame"
- };
- if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element';
- if (window[klass]) return window[klass];
- klass = 'HTML' + tagName + 'Element';
- if (window[klass]) return window[klass];
- klass = 'HTML' + tagName.capitalize() + 'Element';
- if (window[klass]) return window[klass];
-
- window[klass] = {};
- window[klass].prototype = document.createElement(tagName).__proto__;
- return window[klass];
- }
-
- if (F.ElementExtensions) {
- copy(Element.Methods, HTMLElement.prototype);
- copy(Element.Methods.Simulated, HTMLElement.prototype, true);
- }
-
- if (F.SpecificElementExtensions) {
- for (var tag in Element.Methods.ByTag) {
- var klass = findDOMClass(tag);
- if (typeof klass == "undefined") continue;
- copy(T[tag], klass.prototype);
- }
- }
-
- Object.extend(Element, Element.Methods);
- delete Element.ByTag;
-};
-
-var Toggle = { display: Element.toggle };
-
-/*--------------------------------------------------------------------------*/
-
-Abstract.Insertion = function(adjacency) {
- this.adjacency = adjacency;
-}
-
-Abstract.Insertion.prototype = {
- initialize: function(element, content) {
- this.element = $(element);
- this.content = content.stripScripts();
-
- if (this.adjacency && this.element.insertAdjacentHTML) {
- try {
- this.element.insertAdjacentHTML(this.adjacency, this.content);
- } catch (e) {
- var tagName = this.element.tagName.toUpperCase();
- if (['TBODY', 'TR'].include(tagName)) {
- this.insertContent(this.contentFromAnonymousTable());
- } else {
- throw e;
- }
- }
- } else {
- this.range = this.element.ownerDocument.createRange();
- if (this.initializeRange) this.initializeRange();
- this.insertContent([this.range.createContextualFragment(this.content)]);
- }
-
- setTimeout(function() {content.evalScripts()}, 10);
- },
-
- contentFromAnonymousTable: function() {
- var div = document.createElement('div');
- div.innerHTML = '<table><tbody>' + this.content + '</tbody></table>';
- return $A(div.childNodes[0].childNodes[0].childNodes);
- }
-}
-
-var Insertion = new Object();
-
-Insertion.Before = Class.create();
-Insertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), {
- initializeRange: function() {
- this.range.setStartBefore(this.element);
- },
-
- insertContent: function(fragments) {
- fragments.each((function(fragment) {
- this.element.parentNode.insertBefore(fragment, this.element);
- }).bind(this));
- }
-});
-
-Insertion.Top = Class.create();
-Insertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), {
- initializeRange: function() {
- this.range.selectNodeContents(this.element);
- this.range.collapse(true);
- },
-
- insertContent: function(fragments) {
- fragments.reverse(false).each((function(fragment) {
- this.element.insertBefore(fragment, this.element.firstChild);
- }).bind(this));
- }
-});
-
-Insertion.Bottom = Class.create();
-Insertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), {
- initializeRange: function() {
- this.range.selectNodeContents(this.element);
- this.range.collapse(this.element);
- },
-
- insertContent: function(fragments) {
- fragments.each((function(fragment) {
- this.element.appendChild(fragment);
- }).bind(this));
- }
-});
-
-Insertion.After = Class.create();
-Insertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), {
- initializeRange: function() {
- this.range.setStartAfter(this.element);
- },
-
- insertContent: function(fragments) {
- fragments.each((function(fragment) {
- this.element.parentNode.insertBefore(fragment,
- this.element.nextSibling);
- }).bind(this));
- }
-});
-
-/*--------------------------------------------------------------------------*/
-
-Element.ClassNames = Class.create();
-Element.ClassNames.prototype = {
- initialize: function(element) {
- this.element = $(element);
- },
-
- _each: function(iterator) {
- this.element.className.split(/\s+/).select(function(name) {
- return name.length > 0;
- })._each(iterator);
- },
-
- set: function(className) {
- this.element.className = className;
- },
-
- add: function(classNameToAdd) {
- if (this.include(classNameToAdd)) return;
- this.set($A(this).concat(classNameToAdd).join(' '));
- },
-
- remove: function(classNameToRemove) {
- if (!this.include(classNameToRemove)) return;
- this.set($A(this).without(classNameToRemove).join(' '));
- },
-
- toString: function() {
- return $A(this).join(' ');
- }
-};
-
-Object.extend(Element.ClassNames.prototype, Enumerable);
-/* Portions of the Selector class are derived from Jack Slocum’s DomQuery,
- * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style
- * license. Please see http://www.yui-ext.com/ for more information. */
-
-var Selector = Class.create();
-
-Selector.prototype = {
- initialize: function(expression) {
- this.expression = expression.strip();
- this.compileMatcher();
- },
-
- compileMatcher: function() {
- // Selectors with namespaced attributes can't use the XPath version
- if (Prototype.BrowserFeatures.XPath && !(/\[[\w-]*?:/).test(this.expression))
- return this.compileXPathMatcher();
-
- var e = this.expression, ps = Selector.patterns, h = Selector.handlers,
- c = Selector.criteria, le, p, m;
-
- if (Selector._cache[e]) {
- this.matcher = Selector._cache[e]; return;
- }
- this.matcher = ["this.matcher = function(root) {",
- "var r = root, h = Selector.handlers, c = false, n;"];
-
- while (e && le != e && (/\S/).test(e)) {
- le = e;
- for (var i in ps) {
- p = ps[i];
- if (m = e.match(p)) {
- this.matcher.push(typeof c[i] == 'function' ? c[i](m) :
- new Template(c[i]).evaluate(m));
- e = e.replace(m[0], '');
- break;
- }
- }
- }
-
- this.matcher.push("return h.unique(n);\n}");
- eval(this.matcher.join('\n'));
- Selector._cache[this.expression] = this.matcher;
- },
-
- compileXPathMatcher: function() {
- var e = this.expression, ps = Selector.patterns,
- x = Selector.xpath, le, m;
-
- if (Selector._cache[e]) {
- this.xpath = Selector._cache[e]; return;
- }
-
- this.matcher = ['.//*'];
- while (e && le != e && (/\S/).test(e)) {
- le = e;
- for (var i in ps) {
- if (m = e.match(ps[i])) {
- this.matcher.push(typeof x[i] == 'function' ? x[i](m) :
- new Template(x[i]).evaluate(m));
- e = e.replace(m[0], '');
- break;
- }
- }
- }
-
- this.xpath = this.matcher.join('');
- Selector._cache[this.expression] = this.xpath;
- },
-
- findElements: function(root) {
- root = root || document;
- if (this.xpath) return document._getElementsByXPath(this.xpath, root);
- return this.matcher(root);
- },
-
- match: function(element) {
- return this.findElements(document).include(element);
- },
-
- toString: function() {
- return this.expression;
- },
-
- inspect: function() {
- return "#<Selector:" + this.expression.inspect() + ">";
- }
-};
-
-Object.extend(Selector, {
- _cache: {},
-
- xpath: {
- descendant: "//*",
- child: "/*",
- adjacent: "/following-sibling::*[1]",
- laterSibling: '/following-sibling::*',
- tagName: function(m) {
- if (m[1] == '*') return '';
- return "[local-name()='" + m[1].toLowerCase() +
- "' or local-name()='" + m[1].toUpperCase() + "']";
- },
- className: "[contains(concat(' ', @class, ' '), ' #{1} ')]",
- id: "[@id='#{1}']",
- attrPresence: "[@#{1}]",
- attr: function(m) {
- m[3] = m[5] || m[6];
- return new Template(Selector.xpath.operators[m[2]]).evaluate(m);
- },
- pseudo: function(m) {
- var h = Selector.xpath.pseudos[m[1]];
- if (!h) return '';
- if (typeof h === 'function') return h(m);
- return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);
- },
- operators: {
- '=': "[@#{1}='#{3}']",
- '!=': "[@#{1}!='#{3}']",
- '^=': "[starts-with(@#{1}, '#{3}')]",
- '$=': "[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']",
- '*=': "[contains(@#{1}, '#{3}')]",
- '~=': "[contains(concat(' ', @#{1}, ' '), ' #{3} ')]",
- '|=': "[contains(concat('-', @#{1}, '-'), '-#{3}-')]"
- },
- pseudos: {
- 'first-child': '[not(preceding-sibling::*)]',
- 'last-child': '[not(following-sibling::*)]',
- 'only-child': '[not(preceding-sibling::* or following-sibling::*)]',
- 'empty': "[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \t\r\n', '') = '')]",
- 'checked': "[@checked]",
- 'disabled': "[@disabled]",
- 'enabled': "[not(@disabled)]",
- 'not': function(m) {
- var e = m[6], p = Selector.patterns,
- x = Selector.xpath, le, m, v;
-
- var exclusion = [];
- while (e && le != e && (/\S/).test(e)) {
- le = e;
- for (var i in p) {
- if (m = e.match(p[i])) {
- v = typeof x[i] == 'function' ? x[i](m) : new Template(x[i]).evaluate(m);
- exclusion.push("(" + v.substring(1, v.length - 1) + ")");
- e = e.replace(m[0], '');
- break;
- }
- }
- }
- return "[not(" + exclusion.join(" and ") + ")]";
- },
- 'nth-child': function(m) {
- return Selector.xpath.pseudos.nth("(count(./preceding-sibling::*) + 1) ", m);
- },
- 'nth-last-child': function(m) {
- return Selector.xpath.pseudos.nth("(count(./following-sibling::*) + 1) ", m);
- },
- 'nth-of-type': function(m) {
- return Selector.xpath.pseudos.nth("position() ", m);
- },
- 'nth-last-of-type': function(m) {
- return Selector.xpath.pseudos.nth("(last() + 1 - position()) ", m);
- },
- 'first-of-type': function(m) {
- m[6] = "1"; return Selector.xpath.pseudos['nth-of-type'](m);
- },
- 'last-of-type': function(m) {
- m[6] = "1"; return Selector.xpath.pseudos['nth-last-of-type'](m);
- },
- 'only-of-type': function(m) {
- var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m);
- },
- nth: function(fragment, m) {
- var mm, formula = m[6], predicate;
- if (formula == 'even') formula = '2n+0';
- if (formula == 'odd') formula = '2n+1';
- if (mm = formula.match(/^(\d+)$/)) // digit only
- return '[' + fragment + "= " + mm[1] + ']';
- if (mm = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
- if (mm[1] == "-") mm[1] = -1;
- var a = mm[1] ? Number(mm[1]) : 1;
- var b = mm[2] ? Number(mm[2]) : 0;
- predicate = "[((#{fragment} - #{b}) mod #{a} = 0) and " +
- "((#{fragment} - #{b}) div #{a} >= 0)]";
- return new Template(predicate).evaluate({
- fragment: fragment, a: a, b: b });
- }
- }
- }
- },
-
- criteria: {
- tagName: 'n = h.tagName(n, r, "#{1}", c); c = false;',
- className: 'n = h.className(n, r, "#{1}", c); c = false;',
- id: 'n = h.id(n, r, "#{1}", c); c = false;',
- attrPresence: 'n = h.attrPresence(n, r, "#{1}"); c = false;',
- attr: function(m) {
- m[3] = (m[5] || m[6]);
- return new Template('n = h.attr(n, r, "#{1}", "#{3}", "#{2}"); c = false;').evaluate(m);
- },
- pseudo: function(m) {
- if (m[6]) m[6] = m[6].replace(/"/g, '\\"');
- return new Template('n = h.pseudo(n, "#{1}", "#{6}", r, c); c = false;').evaluate(m);
- },
- descendant: 'c = "descendant";',
- child: 'c = "child";',
- adjacent: 'c = "adjacent";',
- laterSibling: 'c = "laterSibling";'
- },
-
- patterns: {
- // combinators must be listed first
- // (and descendant needs to be last combinator)
- laterSibling: /^\s*~\s*/,
- child: /^\s*>\s*/,
- adjacent: /^\s*\+\s*/,
- descendant: /^\s/,
-
- // selectors follow
- tagName: /^\s*(\*|[\w\-]+)(\b|$)?/,
- id: /^#([\w\-\*]+)(\b|$)/,
- className: /^\.([\w\-\*]+)(\b|$)/,
- pseudo: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\((.*?)\))?(\b|$|\s|(?=:))/,
- attrPresence: /^\[([\w]+)\]/,
- attr: /\[((?:[\w-]*:)?[\w-]+)\s*(?:([!^$*~|]?=)\s*((['"])([^\]]*?)\4|([^'"][^\]]*?)))?\]/
- },
-
- handlers: {
- // UTILITY FUNCTIONS
- // joins two collections
- concat: function(a, b) {
- for (var i = 0, node; node = b[i]; i++)
- a.push(node);
- return a;
- },
-
- // marks an array of nodes for counting
- mark: function(nodes) {
- for (var i = 0, node; node = nodes[i]; i++)
- node._counted = true;
- return nodes;
- },
-
- unmark: function(nodes) {
- for (var i = 0, node; node = nodes[i]; i++)
- node._counted = undefined;
- return nodes;
- },
-
- // mark each child node with its position (for nth calls)
- // "ofType" flag indicates whether we're indexing for nth-of-type
- // rather than nth-child
- index: function(parentNode, reverse, ofType) {
- parentNode._counted = true;
- if (reverse) {
- for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {
- node = nodes[i];
- if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++;
- }
- } else {
- for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)
- if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++;
- }
- },
-
- // filters out duplicates and extends all nodes
- unique: function(nodes) {
- if (nodes.length == 0) return nodes;
- var results = [], n;
- for (var i = 0, l = nodes.length; i < l; i++)
- if (!(n = nodes[i])._counted) {
- n._counted = true;
- results.push(Element.extend(n));
- }
- return Selector.handlers.unmark(results);
- },
-
- // COMBINATOR FUNCTIONS
- descendant: function(nodes) {
- var h = Selector.handlers;
- for (var i = 0, results = [], node; node = nodes[i]; i++)
- h.concat(results, node.getElementsByTagName('*'));
- return results;
- },
-
- child: function(nodes) {
- var h = Selector.handlers;
- for (var i = 0, results = [], node; node = nodes[i]; i++) {
- for (var j = 0, children = [], child; child = node.childNodes[j]; j++)
- if (child.nodeType == 1 && child.tagName != '!') results.push(child);
- }
- return results;
- },
-
- adjacent: function(nodes) {
- for (var i = 0, results = [], node; node = nodes[i]; i++) {
- var next = this.nextElementSibling(node);
- if (next) results.push(next);
- }
- return results;
- },
-
- laterSibling: function(nodes) {
- var h = Selector.handlers;
- for (var i = 0, results = [], node; node = nodes[i]; i++)
- h.concat(results, Element.nextSiblings(node));
- return results;
- },
-
- nextElementSibling: function(node) {
- while (node = node.nextSibling)
- if (node.nodeType == 1) return node;
- return null;
- },
-
- previousElementSibling: function(node) {
- while (node = node.previousSibling)
- if (node.nodeType == 1) return node;
- return null;
- },
-
- // TOKEN FUNCTIONS
- tagName: function(nodes, root, tagName, combinator) {
- tagName = tagName.toUpperCase();
- var results = [], h = Selector.handlers;
- if (nodes) {
- if (combinator) {
- // fastlane for ordinary descendant combinators
- if (combinator == "descendant") {
- for (var i = 0, node; node = nodes[i]; i++)
- h.concat(results, node.getElementsByTagName(tagName));
- return results;
- } else nodes = this[combinator](nodes);
- if (tagName == "*") return nodes;
- }
- for (var i = 0, node; node = nodes[i]; i++)
- if (node.tagName.toUpperCase() == tagName) results.push(node);
- return results;
- } else return root.getElementsByTagName(tagName);
- },
-
- id: function(nodes, root, id, combinator) {
- var targetNode = $(id), h = Selector.handlers;
- if (!nodes && root == document) return targetNode ? [targetNode] : [];
- if (nodes) {
- if (combinator) {
- if (combinator == 'child') {
- for (var i = 0, node; node = nodes[i]; i++)
- if (targetNode.parentNode == node) return [targetNode];
- } else if (combinator == 'descendant') {
- for (var i = 0, node; node = nodes[i]; i++)
- if (Element.descendantOf(targetNode, node)) return [targetNode];
- } else if (combinator == 'adjacent') {
- for (var i = 0, node; node = nodes[i]; i++)
- if (Selector.handlers.previousElementSibling(targetNode) == node)
- return [targetNode];
- } else nodes = h[combinator](nodes);
- }
- for (var i = 0, node; node = nodes[i]; i++)
- if (node == targetNode) return [targetNode];
- return [];
- }
- return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];
- },
-
- className: function(nodes, root, className, combinator) {
- if (nodes && combinator) nodes = this[combinator](nodes);
- return Selector.handlers.byClassName(nodes, root, className);
- },
-
- byClassName: function(nodes, root, className) {
- if (!nodes) nodes = Selector.handlers.descendant([root]);
- var needle = ' ' + className + ' ';
- for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) {
- nodeClassName = node.className;
- if (nodeClassName.length == 0) continue;
- if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle))
- results.push(node);
- }
- return results;
- },
-
- attrPresence: function(nodes, root, attr) {
- var results = [];
- for (var i = 0, node; node = nodes[i]; i++)
- if (Element.hasAttribute(node, attr)) results.push(node);
- return results;
- },
-
- attr: function(nodes, root, attr, value, operator) {
- if (!nodes) nodes = root.getElementsByTagName("*");
- var handler = Selector.operators[operator], results = [];
- for (var i = 0, node; node = nodes[i]; i++) {
- var nodeValue = Element.readAttribute(node, attr);
- if (nodeValue === null) continue;
- if (handler(nodeValue, value)) results.push(node);
- }
- return results;
- },
-
- pseudo: function(nodes, name, value, root, combinator) {
- if (nodes && combinator) nodes = this[combinator](nodes);
- if (!nodes) nodes = root.getElementsByTagName("*");
- return Selector.pseudos[name](nodes, value, root);
- }
- },
-
- pseudos: {
- 'first-child': function(nodes, value, root) {
- for (var i = 0, results = [], node; node = nodes[i]; i++) {
- if (Selector.handlers.previousElementSibling(node)) continue;
- results.push(node);
- }
- return results;
- },
- 'last-child': function(nodes, value, root) {
- for (var i = 0, results = [], node; node = nodes[i]; i++) {
- if (Selector.handlers.nextElementSibling(node)) continue;
- results.push(node);
- }
- return results;
- },
- 'only-child': function(nodes, value, root) {
- var h = Selector.handlers;
- for (var i = 0, results = [], node; node = nodes[i]; i++)
- if (!h.previousElementSibling(node) && !h.nextElementSibling(node))
- results.push(node);
- return results;
- },
- 'nth-child': function(nodes, formula, root) {
- return Selector.pseudos.nth(nodes, formula, root);
- },
- 'nth-last-child': function(nodes, formula, root) {
- return Selector.pseudos.nth(nodes, formula, root, true);
- },
- 'nth-of-type': function(nodes, formula, root) {
- return Selector.pseudos.nth(nodes, formula, root, false, true);
- },
- 'nth-last-of-type': function(nodes, formula, root) {
- return Selector.pseudos.nth(nodes, formula, root, true, true);
- },
- 'first-of-type': function(nodes, formula, root) {
- return Selector.pseudos.nth(nodes, "1", root, false, true);
- },
- 'last-of-type': function(nodes, formula, root) {
- return Selector.pseudos.nth(nodes, "1", root, true, true);
- },
- 'only-of-type': function(nodes, formula, root) {
- var p = Selector.pseudos;
- return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root);
- },
-
- // handles the an+b logic
- getIndices: function(a, b, total) {
- if (a == 0) return b > 0 ? [b] : [];
- return $R(1, total).inject([], function(memo, i) {
- if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i);
- return memo;
- });
- },
-
- // handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-type
- nth: function(nodes, formula, root, reverse, ofType) {
- if (nodes.length == 0) return [];
- if (formula == 'even') formula = '2n+0';
- if (formula == 'odd') formula = '2n+1';
- var h = Selector.handlers, results = [], indexed = [], m;
- h.mark(nodes);
- for (var i = 0, node; node = nodes[i]; i++) {
- if (!node.parentNode._counted) {
- h.index(node.parentNode, reverse, ofType);
- indexed.push(node.parentNode);
- }
- }
- if (formula.match(/^\d+$/)) { // just a number
- formula = Number(formula);
- for (var i = 0, node; node = nodes[i]; i++)
- if (node.nodeIndex == formula) results.push(node);
- } else if (m = formula.match(/^(-?\d*)?n(([+-])(\d+))?/)) { // an+b
- if (m[1] == "-") m[1] = -1;
- var a = m[1] ? Number(m[1]) : 1;
- var b = m[2] ? Number(m[2]) : 0;
- var indices = Selector.pseudos.getIndices(a, b, nodes.length);
- for (var i = 0, node, l = indices.length; node = nodes[i]; i++) {
- for (var j = 0; j < l; j++)
- if (node.nodeIndex == indices[j]) results.push(node);
- }
- }
- h.unmark(nodes);
- h.unmark(indexed);
- return results;
- },
-
- 'empty': function(nodes, value, root) {
- for (var i = 0, results = [], node; node = nodes[i]; i++) {
- // IE treats comments as element nodes
- if (node.tagName == '!' || (node.firstChild && !node.innerHTML.match(/^\s*$/))) continue;
- results.push(node);
- }
- return results;
- },
-
- 'not': function(nodes, selector, root) {
- var h = Selector.handlers, selectorType, m;
- var exclusions = new Selector(selector).findElements(root);
- h.mark(exclusions);
- for (var i = 0, results = [], node; node = nodes[i]; i++)
- if (!node._counted) results.push(node);
- h.unmark(exclusions);
- return results;
- },
-
- 'enabled': function(nodes, value, root) {
- for (var i = 0, results = [], node; node = nodes[i]; i++)
- if (!node.disabled) results.push(node);
- return results;
- },
-
- 'disabled': function(nodes, value, root) {
- for (var i = 0, results = [], node; node = nodes[i]; i++)
- if (node.disabled) results.push(node);
- return results;
- },
-
- 'checked': function(nodes, value, root) {
- for (var i = 0, results = [], node; node = nodes[i]; i++)
- if (node.checked) results.push(node);
- return results;
- }
- },
-
- operators: {
- '=': function(nv, v) { return nv == v; },
- '!=': function(nv, v) { return nv != v; },
- '^=': function(nv, v) { return nv.startsWith(v); },
- '$=': function(nv, v) { return nv.endsWith(v); },
- '*=': function(nv, v) { return nv.include(v); },
- '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },
- '|=': function(nv, v) { return ('-' + nv.toUpperCase() + '-').include('-' + v.toUpperCase() + '-'); }
- },
-
- matchElements: function(elements, expression) {
- var matches = new Selector(expression).findElements(), h = Selector.handlers;
- h.mark(matches);
- for (var i = 0, results = [], element; element = elements[i]; i++)
- if (element._counted) results.push(element);
- h.unmark(matches);
- return results;
- },
-
- findElement: function(elements, expression, index) {
- if (typeof expression == 'number') {
- index = expression; expression = false;
- }
- return Selector.matchElements(elements, expression || '*')[index || 0];
- },
-
- findChildElements: function(element, expressions) {
- var exprs = expressions.join(','), expressions = [];
- exprs.scan(/(([\w#:.~>+()\s-]+|\*|\[.*?\])+)\s*(,|$)/, function(m) {
- expressions.push(m[1].strip());
- });
- var results = [], h = Selector.handlers;
- for (var i = 0, l = expressions.length, selector; i < l; i++) {
- selector = new Selector(expressions[i].strip());
- h.concat(results, selector.findElements(element));
- }
- return (l > 1) ? h.unique(results) : results;
- }
-});
-
-function $$() {
- return Selector.findChildElements(document, $A(arguments));
-}
-var Form = {
- reset: function(form) {
- $(form).reset();
- return form;
- },
-
- serializeElements: function(elements, getHash) {
- var data = elements.inject({}, function(result, element) {
- if (!element.disabled && element.name) {
- var key = element.name, value = $(element).getValue();
- if (value != null) {
- if (key in result) {
- if (result[key].constructor != Array) result[key] = [result[key]];
- result[key].push(value);
- }
- else result[key] = value;
- }
- }
- return result;
- });
-
- return getHash ? data : Hash.toQueryString(data);
- }
-};
-
-Form.Methods = {
- serialize: function(form, getHash) {
- return Form.serializeElements(Form.getElements(form), getHash);
- },
-
- getElements: function(form) {
- return $A($(form).getElementsByTagName('*')).inject([],
- function(elements, child) {
- if (Form.Element.Serializers[child.tagName.toLowerCase()])
- elements.push(Element.extend(child));
- return elements;
- }
- );
- },
-
- getInputs: function(form, typeName, name) {
- form = $(form);
- var inputs = form.getElementsByTagName('input');
-
- if (!typeName && !name) return $A(inputs).map(Element.extend);
-
- for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {
- var input = inputs[i];
- if ((typeName && input.type != typeName) || (name && input.name != name))
- continue;
- matchingInputs.push(Element.extend(input));
- }
-
- return matchingInputs;
- },
-
- disable: function(form) {
- form = $(form);
- Form.getElements(form).invoke('disable');
- return form;
- },
-
- enable: function(form) {
- form = $(form);
- Form.getElements(form).invoke('enable');
- return form;
- },
-
- findFirstElement: function(form) {
- return $(form).getElements().find(function(element) {
- return element.type != 'hidden' && !element.disabled &&
- ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());
- });
- },
-
- focusFirstElement: function(form) {
- form = $(form);
- form.findFirstElement().activate();
- return form;
- },
-
- request: function(form, options) {
- form = $(form), options = Object.clone(options || {});
-
- var params = options.parameters;
- options.parameters = form.serialize(true);
-
- if (params) {
- if (typeof params == 'string') params = params.toQueryParams();
- Object.extend(options.parameters, params);
- }
-
- if (form.hasAttribute('method') && !options.method)
- options.method = form.method;
-
- return new Ajax.Request(form.readAttribute('action'), options);
- }
-}
-
-/*--------------------------------------------------------------------------*/
-
-Form.Element = {
- focus: function(element) {
- $(element).focus();
- return element;
- },
-
- select: function(element) {
- $(element).select();
- return element;
- }
-}
-
-Form.Element.Methods = {
- serialize: function(element) {
- element = $(element);
- if (!element.disabled && element.name) {
- var value = element.getValue();
- if (value != undefined) {
- var pair = {};
- pair[element.name] = value;
- return Hash.toQueryString(pair);
- }
- }
- return '';
- },
-
- getValue: function(element) {
- element = $(element);
- var method = element.tagName.toLowerCase();
- return Form.Element.Serializers[method](element);
- },
-
- clear: function(element) {
- $(element).value = '';
- return element;
- },
-
- present: function(element) {
- return $(element).value != '';
- },
-
- activate: function(element) {
- element = $(element);
- try {
- element.focus();
- if (element.select && (element.tagName.toLowerCase() != 'input' ||
- !['button', 'reset', 'submit'].include(element.type)))
- element.select();
- } catch (e) {}
- return element;
- },
-
- disable: function(element) {
- element = $(element);
- element.blur();
- element.disabled = true;
- return element;
- },
-
- enable: function(element) {
- element = $(element);
- element.disabled = false;
- return element;
- }
-}
-
-/*--------------------------------------------------------------------------*/
-
-var Field = Form.Element;
-var $F = Form.Element.Methods.getValue;
-
-/*--------------------------------------------------------------------------*/
-
-Form.Element.Serializers = {
- input: function(element) {
- switch (element.type.toLowerCase()) {
- case 'checkbox':
- case 'radio':
- return Form.Element.Serializers.inputSelector(element);
- default:
- return Form.Element.Serializers.textarea(element);
- }
- },
-
- inputSelector: function(element) {
- return element.checked ? element.value : null;
- },
-
- textarea: function(element) {
- return element.value;
- },
-
- select: function(element) {
- return this[element.type == 'select-one' ?
- 'selectOne' : 'selectMany'](element);
- },
-
- selectOne: function(element) {
- var index = element.selectedIndex;
- return index >= 0 ? this.optionValue(element.options[index]) : null;
- },
-
- selectMany: function(element) {
- var values, length = element.length;
- if (!length) return null;
-
- for (var i = 0, values = []; i < length; i++) {
- var opt = element.options[i];
- if (opt.selected) values.push(this.optionValue(opt));
- }
- return values;
- },
-
- optionValue: function(opt) {
- // extend element because hasAttribute may not be native
- return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;
- }
-}
-
-/*--------------------------------------------------------------------------*/
-
-Abstract.TimedObserver = function() {}
-Abstract.TimedObserver.prototype = {
- initialize: function(element, frequency, callback) {
- this.frequency = frequency;
- this.element = $(element);
- this.callback = callback;
-
- this.lastValue = this.getValue();
- this.registerCallback();
- },
-
- registerCallback: function() {
- setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);
- },
-
- onTimerEvent: function() {
- var value = this.getValue();
- var changed = ('string' == typeof this.lastValue && 'string' == typeof value
- ? this.lastValue != value : String(this.lastValue) != String(value));
- if (changed) {
- this.callback(this.element, value);
- this.lastValue = value;
- }
- }
-}
-
-Form.Element.Observer = Class.create();
-Form.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
- getValue: function() {
- return Form.Element.getValue(this.element);
- }
-});
-
-Form.Observer = Class.create();
-Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
- getValue: function() {
- return Form.serialize(this.element);
- }
-});
-
-/*--------------------------------------------------------------------------*/
-
-Abstract.EventObserver = function() {}
-Abstract.EventObserver.prototype = {
- initialize: function(element, callback) {
- this.element = $(element);
- this.callback = callback;
-
- this.lastValue = this.getValue();
- if (this.element.tagName.toLowerCase() == 'form')
- this.registerFormCallbacks();
- else
- this.registerCallback(this.element);
- },
-
- onElementEvent: function() {
- var value = this.getValue();
- if (this.lastValue != value) {
- this.callback(this.element, value);
- this.lastValue = value;
- }
- },
-
- registerFormCallbacks: function() {
- Form.getElements(this.element).each(this.registerCallback.bind(this));
- },
-
- registerCallback: function(element) {
- if (element.type) {
- switch (element.type.toLowerCase()) {
- case 'checkbox':
- case 'radio':
- Event.observe(element, 'click', this.onElementEvent.bind(this));
- break;
- default:
- Event.observe(element, 'change', this.onElementEvent.bind(this));
- break;
- }
- }
- }
-}
-
-Form.Element.EventObserver = Class.create();
-Form.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
- getValue: function() {
- return Form.Element.getValue(this.element);
- }
-});
-
-Form.EventObserver = Class.create();
-Form.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {
- getValue: function() {
- return Form.serialize(this.element);
- }
-});
-if (!window.Event) {
- var Event = new Object();
-}
-
-Object.extend(Event, {
- KEY_BACKSPACE: 8,
- KEY_TAB: 9,
- KEY_RETURN: 13,
- KEY_ESC: 27,
- KEY_LEFT: 37,
- KEY_UP: 38,
- KEY_RIGHT: 39,
- KEY_DOWN: 40,
- KEY_DELETE: 46,
- KEY_HOME: 36,
- KEY_END: 35,
- KEY_PAGEUP: 33,
- KEY_PAGEDOWN: 34,
-
- element: function(event) {
- return $(event.target || event.srcElement);
- },
-
- isLeftClick: function(event) {
- return (((event.which) && (event.which == 1)) ||
- ((event.button) && (event.button == 1)));
- },
-
- pointerX: function(event) {
- return event.pageX || (event.clientX +
- (document.documentElement.scrollLeft || document.body.scrollLeft));
- },
-
- pointerY: function(event) {
- return event.pageY || (event.clientY +
- (document.documentElement.scrollTop || document.body.scrollTop));
- },
-
- stop: function(event) {
- if (event.preventDefault) {
- event.preventDefault();
- event.stopPropagation();
- } else {
- event.returnValue = false;
- event.cancelBubble = true;
- }
- },
-
- // find the first node with the given tagName, starting from the
- // node the event was triggered on; traverses the DOM upwards
- findElement: function(event, tagName) {
- var element = Event.element(event);
- while (element.parentNode && (!element.tagName ||
- (element.tagName.toUpperCase() != tagName.toUpperCase())))
- element = element.parentNode;
- return element;
- },
-
- observers: false,
-
- _observeAndCache: function(element, name, observer, useCapture) {
- if (!this.observers) this.observers = [];
- if (element.addEventListener) {
- this.observers.push([element, name, observer, useCapture]);
- element.addEventListener(name, observer, useCapture);
- } else if (element.attachEvent) {
- this.observers.push([element, name, observer, useCapture]);
- element.attachEvent('on' + name, observer);
- }
- },
-
- unloadCache: function() {
- if (!Event.observers) return;
- for (var i = 0, length = Event.observers.length; i < length; i++) {
- Event.stopObserving.apply(this, Event.observers[i]);
- Event.observers[i][0] = null;
- }
- Event.observers = false;
- },
-
- observe: function(element, name, observer, useCapture) {
- element = $(element);
- useCapture = useCapture || false;
-
- if (name == 'keypress' &&
- (Prototype.Browser.WebKit || element.attachEvent))
- name = 'keydown';
-
- Event._observeAndCache(element, name, observer, useCapture);
- },
-
- stopObserving: function(element, name, observer, useCapture) {
- element = $(element);
- useCapture = useCapture || false;
-
- if (name == 'keypress' &&
- (Prototype.Browser.WebKit || element.attachEvent))
- name = 'keydown';
-
- if (element.removeEventListener) {
- element.removeEventListener(name, observer, useCapture);
- } else if (element.detachEvent) {
- try {
- element.detachEvent('on' + name, observer);
- } catch (e) {}
- }
- }
-});
-
-/* prevent memory leaks in IE */
-if (Prototype.Browser.IE)
- Event.observe(window, 'unload', Event.unloadCache, false);
-var Position = {
- // set to true if needed, warning: firefox performance problems
- // NOT neeeded for page scrolling, only if draggable contained in
- // scrollable elements
- includeScrollOffsets: false,
-
- // must be called before calling withinIncludingScrolloffset, every time the
- // page is scrolled
- prepare: function() {
- this.deltaX = window.pageXOffset
- || document.documentElement.scrollLeft
- || document.body.scrollLeft
- || 0;
- this.deltaY = window.pageYOffset
- || document.documentElement.scrollTop
- || document.body.scrollTop
- || 0;
- },
-
- realOffset: function(element) {
- var valueT = 0, valueL = 0;
- do {
- valueT += element.scrollTop || 0;
- valueL += element.scrollLeft || 0;
- element = element.parentNode;
- } while (element);
- return [valueL, valueT];
- },
-
- cumulativeOffset: function(element) {
- var valueT = 0, valueL = 0;
- do {
- valueT += element.offsetTop || 0;
- valueL += element.offsetLeft || 0;
- element = element.offsetParent;
- } while (element);
- return [valueL, valueT];
- },
-
- positionedOffset: function(element) {
- var valueT = 0, valueL = 0;
- do {
- valueT += element.offsetTop || 0;
- valueL += element.offsetLeft || 0;
- element = element.offsetParent;
- if (element) {
- if(element.tagName=='BODY') break;
- var p = Element.getStyle(element, 'position');
- if (p == 'relative' || p == 'absolute') break;
- }
- } while (element);
- return [valueL, valueT];
- },
-
- offsetParent: function(element) {
- if (element.offsetParent) return element.offsetParent;
- if (element == document.body) return element;
-
- while ((element = element.parentNode) && element != document.body)
- if (Element.getStyle(element, 'position') != 'static')
- return element;
-
- return document.body;
- },
-
- // caches x/y coordinate pair to use with overlap
- within: function(element, x, y) {
- if (this.includeScrollOffsets)
- return this.withinIncludingScrolloffsets(element, x, y);
- this.xcomp = x;
- this.ycomp = y;
- this.offset = this.cumulativeOffset(element);
-
- return (y >= this.offset[1] &&
- y < this.offset[1] + element.offsetHeight &&
- x >= this.offset[0] &&
- x < this.offset[0] + element.offsetWidth);
- },
-
- withinIncludingScrolloffsets: function(element, x, y) {
- var offsetcache = this.realOffset(element);
-
- this.xcomp = x + offsetcache[0] - this.deltaX;
- this.ycomp = y + offsetcache[1] - this.deltaY;
- this.offset = this.cumulativeOffset(element);
-
- return (this.ycomp >= this.offset[1] &&
- this.ycomp < this.offset[1] + element.offsetHeight &&
- this.xcomp >= this.offset[0] &&
- this.xcomp < this.offset[0] + element.offsetWidth);
- },
-
- // within must be called directly before
- overlap: function(mode, element) {
- if (!mode) return 0;
- if (mode == 'vertical')
- return ((this.offset[1] + element.offsetHeight) - this.ycomp) /
- element.offsetHeight;
- if (mode == 'horizontal')
- return ((this.offset[0] + element.offsetWidth) - this.xcomp) /
- element.offsetWidth;
- },
-
- page: function(forElement) {
- var valueT = 0, valueL = 0;
-
- var element = forElement;
- do {
- valueT += element.offsetTop || 0;
- valueL += element.offsetLeft || 0;
-
- // Safari fix
- if (element.offsetParent == document.body)
- if (Element.getStyle(element,'position')=='absolute') break;
-
- } while (element = element.offsetParent);
-
- element = forElement;
- do {
- if (!window.opera || element.tagName=='BODY') {
- valueT -= element.scrollTop || 0;
- valueL -= element.scrollLeft || 0;
- }
- } while (element = element.parentNode);
-
- return [valueL, valueT];
- },
-
- clone: function(source, target) {
- var options = Object.extend({
- setLeft: true,
- setTop: true,
- setWidth: true,
- setHeight: true,
- offsetTop: 0,
- offsetLeft: 0
- }, arguments[2] || {})
-
- // find page position of source
- source = $(source);
- var p = Position.page(source);
-
- // find coordinate system to use
- target = $(target);
- var delta = [0, 0];
- var parent = null;
- // delta [0,0] will do fine with position: fixed elements,
- // position:absolute needs offsetParent deltas
- if (Element.getStyle(target,'position') == 'absolute') {
- parent = Position.offsetParent(target);
- delta = Position.page(parent);
- }
-
- // correct by body offsets (fixes Safari)
- if (parent == document.body) {
- delta[0] -= document.body.offsetLeft;
- delta[1] -= document.body.offsetTop;
- }
-
- // set position
- if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px';
- if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px';
- if(options.setWidth) target.style.width = source.offsetWidth + 'px';
- if(options.setHeight) target.style.height = source.offsetHeight + 'px';
- },
-
- absolutize: function(element) {
- element = $(element);
- if (element.style.position == 'absolute') return;
- Position.prepare();
-
- var offsets = Position.positionedOffset(element);
- var top = offsets[1];
- var left = offsets[0];
- var width = element.clientWidth;
- var height = element.clientHeight;
-
- element._originalLeft = left - parseFloat(element.style.left || 0);
- element._originalTop = top - parseFloat(element.style.top || 0);
- element._originalWidth = element.style.width;
- element._originalHeight = element.style.height;
-
- element.style.position = 'absolute';
- element.style.top = top + 'px';
- element.style.left = left + 'px';
- element.style.width = width + 'px';
- element.style.height = height + 'px';
- },
-
- relativize: function(element) {
- element = $(element);
- if (element.style.position == 'relative') return;
- Position.prepare();
-
- element.style.position = 'relative';
- var top = parseFloat(element.style.top || 0) - (element._originalTop || 0);
- var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);
-
- element.style.top = top + 'px';
- element.style.left = left + 'px';
- element.style.height = element._originalHeight;
- element.style.width = element._originalWidth;
- }
-}
-
-// Safari returns margins on body which is incorrect if the child is absolutely
-// positioned. For performance reasons, redefine Position.cumulativeOffset for
-// KHTML/WebKit only.
-if (Prototype.Browser.WebKit) {
- Position.cumulativeOffset = function(element) {
- var valueT = 0, valueL = 0;
- do {
- valueT += element.offsetTop || 0;
- valueL += element.offsetLeft || 0;
- if (element.offsetParent == document.body)
- if (Element.getStyle(element, 'position') == 'absolute') break;
-
- element = element.offsetParent;
- } while (element);
-
- return [valueL, valueT];
- }
-}
-
-Element.addMethods(); \ No newline at end of file
diff --git a/BSF/tools/pwg_rel_create.sh b/BSF/tools/pwg_rel_create.sh
deleted file mode 100644
index a2a584a61..000000000
--- a/BSF/tools/pwg_rel_create.sh
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/bash
-
-# +--------------------------------------------------------------------------+
-# | pwg_rel_create.sh |
-# +--------------------------------------------------------------------------+
-# | author : Pierrick LE GALL <http://le-gall.net/pierrick> |
-# | project : Piwigo |
-# +--------------------------------------------------------------------------+
-
-if [ $# -lt 2 ]
-then
- echo
- echo 'usage : '$(basename $0)' <tag> <version number>'
- echo
- exit 1
-fi
-
-tag=$1
-version=$2
-
-name=phpwebgallery-$version
-
-cd /tmp
-if [ -e $name ]
-then
- rm -rf $name
-fi
-
-if [ -e $version ]
-then
- rm -rf $version
-fi
-mkdir $version
-
-# cvs export -r $tag -d $version phpwebgallery
-svn export http://svn.gna.org/svn/phpwebgallery/tags/$tag $name
-# creating mysql.inc.php empty and writeable
-touch $name/include/mysql.inc.php
-chmod a+w $name/include/mysql.inc.php
-
-# find $name -name "*.php" \
-# | xargs grep -l 'branch 1.7' \
-# | xargs perl -pi -e "s/branch 1.7/${version}/g"
-
-cd /tmp
-for ext in zip tar.gz tar.bz2
-do
- file=$version/$name.$ext
- if [ -f $file ]
- then
- rm $name
- fi
-done
-
-
-zip -r $version/$name.zip $name
-tar -czf $version/$name.tar.gz $name
-tar -cjf $version/$name.tar.bz2 $name
-
-cd /tmp/$version
-md5sum p* >MD5SUMS
diff --git a/BSF/tools/release_creation.readme b/BSF/tools/release_creation.readme
deleted file mode 100644
index a8b4f6f52..000000000
--- a/BSF/tools/release_creation.readme
+++ /dev/null
@@ -1,50 +0,0 @@
-=====================================
- Piwigo release creation guide
-=====================================
-
-Technical creation
-==================
-
-I take release 1.7.0 as an example. In URLs "plg" is my personnal Gna!
-username, so use yours.
-
-- tag creation tags/release-1_7_0 :
-
-$ svn copy \
- -r 1999 \
- -m "Create release 1.7.0 from branch 1.7 r1999" \
- svn+ssh://plg@svn.gna.org/svn/phpwebgallery/branch/branch-1_7 \
- svn+ssh://plg@svn.gna.org/svn/phpwebgallery/tags/release-1_7_0
-
-- checkout new Subversion release 1.7.0
-
-$ svn co svn+ssh://plg@svn.gna.org/svn/phpwebgallery/tags/release-1_7_0 1.7.0
-$ cd 1.7.0
-
-- in include/config_default.inc.php, change the following parameters:
- - $conf['check_upgrade_feed'] = false;
- - $conf['show_version'] = false;
- - $conf['show_gt'] = false;
- - $conf['die_on_sql_error'] = false;
-
-- in include/constants.php, change the PHPWG_VERSION to 1.7.0
-
-- commit your changes to tags/release-1_7_0, with the following comment:
-
-> New version 1.7.0 hard coded.
->
-> Stable release required modifications: don't show version and generation
-> time in footer, don't check the upgrade feed, don't die on sql errors.
-
-$ svn commit
-
-- create the release (pwg_rel_create.sh is in tools directory)
-
-$ mkdir /tmp/1.7.0
-$ cd /tmp/1.7.0
-$ pwg_rel_create.sh release-1_7_0 1.7.0
-$ md5sum p* > MD5SUMS
-
-- upload the release to Gna! download area
-
-$ scp -r /tmp/1.7.0 plg@download.gna.org:/upload/phpwebgallery/release/1.7/
diff --git a/BSF/tools/ws.htm b/BSF/tools/ws.htm
deleted file mode 100644
index 25eb21fe4..000000000
--- a/BSF/tools/ws.htm
+++ /dev/null
@@ -1,402 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-<title>PWG web service explorer</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<script type="text/javascript" src="prototype.js" ></script>
-
-<script type="text/javascript">
-
-function setVisibility(id, vis)
-{
- $(id).style.visibility = vis;
-}
-
-function dumpError(err)
-{
- var s= 'Error ';
- if ('string' === typeof err )
- s += err;
- else
- {
- s += err.name+'<br/>';
- s += err.message;
- if (err.stack!=null)
- {//mozilla only
- s += '<br/><small><pre>'+ err.stack + '</pre></small>';
- }
- }
- $("error").update(s);
-}
-
-var gServiceUrl;
-var gCachedMethods;
-
-Ajax.Responders.register({
-
-onException: function(req, err) {
- try {
- document.pwgError = err;
- dumpError(err);
- }
- catch (e)
- {
- alert (err);
- alert (err.message);
- }
-},
-
-onComplete: function(req, transport) {
- if (!req.responseIsSuccess())
- {
- var s = 'Completion failure\n' + transport.status + ' ' + transport.statusText;
- if (transport.status>=300)
- {
- s += '\n';
- s += transport.responseText.substr(0,1000);
- }
- dumpError(s);
- }
- }
-}
-);
-
-
-function pwgGetJsonResult(transport)
-{
- var resp;
- try {
- eval('resp = ' + transport.responseText);
- }
- catch (e)
- {
- var s = e.message;
- s += '\n' + transport.responseText.substr(0,1000).escapeHTML();
- throw new Error( s );
- }
- if (resp==null || resp.result==null || resp.stat==null || resp.stat!='ok')
- {
- var s = 'JSON evaluation error';
- if (resp)
- {
- if (resp.stat!=null) s+= '\n'+resp.stat;
- if (resp.message!=null) s+= '\n'+ resp.message;
- }
- throw new Error(s);
- }
- return resp.result;
-}
-
-function pwgChangeUrl()
-{
- $("error").update("");
- setVisibility("methodListWrapper", "hidden");
- $("methodList").update("");
- setVisibility("methodWrapper", "hidden");
- setVisibility("methodDetailWrapper", "hidden");
-
- gServiceUrl = $F('ws_url');
- gCachedMethods = new Hash();
-
- try {
- var ajaxReq = new Ajax.Request(
- gServiceUrl,
- {method:'get', parameters:'format=json&method=reflection.getMethodList',
- onSuccess: function (r) { onSuccess_getMethodList(r); }
- }
- )
- }catch (e)
- {
- dumpError(e);
- }
- return false;
-}
-
-function onSuccess_getMethodList(transport)
-{
- var result = pwgGetJsonResult(transport);
- var ml = '';
- for (var i=0; i<result.methods.length; i++)
- {
- ml += '<li><a href="#" onclick="return pwgSelectMethod(this.innerHTML)">'+ result.methods[i]+'</a></li>';
- }
- $("methodList").update(ml);
- setVisibility("methodListWrapper", "visible");
-}
-
-function pwgSelectMethod(methodName)
-{
- $("error").update("");
- $("methodName").update(methodName);
- setVisibility("methodDetailWrapper", "hidden");
- setVisibility("methodWrapper", "visible");
-
- if ( gCachedMethods[methodName] )
- fillNewMethod( gCachedMethods[methodName] );
- else
- {
- try {
- var ajaxReq = new Ajax.Request(
- gServiceUrl,
- {method:'get', parameters:'format=json&method=reflection.getMethodDetails&methodName='+methodName,
- onSuccess: function (r) { onSuccess_getMethodDetails(r); }
- }
- )
- }catch (e)
- {
- dumpError( e );
- }
- }
- return false;
-}
-
-function onSuccess_getMethodDetails(transport)
-{
- var result = pwgGetJsonResult(transport);
- fillNewMethod( gCachedMethods[result.name] = $H(result) );
-}
-
-function fillNewMethod(method)
-{
- var methodParamsElt = $("methodParams");
- while (methodParamsElt.tBodies[0].rows.length)
- methodParamsElt.tBodies[0].deleteRow(methodParamsElt.tBodies[0].rows.length-1);
-
- if (method.params && method.params.length>0)
- {
- for (var i=0; i<method.params.length; i++)
- {
- var row = methodParamsElt.tBodies[0].insertRow(-1);
- var isOptional = method.params[i].optional;
- var acceptArray = method.params[i].acceptArray;
- var defaultValue = method.params[i].defaultValue == null ? '' : method.params[i].defaultValue;
-
- row.insertCell(0).innerHTML = method.params[i].name;
- row.insertCell(1).innerHTML = '<span title="parameter is '+(isOptional ? 'optional':'required') +'">'+(isOptional ? '?':'*')+'</span>'
- + (method.params[i].acceptArray ? ' <span title="parameter can be an array; use | (pipe) character to split values">[ ]</span>':'');
- row.insertCell(2).innerHTML = '<input id="methodParameterSend_'+i+'" type="checkbox" '+(isOptional ? '':'checked="checked"')+'/>';
- row.insertCell(3).innerHTML = '<input id="methodParameterValue_'+i+'"" value="'+defaultValue+'" style="width:99%" onchange="$(\'methodParameterSend_'+i+'\').checked=true;"/>';
- }
- }
- $("methodDescription").update(method.description);
- setVisibility("methodDetailWrapper", "visible");
-}
-
-function pwgInvokeMethod( newWindow )
-{
- var methodName = $('methodName').innerHTML;
- var method = gCachedMethods[methodName];
-
- var reqUrl = gServiceUrl;
- reqUrl += "?format="+$F('responseFormat');
-
- if ($('requestFormat').value == 'get')
- {
- reqUrl += "&method="+methodName;
- for ( var i=0; i<method.params.length; i++)
- {
- if (! $('methodParameterSend_'+i).checked)
- continue;
-
- if ( method.params[i].acceptArray && $F('methodParameterValue_'+i).split('|').length > 1 )
- {
- $F('methodParameterValue_'+i).split('|').each(
- function(v) {
- reqUrl += '&'+method.params[i].name+'[]='+v;
- }
- );
- }
- else
- reqUrl += '&'+method.params[i].name+'='+$F('methodParameterValue_'+i);
- }
- if ( !newWindow )
- $("invokeFrame").src = reqUrl;
- else
- window.open(reqUrl);
- }
- else
- {
- var form = $("invokeForm");
- form.action = reqUrl;
- var t = '<input type="hidden" name="'+'method'+'" value="'+methodName+'"/>';
- for ( var i=0; i<method.params.length; i++)
- {
- if (! $('methodParameterSend_'+i).checked)
- continue;
-
- if ( method.params[i].acceptArray && $F('methodParameterValue_'+i).split('|').length > 1 )
- {
- $F('methodParameterValue_'+i).split('|').each(
- function(v) {
- t += '<input type="hidden" name="'+method.params[i].name+'[]" value="'+v+'"/>';
- }
- );
- }
- else
- t += '<input type="hidden" name="'+method.params[i].name+'" value="'+$F('methodParameterValue_'+i)+'"/>';
- }
- form.innerHTML = t;
- form.target = newWindow ? "_blank" : "invokeFrame";
- form.submit();
- }
- return false;
-}
-</script>
-
-
-<style>
-#methodListWrapper {
- width: 13em;
- float: left;
- display: inline;
- visibility: hidden;
-}
-
-#methodList {
- padding-left: 10px;
- margin-left: 15px;
-}
-
-#methodWrapper {
- margin-left: 14em;
- visibility: hidden;
-}
-
-#methodName {
- margin-top: 0;
- margin-bottom: 3px;
-}
-
-
-#error {
- height: 90px;
- overflow: scroll;
- color: red;
-}
-
-#methodParams {
- border-collapse: collapse;
- font-size: small;
-}
-
-#methodParams input {
- font-size: 90%;
- border: 1px solid black;
- text-indent: 2px;
-}
-
-
-a {
- color: #02f;
- background-color: white;
- text-decoration: underline;
-}
-
-a:hover {
- color: white;
- background-color: #02f;
- text-decoration: none;
- cursor:pointer;
-}
-
-</style>
-
-</head>
-
-
-<body>
-
-<div>
- <label>PWG Web service url
- <input name="ws_url" id="ws_url" size="64"/>
-<script type="text/javascript">
- var match = document.location.toString().match(/^(https?.*\/)tools\/ws\.html?$/);
- if (match!=null) $('ws_url').value = match[1]+'ws.php';
-</script>
- </label>
- <a href="#" onclick="return pwgChangeUrl();">Go!</a>
-</div>
-
-<div id="error">
-</div>
-
-<div>
-
-<div id="methodListWrapper"><h2>Methods</h2>
- <ul id="methodList">
- <li><a href="#" onclick="return pwgSelectMethod(this.innerHTML)">getVersion</a></li>
- </ul>
-</div>
-
-<div id="methodWrapper">
- <h2 id="methodName"></h2>
- <div id="methodDetailWrapper">
-
- <table>
- <tr style="vertical-align:top">
-
- <td>
- <div id="methodDescription"></div>
- <table>
- <tr>
- <td>Request format:</td>
- <td>
- <select id="requestFormat">
- <option value="get" selected="selected">GET</option>
- <option value="post">POST</option>
- </select>
- </td>
- </tr>
-
- <tr>
- <td>Response format:</td>
- <td>
- <select id="responseFormat">
- <option value="rest" selected="selected">REST (xml)</option>
- <option value="json">JSON</option>
- <option value="php">PHP serial</option>
- <option value="xmlrpc">XML RPC</option>
- </select>
- </td>
- </tr>
- </table>
- <p>
- <a href="#" onclick="return pwgInvokeMethod(false)">Invoke</a>
- <a href="#" onclick="return pwgInvokeMethod(true)">Invoke (new Window)</a>
- </p>
- </td>
-
-
- <td>
- <table id="methodParams" border="1" cellspacing="0" cellpadding="2px">
- <thead>
- <tr>
- <td style="width:150px">Parameter</td>
- <td>Extra</td>
- <td>Send</td>
- <td style="width:160px">Value</td>
- </tr>
- </thead>
- <tbody>
- </tbody>
- </table>
- </td>
-
- </tr>
- </table>
-
- <div style="display:none;">
- <!-- hiddenForm for POST -->
- <form method="post" action="" target="invokeFrame" id="invokeForm">
- <input type="submit" value="submit"/>
- </form>
- </div>
-
- <iframe width="100%" height="400px" id="invokeFrame" name="invokeFrame" style="clear:both"></iframe>
- </div> <!-- methodDetailWrapper -->
-</div> <!-- methodWrapper -->
-
-</div>
-
-</body>
-</html>
diff --git a/BSF/upgrade.php b/BSF/upgrade.php
deleted file mode 100644
index 73cf376ee..000000000
--- a/BSF/upgrade.php
+++ /dev/null
@@ -1,316 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-define('PHPWG_ROOT_PATH', './');
-
-include_once(PHPWG_ROOT_PATH.'include/functions.inc.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/functions_upgrade.php');
-include(PHPWG_ROOT_PATH.'include/template.class.php');
-
-include(PHPWG_ROOT_PATH.'include/mysql.inc.php');
-include(PHPWG_ROOT_PATH . 'include/config_default.inc.php');
-@include(PHPWG_ROOT_PATH. 'include/config_local.inc.php');
-
-check_upgrade();
-
-prepare_conf_upgrade();
-
-include_once(PHPWG_ROOT_PATH.'include/constants.php');
-define('PREFIX_TABLE', $prefixeTable);
-
-// Database connection
-mysql_connect( $cfgHote, $cfgUser, $cfgPassword )
-or die ( "Could not connect to database server" );
-mysql_select_db( $cfgBase )
-or die ( "Could not connect to database" );
-// +-----------------------------------------------------------------------+
-// | tricky output |
-// +-----------------------------------------------------------------------+
-echo '<!-- This is an HTML comment given in order to make IE outputs';
-echo ' the code.'."\n";
-echo ' Indeed, IE doesn\'t start to send output until a limit';
-echo ' of XXX bytes '."\n";
-echo str_repeat( ' ', 80 )."\n";
-echo str_repeat( ' ', 80 )."\n";
-echo str_repeat( ' ', 80 )."\n";
-echo '-->'."\n";
-flush();
-// +-----------------------------------------------------------------------+
-// | functions |
-// +-----------------------------------------------------------------------+
-
-/**
- * list all tables in an array
- *
- * @return array
- */
-function get_tables()
-{
- $tables = array();
-
- $query = '
-SHOW TABLES
-;';
- $result = mysql_query($query);
-
- while ($row = mysql_fetch_row($result))
- {
- if (preg_match('/^'.PREFIX_TABLE.'/', $row[0]))
- {
- array_push($tables, $row[0]);
- }
- }
-
- return $tables;
-}
-
-/**
- * list all columns of each given table
- *
- * @return array of array
- */
-function get_columns_of($tables)
-{
- $columns_of = array();
-
- foreach ($tables as $table)
- {
- $query = '
-DESC '.$table.'
-;';
- $result = mysql_query($query);
-
- $columns_of[$table] = array();
-
- while ($row = mysql_fetch_row($result))
- {
- array_push($columns_of[$table], $row[0]);
- }
- }
-
- return $columns_of;
-}
-
-/**
- */
-function print_time($message)
-{
- global $last_time;
-
- $new_time = get_moment();
- echo '<pre>['.get_elapsed_time($last_time, $new_time).']';
- echo ' '.$message;
- echo '</pre>';
- flush();
- $last_time = $new_time;
-}
-
-// +-----------------------------------------------------------------------+
-// | playing zone |
-// +-----------------------------------------------------------------------+
-
-// echo implode('<br>', get_tables());
-// echo '<pre>'; print_r(get_columns_of(get_tables())); echo '</pre>';
-
-// foreach (get_available_upgrade_ids() as $upgrade_id)
-// {
-// echo $upgrade_id, '<br>';
-// }
-
-// +-----------------------------------------------------------------------+
-// | template initialization |
-// +-----------------------------------------------------------------------+
-
-$template = new Template(PHPWG_ROOT_PATH.'template/yoga');
-$template->set_filenames(array('upgrade'=>'upgrade.tpl'));
-$template->assign('RELEASE', PHPWG_VERSION);
-
-// +-----------------------------------------------------------------------+
-// | upgrade choice |
-// +-----------------------------------------------------------------------+
-
-$tables = get_tables();
-$columns_of = get_columns_of($tables);
-
-if (!isset($_GET['version']))
-{
- // find the current release
- if (!in_array('param', $columns_of[PREFIX_TABLE.'config']))
- {
- // we're in branch 1.3, important upgrade, isn't it?
- if (in_array(PREFIX_TABLE.'user_category', $tables))
- {
- $current_release = '1.3.1';
- }
- else
- {
- $current_release = '1.3.0';
- }
- }
- else if (!in_array(PREFIX_TABLE.'user_cache', $tables))
- {
- $current_release = '1.4.0';
- }
- else if (!in_array(PREFIX_TABLE.'tags', $tables))
- {
- $current_release = '1.5.0';
- }
- else if ( !in_array(PREFIX_TABLE.'history_summary', $tables) )
- {
- if (!in_array('auto_login_key', $columns_of[PREFIX_TABLE.'user_infos']))
- {
- $current_release = '1.6.0';
- }
- else
- {
- $current_release = '1.6.2';
- }
- }
- else
- {
- die('No upgrade required, the database structure is up to date');
- }
-
- $template->assign(
- 'introduction',
- array(
- 'CURRENT_RELEASE' => $current_release,
- 'RUN_UPGRADE_URL' =>
- PHPWG_ROOT_PATH.'upgrade.php?version='.$current_release,
- )
- );
-}
-
-// +-----------------------------------------------------------------------+
-// | upgrade launch |
-// +-----------------------------------------------------------------------+
-
-else
-{
- if (in_array(PREFIX_TABLE.'history_summary', $tables))
- {
- die('No database upgrade required, do not refresh the page');
- }
-
- $upgrade_file = PHPWG_ROOT_PATH.'install/upgrade_'.$_GET['version'].'.php';
- if (is_file($upgrade_file))
- {
- $page['infos'] = array();
- $page['upgrade_start'] = get_moment();
- $conf['die_on_sql_error'] = false;
- include($upgrade_file);
-
- // Available upgrades must be ignored after a fresh installation. To
- // make PWG avoid upgrading, we must tell it upgrades have already been
- // made.
- list($dbnow) = mysql_fetch_row(pwg_query('SELECT NOW();'));
- define('CURRENT_DATE', $dbnow);
- $datas = array();
- foreach (get_available_upgrade_ids() as $upgrade_id)
- {
- array_push(
- $datas,
- array(
- 'id' => $upgrade_id,
- 'applied' => CURRENT_DATE,
- 'description' => 'upgrade included in migration',
- )
- );
- }
- mass_inserts(
- UPGRADE_TABLE,
- array_keys($datas[0]),
- $datas
- );
-
- // Create empty local files to avoid log errors
- create_empty_local_files();
-
- $page['upgrade_end'] = get_moment();
-
- $template->assign(
- 'upgrade',
- array(
- 'VERSION' => $_GET['version'],
- 'TOTAL_TIME' => get_elapsed_time(
- $page['upgrade_start'],
- $page['upgrade_end']
- ),
- 'SQL_TIME' => number_format(
- $page['queries_time'],
- 3,
- '.',
- ' '
- ).' s',
- 'NB_QUERIES' => $page['count_queries']
- )
- );
-
- array_push(
- $page['infos'],
- '[security] delete files "upgrade.php", "upgrade_feed.php", "install.php" and "install"
-directory'
- );
-
- array_push(
- $page['infos'],
- 'in include/mysql.inc.php, remove
-<pre style="background-color:lightgray">
-define(\'PHPWG_IN_UPGRADE\', true);
-</pre>'
- );
-
- array_push(
- $page['infos'],
- 'Perform a maintenance check in [Administration>General>Maintenance]
-if you encounter any problem.'
- );
-
- $template->assign('infos', $page['infos']);
-
- $query = '
-UPDATE '.USER_CACHE_TABLE.'
- SET need_update = \'true\'
-;';
-
- pwg_query($query);
- $query = '
-REPLACE INTO '.PLUGINS_TABLE.'
- (id, state)
- VALUES (\'c13y_upgrade\', \'active\')
-;';
- pwg_query($query);
- }
- else
- {
- die('Hacking attempt');
- }
-}
-
-// +-----------------------------------------------------------------------+
-// | sending html code |
-// +-----------------------------------------------------------------------+
-
-$template->pparse('upgrade');
-?>
diff --git a/BSF/upgrade_feed.php b/BSF/upgrade_feed.php
deleted file mode 100644
index 44ccbe5db..000000000
--- a/BSF/upgrade_feed.php
+++ /dev/null
@@ -1,93 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-define('PHPWG_ROOT_PATH', './');
-
-include_once(PHPWG_ROOT_PATH.'include/functions.inc.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
-include_once(PHPWG_ROOT_PATH.'admin/include/functions_upgrade.php');
-include(PHPWG_ROOT_PATH.'include/mysql.inc.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when it is not ok |
-// +-----------------------------------------------------------------------+
-check_upgrade();
-
-prepare_conf_upgrade();
-
-define('PREFIX_TABLE', $prefixeTable);
-define('UPGRADES_PATH', PHPWG_ROOT_PATH.'install/db');
-
-// +-----------------------------------------------------------------------+
-// | Database connection |
-// +-----------------------------------------------------------------------+
-
-mysql_connect($cfgHote, $cfgUser, $cfgPassword)
-or die("Could not connect to database server");
-mysql_select_db($cfgBase)
-or die("Could not connect to database");
-
-// +-----------------------------------------------------------------------+
-// | Upgrades |
-// +-----------------------------------------------------------------------+
-
-// retrieve already applied upgrades
-$query = '
-SELECT id
- FROM '.PREFIX_TABLE.'upgrade
-;';
-$applied = array_from_query($query, 'id');
-
-// retrieve existing upgrades
-$existing = get_available_upgrade_ids();
-
-// which upgrades need to be applied?
-$to_apply = array_diff($existing, $applied);
-
-echo '<pre>';
-echo count($to_apply).' upgrades to apply';
-
-foreach ($to_apply as $upgrade_id)
-{
- unset($upgrade_description);
-
- echo "\n\n";
- echo '=== upgrade '.$upgrade_id."\n";
-
- // include & execute upgrade script. Each upgrade script must contain
- // $upgrade_description variable which describe briefly what the upgrade
- // script does.
- include(UPGRADES_PATH.'/'.$upgrade_id.'-database.php');
-
- // notify upgrade
- $query = '
-INSERT INTO '.PREFIX_TABLE.'upgrade
- (id, applied, description)
- VALUES
- (\''.$upgrade_id.'\', NOW(), \''.$upgrade_description.'\')
-;';
- pwg_query($query);
-}
-
-echo '</pre>';
-?>
diff --git a/BSF/upload.php b/BSF/upload.php
deleted file mode 100644
index 83131c80d..000000000
--- a/BSF/upload.php
+++ /dev/null
@@ -1,438 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-define('PHPWG_ROOT_PATH','./');
-
-// +-----------------------------------------------------------------------+
-// | Includes |
-// +-----------------------------------------------------------------------+
-include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
-include_once(PHPWG_ROOT_PATH.'include/upload.class.php');
-
-// +-----------------------------------------------------------------------+
-// | Check Access and exit when user status is not ok |
-// +-----------------------------------------------------------------------+
-check_status($conf['upload_user_access']);
-
-// +-----------------------------------------------------------------------+
-// | Create upload object |
-// +-----------------------------------------------------------------------+
-$upload = new Upload();
-
-
-$username = !empty($_POST['username']) ? $_POST['username']:(is_classic_user() ? $user['username'] : '');
-$mail_address = !empty($_POST['mail_address']) ? $_POST['mail_address'] : (is_classic_user() ? $user['email'] : '');
-$name = !empty($_POST['name']) ? $_POST['name'] : '';
-$author = !empty($_POST['author']) ? $_POST['author'] : (is_classic_user() ? $user['username'] : '');
-$date_creation = !empty($_POST['date_creation']) ? $_POST['date_creation'] : '';
-$comment = !empty($_POST['comment']) ? $_POST['comment'] : '';
-
-//------------------------------------------------------------------- functions
-// The validate_upload function checks if the image of the given path is valid.
-// A picture is valid when :
-// - width, height and filesize are not higher than the maximum
-// filesize authorized by the administrator
-// - the type of the picture is among jpg, gif and png
-// The function returns an array containing :
-// - $result['type'] contains the type of the image ('jpg', 'gif' or 'png')
-// - $result['error'] contains an array with the different errors
-// found with the picture
-function validate_upload( $temp_name, $my_max_file_size,
- $image_max_width, $image_max_height )
-{
- global $conf, $lang, $page, $mail_address;
-
- $result = array();
- $result['error'] = array();
- //echo $_FILES['picture']['name']."<br />".$temp_name;
- $extension = get_extension( $_FILES['picture']['name'] );
- if (!in_array($extension, $conf['picture_ext']))
- {
- array_push( $result['error'], l10n('upload_advise_filetype') );
- return $result;
- }
- if ( !isset( $_FILES['picture'] ) )
- {
- // do we even have a file?
- array_push( $result['error'], "You did not upload anything!" );
- }
- else if ( $_FILES['picture']['size'] > $my_max_file_size * 1024 )
- {
- array_push( $result['error'],
- l10n('upload_advise_filesize').$my_max_file_size.' KB' );
- }
- else
- {
- // check if we are allowed to upload this file_type
- // upload de la photo sous un nom temporaire
- if ( !move_uploaded_file( $_FILES['picture']['tmp_name'], $temp_name ) )
- {
- array_push( $result['error'], l10n('upload_cannot_upload') );
- }
- else
- {
- $size = getimagesize( $temp_name );
- if ( isset( $image_max_width )
- and $image_max_width != ""
- and $size[0] > $image_max_width )
- {
- array_push( $result['error'],
- l10n('upload_advise_width').$image_max_width.' px' );
- }
- if ( isset( $image_max_height )
- and $image_max_height != ""
- and $size[1] > $image_max_height )
- {
- array_push( $result['error'],
- l10n('upload_advise_height').$image_max_height.' px' );
- }
- // $size[2] == 1 means GIF
- // $size[2] == 2 means JPG
- // $size[2] == 3 means PNG
- switch ( $size[2] )
- {
- case 1 : $result['type'] = 'gif'; break;
- case 2 : $result['type'] = 'jpg'; break;
- case 3 : $result['type'] = 'png'; break;
- default :
- array_push( $result['error'], l10n('upload_advise_filetype') );
- }
- }
- }
- if ( sizeof( $result['error'] ) > 0 )
- {
- // destruction de l'image avec le nom temporaire
- @unlink( $temp_name );
- }
- else
- {
- @chmod( $temp_name, 0644);
- }
-
- //------------------------------------------------------------ log informations
- pwg_log();
-
- return $result;
-}
-
-//-------------------------------------------------- access authorization check
-if (isset($_POST['category']) and is_numeric($_POST['category']))
-{
- $page['category'] = $_POST['category'];
-}
-else
-if (isset($_GET['cat']) and is_numeric($_GET['cat']))
-{
- $page['category'] = $_GET['cat'];
-}
-else
-{
- $page['category'] = null;
-}
-
-if (! empty($page['category']))
-{
- check_restrictions($page['category']);
- $category = get_cat_info($page['category']);
- $category['cat_dir'] = get_complete_dir($page['category']);
-
- if (url_is_remote($category['cat_dir']) or !$category['uploadable'])
- {
- page_forbidden('upload not allowed');
- }
-}
-else
-{
- if (isset($_POST['submit']))
- {
- // $page['category'] may be set by a futur plugin but without it
- bad_request('invalid parameters');
- }
- else
- {
- $category = null;
- }
-}
-
-$error = array();
-$page['upload_successful'] = false;
-if ( isset( $_GET['waiting_id'] ) )
-{
- $page['waiting_id'] = $_GET['waiting_id'];
-}
-
-//-------------------------------------------------------------- picture upload
-// verfying fields
-if ( isset( $_POST['submit'] ) and !isset( $_GET['waiting_id'] ) )
-{
- $path = $category['cat_dir'].$_FILES['picture']['name'];
- if ( @is_file( $path ) )
- {
- array_push( $error, l10n('upload_file_exists') );
- }
- // test de la présence des champs obligatoires
- if ( empty($_FILES['picture']['name']))
- {
- array_push( $error, l10n('upload_filenotfound') );
- }
- if ( !ereg( "([_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+)",
- $_POST['mail_address'] ) )
- {
- array_push( $error, l10n('reg_err_mail_address') );
- }
- if ( empty($_POST['username']) )
- {
- array_push( $error, l10n('upload_err_username') );
- }
-
- $date_creation = '';
- if ( !empty($_POST['date_creation']) )
- {
- list( $day,$month,$year ) = explode( '/', $_POST['date_creation'] );
- // int checkdate ( int month, int day, int year)
- if (checkdate($month, $day, $year))
- {
- $date_creation = $year.'-'.$month.'-'.$day;
- }
- else
- {
- array_push( $error, l10n('err_date') );
- }
- }
- // creation of the "infos" field :
- // <infos author="Pierrick LE GALL" comment="my comment"
- // date_creation="2004-08-14" name="" />
- $xml_infos = '<infos';
- $xml_infos.= encodeAttribute('author', $_POST['author']);
- $xml_infos.= encodeAttribute('comment', $_POST['comment']);
- $xml_infos.= encodeAttribute('date_creation', $date_creation);
- $xml_infos.= encodeAttribute('name', $_POST['name']);
- $xml_infos.= ' />';
-
- if ( !preg_match( '/^[a-zA-Z0-9-_.]+$/', $_FILES['picture']['name'] ) )
- {
- array_push( $error, l10n('update_wrong_dirname') );
- }
-
- if ( sizeof( $error ) == 0 )
- {
- $result = validate_upload( $path, $conf['upload_maxfilesize'],
- $conf['upload_maxwidth'],
- $conf['upload_maxheight'] );
- for ( $j = 0; $j < sizeof( $result['error'] ); $j++ )
- {
- array_push( $error, $result['error'][$j] );
- }
- }
-
- if ( sizeof( $error ) == 0 )
- {
- $query = 'insert into '.WAITING_TABLE;
- $query.= ' (storage_category_id,file,username,mail_address,date,infos)';
- $query.= ' values ';
- $query.= '('.$page['category'].",'".$_FILES['picture']['name']."'";
- $query.= ",'".htmlspecialchars( $_POST['username'], ENT_QUOTES)."'";
- $query.= ",'".$_POST['mail_address']."',".time().",'".$xml_infos."')";
- $query.= ';';
- pwg_query( $query );
- $page['waiting_id'] = mysql_insert_id();
-
- if ($conf['email_admin_on_picture_uploaded'])
- {
- include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
-
- $waiting_url = get_absolute_root_url().'admin.php?page=upload';
-
- $keyargs_content = array
- (
- get_l10n_args('Category: %s', get_cat_display_name($category['upper_names'], null, false)),
- get_l10n_args('Picture name: %s', $_FILES['picture']['name']),
- get_l10n_args('User: %s', $_POST['username']),
- get_l10n_args('Email: %s', $_POST['mail_address']),
- get_l10n_args('Picture name: %s', $_POST['name']),
- get_l10n_args('Author: %s', $_POST['author']),
- get_l10n_args('Creation date: %s', $_POST['date_creation']),
- get_l10n_args('Comment: %s', $_POST['comment']),
- get_l10n_args('', ''),
- get_l10n_args('Waiting page: %s', $waiting_url)
- );
-
- pwg_mail_notification_admins
- (
- get_l10n_args('Picture uploaded by %s', $_POST['username']),
- $keyargs_content
- );
- }
- }
-}
-
-//------------------------------------------------------------ thumbnail upload
-if ( isset( $_POST['submit'] ) and isset( $_GET['waiting_id'] ) )
-{
- // upload of the thumbnail
- $query = 'select file';
- $query.= ' from '.WAITING_TABLE;
- $query.= ' where id = '.$_GET['waiting_id'];
- $query.= ';';
- $result= pwg_query( $query );
- $row = mysql_fetch_array( $result );
- $file = substr ( $row['file'], 0, strrpos ( $row['file'], ".") );
- $extension = get_extension( $_FILES['picture']['name'] );
-
- if (($path = mkget_thumbnail_dir($category['cat_dir'], $error)) != false)
- {
- $path.= '/'.$conf['prefix_thumbnail'].$file.'.'.$extension;
- $result = validate_upload( $path, $conf['upload_maxfilesize'],
- $conf['upload_maxwidth_thumbnail'],
- $conf['upload_maxheight_thumbnail'] );
- for ( $j = 0; $j < sizeof( $result['error'] ); $j++ )
- {
- array_push( $error, $result['error'][$j] );
- }
- }
-
- if ( sizeof( $error ) == 0 )
- {
- $query = 'update '.WAITING_TABLE;
- $query.= " set tn_ext = '".$extension."'";
- $query.= ' where id = '.$_GET['waiting_id'];
- $query.= ';';
- pwg_query( $query );
- $page['upload_successful'] = true;
- }
-}
-
-//
-// Start output of page
-//
-$title= l10n('upload_title');
-$page['body_id'] = 'theUploadPage';
-include(PHPWG_ROOT_PATH.'include/page_header.php');
-$template->set_filenames(array('upload'=>'upload.tpl'));
-
-// Load category list
-$query = '
-SELECT
- id, name, uppercats, global_rank
-FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.'
- ON id = cat_id and user_id = '.$user['id'].'
-WHERE
- uploadable = \'true\'
- '.get_sql_condition_FandF
- (
- array
- (
- 'visible_categories' => 'id',
- ),
- 'AND'
- ).'
-;';
-display_select_cat_wrapper($query, array($page['category']), 'categories');
-
-$u_form = PHPWG_ROOT_PATH.'upload.php?cat='.$page['category'];
-if ( isset( $page['waiting_id'] ) )
-{
-$u_form.= '&amp;waiting_id='.$page['waiting_id'];
-}
-
-if ( isset( $page['waiting_id'] ) )
-{
- $advise_title = l10n('upload_advise_thumbnail').$_FILES['picture']['name'];
-}
-else
-{
- $advise_title = l10n('Choose an image');
-}
-
-$template->assign(
- array(
- 'ADVISE_TITLE' => $advise_title,
- 'NAME' => $username,
- 'EMAIL' => $mail_address,
- 'NAME_IMG' => $name,
- 'AUTHOR_IMG' => $author,
- 'DATE_IMG' => $date_creation,
- 'COMMENT_IMG' => $comment,
-
- 'F_ACTION' => $u_form,
-
- 'U_RETURN' => make_index_url(array('category' => $category)),
- )
- );
-
-$template->assign('errors', $error);
-$template->assign('UPLOAD_SUCCESSFUL', $page['upload_successful'] );
-
-if ( !$page['upload_successful'] )
-{
-//--------------------------------------------------------------------- advises
- if ( !empty($conf['upload_maxfilesize']) )
- {
- $content = l10n('upload_advise_filesize');
- $content.= $conf['upload_maxfilesize'].' KB';
- $template->append('advises', $content);
- }
-
- if ( isset( $page['waiting_id'] ) )
- {
- if ( $conf['upload_maxwidth_thumbnail'] != '' )
- {
- $content = l10n('upload_advise_width');
- $content.= $conf['upload_maxwidth_thumbnail'].' px';
- $template->append('advises', $content);
- }
- if ( $conf['upload_maxheight_thumbnail'] != '' )
- {
- $content = l10n('upload_advise_height');
- $content.= $conf['upload_maxheight_thumbnail'].' px';
- $template->append('advises', $content);
- }
- }
- else
- {
- if ( $conf['upload_maxwidth'] != '' )
- {
- $content = l10n('upload_advise_width');
- $content.= $conf['upload_maxwidth'].' px';
- $template->append('advises', $content);
- }
- if ( $conf['upload_maxheight'] != '' )
- {
- $content = l10n('upload_advise_height');
- $content.= $conf['upload_maxheight'].' px';
- $template->append('advises', $content);
- }
- }
- $template->append('advises', l10n('upload_advise_filetype'));
-
-//----------------------------------------- optionnal username and mail address
- if ( !isset( $page['waiting_id'] ) )
- {
- $template->assign('SHOW_FORM_FIELDS', true);
- }
-}
-
-//----------------------------------------------------------- html code display
-$template->parse('upload');
-include(PHPWG_ROOT_PATH.'include/page_tail.php');
-?>
diff --git a/BSF/ws.php b/BSF/ws.php
deleted file mode 100644
index 80f543f06..000000000
--- a/BSF/ws.php
+++ /dev/null
@@ -1,235 +0,0 @@
-<?php
-// +-----------------------------------------------------------------------+
-// | Piwigo - a PHP based picture gallery |
-// +-----------------------------------------------------------------------+
-// | Copyright(C) 2008 Piwigo Team http://piwigo.org |
-// | Copyright(C) 2003-2008 PhpWebGallery Team http://phpwebgallery.net |
-// | Copyright(C) 2002-2003 Pierrick LE GALL http://le-gall.net/pierrick |
-// +-----------------------------------------------------------------------+
-// | This program is free software; you can redistribute it and/or modify |
-// | it under the terms of the GNU General Public License as published by |
-// | the Free Software Foundation |
-// | |
-// | This program is distributed in the hope that it will be useful, but |
-// | WITHOUT ANY WARRANTY; without even the implied warranty of |
-// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
-// | General Public License for more details. |
-// | |
-// | You should have received a copy of the GNU General Public License |
-// | along with this program; if not, write to the Free Software |
-// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
-// | USA. |
-// +-----------------------------------------------------------------------+
-
-define ('PHPWG_ROOT_PATH', './');
-
-include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
-check_status(ACCESS_FREE);
-include_once(PHPWG_ROOT_PATH.'include/ws_core.inc.php');
-
-if ( !$conf['allow_web_services'] )
-{
- page_forbidden('Web services are disabled');
-}
-
-/**
- * event handler that registers standard methods with the web service
- */
-function ws_addDefaultMethods( $arr )
-{
- include_once(PHPWG_ROOT_PATH.'include/ws_functions.inc.php');
- global $conf, $user;
- $service = &$arr[0];
- $service->addMethod('pwg.getVersion', 'ws_getVersion', null,
- 'retrieves the PWG version');
-
- $service->addMethod('pwg.categories.getImages', 'ws_categories_getImages',
- array(
- 'cat_id'=>array('default'=>0, 'flags'=>WS_PARAM_FORCE_ARRAY),
- 'recursive'=>array('default'=>false),
- 'per_page' => array('default'=>100, 'maxValue'=>$conf['ws_max_images_per_page']),
- 'page' => array('default'=>0),
- 'order' => array('default'=>null),
- 'f_min_rate' => array( 'default'=> null ),
- 'f_max_rate' => array( 'default'=> null ),
- 'f_min_hit' => array( 'default'=> null ),
- 'f_max_hit' => array( 'default'=> null ),
- 'f_min_date_available' => array( 'default'=> null ),
- 'f_max_date_available' => array( 'default'=> null ),
- 'f_min_date_created' => array( 'default'=> null ),
- 'f_max_date_created' => array( 'default'=> null ),
- 'f_min_ratio' => array( 'default'=> null ),
- 'f_max_ratio' => array( 'default'=> null ),
- 'f_with_thumbnail' => array( 'default'=> false ),
- ),
- 'Returns elements for the corresponding categories.
-<br/><b>cat_id</b> can be empty if <b>recursive</b> is true. Can be sent as an array.
-<br/><b>order</b> comma separated fields for sorting (file,id, average_rate,...)'
- );
-
- $service->addMethod('pwg.categories.getList', 'ws_categories_getList',
- array(
- 'cat_id' => array('default'=>0),
- 'recursive' => array('default'=>false),
- 'public' => array('default'=>false),
- ),
- 'retrieves a list of categories' );
-
- $service->addMethod('pwg.images.addComment', 'ws_images_addComment',
- array(
- 'image_id' => array(),
- 'author' => array( 'default' => is_a_guest()? 'guest':$user['username']),
- 'content' => array(),
- 'key' => array(),
- ),
- 'add a comment to an image' );
-
- $service->addMethod('pwg.images.getInfo', 'ws_images_getInfo',
- array(
- 'image_id' => array(),
- 'comments_page' => array('default'=>0 ),
- 'comments_per_page' => array(
- 'default' => $conf['nb_comment_page'],
- 'maxValue' => 2*$conf['nb_comment_page'],
- ),
- ),
- 'retrieves information about the given photo' );
-
- $service->addMethod('pwg.images.search', 'ws_images_search',
- array(
- 'query'=>array(),
- 'per_page' => array('default'=>100, 'maxValue'=>$conf['ws_max_images_per_page']),
- 'page' => array('default'=>0),
- 'order' => array('default'=>null),
- 'f_min_rate' => array( 'default'=> null ),
- 'f_max_rate' => array( 'default'=> null ),
- 'f_min_hit' => array( 'default'=> null ),
- 'f_max_hit' => array( 'default'=> null ),
- 'f_min_date_available' => array( 'default'=> null ),
- 'f_max_date_available' => array( 'default'=> null ),
- 'f_min_date_created' => array( 'default'=> null ),
- 'f_max_date_created' => array( 'default'=> null ),
- 'f_min_ratio' => array( 'default'=> null ),
- 'f_max_ratio' => array( 'default'=> null ),
- 'f_with_thumbnail' => array( 'default'=> false ),
- ),
- 'Returns elements for the corresponding query search.'
- );
-
- $service->addMethod('pwg.session.getStatus', 'ws_session_getStatus', null, '' );
- $service->addMethod('pwg.session.login', 'ws_session_login',
- array('username', 'password'),
- 'POST method only' );
- $service->addMethod('pwg.session.logout', 'ws_session_logout', null, '');
-
- $service->addMethod('pwg.tags.getList', 'ws_tags_getList',
- array('sort_by_counter' => array('default' =>false) ),
- 'retrieves a list of available tags');
- $service->addMethod('pwg.tags.getImages', 'ws_tags_getImages',
- array(
- 'tag_id'=>array('default'=>null, 'flags'=>WS_PARAM_FORCE_ARRAY ),
- 'tag_url_name'=>array('default'=>null, 'flags'=>WS_PARAM_FORCE_ARRAY ),
- 'tag_name'=>array('default'=>null, 'flags'=>WS_PARAM_FORCE_ARRAY ),
- 'tag_mode_and'=>array('default'=>false),
- 'per_page' => array('default'=>100, 'maxValue'=>$conf['ws_max_images_per_page']),
- 'page' => array('default'=>0),
- 'order' => array('default'=>null),
- 'f_min_rate' => array( 'default'=> null ),
- 'f_max_rate' => array( 'default'=> null ),
- 'f_min_hit' => array( 'default'=> null ),
- 'f_max_hit' => array( 'default'=> null ),
- 'f_min_date_available' => array( 'default'=> null ),
- 'f_max_date_available' => array( 'default'=> null ),
- 'f_min_date_created' => array( 'default'=> null ),
- 'f_max_date_created' => array( 'default'=> null ),
- 'f_min_ratio' => array( 'default'=> null ),
- 'f_max_ratio' => array( 'default'=> null ),
- 'f_with_thumbnail' => array( 'default'=> false ),
- ),
- 'Returns elements for the corresponding tags. Note that tag_id, tag_url_name, tag_name an be arrays. Fill at least one of them. '
- );
-}
-
-add_event_handler('ws_add_methods', 'ws_addDefaultMethods');
-
-
-add_event_handler('ws_invoke_allowed', 'ws_isInvokeAllowed', EVENT_HANDLER_PRIORITY_NEUTRAL, 3);
-
-$calling_partner_id = '';
-$requestFormat = null;
-$responseFormat = null;
-
-if ( isset($_GET['partner']) )
-{
- $calling_partner_id = $_GET['partner'];
-}
-if ( isset($_GET['format']) )
-{
- $responseFormat = $_GET['format'];
-}
-
-if ( isset($HTTP_RAW_POST_DATA) )
-{
- $HTTP_RAW_POST_DATA = trim($HTTP_RAW_POST_DATA);
- if ( strncmp($HTTP_RAW_POST_DATA, '<?xml', 5) == 0 )
- {
- }
- else
- {
- $requestFormat = "json";
- }
-}
-else
-{
- $requestFormat = "rest";
-}
-
-if ( !isset($responseFormat) and isset($requestFormat) )
-{
- $responseFormat = $requestFormat;
-}
-
-$service = new PwgServer();
-
-if (!is_null($requestFormat))
-{
- $handler = null;
- switch ($requestFormat)
- {
- case 'rest':
- include_once(PHPWG_ROOT_PATH.'include/ws_protocols/rest_handler.php');
- $handler = new PwgRestRequestHandler();
- break;
- }
- $service->setHandler($requestFormat, $handler);
-}
-
-if (!is_null($responseFormat))
-{
- $encoder = null;
- switch ($responseFormat)
- {
- case 'rest':
- include_once(PHPWG_ROOT_PATH.'include/ws_protocols/rest_encoder.php');
- $encoder = new PwgRestEncoder();
- break;
- case 'php':
- include_once(PHPWG_ROOT_PATH.'include/ws_protocols/php_encoder.php');
- $encoder = new PwgSerialPhpEncoder();
- break;
- case 'json':
- include_once(PHPWG_ROOT_PATH.'include/ws_protocols/json_encoder.php');
- $encoder = new PwgJsonEncoder();
- break;
- case 'xmlrpc':
- include_once(PHPWG_ROOT_PATH.'include/ws_protocols/xmlrpc_encoder.php');
- $encoder = new PwgXmlRpcEncoder();
- break;
- }
- $service->setEncoder($responseFormat, $encoder);
-}
-
-set_make_full_url();
-$service->run();
-
-?>