1 |
596
|
thorn
|
<?php
|
2 |
1477
|
Luisehahne
|
/**
|
3 |
|
|
*
|
4 |
|
|
* @category modules
|
5 |
|
|
* @package captcha_control
|
6 |
|
|
* @author WebsiteBaker Project
|
7 |
|
|
* @copyright 2009-2011, Website Baker Org. e.V.
|
8 |
|
|
* @link http://www.websitebaker2.org/
|
9 |
|
|
* @license http://www.gnu.org/licenses/gpl.html
|
10 |
|
|
* @platform WebsiteBaker 2.8.x
|
11 |
|
|
* @requirements PHP 5.2.2 and higher
|
12 |
|
|
* @version $Id$
|
13 |
|
|
* @filesource $HeadURL$
|
14 |
|
|
* @lastmodified $Date$
|
15 |
|
|
*
|
16 |
|
|
*/
|
17 |
596
|
thorn
|
|
18 |
|
|
// prevent this file from being accessed directly
|
19 |
1536
|
Luisehahne
|
/* -------------------------------------------------------- */
|
20 |
|
|
if(defined('WB_PATH') == false)
|
21 |
|
|
{
|
22 |
|
|
// Stop this file being access directly
|
23 |
|
|
die('<head><title>Access denied</title></head><body><h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2></body></html>');
|
24 |
|
|
}
|
25 |
|
|
/* -------------------------------------------------------- */
|
26 |
596
|
thorn
|
|
27 |
|
|
$table = TABLE_PREFIX.'mod_captcha_control';
|
28 |
|
|
$database->query("DROP TABLE IF EXISTS `$table`");
|
29 |
|
|
|
30 |
1536
|
Luisehahne
|
$database->query("CREATE TABLE IF NOT EXISTS `$table` (
|
31 |
596
|
thorn
|
`enabled_captcha` VARCHAR(1) NOT NULL DEFAULT '1',
|
32 |
820
|
thorn
|
`enabled_asp` VARCHAR(1) NOT NULL DEFAULT '0',
|
33 |
596
|
thorn
|
`captcha_type` VARCHAR(255) NOT NULL DEFAULT 'calc_text',
|
34 |
|
|
`asp_session_min_age` INT(11) NOT NULL DEFAULT '20',
|
35 |
|
|
`asp_view_min_age` INT(11) NOT NULL DEFAULT '10',
|
36 |
640
|
thorn
|
`asp_input_min_age` INT(11) NOT NULL DEFAULT '5',
|
37 |
919
|
Ruebenwurz
|
`ct_text` LONGTEXT NOT NULL
|
38 |
1536
|
Luisehahne
|
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci"
|
39 |
596
|
thorn
|
);
|
40 |
|
|
|
41 |
|
|
// add new row using the table default values defined above
|
42 |
|
|
$database->query("
|
43 |
|
|
INSERT INTO `$table`
|
44 |
|
|
(`enabled_captcha`, `enabled_asp`, `captcha_type`)
|
45 |
|
|
VALUES
|
46 |
|
|
('1', '1', 'calc_text')
|
47 |
|
|
");
|