Project

General

Profile

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