Project

General

Profile

1
<?php
2
/**
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: install.php 1477 2011-07-21 02:47:28Z Luisehahne $
15
 * @filesource      $HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/modules/captcha_control/install.php $
16
 * @lastmodified    $Date: 2011-07-21 04:47:28 +0200 (Thu, 21 Jul 2011) $
17
 *
18
 */
19

    
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
	`enabled_asp` VARCHAR(1) NOT NULL DEFAULT '0',
29
	`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
	`asp_input_min_age` INT(11) NOT NULL DEFAULT '5',
33
	`ct_text` LONGTEXT NOT NULL
34
	)"
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
");
(4-4/6)