Project

General

Profile

« Previous | Next » 

Revision 596

Added by thorn almost 17 years ago

added new CAPTCHA and ASP (Advanced Spam Protection)

View differences:

trunk/CHANGELOG
13 13
------------------------------------- 2.7.0 -------------------------------------
14 14
25-Jan-2008 Christian Sommer
15 15
!	removed changes introduced with changeset 593 (we need to think off if we want to implement that feature)
16
25-Jan-2008 Thomas Hornik
16
25-Jan-2008 Thomas Hornik
17
+	Added new CAPTCHA. Adapted core: signup and modules: news and form.
18
+	Added Advanced Spam Protection (ASP) to core: signup and modules news and form.
17 19
#	module news: it was possible to post comments to postings with commenting disabled
18 20
	or to inactive postings. Fixed
19 21
24-Jan-2008 Thomas Hornik
trunk/wb/upgrade-script.php
61 61
 */
62 62
function db_add_search_key_value($key, $value) {
63 63
	global $database; global $OK; global $FAIL;
64
	$query = $database->query("SELECT value FROM ".TABLE_PREFIX."search WHERE name = '$key' LIMIT 1");
64
	$table = TABLE_PREFIX.'search';
65
	$query = $database->query("SELECT value FROM $table WHERE name = '$key' LIMIT 1");
65 66
	if($query->numRows() > 0) {
66 67
		echo "$key: allready there. $OK.<br />";
67 68
		return true;
68 69
	} else {
69
		$database->query("INSERT INTO ".TABLE_PREFIX."search (name,value,extra) VALUES ('$key', '$value', '')");
70
		$database->query("INSERT INTO $table (name,value,extra) VALUES ('$key', '$value', '')");
70 71
		echo mysql_error()?mysql_error().'<br />':'';
71
		$query = $database->query("SELECT value FROM ".TABLE_PREFIX."search WHERE name = '$key' LIMIT 1");
72
		$query = $database->query("SELECT value FROM $table WHERE name = '$key' LIMIT 1");
72 73
		if($query->numRows() > 0) {
73 74
			echo "$key: $OK.<br />";
74 75
			return true;
......
349 350
	
350 351
}
351 352

  
353
/**********************************************************
354
 *  - asp - Advanced Spam Protection
355
 */
356
echo "<br /><u>Adding table mod_captcha_control</u><br />";
357
$table = TABLE_PREFIX.'mod_captcha_control';
358
$database->query("DROP TABLE IF EXISTS `$table`");
359
$database->query("CREATE TABLE `$table` (
360
	`enabled_captcha` VARCHAR(1) NOT NULL DEFAULT '1',
361
	`enabled_asp` VARCHAR(1) NOT NULL DEFAULT '1',
362
	`captcha_type` VARCHAR(255) NOT NULL DEFAULT 'calc_text',
363
	`asp_session_min_age` INT(11) NOT NULL DEFAULT '20',
364
	`asp_view_min_age` INT(11) NOT NULL DEFAULT '10',
365
	`asp_input_min_age` INT(11) NOT NULL DEFAULT '5'
366
	)"
367
);
368
$database->query("
369
	INSERT INTO `$table`
370
		(`enabled_captcha`, `enabled_asp`, `captcha_type`)
371
	VALUES
372
		('1', '1', 'calc_text')
373
");
352 374

  
353 375

  
354 376
//******************************************************************************
trunk/wb/include/captcha/backgrounds/index.php
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
header("Location: ../index.php");
27

  
28
?>
0 29

  
trunk/wb/include/captcha/captchas/ttf_image.php
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
require_once("../../../config.php");
27
require_once(WB_PATH.'/include/captcha/captcha.php');
28

  
29
// get lists of fonts and backgrounds
30
require_once(WB_PATH.'/search/search_modext.php');
31
list($fonts, $dirs) = list_files_dirs(WB_PATH.'/include/captcha/fonts', false);
32
list($bgs, $dirs) = list_files_dirs(WB_PATH.'/include/captcha/backgrounds', false);
33
$fonts = clear_filelist($fonts, '\.ttf');
34
$bgs = clear_filelist($bgs, '\.png');
35

  
36
// make random string
37
if(!function_exists('randomString')) {
38
	function randomString($len) {
39
		list($usec, $sec) = explode(' ', microtime());
40
		srand((float)$sec + ((float)$usec * 100000));
41
		//$possible="ABCDEFGHJKLMNPRSTUVWXYZabcdefghkmnpqrstuvwxyz23456789";
42
		$possible="abdfhkrsvwxyz23456789";
43
		$str="";
44
		while(strlen($str)<$len) {
45
			$str.=substr($possible,(rand()%(strlen($possible))),1);
46
		}
47
		return($str);
48
	}
49
}
50
$text = randomString(5); // number of characters
51
$_SESSION['captcha'] = $text; 
52

  
53
// choose a font and background
54
$font = $fonts[array_rand($fonts)];
55
$bg = $bgs[array_rand($bgs)];
56
// get image-dimensions
57
list($width, $height, $type, $attr) = getimagesize($bg);
58

  
59
// create image
60
$image_failed = true;
61
do {
62
	$image = ImageCreateFromPNG($bg); // backgroundimage
63
	$grey = rand(0,50);
64
	$color = ImageColorAllocate($image, $grey, $grey, $grey); // Farbe
65
	$ttf = $font;
66
	$ttfsize = 25; // fontsize
67
	$angle = rand(0,5);
68
	$t_x = rand(5,30);
69
	$t_y = rand($height-10,$height-2);
70
	$res = imagettftext($image, $ttfsize, $angle, $t_x, $t_y, $color, $ttf, $text);
71
	// check if text fits into the image
72
	//if(($res[0]>0 && $res[0]<$width) && ($res[1]>0 && $res[1]<$height) && 
73
	//   ($res[2]>0 && $res[2]<$width) && ($res[3]>0 && $res[3]<$height) && 
74
	//   ($res[4]>0 && $res[4]<$width) && ($res[5]>0 && $res[5]<$height) && 
75
	//   ($res[6]>0 && $res[6]<$width) && ($res[7]>0 && $res[7]<$height)
76
	//) {
77
		$image_failed = false;
78
	//}
79
} while($image_failed);
80

  
81
captcha_header();
82
ob_start();
83
imagepng($image);
84
header("Content-Length: ".ob_get_length()); 
85
ob_end_flush();
86
imagedestroy($image);
87

  
88
?>
0 89

  
trunk/wb/include/captcha/captchas/old_image.php
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
require_once("../../../config.php");
27
require_once(WB_PATH.'/include/captcha/captcha.php');
28

  
29
// Captcha
30
srand((double)microtime()*100000);
31
$_SESSION['captcha'] = rand(10000,99999);
32

  
33
$w=120;
34
$h=30;
35
$image = imagecreate($w, $h);
36
$white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
37
$gray = imagecolorallocate($image, 0xC0, 0xC0, 0xC0);
38
$darkgray = imagecolorallocate($image, 0x50, 0x50, 0x50);
39

  
40
srand((double)microtime()*1000000);
41
for($i = 0; $i < 30; $i++) {
42
	$x1 = rand(0,$w);
43
	$y1 = rand(0,$h);
44
	$x2 = rand(0,$w);
45
	$y2 = rand(0,$h);
46
	imageline($image, $x1, $y1, $x2, $y2 , $gray);  
47
}
48

  
49
$x = 0;
50
for($i = 0; $i < 5; $i++) {
51
	$fnt = rand(3,5);
52
	$x = $x + rand(12 , 20);
53
	$y = rand(7 , 12); 
54
	imagestring($image, $fnt, $x, $y, substr($_SESSION['captcha'], $i, 1), $darkgray); 
55
}
56

  
57
captcha_header();
58
ob_start();
59
imagepng($image);
60
header("Content-Length: ".ob_get_length()); 
61
ob_end_flush();
62
imagedestroy($image);
63

  
64
?>
0 65

  
trunk/wb/include/captcha/captchas/calc_image.php
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
require_once("../../../config.php");
27
require_once(WB_PATH.'/include/captcha/captcha.php');
28

  
29
// Captcha
30
$_SESSION['captcha'] = '';
31
mt_srand((double)microtime()*100000);
32
$n = mt_rand(1,3);
33
switch ($n) {
34
	case 1:
35
		mt_srand((double)microtime()*1000000);
36
		$x = mt_rand(1,9);
37
		$y = mt_rand(1,9);
38
		$_SESSION['captcha'] = $x + $y;
39
		$cap = "$x+$y"; 
40
		break; 
41
	case 2:
42
		mt_srand((double)microtime()*1000000);
43
		$x = mt_rand(10,20);
44
		$y = mt_rand(1,9);
45
		$_SESSION['captcha'] = $x - $y; 
46
		$cap = "$x-$y"; 
47
		break;
48
	case 3:
49
		mt_srand((double)microtime()*1000000);
50
		$x = mt_rand(2,10);
51
		$y = mt_rand(2,5);
52
		$_SESSION['captcha'] = $x * $y; 
53
		$cap = "$x*$y"; 
54
		break;
55
}
56

  
57
$image = imagecreate(100, 30);
58

  
59
$white = imagecolorallocate($image, 0xFF, 0xFF, 0xFF);
60
$gray = imagecolorallocate($image, 0xC0, 0xC0, 0xC0);
61
$darkgray = imagecolorallocate($image, 0x30, 0x30, 0x30);
62

  
63
srand((double)microtime()*1000000);
64

  
65
for($i = 0; $i < 30; $i++) {
66
	$x1 = rand(0,100);
67
	$y1 = rand(0,30);
68
	$x2 = rand(0,100);
69
	$y2 = rand(0,30);
70
	imageline($image, $x1, $y1, $x2, $y2 , $gray);  
71
}
72

  
73
$x = 0;
74
$l = strlen($cap);
75
for($i = 0; $i < $l; $i++) {
76
	$fnt = rand(3,5);
77
	$x = $x + rand(12 , 20);
78
	$y = rand(7 , 12); 
79
	imagestring($image, $fnt, $x, $y, substr($cap, $i, 1), $darkgray); 
80
}
81

  
82
captcha_header();
83
imagepng($image);
84
imagedestroy($image);
85

  
86
?>
0 87

  
trunk/wb/include/captcha/captchas/calc_text.php
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
// Must include code to stop this file being accessed directly
27
if(defined('WB_PATH') == false) { exit("Cannot access this file directly"); }
28

  
29
$_SESSION['captcha'] = '';
30
mt_srand((double)microtime()*100000);
31
$n = mt_rand(1,3);
32
switch ($n) {
33
	case 1:
34
		mt_srand((double)microtime()*1000000);
35
		$x = mt_rand(1,9);
36
		$y = mt_rand(1,9);
37
		$_SESSION['captcha'] = $x + $y;
38
		$cap = "$x {$MOD_CAPTCHA['ADDITION']} $y"; 
39
		break; 
40
	case 2:
41
		mt_srand((double)microtime()*1000000);
42
		$x = mt_rand(10,20);
43
		$y = mt_rand(1,9);
44
		$_SESSION['captcha'] = $x - $y; 
45
		$cap = "$x {$MOD_CAPTCHA['SUBTRAKTION']} $y"; 
46
		break;
47
	case 3:
48
		mt_srand((double)microtime()*1000000);
49
		$x = mt_rand(2,10);
50
		$y = mt_rand(2,5);
51
		$_SESSION['captcha'] = $x * $y; 
52
		$cap = "$x {$MOD_CAPTCHA['MULTIPLIKATION']} $y"; 
53
		break;
54
}
55
echo $cap;
56
?>
0 57

  
trunk/wb/include/captcha/captchas/index.php
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
header("Location: ../index.php");
27

  
28
?>
0 29

  
trunk/wb/include/captcha/asp.php
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
// Must include code to stop this file being accessed directly
27
if(!defined('WB_PATH')) { exit("Cannot access this file directly"); }
28

  
29
if(ENABLED_ASP) {
30
?>
31
	<style type="text/css">
32
		.nixhier { display:none; }
33
	</style>
34
<?php
35
}
36

  
37
?>
0 38

  
trunk/wb/include/captcha/captcha.php
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
/* CAPTCHA - How to use:
27
 * use 
28
 *	require_once(WB_PATH.'/include/captcha/captcha.php');
29
 * and put 
30
 *	<?php call_captcha(); ?>
31
 * into your form.
32
 *
33
 * captcha-code is in $_SESSION['captcha']
34
 * user input in $_POST['captcha']
35
 */
36

  
37
// Must include code to stop this file being accessed directly
38
if(!defined('WB_PATH')) { exit("Cannot access this file directly"); }
39

  
40
if(!isset($admin)) {
41
	require_once(WB_PATH.'/framework/class.wb.php');
42
	$admin = new wb;
43
}
44

  
45
// check if module language file exists for the language set by the user (e.g. DE, EN)
46
global $MOD_CAPTCHA;
47
if(!file_exists(WB_PATH.'/modules/captcha_control/languages/'.LANGUAGE .'.php')) {
48
	// no module language file exists for the language set by the user, include default module language file EN.php
49
	require_once(WB_PATH.'/modules/captcha_control/languages/EN.php');
50
} else {
51
	// a module language file exists for the language defined by the user, load it
52
	require_once(WB_PATH.'/modules/captcha_control/languages/'.LANGUAGE .'.php');
53
}
54

  
55
// output-handler for image-captchas to determine size of image
56
if(!function_exists('captcha_header')) {
57
	function captcha_header() {
58
		header("Expires: Mon, 1 Jan 1990 05:00:00 GMT");
59
		header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
60
		header("Cache-Control: no-store, no-cache, must-revalidate, proxy-revalidate");
61
		header("Cache-Control: post-check=0, pre-check=0", false); // MS made there own headers :-(
62
		header("Pragma: no-cache");
63
		header("Content-type: image/png");
64
		return;
65
	}
66
}
67

  
68
// get list of available CAPTCHAS for the dropdown-listbox in admin-tools
69
if(extension_loaded('gd') && function_exists('imagepng') && function_exists('imagettftext')) {
70
	$useable_captchas = array(
71
		'calc_text'=>$MOD_CAPTCHA_CONTROL['CALC_TEXT'],
72
		'calc_image'=>$MOD_CAPTCHA_CONTROL['CALC_IMAGE'],
73
		'ttf_image'=>$MOD_CAPTCHA_CONTROL['TTF_IMAGE'],
74
		'old_image'=>$MOD_CAPTCHA_CONTROL['OLD_IMAGE']
75
	);
76
} elseif(extension_loaded('gd') && function_exists('imagepng')) {
77
	$useable_captchas = array(
78
		'calc_text'=>$MOD_CAPTCHA_CONTROL['CALC_TEXT'],
79
		'calc_image'=>$MOD_CAPTCHA_CONTROL['CALC_IMAGE'],
80
		'old_image'=>$MOD_CAPTCHA_CONTROL['OLD_IMAGE']
81
	);
82
} else {
83
	$useable_captchas = array(
84
		'calc_text'=>$MOD_CAPTCHA_CONTROL['CALC_TEXT']
85
	);
86
}
87

  
88
if(!function_exists('call_captcha')) {
89
	function call_captcha() {
90
		global $MOD_CAPTCHA;
91

  
92
		switch(CAPTCHA_TYPE) {
93
			// two special cases
94
			case 'calc_text': // calculation as text
95
				?>
96
				<?php include(WB_PATH.'/include/captcha/captchas/calc_text.php'); ?> = 
97
				<input type="text" name="captcha" maxlength="5"  style="width:20px" />&nbsp;&nbsp;<?php echo $MOD_CAPTCHA['VERIFICATION_INFO_RES']; ?></font>
98
				<?php
99
				break;
100
			case 'calc_image': // calculation with image (old captcha)
101
				?>
102
				<img src="<?php echo WB_URL.'/include/captcha/captchas/calc_image.php?t='.time(); ?>" align="middle" alt="Captcha" /> = 
103
				<input type="text" name="captcha" maxlength="5" style="width:20px" />&nbsp;&nbsp;<?php echo $MOD_CAPTCHA['VERIFICATION_INFO_RES']; ?></font>
104
				<?php
105
				break;
106
			// normal images
107
			case 'ttf_image': // captcha with varying background and ttf-font
108
			case 'old_image': // old captcha
109
				?>
110
				<img src="<?php echo WB_URL.'/include/captcha/captchas/'.CAPTCHA_TYPE.'.php?t='.time(); ?>" align="middle" alt="Captcha" />
111
				<input type="text" name="captcha" maxlength="5" style="width:50px" />&nbsp;&nbsp;<?php echo $MOD_CAPTCHA['VERIFICATION_INFO_TEXT']; ?></font>
112
				<?php
113
				break;
114
		}
115
	}
116
}
117
?>
0 118

  
trunk/wb/include/captcha/fonts/LL_Readme
1
These two fonts (LLBd.ttf and LLBI.ttf) are derivated from LinuxLibertine for use with website baker's captcha.
2
All chars above pos. 127 has been removed.
3
Jan. 2008 - thorn
4

  
5
---------------------------------------------------
6

  
7
LOFP - Libertine Open Fonts Project
8

  
9
1. OPEN FONTS PROJECT'S AIMS
10
We work on a serif font-family for practical use in documents. This project aims at creating a free alternative to the standard W*ndows Font (T*mes).
11
But neveretheless Libertine is not a clone of any common font! It has been developed from scratch and it goes different ways in typography than the Times. Just the useability and the dimensions shall be similar, Libertine should be even better for typical office use! If you want a Times-clone go elsewhere! If you just need reliable and good typography give this font a chance. If you want to know more about the design of Libertine, have a look at our website.
12

  
13
2. LICENSE AND OPENSOURCE
14
We publish our fonts under the terms of the GPL (see GPL.txt) and OFL (OFL.txt) 
15
-> see also LICENCE.txt!
16
The OpenSource-tool Fontforge is used as font editor (see http://fontforge.sf.net).
17

  
18
3. FONT FORMATS TTF VS. OTF
19
The font files are available as TTF (TrueType) and OTF (OpenType) fonts. The TTF-Family is called "LinuxLibertine" and the OTF "LinuxLibertine O" so that both types can be installed and used parallely.
20
We recommend TTF for most users. OTF is especially useful for Windows users (Hinting) and *.dfont for Mac-Users. The advanced typographic features like ligature substitution and Small Capitals, ... may be availible in the OTF only.
21

  
22
4. HINTING
23
The TrueType-hinting is a complex technique and our editor FontForge doesn't support it quite well (but alot better version by version)... Since version 2.7 also the normal TTFs are hinted. If you don't like this, send me a mail. You may also try the OpenTypes (which contain PS-Hintings which are quite good supported by fontforge).
24

  
25
5. DOWNLOAD AND CONTACT
26
We publish our fonts at http://linuxlibertine.sf.net.
27

  
28
6. THE UNDERLINED VARIANT
29
Some people liked our idea of a real underlined. The advantage of this font is that g, commas, cedillas... are not overprinted by the line anymore. For technical reasons the space is not underlined but you can use the _ instead. In this font it has the width of the space and the line is at hight of the underline. The underlined variant uses an older font outline! Please keep this in mind!
30

  
31

  
0 32

  
trunk/wb/include/captcha/fonts/LL_OFL.txt
1
This Font Software is Copyright (c) 2003-2006, Philipp H. Poll (http://linuxlibertine.sf.net/).
2
All Rights Reserved.
3

  
4
"Linux Libertine" is a Reserved Font Name for this Font Software.
5

  
6
This Font Software is licensed under the SIL Open Font License, Version 1.0.
7
No modification of the license is permitted, only verbatim copy is allowed.
8
This license is copied below, and is also available with a FAQ at:
9
http://scripts.sil.org/OFL
10

  
11

  
12
-----------------------------------------------------------
13
SIL OPEN FONT LICENSE Version 1.0 - 22 November 2005
14
-----------------------------------------------------------
15

  
16
PREAMBLE
17
The goals of the Open Font License (OFL) are to stimulate worldwide
18
development of cooperative font projects, to support the font creation
19
efforts of academic and linguistic communities, and to provide an open
20
framework in which fonts may be shared and improved in partnership with
21
others.
22

  
23
The OFL allows the licensed fonts to be used, studied, modified and
24
redistributed freely as long as they are not sold by themselves. The
25
fonts, including any derivative works, can be bundled, embedded, 
26
redistributed and sold with any software provided that the font
27
names of derivative works are changed. The fonts and derivatives,
28
however, cannot be released under any other type of license.
29

  
30
DEFINITIONS
31
"Font Software" refers to any and all of the following:
32
	- font files
33
	- data files
34
	- source code
35
	- build scripts
36
	- documentation
37

  
38
"Reserved Font Name" refers to the Font Software name as seen by
39
users and any other names as specified after the copyright statement.
40

  
41
"Standard Version" refers to the collection of Font Software
42
components as distributed by the Copyright Holder.
43

  
44
"Modified Version" refers to any derivative font software made by
45
adding to, deleting, or substituting -- in part or in whole --
46
any of the components of the Standard Version, by changing formats
47
or by porting the Font Software to a new environment.
48

  
49
"Author" refers to any designer, engineer, programmer, technical
50
writer or other person who contributed to the Font Software.
51

  
52
PERMISSION & CONDITIONS
53
Permission is hereby granted, free of charge, to any person obtaining
54
a copy of the Font Software, to use, study, copy, merge, embed, modify,
55
redistribute, and sell modified and unmodified copies of the Font
56
Software, subject to the following conditions:
57

  
58
1) Neither the Font Software nor any of its individual components,
59
in Standard or Modified Versions, may be sold by itself.
60

  
61
2) Standard or Modified Versions of the Font Software may be bundled,
62
redistributed and sold with any software, provided that each copy
63
contains the above copyright notice and this license. These can be
64
included either as stand-alone text files, human-readable headers or
65
in the appropriate machine-readable metadata fields within text or
66
binary files as long as those fields can be easily viewed by the user.
67

  
68
3) No Modified Version of the Font Software may use the Reserved Font
69
Name(s), in part or in whole, unless explicit written permission is
70
granted by the Copyright Holder. This restriction applies to all 
71
references stored in the Font Software, such as the font menu name and
72
other font description fields, which are used to differentiate the
73
font from others.
74

  
75
4) The name(s) of the Copyright Holder or the Author(s) of the Font
76
Software shall not be used to promote, endorse or advertise any
77
Modified Version, except to acknowledge the contribution(s) of the
78
Copyright Holder and the Author(s) or with their explicit written
79
permission.
80

  
81
5) The Font Software, modified or unmodified, in part or in whole,
82
must be distributed using this license, and may not be distributed
83
under any other license.
84

  
85
TERMINATION
86
This license becomes null and void if any of the above conditions are
87
not met.
88

  
89
DISCLAIMER
90
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
91
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
92
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
93
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
94
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
95
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
96
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
97
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
98
OTHER DEALINGS IN THE FONT SOFTWARE.
0 99

  
trunk/wb/include/captcha/fonts/LL_GPL.txt
1
		    GNU GENERAL PUBLIC LICENSE (with font exception)
2
		       Version 2, June 1991
3

  
4
 Copyright (C) 1989, 1991 Free Software Foundation, Inc.
5
                 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
6
 Everyone is permitted to copy and distribute verbatim copies
7
 of this license document, but changing it is not allowed.
8

  
9
			    Preamble
10

  
11
  The licenses for most software are designed to take away your
12
freedom to share and change it.  By contrast, the GNU General Public
13
License is intended to guarantee your freedom to share and change free
14
software--to make sure the software is free for all its users.  This
15
General Public License applies to most of the Free Software
16
Foundation's software and to any other program whose authors commit to
17
using it.  (Some other Free Software Foundation software is covered by
18
the GNU Library General Public License instead.)  You can apply it to
19
your programs, too.
20

  
21
  When we speak of free software, we are referring to freedom, not
22
price.  Our General Public Licenses are designed to make sure that you
23
have the freedom to distribute copies of free software (and charge for
24
this service if you wish), that you receive source code or can get it
25
if you want it, that you can change the software or use pieces of it
26
in new free programs; and that you know you can do these things.
27

  
28
  To protect your rights, we need to make restrictions that forbid
29
anyone to deny you these rights or to ask you to surrender the rights.
30
These restrictions translate to certain responsibilities for you if you
31
distribute copies of the software, or if you modify it.
32

  
33
  For example, if you distribute copies of such a program, whether
34
gratis or for a fee, you must give the recipients all the rights that
35
you have.  You must make sure that they, too, receive or can get the
36
source code.  And you must show them these terms so they know their
37
rights.
38

  
39
  We protect your rights with two steps: (1) copyright the software, and
40
(2) offer you this license which gives you legal permission to copy,
41
distribute and/or modify the software.
42

  
43
  Also, for each author's protection and ours, we want to make certain
44
that everyone understands that there is no warranty for this free
45
software.  If the software is modified by someone else and passed on, we
46
want its recipients to know that what they have is not the original, so
47
that any problems introduced by others will not reflect on the original
48
authors' reputations.
49

  
50
  Finally, any free program is threatened constantly by software
51
patents.  We wish to avoid the danger that redistributors of a free
52
program will individually obtain patent licenses, in effect making the
53
program proprietary.  To prevent this, we have made it clear that any
54
patent must be licensed for everyone's free use or not licensed at all.
55

  
56
  The precise terms and conditions for copying, distribution and
57
modification follow.
58

59
		    GNU GENERAL PUBLIC LICENSE
60
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61

  
62
  0. This License applies to any program or other work which contains
63
a notice placed by the copyright holder saying it may be distributed
64
under the terms of this General Public License.  The "Program", below,
65
refers to any such program or work, and a "work based on the Program"
66
means either the Program or any derivative work under copyright law:
67
that is to say, a work containing the Program or a portion of it,
68
either verbatim or with modifications and/or translated into another
69
language.  (Hereinafter, translation is included without limitation in
70
the term "modification".)  Each licensee is addressed as "you".
71

  
72
Activities other than copying, distribution and modification are not
73
covered by this License; they are outside its scope.  The act of
74
running the Program is not restricted, and the output from the Program
75
is covered only if its contents constitute a work based on the
76
Program (independent of having been made by running the Program).
77
Whether that is true depends on what the Program does.
78

  
79
  1. You may copy and distribute verbatim copies of the Program's
80
source code as you receive it, in any medium, provided that you
81
conspicuously and appropriately publish on each copy an appropriate
82
copyright notice and disclaimer of warranty; keep intact all the
83
notices that refer to this License and to the absence of any warranty;
84
and give any other recipients of the Program a copy of this License
85
along with the Program.
86

  
87
You may charge a fee for the physical act of transferring a copy, and
88
you may at your option offer warranty protection in exchange for a fee.
89

  
90
  2. You may modify your copy or copies of the Program or any portion
91
of it, thus forming a work based on the Program, and copy and
92
distribute such modifications or work under the terms of Section 1
93
above, provided that you also meet all of these conditions:
94

  
95
    a) You must cause the modified files to carry prominent notices
96
    stating that you changed the files and the date of any change.
97

  
98
    b) You must cause any work that you distribute or publish, that in
99
    whole or in part contains or is derived from the Program or any
100
    part thereof, to be licensed as a whole at no charge to all third
101
    parties under the terms of this License.
102

  
103
    c) If the modified program normally reads commands interactively
104
    when run, you must cause it, when started running for such
105
    interactive use in the most ordinary way, to print or display an
106
    announcement including an appropriate copyright notice and a
107
    notice that there is no warranty (or else, saying that you provide
108
    a warranty) and that users may redistribute the program under
109
    these conditions, and telling the user how to view a copy of this
110
    License.  (Exception: if the Program itself is interactive but
111
    does not normally print such an announcement, your work based on
112
    the Program is not required to print an announcement.)
113

114
These requirements apply to the modified work as a whole.  If
115
identifiable sections of that work are not derived from the Program,
116
and can be reasonably considered independent and separate works in
117
themselves, then this License, and its terms, do not apply to those
118
sections when you distribute them as separate works.  But when you
119
distribute the same sections as part of a whole which is a work based
120
on the Program, the distribution of the whole must be on the terms of
121
this License, whose permissions for other licensees extend to the
122
entire whole, and thus to each and every part regardless of who wrote it.
123

  
124
Thus, it is not the intent of this section to claim rights or contest
125
your rights to work written entirely by you; rather, the intent is to
126
exercise the right to control the distribution of derivative or
127
collective works based on the Program.
128

  
129
In addition, mere aggregation of another work not based on the Program
130
with the Program (or with a work based on the Program) on a volume of
131
a storage or distribution medium does not bring the other work under
132
the scope of this License.
133

  
134
  3. You may copy and distribute the Program (or a work based on it,
135
under Section 2) in object code or executable form under the terms of
136
Sections 1 and 2 above provided that you also do one of the following:
137

  
138
    a) Accompany it with the complete corresponding machine-readable
139
    source code, which must be distributed under the terms of Sections
140
    1 and 2 above on a medium customarily used for software interchange; or,
141

  
142
    b) Accompany it with a written offer, valid for at least three
143
    years, to give any third party, for a charge no more than your
144
    cost of physically performing source distribution, a complete
145
    machine-readable copy of the corresponding source code, to be
146
    distributed under the terms of Sections 1 and 2 above on a medium
147
    customarily used for software interchange; or,
148

  
149
    c) Accompany it with the information you received as to the offer
150
    to distribute corresponding source code.  (This alternative is
151
    allowed only for noncommercial distribution and only if you
152
    received the program in object code or executable form with such
153
    an offer, in accord with Subsection b above.)
154

  
155
The source code for a work means the preferred form of the work for
156
making modifications to it.  For an executable work, complete source
157
code means all the source code for all modules it contains, plus any
158
associated interface definition files, plus the scripts used to
159
control compilation and installation of the executable.  However, as a
160
special exception, the source code distributed need not include
161
anything that is normally distributed (in either source or binary
162
form) with the major components (compiler, kernel, and so on) of the
163
operating system on which the executable runs, unless that component
164
itself accompanies the executable.
165

  
166
If distribution of executable or object code is made by offering
167
access to copy from a designated place, then offering equivalent
168
access to copy the source code from the same place counts as
169
distribution of the source code, even though third parties are not
170
compelled to copy the source along with the object code.
171

172
  4. You may not copy, modify, sublicense, or distribute the Program
173
except as expressly provided under this License.  Any attempt
174
otherwise to copy, modify, sublicense or distribute the Program is
175
void, and will automatically terminate your rights under this License.
176
However, parties who have received copies, or rights, from you under
177
this License will not have their licenses terminated so long as such
178
parties remain in full compliance.
179

  
180
  5. You are not required to accept this License, since you have not
181
signed it.  However, nothing else grants you permission to modify or
182
distribute the Program or its derivative works.  These actions are
183
prohibited by law if you do not accept this License.  Therefore, by
184
modifying or distributing the Program (or any work based on the
185
Program), you indicate your acceptance of this License to do so, and
186
all its terms and conditions for copying, distributing or modifying
187
the Program or works based on it.
188

  
189
  6. Each time you redistribute the Program (or any work based on the
190
Program), the recipient automatically receives a license from the
191
original licensor to copy, distribute or modify the Program subject to
192
these terms and conditions.  You may not impose any further
193
restrictions on the recipients' exercise of the rights granted herein.
194
You are not responsible for enforcing compliance by third parties to
195
this License.
196

  
197
  7. If, as a consequence of a court judgment or allegation of patent
198
infringement or for any other reason (not limited to patent issues),
199
conditions are imposed on you (whether by court order, agreement or
200
otherwise) that contradict the conditions of this License, they do not
201
excuse you from the conditions of this License.  If you cannot
202
distribute so as to satisfy simultaneously your obligations under this
203
License and any other pertinent obligations, then as a consequence you
204
may not distribute the Program at all.  For example, if a patent
205
license would not permit royalty-free redistribution of the Program by
206
all those who receive copies directly or indirectly through you, then
207
the only way you could satisfy both it and this License would be to
208
refrain entirely from distribution of the Program.
209

  
210
If any portion of this section is held invalid or unenforceable under
211
any particular circumstance, the balance of the section is intended to
212
apply and the section as a whole is intended to apply in other
213
circumstances.
214

  
215
It is not the purpose of this section to induce you to infringe any
216
patents or other property right claims or to contest validity of any
217
such claims; this section has the sole purpose of protecting the
218
integrity of the free software distribution system, which is
219
implemented by public license practices.  Many people have made
220
generous contributions to the wide range of software distributed
221
through that system in reliance on consistent application of that
222
system; it is up to the author/donor to decide if he or she is willing
223
to distribute software through any other system and a licensee cannot
224
impose that choice.
225

  
226
This section is intended to make thoroughly clear what is believed to
227
be a consequence of the rest of this License.
228

229
  8. If the distribution and/or use of the Program is restricted in
230
certain countries either by patents or by copyrighted interfaces, the
231
original copyright holder who places the Program under this License
232
may add an explicit geographical distribution limitation excluding
233
those countries, so that distribution is permitted only in or among
234
countries not thus excluded.  In such case, this License incorporates
235
the limitation as if written in the body of this License.
236

  
237
  9. The Free Software Foundation may publish revised and/or new versions
238
of the General Public License from time to time.  Such new versions will
239
be similar in spirit to the present version, but may differ in detail to
240
address new problems or concerns.
241

  
242
Each version is given a distinguishing version number.  If the Program
243
specifies a version number of this License which applies to it and "any
244
later version", you have the option of following the terms and conditions
245
either of that version or of any later version published by the Free
246
Software Foundation.  If the Program does not specify a version number of
247
this License, you may choose any version ever published by the Free Software
248
Foundation.
249

  
250
  10. If you wish to incorporate parts of the Program into other free
251
programs whose distribution conditions are different, write to the author
252
to ask for permission.  For software which is copyrighted by the Free
253
Software Foundation, write to the Free Software Foundation; we sometimes
254
make exceptions for this.  Our decision will be guided by the two goals
255
of preserving the free status of all derivatives of our free software and
256
of promoting the sharing and reuse of software generally.
257

  
258
As a special exception, if you create a document which uses this font, and embed this font or unaltered portions of this font into the document, this font does not by itself cause the resulting document to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the document might be covered by the GNU General Public License. If you modify this font, you may extend this exception to your version of the font, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.
259

  
260
			    NO WARRANTY
261

  
262
  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
263
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
264
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
265
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
266
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
267
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
268
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
269
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
270
REPAIR OR CORRECTION.
271

  
272
  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
273
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
274
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
275
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
276
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
277
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
278
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
279
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
280
POSSIBILITY OF SUCH DAMAGES.
281

  
282
		     END OF TERMS AND CONDITIONS
283

284
	    How to Apply These Terms to Your New Programs
285

  
286
  If you develop a new program, and you want it to be of the greatest
287
possible use to the public, the best way to achieve this is to make it
288
free software which everyone can redistribute and change under these terms.
289

  
290
  To do so, attach the following notices to the program.  It is safest
291
to attach them to the start of each source file to most effectively
292
convey the exclusion of warranty; and each file should have at least
293
the "copyright" line and a pointer to where the full notice is found.
294

  
295
    <one line to give the program's name and a brief idea of what it does.>
296
    Copyright (C) <year>  <name of author>
297

  
298
    This program is free software; you can redistribute it and/or modify
299
    it under the terms of the GNU General Public License as published by
300
    the Free Software Foundation; either version 2 of the License, or
301
    (at your option) any later version.
302

  
303
    This program is distributed in the hope that it will be useful,
304
    but WITHOUT ANY WARRANTY; without even the implied warranty of
305
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
306
    GNU General Public License for more details.
307

  
308
    You should have received a copy of the GNU General Public License
309
    along with this program; if not, write to the Free Software
310
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
311

  
312

  
313
Also add information on how to contact you by electronic and paper mail.
314

  
315
If the program is interactive, make it output a short notice like this
316
when it starts in an interactive mode:
317

  
318
    Gnomovision version 69, Copyright (C) year name of author
319
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
320
    This is free software, and you are welcome to redistribute it
321
    under certain conditions; type `show c' for details.
322

  
323
The hypothetical commands `show w' and `show c' should show the appropriate
324
parts of the General Public License.  Of course, the commands you use may
325
be called something other than `show w' and `show c'; they could even be
326
mouse-clicks or menu items--whatever suits your program.
327

  
328
You should also get your employer (if you work as a programmer) or your
329
school, if any, to sign a "copyright disclaimer" for the program, if
330
necessary.  Here is a sample; alter the names:
331

  
332
  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
333
  `Gnomovision' (which makes passes at compilers) written by James Hacker.
334

  
335
  <signature of Ty Coon>, 1 April 1989
336
  Ty Coon, President of Vice
337

  
338
This General Public License does not permit incorporating your program into
339
proprietary programs.  If your program is a subroutine library, you may
340
consider it more useful to permit linking proprietary applications with the
341
library.  If this is what you want to do, use the GNU Library General
342
Public License instead of this License.
343

  
0 344

  
trunk/wb/include/captcha/fonts/LL_LICENCE.txt
1
- Lizenz / Licence -
2

  
3
Unsere Schriften sind frei im Sinne der GPL, d.h. (stark vereinfacht) dass Veränderungen an der Schriftart erlaubt sind unter der Bedingung, dass diese wieder der Öffentlichkeit unter gleicher Lizenz freigegeben werden. Querdenker behaupten oft, dass bei der Verwendung einer GPL-Schrift eingebettet in beispielsweise eine PDF auch diese freigestellt werden müsse. Deshalb gibt es die sogenannte "Font-exception" der GPL (welche diesem Lizenztext hinzugefügt wurde). Weitere Informationen zur GPL (Lizenztext mit Font-Exzeption im Archiv).
4
Zusätzlich stehen die Schriften unter der Open Font License (siehe OFL.txt).
5

  
6
Our fonts are free in the sense of the GPL. Changing the font is allowed as long as the derivative work is published under the same licence again. Pedantics keep claiming that the embedded use of GPL-fonts in i.e. PDFs requires the free publication of the PDF as well. This is why our GPL contains the so called "font exception". Further information about the GPL (Licence text with font exception of the archive).
7
Additionally our fonts are licensed under the Open Fonts License (See OFL.txt).
0 8

  
trunk/wb/include/captcha/fonts/index.php
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
header("Location: ../index.php");
27

  
28
?>
0 29

  
trunk/wb/include/captcha/readme.txt
1
// $Id$
2

  
3

  
4
 Website Baker Project <http://www.websitebaker.org/>
5
 Copyright (C) 2004-2008, Ryan Djurovich
6

  
7
 Website Baker is free software; you can redistribute it and/or modify
8
 it under the terms of the GNU General Public License as published by
9
 the Free Software Foundation; either version 2 of the License, or
10
 (at your option) any later version.
11

  
12
 Website Baker is distributed in the hope that it will be useful,
13
 but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 GNU General Public License for more details.
16

  
17
 You should have received a copy of the GNU General Public License
18
 along with Website Baker; if not, write to the Free Software
19
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20

  
21

  
22

  
23

  
24
One can improve CAPTCHA-type "CAPTCHA with varying fonts and backgrounds"
25
- by adding backgrounds (PNG-images, 140x40 pixels) to backgrounds/
26
- and by adding TrueType-fonts to fonts/
27

  
28

  
29
The CAPTCHA-string is allways stored in $_SESSION['captcha']
30
The input-field is called "captcha", too.
31

  
0 32

  
trunk/wb/include/captcha/index.php
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
header("Location: ../index.php");
27

  
28
?>
0 29

  
trunk/wb/admin/settings/index.php
321 321
	$template->set_var('SMART_LOGIN_DISABLED', ' checked');
322 322
}
323 323

  
324
// Work-out if captcha verification feature is enabled
325
if(defined('CAPTCHA_VERIFICATION') AND CAPTCHA_VERIFICATION == true) {
326
	$template->set_var('CAPTCHA_VERIFICATION_ENABLED', ' checked');
327
} else {
328
	$template->set_var('CAPTCHA_VERIFICATION_DISABLED', ' checked');
329
}
330 324
if(extension_loaded('gd') AND function_exists('imageCreateFromJpeg')) { /* Make's sure GD library is installed */
331 325
	$template->set_var('GD_EXTENSION_ENABLED', '');
332 326
} else {
......
589 583
								'TEXT_WRITE' => $TEXT['WRITE'],
590 584
								'TEXT_EXECUTE' => $TEXT['EXECUTE'],
591 585
								'TEXT_SMART_LOGIN' => $TEXT['SMART_LOGIN'],
592
								'TEXT_CAPTCHA_VERIFICATION' => $TEXT['CAPTCHA_VERIFICATION'],
593 586
								'TEXT_MULTIPLE_MENUS' => $TEXT['MULTIPLE_MENUS'],
594 587
								'TEXT_HOMEPAGE_REDIRECTION' => $TEXT['HOMEPAGE_REDIRECTION'],
595 588
								'TEXT_SECTION_BLOCKS' => $TEXT['SECTION_BLOCKS'],
trunk/wb/admin/settings/template.html
217 217
		<label for="smart_login_false">{TEXT_DISABLED}</label>
218 218
	</td>
219 219
</tr>
220
<tr class="advanced" style="display: {GD_EXTENSION_LOADED};">
221
	<td class="setting_name">{TEXT_CAPTCHA_VERIFICATION}:</td>
222
	<td class="setting_value" colspan="2">
223
		<input type="radio" name="captcha_verification" id="captcha_verification_true" style="width: 14px; height: 14px;" value="true"{CAPTCHA_VERIFICATION_ENABLED} />
224
		<label for="captcha_verification_true">{TEXT_ENABLED}</label>
225
		<input type="radio" name="captcha_verification" id="captcha_verification_false" style="width: 14px; height: 14px;" value="false"{CAPTCHA_VERIFICATION_DISABLED} />
226
		<label for="captcha_verification_false">{TEXT_DISABLED}</label>
227
	</td>
228
</tr>
229 220
<tr>
230 221
	<td class="setting_name">{TEXT_LOGIN}:</td>
231 222
	<td class="setting_value" colspan="2">
trunk/wb/account/signup.php
35 35
	}
36 36
}
37 37

  
38
if(ENABLED_ASP && isset($_POST['username']) && ( // form faked? Check the honeypot-fields.
39
	(!isset($_POST['submitted_when']) OR !isset($_SESSION['submitted_when'])) OR 
40
	($_POST['submitted_when'] != $_SESSION['submitted_when']) OR
41
	(!isset($_POST['email-address']) OR $_POST['email-address']) OR
42
	(!isset($_POST['name']) OR $_POST['name']) OR
43
	(!isset($_POST['full_name']) OR $_POST['full_name'])
44
)) {
45
	exit(header("Location: ".WB_URL.PAGES_DIRECTORY.""));
46
}
47

  
38 48
// Load the language file
39 49
if(!file_exists(WB_PATH.'/languages/'.DEFAULT_LANGUAGE.'.php')) {
40 50
	exit('Error loading language file '.DEFAULT_LANGUAGE.', please check configuration');
trunk/wb/account/signup2.php
62 62
$email = $wb->add_slashes($email);
63 63

  
64 64
// Captcha
65
if(extension_loaded('gd') AND function_exists('imageCreateFromJpeg') AND CAPTCHA_VERIFICATION) { /* Make's sure GD library is installed */
65
if(ENABLED_CAPTCHA) {
66 66
	if(isset($_POST['captcha']) AND $_POST['captcha'] != ''){
67 67
		// Check for a mismatch
68 68
		if(!isset($_POST['captcha']) OR !isset($_SESSION['captcha']) OR $_POST['captcha'] != $_SESSION['captcha']) {
......
138 138
	}
139 139
}
140 140

  
141
?>
141
?>
trunk/wb/account/signup_form.php
27 27
	header('Location: ../index.php');
28 28
	exit(0);
29 29
}
30

  
30
require_once(WB_PATH.'/include/captcha/captcha.php');
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff