1
|
<?php
|
2
|
|
3
|
// $Id$
|
4
|
|
5
|
/*
|
6
|
|
7
|
Website Baker Project <http://www.websitebaker.org/>
|
8
|
Copyright (C) 2004-2008, Ryan Djurovich
|
9
|
|
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
|
`enabled_asp` VARCHAR(1) NOT NULL DEFAULT '1',
|
35
|
`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
|
`asp_input_min_age` INT(11) NOT NULL DEFAULT '5'
|
39
|
)"
|
40
|
);
|
41
|
|
42
|
// add new row using the table default values defined above
|
43
|
$database->query("
|
44
|
INSERT INTO `$table`
|
45
|
(`enabled_captcha`, `enabled_asp`, `captcha_type`)
|
46
|
VALUES
|
47
|
('1', '1', 'calc_text')
|
48
|
");
|
49
|
|
50
|
?>
|