1 |
596
|
thorn
|
<?php
|
2 |
|
|
|
3 |
|
|
// $Id$
|
4 |
|
|
|
5 |
|
|
/*
|
6 |
|
|
|
7 |
|
|
Website Baker Project <http://www.websitebaker.org/>
|
8 |
915
|
Ruebenwurz
|
Copyright (C) 2004-2009, Ryan Djurovich
|
9 |
596
|
thorn
|
|
10 |
|
|
Website Baker is free software; you can redistribute it and/or modify
|
11 |
|
|
it under the terms of the GNU General Public License as published by
|
12 |
|
|
the Free Software Foundation; either version 2 of the License, or
|
13 |
|
|
(at your option) any later version.
|
14 |
|
|
|
15 |
|
|
Website Baker is distributed in the hope that it will be useful,
|
16 |
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
17 |
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
18 |
|
|
GNU General Public License for more details.
|
19 |
|
|
|
20 |
|
|
You should have received a copy of the GNU General Public License
|
21 |
|
|
along with Website Baker; if not, write to the Free Software
|
22 |
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
23 |
|
|
|
24 |
|
|
*/
|
25 |
|
|
|
26 |
|
|
// prevent this file from being accessed directly
|
27 |
|
|
if(!defined('WB_PATH')) { exit('Cannot access this file directly'); }
|
28 |
|
|
|
29 |
|
|
$table = TABLE_PREFIX.'mod_captcha_control';
|
30 |
|
|
$database->query("DROP TABLE IF EXISTS `$table`");
|
31 |
|
|
|
32 |
|
|
$database->query("CREATE TABLE `$table` (
|
33 |
|
|
`enabled_captcha` VARCHAR(1) NOT NULL DEFAULT '1',
|
34 |
820
|
thorn
|
`enabled_asp` VARCHAR(1) NOT NULL DEFAULT '0',
|
35 |
596
|
thorn
|
`captcha_type` VARCHAR(255) NOT NULL DEFAULT 'calc_text',
|
36 |
|
|
`asp_session_min_age` INT(11) NOT NULL DEFAULT '20',
|
37 |
|
|
`asp_view_min_age` INT(11) NOT NULL DEFAULT '10',
|
38 |
640
|
thorn
|
`asp_input_min_age` INT(11) NOT NULL DEFAULT '5',
|
39 |
|
|
`ct_text` LONGTEXT NOT NULL DEFAULT ''
|
40 |
596
|
thorn
|
)"
|
41 |
|
|
);
|
42 |
|
|
|
43 |
|
|
// add new row using the table default values defined above
|
44 |
|
|
$database->query("
|
45 |
|
|
INSERT INTO `$table`
|
46 |
|
|
(`enabled_captcha`, `enabled_asp`, `captcha_type`)
|
47 |
|
|
VALUES
|
48 |
|
|
('1', '1', 'calc_text')
|
49 |
|
|
");
|
50 |
|
|
|
51 |
|
|
?>
|