##############################################################
## MOD Title:           Anti Bot Question MOD
## MOD Author:          MagMo < N/A > (N/A) http://phpbb.mwegner.de/
## MOD Description:     EN:
##                        This MOD applies a bot safe visual confirmation system to the registration and/or guest post forms to 
##                        prevent bots from registering and/or spamming as guests.
##                        The MOD can generate fully automatic and random questions (Text or graphic) or you may define your own 
##                        individual questions.
##                        ABQ has several techniques that prevent bots from reading the generated questions. This is done by 
##                        changing variables. To help users more easily answer the questions there is a multiple choice option.
##                        You may also upload your own fonts which are then used for generation of automatic questions (GD and 
##                        Freetype required).
##                      DE:
##                        Der MOD fgt wahlweise dem Registrierungsformular und dem Beitragschreiben-Formular fr Gste 
##                        eine Frage hinzu, die richtig beantwortet werden muss um die Registrierung bzw. das Beitragschreiben
##                        erfolgreich beenden zu knnen.
##                        Die Frage wird je nach MOD-Konfiguration aus einem Pool individueller Fragen gewhlt oder es wird 
##                        eine zufllige Frage automatisch erstellt. Die Fragen knnen reine Textfragen sein oder sich auf 
##                        Bilder beziehen bzw. aus Bildern bestehen.
##                        Zudem verndert der MOD einige Variablen und ermglich das einfach Abndern eben dieser, dadurch 
##                        wird das automatische Registrieren / Beitragschreiben durch Bots ebenfalls erschwert.
##                        Nach mehrfachen falschen Antworten knnen die Registrierungs- bzw. Beitragschreibenfunktion fr 
##                        die jeweilige Session automatisch gesperrt werden.
##                      FR:
##                        Ce MOD ajoute un systme de confirmation visuel scuris lors de la procdure d'enregistrement
##                        ainsi que dans le formulaire de postage pour les invits afin de prvenir toute inscriptions/messages 
##                        de la part des robots. Ce MOD peut gnrer des questions automatiques et alatoires (textuelles ou images) 
##                        et vous pouvez dfinir vos propres questions. Ce MOD utilise plusieurs techniques pour contrer la lecture 
##                        des questions par les robots, en changeant les noms de variables. Pour aider les utilisateurs  rpondre, 
##                        il est possible de fournir plusieurs rponses par question. Vous pouvez aussi uploader vos propres polices 
##                        de caractres pour les utiliser lors de la gnration des questions automatiques (librairies GD Freetype requises).
##                      ES:
##                        Este MOD aplica un sistema de confirmacin visual en el formulario de registro
##                        y/o a la publicacin de mensajes por parte de visitantes para prevenir que bots publicitarios se registren 
##                        y/o publican spam como invitados. El MOD puede generar preguntas automticas y aleatorias (Texto o
##                        grficas) y puedes definir tus propios preguntas individuales.
##                        ABQ utiliza varias tecnicas que impiden que los bots sean capaces de leer las preguntas generadas. 
##                        Esto se hace mediante el cambio de variables. Para facilitar a los usuarios el responder a las preguntas se 
##                        puede usar un sistema de Eleccin Multiple. Tambin puedes instalar tus propios fonts para generar las 
##                        preguntas automticas (GD and Freetype requerido).
##
## MOD Version:         2.0.2
##
## Installation Level:  Intermediate
## Installation Time:   30 Minutes
##
## Files To Edit:       12
##      posting.php
##      admin/admin_users.php
##      includes/constants.php
##      includes/functions.php
##      includes/page_tail.php
##      includes/usercp_avatar.php
##      includes/usercp_register.php
##      templates/subSilver/agreement.tpl
##      templates/subSilver/posting_body.tpl
##      templates/subSilver/overall_footer.tpl
##      templates/subSilver/profile_add_body.tpl
##      templates/subSilver/admin/user_edit_body.tpl
##
## Included Files:      122
##      abq_image.php
##      abq_mod/index.htm
##      abq_mod/fonts/do-not-delete.ttf
##      abq_mod/fonts/forgotte.ttf
##      abq_mod/fonts/index.htm
##      abq_mod/fonts/licostrg.ttf
##      abq_mod/fonts/liquidis.ttf
##      abq_mod/fonts/opal.ttf
##      abq_mod/fonts/tubular.ttf
##      abq_mod/fonts/vinera.ttf
##      abq_mod/fonts/volatile1brk.ttf
##      admin/abq_auto_quests.php
##      admin/abq_config.php
##      admin/abq_config2.php
##      admin/abq_fonts.php
##      admin/abq_indi_images.php
##      admin/abq_indi_quests.php
##      admin/abq_indig_quests.php
##      admin/abq_reset.php
##      admin/admin_anti_bot_question_index.php
##      images/abq_mod/example1.jpg
##      images/abq_mod/example2.jpg
##      images/abq_mod/example3.gif
##      images/abq_mod/example4.jpg
##      images/abq_mod/example5.jpg
##      images/abq_mod/index.htm
##      images/abq_mod/admin/_test_.gif
##      images/abq_mod/admin/001.jpg
##      images/abq_mod/admin/001a.jpg
##      images/abq_mod/admin/002.jpg
##      images/abq_mod/admin/002a.jpg
##      images/abq_mod/admin/003.jpg
##      images/abq_mod/admin/003a.jpg
##      images/abq_mod/admin/004.jpg
##      images/abq_mod/admin/004a.jpg
##      images/abq_mod/admin/005.jpg
##      images/abq_mod/admin/005a.jpg
##      images/abq_mod/admin/006.jpg
##      images/abq_mod/admin/006a.jpg
##      images/abq_mod/admin/007.jpg
##      images/abq_mod/admin/007a.jpg
##      images/abq_mod/admin/101.jpg
##      images/abq_mod/admin/101a.jpg
##      images/abq_mod/admin/102.jpg
##      images/abq_mod/admin/102a.jpg
##      images/abq_mod/admin/103.jpg
##      images/abq_mod/admin/103a.jpg
##      images/abq_mod/admin/104.jpg
##      images/abq_mod/admin/104a.jpg
##      images/abq_mod/admin/105.jpg
##      images/abq_mod/admin/106.jpg
##      images/abq_mod/admin/107.jpg
##      images/abq_mod/admin/108.jpg
##      images/abq_mod/admin/109.jpg
##      images/abq_mod/admin/109a.jpg
##      images/abq_mod/admin/110.jpg
##      images/abq_mod/admin/110a.jpg
##      images/abq_mod/admin/111.jpg
##      images/abq_mod/admin/111a.jpg
##      images/abq_mod/admin/112.jpg
##      images/abq_mod/admin/112a.jpg
##      images/abq_mod/admin/113.jpg
##      images/abq_mod/admin/114.jpg
##      images/abq_mod/admin/115.jpg
##      images/abq_mod/admin/116.jpg
##      images/abq_mod/admin/117.jpg
##      images/abq_mod/admin/117a.jpg
##      images/abq_mod/admin/118.jpg
##      images/abq_mod/admin/118a.jpg
##      images/abq_mod/admin/119.jpg
##      images/abq_mod/admin/119a.jpg
##      images/abq_mod/admin/120.jpg
##      images/abq_mod/admin/120a.jpg
##      images/abq_mod/admin/121.jpg
##      images/abq_mod/admin/122.jpg
##      images/abq_mod/admin/123.jpg
##      images/abq_mod/admin/124.jpg
##      images/abq_mod/admin/125.jpg
##      images/abq_mod/admin/125a.jpg
##      images/abq_mod/admin/126.jpg
##      images/abq_mod/admin/126a.jpg
##      images/abq_mod/admin/127.jpg
##      images/abq_mod/admin/127a.jpg
##      images/abq_mod/admin/128.jpg
##      images/abq_mod/admin/129.jpg
##      images/abq_mod/admin/130.jpg
##      images/abq_mod/admin/131.jpg
##      images/abq_mod/admin/131a.jpg
##      images/abq_mod/admin/132.jpg
##      images/abq_mod/admin/132a.jpg
##      images/abq_mod/admin/133.jpg
##      images/abq_mod/admin/133a.jpg
##      images/abq_mod/admin/134.jpg
##      images/abq_mod/admin/attention.gif
##      images/abq_mod/admin/abq-button.gif
##      images/abq_mod/admin/index.htm
##      images/abq_mod/cache/index.htm
##      includes/functions_abq.php
##      includes/functions_abq_image1.php
##      includes/functions_abq_image2.php
##      includes/functions_abq_image3.php
##      includes/functions_abq_image4.php
##      includes/functions_abq_upload.php
##        language/lang_english/lang_abq.php
##        language/lang_english/lang_abq_admin.php
##      templates/subSilver/admin/abq_auto_quests_body.tpl
##      templates/subSilver/admin/abq_config2_body.tpl
##      templates/subSilver/admin/abq_config_body.tpl
##      templates/subSilver/admin/abq_fonts_body.tpl
##      templates/subSilver/admin/abq_fonts_delete_body.tpl
##      templates/subSilver/admin/abq_fonts_example_body.tpl
##      templates/subSilver/admin/abq_fonts_upload_body.tpl
##      templates/subSilver/admin/abq_index_body.tpl
##      templates/subSilver/admin/abq_indi_images_body.tpl
##      templates/subSilver/admin/abq_indi_images_delete_body.tpl
##      templates/subSilver/admin/abq_indi_images_upload_body.tpl
##      templates/subSilver/admin/abq_indi_quests_body.tpl
##      templates/subSilver/admin/abq_indi_quests_delete_body.tpl
##      templates/subSilver/admin/abq_indi_quests_edit_body.tpl
##      templates/subSilver/admin/abq_indig_quests_body.tpl
##      templates/subSilver/admin/abq_indig_quests_delete_body.tpl
##      templates/subSilver/admin/abq_indig_quests_edit_body.tpl
##      templates/subSilver/admin/abq_reset_body.tpl
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 
############################################################## 
## For security purposes, please check: http://www.phpbb.com/mods/ 
## for the latest version of this MOD. Although MODs are checked 
## before being allowed in the MODs Database there is no guarantee 
## that there are no security problems within the MOD. No support 
## will be given for MODs not found within the MODs Database which 
## can be found at http://www.phpbb.com/mods/ 
############################################################## 
##
## Author Notes: 
##
## Special thanks to all my testers and translators. (ErnadoO, Dogs and things, DickS, Underhill, IPB_Flchtling, plasma, rreptile etc.).
##
##
## phpbb.de:    http://www.phpbb.de/viewtopic.php?t=117514            (german / deutsch)
## phpbb.com:   http://www.phpbb.com/phpBB/viewtopic.php?t=383305     (english)
##
##
## EN:
## 
## - If you use the Advanced Quick Reply MOD 1.1.1 you need (!) the:
##   Anti Bot Question MOD - Advanced Quick Reply Add-On (Download: http://phpbb.mwegner.de/download/download-16.html)
##
## - If you use the Quick Reply MOD 1.0.5 you need (!) the:
##   Anti Bot Question MOD - Quick Reply Add-On (Download: http://phpbb.mwegner.de/download/download-19.html)
##
## - If you use the Quick Reply with Quote MOD 1.1.3 you need (!) the:
##   Anti Bot Question MOD - Quick Reply with Quote Add-On (Download: http://phpbb.mwegner.de/download/download-20.html)
##
## - If you use the Quick Reply with Quote and BBCode MOD 1.1.3 you need (!) the:
##   Anti Bot Question MOD - Quick Reply with Quote and BBCode Add-On (Download: http://phpbb.mwegner.de/download/download-21.html)
##
## - This MOD is compatible with Select Default Language MOD 1.3.4. If you use the Select Default Language MOD, special changes of the 
##   code are not necessary.
##
## DE:
##
## - Wenn du den Advanced Quick Reply MOD 1.1.1 verwendest, bentigst (!) du das:
##   Anti Bot Question MOD - Advanced Quick Reply Add-On (Download: http://phpbb.mwegner.de/download/download-16.html)
##
## - Wenn du den Quick Reply MOD 1.0.5 verwendest, bentigst (!) du das:
##   Anti Bot Question MOD - Quick Reply Add-On (Download: http://phpbb.mwegner.de/download/download-19.html)
##
## - Wenn du den Quick Reply with Quote MOD 1.1.3 verwendest, bentigst (!) du das:
##   Anti Bot Question MOD - Quick Reply with Quote Add-On (Download: http://phpbb.mwegner.de/download/download-20.html)
##
## - Wenn du den Quick Reply with Quote and BBCode MOD 1.1.3 verwendest, bentigst (!) du das:
##   Anti Bot Question MOD - Quick Reply with Quote and BBCode Add-On (Download: http://phpbb.mwegner.de/download/download-21.html)
##
## - Der Anti Bot Question MOD ist mit dem Select Default Language MOD 1.3.4. kompatibel. Wenn Sie beide MODs zusammen verwenden, dann sind 
##   keine extra Codenderungen erforderlich.
##
## !!! PROBLEME MIT DIESER ANLEITUNG? !!!
##     Dann helfen eventuell die Infos auf dieser Seite und den Folgeseiten weiter:
##     http://phpbb.mwegner.de/knowledge-base/mod-installationsanleitung.html
##
## FR:
##
## - Si vous utilisez le MOD Advanced Quick Reply 1.1.1 vous devez tlcharger (!) l'add-on:
##   Anti Bot Question MOD - Advanced Quick Reply (Download: http://phpbb.mwegner.de/download/download-16.html)
##
## - Si vous utilisez le MOD Quick Reply 1.0.5 vous devez tlcharger (!) l'add-on:
##   Anti Bot Question MOD - Quick Reply Add-On (Download: http://phpbb.mwegner.de/download/download-19.html)
##
## - Si vous utilisez le MOD Quick Reply with Quote 1.1.3 vous devez tlcharger (!) l'add-on:
##   Anti Bot Question MOD - Quick Reply with Quote Add-On (Download: http://phpbb.mwegner.de/download/download-20.html)
##
## - Si vous utilisez le MOD Quick Reply with Quote and BBCode 1.1.3 vous devez tlcharger (!) l'add-on:
##   Anti Bot Question MOD - Quick Reply with Quote and BBCode Add-On (Download: http://phpbb.mwegner.de/download/download-21.html)
##
## - Ce MOD est compatible avec le MOD Select Default Language 1.3.4. Si vous utilisez ce dernier, aucune adapation n'est ncssaire.
##
## ES:
##
## - Si tienes instalado el Advanced Quick Reply MOD 1.1.1 necesitas (!) el:
##   Anti Bot Question MOD - Advanced Quick Reply Add-On (Download: http://phpbb.mwegner.de/download/download-16.html)
##
## - Si tienes instalado el Quick Reply MOD 1.0.5 necesitas (!) el:
##   Anti Bot Question MOD - Quick Reply Add-On (Download: http://phpbb.mwegner.de/download/download-19.html)
##
## - Si tienes instalado el Quick Reply with Quote MOD 1.1.3 necesitas (!) el:
##   Anti Bot Question MOD - Quick Reply with Quote Add-On (Download: http://phpbb.mwegner.de/download/download-20.html)
##
## - Si tienes instalado el Quick Reply with Quote and BBCode MOD 1.1.3 necesitas (!) el:
##   Anti Bot Question MOD - Quick Reply with Quote and BBCode Add-On (Download: http://phpbb.mwegner.de/download/download-21.html)
##
## - Este MOD es compatible con el Select Default Language MOD 1.3.4. Si utilizas el Select Default Language MOD, no hacen falta 
##   cambios especiales en el cdigo.
##
############################################################## 
##
## MOD History:
##
## DE:
##   ./other_languages/history_german.txt
## FR:
##   ./other_languages/history_french.txt
## ES:
##   ./other_languages/history_spanish.txt
##
## EN:
##   2006-03-15 - Version 0.1.0
##      - Initial Release
##
##   2006-03-21 - Version 0.2.0
##      - Bugfix in the variable description (no functional impact).
##      - Definition of unlimited questions and answers of which ABQ selects one randomly.
##
##   2006-03-22 - Version 0.2.1
##      - Severe bugfix in the variable definition.
##
##   2006-03-22 - Version 0.2.2
##      - Bugfix: Variables not declared.
##
##   2006-04-04 - Version 0.3.0
##      - Questions and answers can be managed via ACP.
##
##   2006-04-05 - Version 0.3.1
##      - Bugfix: Different questions for different languages (broken in 0.3.0).
##
##   2006-04-07 - Version 0.3.2
##      - Fixed a bug in the installation instructions of 0.3.1.
##
##   2006-04-15 - Version 0.3.3
##      - IMAGE field and functions added.
##      - Option to set if answers are case sensitive.
##      - Up to 5 answers per question.
##      - Prevented display of same question when browser was refreshed.
##      - POST-Variable can be defined in ACP.
##      - Added support for guest postings.
##      - Minimum requirement for ABQ is phpBB 2.0.20
##
##   2006-04-18 - Version 0.3.4
##      - Bugfix: When ABQ had no question defined, guests where unable to post.
##      - Fixed two buggy SQL statements.
##
##   2006-06-12 - Version 1.0.0
##      - End of beta phase.
##      - Adapted installation manual to phpBB 2.0.21.
##      - Captcha is drawn with the help of file "bild.php". This method prevents bots from reading the image ad the picture ID is variable.
##
##   2006-06-14 - Version 1.0.1
##      - Name change from "Registration Anti Bot Question MOD" to "Anti Bot Question Mod".
##      - Added option to disable image creation with "bild.php".
##      - Picture selection in question creation form changed.
##      - Mod managemant in ACP optimized.
##
##   2006-07-10 - Version 1.0.2
##      - Simplified code.
##      - Added additional information about ABQ in registration form page.
##      - Added version check.
##      - Fixed spelling errors in German translation.
##      - Added French translation (plasma).
##
##   2006-08-08 - Version 1.0.3
##      - Bug fixed with database query.
##
##   2006-11-26 - Version 2.0.0
##      - Removed version check.
##      - Added automatic random question generation for text and image questions.
##      - Number of registration attempts limited to three.
##      - Not validated HTML corrected.
##      - Added picture upload function.
##      - Added font upload function.
##      - HTML is no longer allowed with Individual Questions. Instead BBCode can be used.
##      - Registration attempts that entered a non available language are blocked.
##
##   2006-12-09 - Version 2.0.1
##      - Added option to select *, x or X for displaying multiplication questions.
##      - Added multiple choice option to make answering easier for humans.
##      - Auto detection for GD- and Freetype-library updated.
##      - When uploading an image there is now checked if getimagesize() is available.
##      - Random display of Individual Questions adapted to syntax of MSSQL.
##
##   2007-03-06 - Version 3.0.0
##      - Option to manually activate/deactivate presence of GD- and Freetype-Libraries in case the automatic detection fails.
##      - New version of Individual Questions: The entire question is displayed as image (increases bot protection dramatically).
##      - Variable name of email field may be changed. This is not visible to the visitor but is a significant problem for the bots.
##      - The agreed variable and its value can be changed. It still contains a random component. This is not visible to the visitor but is a significant problem for the bots.
##      - The registration form now has the noindex-Metatag. Search engines will index the form thousend times without it because of the random component of the agreed variable.
##      - Links in the registration form now have rel="nofollow" added to them to prevent the registration form being indexed by search engines.
##      - Added a counter which counts the number of blocked registration and guest postings. Counter can optionally be displayed in the footer of the board.
##      - The images can now be splitted into so called multi images and then added up to one picture (like a puzzle). This increases bot protection considerably.
##      - Option to define the max. number of registration attempts in ACP.
##      - Option to define the max. number of guest posting attempts in ACP.
##      - changes for phpbb.com MOD valitation
##      - Bugfix: Without cookies the file abq_image.php doesn't show the images.
##      - ABQ-Session-Management optimized
##
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

#
#-----[ DIY INSTRUCTIONS ]--------------------------------------
#
# EN:
#    create following folders:
#
# DE:
#    folgende Verzeichnisse erstellen:
#
# FR:
#    Crez les rpertoires suivants:
#
# ES:
#    crear las siguientes carpetas:
#
#   abq_mod
#   abq_mod/fonts
#   images/abq_mod
#   images/abq_mod/admin
#   images/abq_mod/cache
#
Create folder: abq_mod
Create folder: abq_mod/fonts
Create folder: images/abq_mod
Create folder: images/abq_mod/admin
Create folder: images/abq_mod/cache

#
#-----[ DIY INSTRUCTIONS ]--------------------------------------
#
# EN:
#    change file system modes:
#
# DE:
#    Zugriffsrechte ndern:
#
# FR:
#    Changez les droits des fichiers suivants:
#
# ES:
#    cambiar file system modes (CHMOD):
#
#   CHMOD abq_mod/fonts to 777
#   CHMOD images/abq_mod to 777
#   CHMOD images/abq_mod/cache to 777
#
CHMOD abq_mod/fonts to 777
CHMOD images/abq_mod to 777
CHMOD images/abq_mod/cache to 777

# 
#-----[ COPY ]------------------------------------------------ 
#
# EN:
#    Copy all included Files to the right position into your Board.
#    The Structure into the "root" folder of this MOD is identically with the
#    Structure of a phpBB Board. So then you know where the Files have to be.
#
#    If you have installed more than one Template you have to upload
#    the included *.tpl files in the subSilver folder of this MOD
#    into the folders of every Template you have installed!
#
# DE:
#    Kopiere alle einzufgenden Dateien (Included Files) an die richtige Stelle in dein Forum.
#    Die Struktur des Verzeichnises "root" dieses Mods ist identisch mit der 
#    Struktur des phpBB Boards. So kannst du genau sehen wo die Dateien hin mssen.
#
#    Wenn du mehr als ein Template installiert hast, dann musst
#    du die ins subSilver-Verzeichnis einzufgenden *.tpl-Dateien 
#    in jedes Verzeichnis aller installierten Templates kopieren.
#
# FR:
#    Copiez tous les fichiers inclus dans les rpertoires adquats. L'arborescence dans 
#    le dossier "root" est identique  la structure de votre forum phpBB. Ainsi vous savez o 
#    doivent aller les fichiers.
#
#    Si vous avez install plus d'un template, vous devez uploader les fichiers .tpl du 
#    rpertoire subSilver du MOD dans TOUS vos rpertoires thme!
#
# ES:
#    Copia todos los ficheros incluidos al lugar correcto en tu foro. La estructura
#    en la carpeta "root" en este MOD es idntica a la Estructura de un 
#    foro phpBB. As puedes saber donde va cada archivo.
#
#    Si tienes instalado ms de un Template/Estilo tienes que subir los archivos .tpl incluidos 
#    en en la carpeta subSilver de este MOD a las carpetas correspondientes de cada Template/Estilo 
#    que tienes instalado!
#
copy root/abq_image.php to abq_image.php
copy root/abq_mod/index.htm to abq_mod/index.htm
copy root/abq_mod/fonts/do-not-delete.ttf to abq_mod/fonts/do-not-delete.ttf
copy root/abq_mod/fonts/forgotte.ttf to abq_mod/fonts/forgotte.ttf
copy root/abq_mod/fonts/index.htm to abq_mod/fonts/index.htm
copy root/abq_mod/fonts/licostrg.ttf to abq_mod/fonts/licostrg.ttf
copy root/abq_mod/fonts/liquidis.ttf to abq_mod/fonts/liquidis.ttf
copy root/abq_mod/fonts/opal.ttf to abq_mod/fonts/opal.ttf
copy root/abq_mod/fonts/tubular.ttf to abq_mod/fonts/tubular.ttf
copy root/abq_mod/fonts/vinera.ttf to abq_mod/fonts/vinera.ttf
copy root/abq_mod/fonts/volatile1brk.ttf to abq_mod/fonts/volatile1brk.ttf
copy root/admin/abq_auto_quests.php to admin/abq_auto_quests.php
copy root/admin/abq_config.php to admin/abq_config.php
copy root/admin/abq_config2.php to admin/abq_config2.php
copy root/admin/abq_fonts.php to admin/abq_fonts.php
copy root/admin/abq_indi_images.php to admin/abq_indi_images.php
copy root/admin/abq_indi_quests.php to admin/abq_indi_quests.php
copy root/admin/abq_indig_quests.php to admin/abq_indig_quests.php
copy root/admin/abq_reset.php to admin/abq_reset.php
copy root/admin/admin_anti_bot_question_index.php to admin/admin_anti_bot_question_index.php
copy root/images/abq_mod/example1.jpg to images/abq_mod/example1.jpg
copy root/images/abq_mod/example2.jpg to images/abq_mod/example2.jpg
copy root/images/abq_mod/example3.gif to images/abq_mod/example3.gif
copy root/images/abq_mod/example4.jpg to images/abq_mod/example4.jpg
copy root/images/abq_mod/example5.jpg to images/abq_mod/example5.jpg
copy root/images/abq_mod/index.htm to images/abq_mod/index.htm
copy root/images/abq_mod/admin/_test_.gif to images/abq_mod/admin/_test_.gif
copy root/images/abq_mod/admin/001.jpg to images/abq_mod/admin/001.jpg
copy root/images/abq_mod/admin/001a.jpg to images/abq_mod/admin/001a.jpg
copy root/images/abq_mod/admin/002.jpg to images/abq_mod/admin/002.jpg
copy root/images/abq_mod/admin/002a.jpg to images/abq_mod/admin/002a.jpg
copy root/images/abq_mod/admin/003.jpg to images/abq_mod/admin/003.jpg
copy root/images/abq_mod/admin/003a.jpg to images/abq_mod/admin/003a.jpg
copy root/images/abq_mod/admin/004.jpg to images/abq_mod/admin/004.jpg
copy root/images/abq_mod/admin/004a.jpg to images/abq_mod/admin/004a.jpg
copy root/images/abq_mod/admin/005.jpg to images/abq_mod/admin/005.jpg
copy root/images/abq_mod/admin/005a.jpg to images/abq_mod/admin/005a.jpg
copy root/images/abq_mod/admin/006.jpg to images/abq_mod/admin/006.jpg
copy root/images/abq_mod/admin/006a.jpg to images/abq_mod/admin/006a.jpg
copy root/images/abq_mod/admin/007.jpg to images/abq_mod/admin/007.jpg
copy root/images/abq_mod/admin/007a.jpg to images/abq_mod/admin/007a.jpg
copy root/images/abq_mod/admin/101.jpg to images/abq_mod/admin/101.jpg
copy root/images/abq_mod/admin/101a.jpg to images/abq_mod/admin/101a.jpg
copy root/images/abq_mod/admin/102.jpg to images/abq_mod/admin/102.jpg
copy root/images/abq_mod/admin/102a.jpg to images/abq_mod/admin/102a.jpg
copy root/images/abq_mod/admin/103.jpg to images/abq_mod/admin/103.jpg
copy root/images/abq_mod/admin/103a.jpg to images/abq_mod/admin/103a.jpg
copy root/images/abq_mod/admin/104.jpg to images/abq_mod/admin/104.jpg
copy root/images/abq_mod/admin/104a.jpg to images/abq_mod/admin/104a.jpg
copy root/images/abq_mod/admin/105.jpg to images/abq_mod/admin/105.jpg
copy root/images/abq_mod/admin/106.jpg to images/abq_mod/admin/106.jpg
copy root/images/abq_mod/admin/107.jpg to images/abq_mod/admin/107.jpg
copy root/images/abq_mod/admin/108.jpg to images/abq_mod/admin/108.jpg
copy root/images/abq_mod/admin/109.jpg to images/abq_mod/admin/109.jpg
copy root/images/abq_mod/admin/109a.jpg to images/abq_mod/admin/109a.jpg
copy root/images/abq_mod/admin/110.jpg to images/abq_mod/admin/110.jpg
copy root/images/abq_mod/admin/110a.jpg to images/abq_mod/admin/110a.jpg
copy root/images/abq_mod/admin/111.jpg to images/abq_mod/admin/111.jpg
copy root/images/abq_mod/admin/111a.jpg to images/abq_mod/admin/111a.jpg
copy root/images/abq_mod/admin/112.jpg to images/abq_mod/admin/112.jpg
copy root/images/abq_mod/admin/112a.jpg to images/abq_mod/admin/112a.jpg
copy root/images/abq_mod/admin/113.jpg to images/abq_mod/admin/113.jpg
copy root/images/abq_mod/admin/114.jpg to images/abq_mod/admin/114.jpg
copy root/images/abq_mod/admin/115.jpg to images/abq_mod/admin/115.jpg
copy root/images/abq_mod/admin/116.jpg to images/abq_mod/admin/116.jpg
copy root/images/abq_mod/admin/117.jpg to images/abq_mod/admin/117.jpg
copy root/images/abq_mod/admin/117a.jpg to images/abq_mod/admin/117a.jpg
copy root/images/abq_mod/admin/118.jpg to images/abq_mod/admin/118.jpg
copy root/images/abq_mod/admin/118a.jpg to images/abq_mod/admin/118a.jpg
copy root/images/abq_mod/admin/119.jpg to images/abq_mod/admin/119.jpg
copy root/images/abq_mod/admin/119a.jpg to images/abq_mod/admin/119a.jpg
copy root/images/abq_mod/admin/120.jpg to images/abq_mod/admin/120.jpg
copy root/images/abq_mod/admin/120a.jpg to images/abq_mod/admin/120a.jpg
copy root/images/abq_mod/admin/121.jpg to images/abq_mod/admin/121.jpg
copy root/images/abq_mod/admin/122.jpg to images/abq_mod/admin/122.jpg
copy root/images/abq_mod/admin/123.jpg to images/abq_mod/admin/123.jpg
copy root/images/abq_mod/admin/124.jpg to images/abq_mod/admin/124.jpg
copy root/images/abq_mod/admin/125.jpg to images/abq_mod/admin/125.jpg
copy root/images/abq_mod/admin/125a.jpg to images/abq_mod/admin/125a.jpg
copy root/images/abq_mod/admin/126.jpg to images/abq_mod/admin/126.jpg
copy root/images/abq_mod/admin/126a.jpg to images/abq_mod/admin/126a.jpg
copy root/images/abq_mod/admin/127.jpg to images/abq_mod/admin/127.jpg
copy root/images/abq_mod/admin/127a.jpg to images/abq_mod/admin/127a.jpg
copy root/images/abq_mod/admin/128.jpg to images/abq_mod/admin/128.jpg
copy root/images/abq_mod/admin/129.jpg to images/abq_mod/admin/129.jpg
copy root/images/abq_mod/admin/130.jpg to images/abq_mod/admin/130.jpg
copy root/images/abq_mod/admin/131.jpg to images/abq_mod/admin/131.jpg
copy root/images/abq_mod/admin/131a.jpg to images/abq_mod/admin/131a.jpg
copy root/images/abq_mod/admin/132.jpg to images/abq_mod/admin/132.jpg
copy root/images/abq_mod/admin/132a.jpg to images/abq_mod/admin/132a.jpg
copy root/images/abq_mod/admin/133.jpg to images/abq_mod/admin/133.jpg
copy root/images/abq_mod/admin/133a.jpg to images/abq_mod/admin/133a.jpg
copy root/images/abq_mod/admin/134.jpg to images/abq_mod/admin/134.jpg
copy root/images/abq_mod/admin/attention.gif to images/abq_mod/admin/attention.gif
copy root/images/abq_mod/admin/abq-button.gif to images/abq_mod/admin/abq-button.gif
copy root/images/abq_mod/admin/index.htm to images/abq_mod/admin/index.htm
copy root/images/abq_mod/cache/index.htm to images/abq_mod/cache/index.htm
copy root/includes/functions_abq.php to includes/functions_abq.php
copy root/includes/functions_abq_image1.php to includes/functions_abq_image1.php
copy root/includes/functions_abq_image2.php to includes/functions_abq_image2.php
copy root/includes/functions_abq_image3.php to includes/functions_abq_image3.php
copy root/includes/functions_abq_image4.php to includes/functions_abq_image4.php
copy root/includes/functions_abq_upload.php to includes/functions_abq_upload.php

copy root/language/lang_english/lang_abq.php to language/lang_english/lang_abq.php
copy root/language/lang_english/lang_abq_admin.php to language/lang_english/lang_abq_admin.php

copy root/templates/subSilver/admin/abq_auto_quests_body.tpl to templates/subSilver/admin/abq_auto_quests_body.tpl
copy root/templates/subSilver/admin/abq_config2_body.tpl to templates/subSilver/admin/abq_config2_body.tpl
copy root/templates/subSilver/admin/abq_config_body.tpl to templates/subSilver/admin/abq_config_body.tpl
copy root/templates/subSilver/admin/abq_fonts_body.tpl to templates/subSilver/admin/abq_fonts_body.tpl
copy root/templates/subSilver/admin/abq_fonts_delete_body.tpl to templates/subSilver/admin/abq_fonts_delete_body.tpl
copy root/templates/subSilver/admin/abq_fonts_example_body.tpl to templates/subSilver/admin/abq_fonts_example_body.tpl
copy root/templates/subSilver/admin/abq_fonts_upload_body.tpl to templates/subSilver/admin/abq_fonts_upload_body.tpl
copy root/templates/subSilver/admin/abq_index_body.tpl to templates/subSilver/admin/abq_index_body.tpl
copy root/templates/subSilver/admin/abq_indi_images_body.tpl to templates/subSilver/admin/abq_indi_images_body.tpl
copy root/templates/subSilver/admin/abq_indi_images_delete_body.tpl to templates/subSilver/admin/abq_indi_images_delete_body.tpl
copy root/templates/subSilver/admin/abq_indi_images_upload_body.tpl to templates/subSilver/admin/abq_indi_images_upload_body.tpl
copy root/templates/subSilver/admin/abq_indi_quests_body.tpl to templates/subSilver/admin/abq_indi_quests_body.tpl
copy root/templates/subSilver/admin/abq_indi_quests_delete_body.tpl to templates/subSilver/admin/abq_indi_quests_delete_body.tpl
copy root/templates/subSilver/admin/abq_indi_quests_edit_body.tpl to templates/subSilver/admin/abq_indi_quests_edit_body.tpl
copy root/templates/subSilver/admin/abq_indig_quests_body.tpl to templates/subSilver/admin/abq_indig_quests_body.tpl
copy root/templates/subSilver/admin/abq_indig_quests_delete_body.tpl to templates/subSilver/admin/abq_indig_quests_delete_body.tpl
copy root/templates/subSilver/admin/abq_indig_quests_edit_body.tpl to templates/subSilver/admin/abq_indig_quests_edit_body.tpl
copy root/templates/subSilver/admin/abq_reset_body.tpl to templates/subSilver/admin/abq_reset_body.tpl

# 
#-----[ SQL ]------------------------------------------ 
# 
# EN:
#    Run the following SQL statement to update your phpBB database.
#    You can use phpMyAdmin or a similar tool to run this update.
#
#    IMPORTANT: If you have changed the table prefix from the default of phpBB2,
#     please be sure to replace phpbb with your prefix BEFORE running this update.
#
# DE:
#    Fhre folgende SQL-Anweisungen aus, um die phpBB-Datenbank zu anzupassen.
#    Dies kann mittels phpMyAdmin oder einem vergleichbaren Programm geschehen.
#
#    WICHTIG: Wenn du das Standard-Tabellenprfix von phpBB2 gendert hast,
#     dann ist es notwendig in allen SQLAnweisungen phpbb durch das neue Prfix auszutauschen.
#             Dies muss geschehen BEVOR die Anpassung ausgefhrt wird.
#
# FR:
#    Excutez les requtes suivantes afin de mettre  jour votre base de donnes.
#    Pour cela, vous pouvez utiliser phpMyAdmin ou un outil similaire.
#
#    IMPORTANT: Si vous n'utilisez pas un prfix de vos table par dfaut, assurez vous 
#     de remplacer "phpbb_" par votre prfix, AVANT d'excuter ces requtes.
#
# ES:
#    Ejecuta los siguientes commandos SQL para actualizar tu base de datos.
#    Puedes usar phpMyAdmin o un programa similar para realizar esta actualizacin.
#
#    IMPORTANTE: Si has cambiado el prefijo de las tablas phpBB2 a otro,
#     asegrate de haber cambiado phpbb por tu prefijo Antes de ejecutar 
#                esta actualizacin de tu base de datos.
#
CREATE TABLE phpbb_anti_bot_quest_config (
 config_name VARCHAR(255) NOT NULL,
 config_value VARCHAR(255) NOT NULL,
 PRIMARY KEY (config_name) 
);

INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('abq_register', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('abq_guest', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('abq_variable_name', 'abq_0001');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('IndiQuests_CaseSensitive', '1');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('IndiQuests_ImagePHP', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Individuel_Questions', '1');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Ratio_Auto_Indi_Questions', '50');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_01', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_02', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_03', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_04', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_05', '1');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_06', '1');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_07', '1');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_08', '1');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_09', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_10', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_11', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_12', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_13', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_14', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_15', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_16', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_17', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_18', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_19', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_20', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_21', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_22', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_23', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_24', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_25', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_26', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_27', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_28', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_29', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_30', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_31', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_32', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_33', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuestion_34', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('max_Effects', '3');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Effect_SeparatingLines', '1');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Effect_BGText', '1');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Effect_Grid', '2');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Effect_FilledGrid', '1');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Effect_GridHeight', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Effect_GridWidth', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Effect_Ellipses', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Effect_Arcs', '2');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Effect_Lines', '2');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuests_LargeNumbers', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuests_MultiplicationSymbol', '*');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('AutoQuests_MultipleChoise', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('agreed_variable_name', 'ab_var');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('agreed_variable_value', 'agreed');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('email_variable_name', 'ab_email');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('multiimages', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('fontsize', '20');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('ImageFormat', '20');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('JPG_Quality', '80');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_BG_R1', '210');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_BG_R2', '230');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_BG_G1', '210');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_BG_G2', '230');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_BG_B1', '210');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_BG_B2', '230');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Text_Question1_R', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Text_Question1_G', '50');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Text_Question1_B', '50');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Text_Question2_R', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Text_Question2_G', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Text_Question2_B', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid1_R1', '225');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid1_R2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid1_G1', '90');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid1_G2', '110');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid1_B1', '90');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid1_B2', '110');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid2_R1', '90');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid2_R2', '110');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid2_G1', '225');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid2_G2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid2_B1', '90');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid2_B2', '110');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid3_R1', '90');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid3_R2', '110');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid3_G1', '90');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid3_G2', '110');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid3_B1', '225');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid3_B2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid4_R1', '130');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid4_R2', '170');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid4_G1', '130');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid4_G2', '170');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid4_B1', '130');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Grid4_B2', '170');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_FilledGrid_R1', '200');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_FilledGrid_R2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_FilledGrid_G1', '200');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_FilledGrid_G2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_FilledGrid_B1', '200');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_FilledGrid_B2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Ellipses_R1', '120');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Ellipses_R2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Ellipses_G1', '120');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Ellipses_G2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Ellipses_B1', '120');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Ellipses_B2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_PartialEllipses_R1', '120');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_PartialEllipses_R2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_PartialEllipses_G1', '120');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_PartialEllipses_G2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_PartialEllipses_B1', '120');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_PartialEllipses_B2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Lines_R1', '120');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Lines_R2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Lines_G1', '120');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Lines_G2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Lines_B1', '120');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Lines_B2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Arcs_R1', '120');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Arcs_R2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Arcs_G1', '120');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Arcs_G2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Arcs_B1', '120');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Arcs_B2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_BGText_R1', '180');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_BGText_R2', '220');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_BGText_G1', '180');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_BGText_G2', '220');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_BGText_B1', '180');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_BGText_B2', '220');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Text_R1', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Text_R2', '100');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Text_G1', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Text_G2', '100');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Text_B1', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_Text_B2', '255');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_SeparatingLines_R1', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_SeparatingLines_R2', '50');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_SeparatingLines_G1', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_SeparatingLines_G2', '50');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_SeparatingLines_B1', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('Color_SeparatingLines_B2', '50');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('lib_gd', '3');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('lib_ft', '2');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('show_counter', '2');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('counter_vari', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('counter_quest_reg', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('counter_quest_post', '0');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('lockregister', '3');
INSERT INTO phpbb_anti_bot_quest_config (config_name, config_value) VALUES ('lockguestposts', '8');

CREATE TABLE phpbb_anti_bot_quest_confirm (
 confirm_id CHAR(32) NOT NULL,
 session_id CHAR(32) NOT NULL,
 answer VARCHAR(255) NOT NULL,
 line1 VARCHAR(255) NOT NULL,
 line2 VARCHAR(255) NOT NULL,
 line3 VARCHAR(255) NOT NULL,
 line4 VARCHAR(255) NOT NULL,
 color CHAR(1) NOT NULL,
 whichform CHAR(1) NOT NULL,
 start_time INT(11) NOT NULL,
 PRIMARY KEY (confirm_id, session_id) 
);

CREATE TABLE phpbb_anti_bot_quest_regconfirm (
 confirm_id CHAR(32) NOT NULL,
 session_id CHAR(32) NOT NULL,
 start_time INT(11) NOT NULL,
 PRIMARY KEY (session_id) 
);

CREATE TABLE phpbb_anti_bot_quest (
 id MEDIUMINT(8) NOT NULL,
 question TEXT NOT NULL,
 answer1 VARCHAR(255) NOT NULL,
 answer2 VARCHAR(255) NOT NULL,
 answer3 VARCHAR(255) NOT NULL,
 answer4 VARCHAR(255) NOT NULL,
 answer5 VARCHAR(255) NOT NULL,
 anti_bot_img VARCHAR(255) NOT NULL,
 lang VARCHAR(255) NOT NULL,
 bbcodeuid VARCHAR(10) NOT NULL,
 wronganswer01 VARCHAR(255) NOT NULL,
 wronganswer02 VARCHAR(255) NOT NULL,
 wronganswer03 VARCHAR(255) NOT NULL,
 wronganswer04 VARCHAR(255) NOT NULL,
 wronganswer05 VARCHAR(255) NOT NULL,
 wronganswer06 VARCHAR(255) NOT NULL,
 wronganswer07 VARCHAR(255) NOT NULL,
 wronganswer08 VARCHAR(255) NOT NULL,
 wronganswer09 VARCHAR(255) NOT NULL,
 wronganswer10 VARCHAR(255) NOT NULL,
 imagequestion char(1) NOT NULL,
 PRIMARY KEY (id)
);

INSERT INTO phpbb_anti_bot_quest (id, question, answer1, answer2, answer3, answer4, answer5, anti_bot_img, lang, bbcodeuid, wronganswer01, wronganswer02, wronganswer03, wronganswer04, wronganswer05, wronganswer06, wronganswer07, wronganswer08, wronganswer09, wronganswer10, imagequestion) VALUES ('1', 'Which of these four is a planet?\r\nAmerica, Cat, Earth, University', 'Earth', '', '', '', '', '', 'english', 'b7d1788b14', '', '', '', '', '', '', '', '', '', '', '');
INSERT INTO phpbb_anti_bot_quest (id, question, answer1, answer2, answer3, answer4, answer5, anti_bot_img, lang, bbcodeuid, wronganswer01, wronganswer02, wronganswer03, wronganswer04, wronganswer05, wronganswer06, wronganswer07, wronganswer08, wronganswer09, wronganswer10, imagequestion) VALUES ('2', 'Which of these four is an animal?\r\nCar, Europe, Horse, Mountain', 'Horse', '', '', '', '', '', 'english', '0a8929fb6a', '', '', '', '', '', '', '', '', '', '', '');
INSERT INTO phpbb_anti_bot_quest (id, question, answer1, answer2, answer3, answer4, answer5, anti_bot_img, lang, bbcodeuid, wronganswer01, wronganswer02, wronganswer03, wronganswer04, wronganswer05, wronganswer06, wronganswer07, wronganswer08, wronganswer09, wronganswer10, imagequestion) VALUES ('3', 'What is the result of three multiplied by three?\r\n(Do not use numbers in your answer. e.g. If the result is 5, then write five.)', 'nine', 'Nine', '', '', '', '', 'english', 'aef9c3dd22', '', '', '', '', '', '', '', '', '', '', '');
INSERT INTO phpbb_anti_bot_quest (id, question, answer1, answer2, answer3, answer4, answer5, anti_bot_img, lang, bbcodeuid, wronganswer01, wronganswer02, wronganswer03, wronganswer04, wronganswer05, wronganswer06, wronganswer07, wronganswer08, wronganswer09, wronganswer10, imagequestion) VALUES ('4', 'Shows the picture fire? Yes or no', 'Yes', 'yes', '', '', '', 'example2.jpg', 'english', '4b5116a301', '', '', '', '', '', '', '', '', '', '', '');
INSERT INTO phpbb_anti_bot_quest (id, question, answer1, answer2, answer3, answer4, answer5, anti_bot_img, lang, bbcodeuid, wronganswer01, wronganswer02, wronganswer03, wronganswer04, wronganswer05, wronganswer06, wronganswer07, wronganswer08, wronganswer09, wronganswer10, imagequestion) VALUES ('5', 'What kind of fruit is shown on the picture?', 'Apple', 'apple', '', '', '', 'example5.jpg', 'english', '4f531943b6', '', '', '', '', '', '', '', '', '', '', '');
INSERT INTO phpbb_anti_bot_quest (id, question, answer1, answer2, answer3, answer4, answer5, anti_bot_img, lang, bbcodeuid, wronganswer01, wronganswer02, wronganswer03, wronganswer04, wronganswer05, wronganswer06, wronganswer07, wronganswer08, wronganswer09, wronganswer10, imagequestion) VALUES ('6', 'Can you see an airplane on the photo?', 'No', 'no', '', '', '', 'example2.jpg', 'english', '30fcf0fd26', '', '', '', '', '', '', '', '', '', '', '');
INSERT INTO phpbb_anti_bot_quest (id, question, answer1, answer2, answer3, answer4, answer5, anti_bot_img, lang, bbcodeuid, wronganswer01, wronganswer02, wronganswer03, wronganswer04, wronganswer05, wronganswer06, wronganswer07, wronganswer08, wronganswer09, wronganswer10, imagequestion) VALUES ('7', 'How many blue lines can you count on the image?', '4', 'four', 'Four', '', '', 'example3.gif', 'english', 'adc7dc3e28', '', '', '', '', '', '', '', '', '', '', '');
INSERT INTO phpbb_anti_bot_quest (id, question, answer1, answer2, answer3, answer4, answer5, anti_bot_img, lang, bbcodeuid, wronganswer01, wronganswer02, wronganswer03, wronganswer04, wronganswer05, wronganswer06, wronganswer07, wronganswer08, wronganswer09, wronganswer10, imagequestion) VALUES ('8', 'How many red lines can you see on the image?', '5', 'five', 'Five', '', '', 'example3.gif', 'english', '9134e7320c', '', '', '', '', '', '', '', '', '', '', '');
INSERT INTO phpbb_anti_bot_quest (id, question, answer1, answer2, answer3, answer4, answer5, anti_bot_img, lang, bbcodeuid, wronganswer01, wronganswer02, wronganswer03, wronganswer04, wronganswer05, wronganswer06, wronganswer07, wronganswer08, wronganswer09, wronganswer10, imagequestion) VALUES ('9', 'What is the result of...', '5', 'five', 'Five', '', '', 'example4.jpg', 'english', '37b6dd7e9b', '', '', '', '', '', '', '', '', '', '', '');
INSERT INTO phpbb_anti_bot_quest (id, question, answer1, answer2, answer3, answer4, answer5, anti_bot_img, lang, bbcodeuid, wronganswer01, wronganswer02, wronganswer03, wronganswer04, wronganswer05, wronganswer06, wronganswer07, wronganswer08, wronganswer09, wronganswer10, imagequestion) VALUES ('10', 'How many arrows can you find?', '6', 'six', 'Six', '', '', 'example1.jpg', 'english', '50dd984877', '', '', '', '', '', '', '', '', '', '', '');

# 
#-----[ OPEN ]------------------------------------------------ 
# 
posting.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
include($phpbb_root_path . 'includes/functions_post.'.$phpEx);

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
// Anti Bot Question Mod - Start
include($phpbb_root_path . 'includes/functions_abq.' . $phpEx);
// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
		case 'editpost':
		case 'newtopic':
		case 'reply':

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
			// Anti Bot Question Mod - Start
			ABQ_CheckAnswer('Posting');
			// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------ 
# 
// Generate smilies listing for page output
generate_smilies('inline', PAGE_POSTING);

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
// Anti Bot Question Mod - Start
$abq_CaseInfo = ABQ_AskQuestion('Posting');
// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------ 
# 
	'SMILIES_STATUS' => $smilies_status,

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
	// Anti Bot Question Mod - Start
	'L_ABQ_QUEST' => $abq_quest,
	'L_ABQ_EXPLAIN' => $lang['ABQ_PostForm_explain'] . '<br />' . sprintf($lang['ABQ_Form_Problems'], '<a href="mailto:' . $board_config['board_email'] . '">', '</a>'),
	'L_ABQ_QUESTION' => $lang['ABQ_Form_Question'],
	'L_ABQ_ANSWER' => $lang['ABQ_Form_YourAnswer'],
	'L_ABQ_ANSWER_EXPLAIN' => (($abq_CaseInfo) && (substr($abq_answerfield,0,7) != '<select')) ? '<br />'.$lang['ABQ_Form_CaseSensitive'] : '',
	'S_ABQ' => $abq_answerfield, 
	// Anti Bot Question Mod - End

# 
#-----[ OPEN ]------------------------------------------------ 
# 
admin/admin_users.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
		$email = ( !empty($HTTP_POST_VARS['email']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['email'] ) )) : '';

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
		// Anti Bot Question Mod - Start
		if ($abq_config['abq_register'])
		{
			$email = ( !empty($HTTP_POST_VARS[$abq_config['email_variable_name']]) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS[$abq_config['email_variable_name']] ) )) : '';
		}
		else
		{
			// Anti Bot Question Mod - End
			$email = ( !empty($HTTP_POST_VARS['email']) ) ? trim(strip_tags(htmlspecialchars( $HTTP_POST_VARS['email'] ) )) : '';
			// Anti Bot Question Mod - Start
		}
		// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
			$s_hidden_fields = '<input type="hidden" name="mode" value="edit" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" /><input type="hidden" name="avatarcatname" value="' . $category . '" />';

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
			// Anti Bot Question Mod - Start
			if ($abq_config['abq_register'])
			{
				$s_hidden_fields = '<input type="hidden" name="mode" value="edit" /><input type="hidden" name="' . $abq_config['agreed_variable_name'] . '" value="' . $abq_config['agreed_variable_value'] . '" /><input type="hidden" name="coppa" value="' . $coppa . '" /><input type="hidden" name="avatarcatname" value="' . $category . '" />';
				$s_hidden_fields .= '<input type="hidden" name="' . $abq_config['email_variable_name'] . '" value="' . str_replace("\"", "&quot;", $email) . '" />';			}
			else
			{
				// Anti Bot Question Mod - End
				$s_hidden_fields = '<input type="hidden" name="mode" value="edit" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" /><input type="hidden" name="avatarcatname" value="' . $category . '" />';
				// Anti Bot Question Mod - Start
				$s_hidden_fields .= '<input type="hidden" name="email" value="' . str_replace("\"", "&quot;", $email) . '" />';
			}
			// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
			$s_hidden_fields .= '<input type="hidden" name="email" value="' . str_replace("\"", "&quot;", $email) . '" />';

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
// ABQ Mod		$s_hidden_fields .= '<input type="hidden" name="email" value="' . str_replace("\"", "&quot;", $email) . '" />';

# 
#-----[ FIND ]------------------------------------------------ 
# 
		$s_hidden_fields = '<input type="hidden" name="mode" value="save" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
		// Anti Bot Question Mod - Start
		if ($abq_config['abq_register'])
		{
			$s_hidden_fields = '<input type="hidden" name="mode" value="save" /><input type="hidden" name="' . $abq_config['agreed_variable_name'] . '" value="' . $abq_config['agreed_variable_value'] . '" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
		}
		else
		{
			// Anti Bot Question Mod - End
			$s_hidden_fields = '<input type="hidden" name="mode" value="save" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
			// Anti Bot Question Mod - Start
		}
		// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
		$template->assign_vars(array(

# 
#-----[ BEFORE, ADD ]------------------------------------------------ 
# 
		// Anti Bot Question Mod - Start
		if ($abq_config['abq_register'])
		{
			$abq_email_variable_name = $abq_config['email_variable_name'];
		}
		else
		{
			$abq_email_variable_name = 'email';
		}
		// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
			'EMAIL' => $email,

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
			// Anti Bot Question Mod - Start
			'S_ABQ_EMAIL' => $abq_email_variable_name,
			// Anti Bot Question Mod - End

# 
#-----[ OPEN ]------------------------------------------------ 
# 
includes/constants.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
define('CONFIRM_TABLE', $table_prefix.'confirm');

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
// Anti Bot Question Mod - Start
define('ANTI_BOT_QUEST_TABLE', $table_prefix.'anti_bot_quest');
define('ANTI_BOT_QUEST_CONFIG_TABLE', $table_prefix.'anti_bot_quest_config');
define('ANTI_BOT_QUEST_CONFIRM_TABLE', $table_prefix.'anti_bot_quest_confirm');
define('ANTI_BOT_QUEST_REGCONFIRM_TABLE', $table_prefix.'anti_bot_quest_regconfirm');
// Anti Bot Question Mod - End

#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
	global $nav_links;

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
	// Anti Bot Question Mod - Start
	global $abq_config;
	// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
	include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx);

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
	// Anti Bot Question Mod - Start
	include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_abq.' . $phpEx);

	$abq_config = array();
	$sql = "SELECT *
		FROM " . ANTI_BOT_QUEST_CONFIG_TABLE;
	if( !($result = $db->sql_query($sql)) )
	{
		message_die(CRITICAL_ERROR, "Could not query anti bot question mod config information", "", __LINE__, __FILE__, $sql);
	}

	while ( $row = $db->sql_fetchrow($result) )
	{
		$abq_config[$row['config_name']] = $row['config_value'];
	}
	// Anti Bot Question Mod - End

#
#-----[ OPEN ]------------------------------------------
#
includes/page_tail.php

#
#-----[ FIND ]------------------------------------------
#
//
// Show the overall footer.
//

#
#-----[ AFTER, ADD ]------------------------------------------
#
// Anti Bot Question Mod - Start
if (($abq_config['abq_register']) || ($abq_config['abq_guest']))
{
	$abq_footer = $lang['ABQ_Footer'];
	if ($abq_config['show_counter'] == 1)
	{
		$abq_footer .= sprintf($lang['ABQ_Footer_Counter1'], ($abq_config['counter_vari'] + $abq_config['counter_quest_reg']));
	}
	elseif ($abq_config['show_counter'] == 2)
	{
		$abq_footer .= sprintf($lang['ABQ_Footer_Counter2'], ($abq_config['counter_vari'] + $abq_config['counter_quest_reg']), $abq_config['counter_quest_post']);
	}
	elseif ($abq_config['show_counter'] == 3)
	{
		$abq_footer .= sprintf($lang['ABQ_Footer_Counter3'], $abq_config['counter_quest_post']);
	}
	$template->assign_block_vars('switch_abq_footer', array());
	$template->assign_vars(array(
		'ABQ_FOOTER' => $abq_footer)
	);
}
// Anti Bot Question Mod - End

# 
#-----[ OPEN ]------------------------------------------------ 
# 
includes/usercp_avatar.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
	global $board_config, $db, $template, $lang, $images, $theme;

# 
#-----[ IN-LINE FIND ]------------------------------------------------ 
# 
$theme

# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------------ 
# 
, $abq_config

# 
#-----[ FIND ]------------------------------------------------ 
# 
	$params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'cur_password', 'new_password', 'password_confirm', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popup_pm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat');

	$s_hidden_vars = '<input type="hidden" name="sid" value="' . $session_id . '" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="avatarcatname" value="' . $category . '" />';

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
	// Anti Bot Question Mod - Start
	$params = array('coppa', 'user_id', 'username', 'current_email', 'cur_password', 'new_password', 'password_confirm', 'icq', 'aim', 'msn', 'yim', 'website', 'location', 'occupation', 'interests', 'signature', 'viewemail', 'notifypm', 'popup_pm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat');

	if ($abq_config['abq_register'])
	{
		$params[] = $abq_config['email_variable_name'];
		$$abq_config['email_variable_name'] = $email;
		$s_hidden_vars = '<input type="hidden" name="sid" value="' . $session_id . '" /><input type="hidden" name="' . $abq_config['agreed_variable_name'] . '" value="' . $abq_config['agreed_variable_value'] . '" /><input type="hidden" name="avatarcatname" value="' . $category . '" />';
	}
	else
	{
		$params[] = 'email';
		// Anti Bot Question Mod - End
		$s_hidden_vars = '<input type="hidden" name="sid" value="' . $session_id . '" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="avatarcatname" value="' . $category . '" />';
		// Anti Bot Question Mod - Start
	}
	// Anti Bot Question Mod - End

# 
#-----[ OPEN ]------------------------------------------------ 
# 
includes/usercp_register.php

# 
#-----[ FIND ]------------------------------------------------ 
# 
	die("Hacking attempt");
	exit;
}

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
// Anti Bot Question Mod - Start
include($phpbb_root_path . 'includes/functions_abq.' . $phpEx);
// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
	global $userdata, $template, $lang, $phpbb_root_path, $phpEx;

# 
#-----[ IN-LINE FIND ]------------------------------------------------ 
# 
$phpEx

# 
#-----[ IN-LINE AFTER, ADD ]------------------------------------------------ 
# 
, $abq_config, $abq_agreedPart2

# 
#-----[ FIND ]------------------------------------------------ 
# 
		"U_AGREE_OVER13" => append_sid("profile.$phpEx?mode=register&amp;agreed=true"),
		"U_AGREE_UNDER13" => append_sid("profile.$phpEx?mode=register&amp;agreed=true&amp;coppa=true"))

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
		// Anti Bot Question Mod - Start
		"U_AGREE_OVER13" => append_sid("profile.$phpEx?mode=register&amp;" . (($abq_config['abq_register']) ? $abq_config['agreed_variable_name'] : "agreed") . "=" . (($abq_config['abq_register']) ? $abq_config['agreed_variable_value'] . $abq_agreedPart2 : "true")),
		"U_AGREE_UNDER13" => append_sid("profile.$phpEx?mode=register&amp;" . (($abq_config['abq_register']) ? $abq_config['agreed_variable_name'] : "agreed") . "=" . (($abq_config['abq_register']) ? $abq_config['agreed_variable_value'] . $abq_agreedPart2 : "true") . "&amp;coppa=true"))
		// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
if ( $mode == 'register' && !isset($HTTP_POST_VARS['agreed']) && !isset($HTTP_GET_VARS['agreed']) )

# 
#-----[ BEFORE, ADD ]----------------------------------------
# 
// Anti Bot Question Mod - Start
$abq_agreedPart2 = '';

if (($abq_config['abq_register']) && ($mode == 'register'))
{
	$sql = 'DELETE FROM ' . ANTI_BOT_QUEST_REGCONFIRM_TABLE . ' 
		WHERE start_time < ' . (time() - (int) $board_config['session_length']) . ' 
		AND session_id <> \'' . $userdata['session_id'] . '\'';
	if (!$db->sql_query($sql))
	{
		message_die(GENERAL_ERROR, 'Could not delete stale anti bot question data', '', __LINE__, __FILE__, $sql);
	}
	$db->sql_freeresult($result);

	$sql = 'SELECT confirm_id 
		FROM ' . ANTI_BOT_QUEST_REGCONFIRM_TABLE . ' 
		WHERE session_id = \'' . $userdata['session_id'] . '\'';
	if (!($result = $db->sql_query($sql)))
	{
		message_die(CRITICAL_ERROR, "Could not query anti bot question mod registration information", "", __LINE__, __FILE__, $sql);
	}
	if ($db->sql_numrows($result) > 0)
	{
		while ($row = $db->sql_fetchrow($result))
		{
			$abqrow = $row;
		}
		$abq_agreedPart2 = $abqrow['confirm_id'];
	}
	if ($abq_agreedPart2 == '')
	{
		$abq_agreedPart2 = md5(uniqid($user_ip));

		$sql = 'INSERT INTO ' . ANTI_BOT_QUEST_REGCONFIRM_TABLE . ' (confirm_id, session_id, start_time) 
			VALUES (\'' . $abq_agreedPart2 . '\', \'' . $userdata['session_id'] . '\', ' . time() . ')';
		if (!$db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, 'Could not insert new anti bot question registration information', '', __LINE__, __FILE__, $sql);
		}

	}
	elseif ((!isset($HTTP_POST_VARS[$abq_config['agreed_variable_name']])) && (!isset($HTTP_GET_VARS[$abq_config['agreed_variable_name']])))
	{
		$abq_agreedPart2 = md5(uniqid($user_ip));

		$sql = 'UPDATE ' . ANTI_BOT_QUEST_REGCONFIRM_TABLE . ' 
			SET confirm_id = \'' . $abq_agreedPart2 . '\', 
			start_time = ' . time() . ' 
			WHERE session_id = \'' . $userdata['session_id'] . '\'';
		if ( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Could not update anti bot question registration information', '', __LINE__, __FILE__, $sql);
		}
	}

	if (((isset($HTTP_POST_VARS[$abq_config['agreed_variable_name']])) && ($HTTP_POST_VARS[$abq_config['agreed_variable_name']] == $abq_config['agreed_variable_value'].$abq_agreedPart2)) || ((isset($HTTP_GET_VARS[$abq_config['agreed_variable_name']])) && ($HTTP_GET_VARS[$abq_config['agreed_variable_name']] == $abq_config['agreed_variable_value'].$abq_agreedPart2)))
	{}
	else
	{
		if ((isset($HTTP_POST_VARS['agreed'])) || (isset($HTTP_GET_VARS['agreed'])) || (isset($HTTP_POST_VARS['email'])))
		{
			$sql = 'SELECT *
				FROM ' . ANTI_BOT_QUEST_CONFIG_TABLE . ' 
				WHERE config_name = \'counter_vari\'';
			if( !($result = $db->sql_query($sql)) )
			{
				message_die(CRITICAL_ERROR, "Could not query anti bot question mod counter information", "", __LINE__, __FILE__, $sql);
			}
			while ( $row = $db->sql_fetchrow($result) )
			{
				$abq_counter_vari = $row['config_value'];
			}
			$abq_counter_vari++;

			$sql = 'UPDATE ' . ANTI_BOT_QUEST_CONFIG_TABLE . ' SET 
				config_value = \'' . $abq_counter_vari . '\' 
				WHERE config_name = \'counter_vari\'';
			if( !$db->sql_query($sql) )
			{
				message_die(GENERAL_ERROR, "Failed to update anti bot question mod counter", "", __LINE__, __FILE__, $sql);
			}
		}

		$template->assign_vars(array(
			"META" => '<meta name="robots" content="noindex,nofollow" /><meta name="robots" content="noarchive" /><meta http-equiv="expires" content="0" /><meta http-equiv="pragma" content="no-cache" />')
		);
		include($phpbb_root_path . 'includes/page_header.'.$phpEx);
		show_coppa();
		include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
	}
}
elseif (!$abq_config['abq_register'])
// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
		$current_email = trim(htmlspecialchars($HTTP_POST_VARS['current_email']));
	}

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
	// Anti Bot Question Mod - Start
	if ($abq_config['abq_register'])
	{
		$abq_email_variable_name = $abq_config['email_variable_name'];
	}
	else
	{
		$abq_email_variable_name = 'email';
	}
	// Anti Bot Question Mod - End
	
# 
#-----[ FIND ]------------------------------------------------ 
# 
	$strip_var_list = array('email' => 'email', 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests', 'confirm_code' => 'confirm_code');

# 
#-----[ REPLACE WITH ]------------------------------------------------ 
# 
	$strip_var_list = array('email' => $abq_email_variable_name, 'icq' => 'icq', 'aim' => 'aim', 'msn' => 'msn', 'yim' => 'yim', 'website' => 'website', 'location' => 'location', 'occupation' => 'occupation', 'interests' => 'interests', 'confirm_code' => 'confirm_code', 'abq_aw' => $abq_config['abq_variable_name'], 'idabq' => 'idabq');

# 
#-----[ FIND ]------------------------------------------------ 
# 
				$error = TRUE;
				$error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Confirm_code_wrong'];
			}
			$db->sql_freeresult($result);
		}
	}

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
	// Anti Bot Question Mod - Start
	ABQ_CheckAnswer('Registration');
	// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
//
// Default pages
//

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
// Anti Bot Question Mod - Start
$template->assign_vars(array(
	"META" => '<meta name="robots" content="noindex,nofollow" /><meta name="robots" content="noarchive" /><meta http-equiv="expires" content="0" /><meta http-equiv="pragma" content="no-cache" />')
);
// Anti Bot Question Mod - Ende

# 
#-----[ FIND ]------------------------------------------------ 
# 
	$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
	// Anti Bot Question Mod - Start
	if ($abq_config['abq_register'])
	{
		$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="' . $abq_config['agreed_variable_name'] . '" value="' . $abq_config['agreed_variable_value'] . $abq_agreedPart2 . '" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
	}
	else
	{
		// Anti Bot Question Mod - End
		$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="agreed" value="true" /><input type="hidden" name="coppa" value="' . $coppa . '" />';
		// Anti Bot Question Mod - Start
	}
	// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
		'body' => 'profile_add_body.tpl')
	);

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
	// Anti Bot Question Mod - Start
	$abq_quest = '';
	$abq_answerfield = '';
	$abq_CaseInfo = 0;
	// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
	if ( $mode == 'editprofile' )
	{
		$template->assign_block_vars('switch_edit_profile', array());
	}

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
	// Anti Bot Question Mod - Start
	else if (( $mode == 'register' ) && ($abq_config['abq_register']))
	{
		$abq_CaseInfo = ABQ_AskQuestion('Registration');
	}
	// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
	$form_enctype = ( @$ini_val('file_uploads') == '0' || strtolower(@$ini_val('file_uploads') == 'off') || phpversion() == '4.0.4pl1' || !$board_config['allow_avatar_upload'] || ( phpversion() < '4.0.3' && @$ini_val('open_basedir') != '' ) ) ? '' : 'enctype="multipart/form-data"';

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
	// Anti Bot Question Mod - Start
	if ($abq_config['abq_register'])
	{
		$abq_email_variable_name = $abq_config['email_variable_name'];
	}
	else
	{
		$abq_email_variable_name = 'email';
	}
	// Anti Bot Question Mod - End

# 
#-----[ FIND ]------------------------------------------------ 
# 
		'CONFIRM_IMG' => $confirm_image, 

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
		// Anti Bot Question Mod - Start
		'S_ABQ_EMAIL' => $abq_email_variable_name,
		'L_ABQ_QUEST' => $abq_quest,
		'L_ABQ_EXPLAIN' => $lang['ABQ_RegisterForm_explain'],
		'L_ABQ_NOTE' => sprintf($lang['ABQ_Form_Problems'], '<a href="mailto:' . $board_config['board_email'] . '">', '</a>'),
		'L_ABQ_QUESTION' => $lang['ABQ_Form_Question'],
		'L_ABQ_ANSWER' => $lang['ABQ_Form_YourAnswer'],
		'L_ABQ_ANSWER_EXPLAIN' => (($abq_CaseInfo) && (substr($abq_answerfield,0,7) != '<select')) ? '<br />'.$lang['ABQ_Form_CaseSensitive'] : '',
		'S_ABQ' => $abq_answerfield, 
		// Anti Bot Question Mod - End

# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/agreement.tpl

# 
#-----[ FIND ]------------------------------------------------ 
# 
				<td><span class="genmed"><br />{AGREEMENT}<br /><br /><br /><div align="center"><a href="{U_AGREE_OVER13}" class="genmed">{AGREE_OVER_13}</a><br /><br /><a href="{U_AGREE_UNDER13}" class="genmed">{AGREE_UNDER_13}</a><br /><br /><a href="{U_INDEX}" class="genmed">{DO_NOT_AGREE}</a></div><br /></span></td>

# 
#-----[ IN-LINE FIND ]------------------------------------------------ 
# 
<a href="{U_AGREE_OVER13}" class="genmed">

# 
#-----[ IN-LINE REPLACE WITH ]------------------------------------------------ 
# 
<a href="{U_AGREE_OVER13}" class="genmed" rel="nofollow">

# 
#-----[ IN-LINE FIND ]------------------------------------------------ 
# 
# EN:
#    Within the german version of phpBB.de this "IN-LINE FIND" doesn't exist because the COPPA was removed.
#    Ignore this "IN-LINE FIND" and the following "IN-LINE REPLACE WITH" if you use the german version without the COPPA.
# 
# DE:
#    In der deutschen Version von phpBB.de gibt es dieses "IN-LINE FIND" nicht, da die COPPA entfernt wurde.
#    Zusammen mit dem nachfolgenden "IN-LINE REPLACE WITH" kann es ignoriert werden, wenn die COPPA nicht nachtrglich wieder eingebaut wurde.
#
# FR:
#    Dans la version allemande de phpBB.de, cette instruction "IN-LINE FIND" est  ignorer car le COPPA a t supprim. 
#    Ignorez cette tape ainsi que la suivante ("IN-LINE REPLACE WITH") si vous utilisez une version allemande sans le COPPA.
#
# ES:
#    En la versin en alemn de phpBB.de este "IN-LINE FIND" no existe porque el COPPA fue eliminado. 
#    Ignora este "IN-LINE FIND" y el siguiente "IN-LINE REPLACE WITH" si utilizas la versin alemana.
#
<a href="{U_AGREE_UNDER13}" class="genmed">

# 
#-----[ IN-LINE REPLACE WITH ]------------------------------------------------ 
# 
<a href="{U_AGREE_UNDER13}" class="genmed" rel="nofollow">

# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subSilver/posting_body.tpl

# 
#-----[ FIND ]------------------------------------------ 
# 
	{POLLBOX} 

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
	<!-- BEGIN switch_anti_bot_question -->
	<tr>
		<th class="thHead" colspan="2" height="25"><b>{L_ABQ_QUESTION}</b></th>
	</tr>
	<tr>
		<td class="row1" colspan="2"><span class="gensmall">{L_ABQ_EXPLAIN}</span></td>
	</tr>
	<tr>
	  <td class="row1" valign="top"><span class="gen">{L_ABQ_QUESTION}:</span></td>
	  <td class="row2"><span class="gen">{L_ABQ_QUEST}</span>
	  </td>
	</tr>
	<tr>
	  <td class="row1"><span class="gen">{L_ABQ_ANSWER}: *</span><span class="gensmall">{L_ABQ_ANSWER_EXPLAIN}</span></td>
	  <td class="row2">{S_ABQ}</td>
	</tr>
	<!-- END switch_anti_bot_question -->

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_footer.tpl

#
#-----[ FIND ]------------------------------------------
#
Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> &copy; 2001, 2005 phpBB Group<br />{TRANSLATION_INFO}</span></div>

#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN switch_abq_footer -->
<div align="center"><span class="copyright"><br>
{ABQ_FOOTER}
</span></div>
<!-- END switch_abq_footer -->

# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/profile_add_body.tpl

# 
#-----[ FIND ]------------------------------------------------ 
# 
		<td class="row2"><input type="text" class="post" style="width:200px" name="email" size="25" maxlength="255" value="{EMAIL}" /></td>

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
		<td class="row2"><input type="text" class="post" style="width:200px" name="{S_ABQ_EMAIL}" size="25" maxlength="255" value="{EMAIL}" /></td>

# 
#-----[ FIND ]------------------------------------------------ 
# 
	<tr> 
	  <td class="row1"><span class="gen">{L_CONFIRM_CODE}: * </span><br /><span class="gensmall">{L_CONFIRM_CODE_EXPLAIN}</span></td>
	  <td class="row2"><input type="text" class="post" style="width: 200px" name="confirm_code" size="6" maxlength="6" value="" /></td>
	</tr>
	<!-- END switch_confirm -->

# 
#-----[ AFTER, ADD ]------------------------------------------------ 
# 
	<!-- BEGIN switch_anti_bot_question -->
	<tr>
	  <td class="row1" valign="top"><span class="gen">{L_ABQ_QUESTION}:</span><br />
		<span class="gensmall">{L_ABQ_EXPLAIN}</span></td>
	  <td class="row2"><span class="gen">{L_ABQ_QUEST}</span>
	  </td>
	</tr>
	<tr>
		<td class="row1" colspan="2" align="center"><span class="gensmall">{L_ABQ_NOTE}</span></td>
	</tr>
	<tr>
	  <td class="row1"><span class="gen">{L_ABQ_ANSWER}: *</span><span class="gensmall">{L_ABQ_ANSWER_EXPLAIN}</span></td>
	  <td class="row2">{S_ABQ}</td>
	</tr>
	<!-- END switch_anti_bot_question -->

# 
#-----[ OPEN ]------------------------------------------------ 
# 
templates/subSilver/admin/user_edit_body.tpl

# 
#-----[ FIND ]------------------------------------------------ 
# 
		<input class="post" type="text" name="email" size="35" maxlength="255" value="{EMAIL}" />

# 
#-----[ REPLACE WITH ]----------------------------------------
# 
		<input class="post" type="text" name="{S_ABQ_EMAIL}" size="35" maxlength="255" value="{EMAIL}" />

# 
#-----[ SAVE/CLOSE ALL FILES ]-------------------------------- 
# 
# EoM 