Skip to content

Commit 5bb2441

Browse files
committed
CRLF conversions
1 parent c738245 commit 5bb2441

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+18098
-18098
lines changed

additional-methods.js

+259-259
Large diffs are not rendered by default.

changelog.txt

+242-242
Large diffs are not rendered by default.

demo/captcha/captcha.js

+27-27
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
$(function(){
2-
$("#refreshimg").click(function(){
3-
$.post('newsession.php');
4-
$("#captchaimage").load('image_req.php');
5-
return false;
6-
});
7-
8-
$("#captchaform").validate({
9-
rules: {
10-
captcha: {
11-
required: true,
12-
remote: "process.php"
13-
}
14-
},
15-
messages: {
16-
captcha: "Correct captcha is required. Click the captcha to generate a new one"
17-
},
18-
submitHandler: function() {
19-
alert("Correct captcha!");
20-
},
21-
success: function(label) {
22-
label.addClass("valid").text("Valid captcha!")
23-
},
24-
onkeyup: false
25-
});
26-
27-
});
1+
$(function(){
2+
$("#refreshimg").click(function(){
3+
$.post('newsession.php');
4+
$("#captchaimage").load('image_req.php');
5+
return false;
6+
});
7+
8+
$("#captchaform").validate({
9+
rules: {
10+
captcha: {
11+
required: true,
12+
remote: "process.php"
13+
}
14+
},
15+
messages: {
16+
captcha: "Correct captcha is required. Click the captcha to generate a new one"
17+
},
18+
submitHandler: function() {
19+
alert("Correct captcha!");
20+
},
21+
success: function(label) {
22+
label.addClass("valid").text("Valid captcha!")
23+
},
24+
onkeyup: false
25+
});
26+
27+
});

demo/captcha/image_req.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?php
2-
3-
// Echo the image - timestamp appended to prevent caching
4-
echo '<a href="index.php" onclick="refreshimg(); return false;" title="Click to refresh image"><img src="images/image.jpg?' . time() . '" width="132" height="46" alt="Captcha image" /></a>';
5-
1+
<?php
2+
3+
// Echo the image - timestamp appended to prevent caching
4+
echo '<a href="index.php" onclick="refreshimg(); return false;" title="Click to refresh image"><img src="images/image.jpg?' . time() . '" width="132" height="46" alt="Captcha image" /></a>';
5+
66
?>

demo/captcha/index.php

+65-65
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,66 @@
1-
<?php
2-
3-
// Make the page validate
4-
ini_set('session.use_trans_sid', '0');
5-
6-
// Include the random string file
7-
require 'rand.php';
8-
9-
// Begin the session
10-
session_start();
11-
12-
// Set the session contents
13-
$_SESSION['captcha_id'] = $str;
14-
15-
?>
16-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
17-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
18-
19-
<head>
20-
<title>AJAX CAPTCHA</title>
21-
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
22-
<meta name="keywords" content="AJAX,JHR,PHP,CAPTCHA,download,PHP CAPTCHA,AJAX CAPTCHA,AJAX PHP CAPTCHA,download AJAX CAPTCHA,download AJAX PHP CAPTCHA" />
23-
<meta name="description" content="An AJAX CAPTCHA script, written in PHP" />
24-
25-
<script type="text/javascript" src="../../lib/jquery.js"></script>
26-
<script type="text/javascript" src="../../jquery.validate.js"></script>
27-
<script type="text/javascript" src="captcha.js"></script>
28-
29-
<link rel="stylesheet" type="text/css" href="style.css" />
30-
<style type="text/css">
31-
img { border: 1px solid #eee; }
32-
p#statusgreen { font-size: 1.2em; background-color: #fff; color: #0a0; }
33-
p#statusred { font-size: 1.2em; background-color: #fff; color: #a00; }
34-
fieldset label { display: block; }
35-
fieldset div#captchaimage { float: left; margin-right: 15px; }
36-
fieldset input#captcha { width: 25%; border: 1px solid #ddd; padding: 2px; }
37-
fieldset input#submit { display: block; margin: 2% 0% 0% 0%; }
38-
#captcha.success {
39-
border: 1px solid #49c24f;
40-
background: #bcffbf;
41-
}
42-
#captcha.error {
43-
border: 1px solid #c24949;
44-
background: #ffbcbc;
45-
}
46-
</style>
47-
</head>
48-
49-
<body>
50-
51-
<h1><acronym title="Asynchronous JavaScript And XML">AJAX</acronym> <acronym title="Completely Automated Public Turing test to tell Computers and Humans Apart">CAPTCHA</acronym>, based on <a href="http://psyrens.com/captcha/">http://psyrens.com/captcha/</a></h1>
52-
53-
<form id="captchaform" action="">
54-
<fieldset>
55-
<div id="captchaimage"><a href="<?php echo $_SERVER['PHP_SELF']; ?>" id="refreshimg" title="Click to refresh image"><img src="images/image.php?<?php echo time(); ?>" width="132" height="46" alt="Captcha image" /></a></div>
56-
<label for="captcha">Enter the characters as seen on the image above (case insensitive):</label>
57-
<input type="text" maxlength="6" name="captcha" id="captcha" />
58-
<input type="submit" name="submit" id="submit" value="Check" />
59-
</fieldset>
60-
</form>
61-
62-
<p>If you can&#39;t decipher the text on the image, click it to dynamically generate a new one.</p>
63-
64-
</body>
65-
1+
<?php
2+
3+
// Make the page validate
4+
ini_set('session.use_trans_sid', '0');
5+
6+
// Include the random string file
7+
require 'rand.php';
8+
9+
// Begin the session
10+
session_start();
11+
12+
// Set the session contents
13+
$_SESSION['captcha_id'] = $str;
14+
15+
?>
16+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
17+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
18+
19+
<head>
20+
<title>AJAX CAPTCHA</title>
21+
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
22+
<meta name="keywords" content="AJAX,JHR,PHP,CAPTCHA,download,PHP CAPTCHA,AJAX CAPTCHA,AJAX PHP CAPTCHA,download AJAX CAPTCHA,download AJAX PHP CAPTCHA" />
23+
<meta name="description" content="An AJAX CAPTCHA script, written in PHP" />
24+
25+
<script type="text/javascript" src="../../lib/jquery.js"></script>
26+
<script type="text/javascript" src="../../jquery.validate.js"></script>
27+
<script type="text/javascript" src="captcha.js"></script>
28+
29+
<link rel="stylesheet" type="text/css" href="style.css" />
30+
<style type="text/css">
31+
img { border: 1px solid #eee; }
32+
p#statusgreen { font-size: 1.2em; background-color: #fff; color: #0a0; }
33+
p#statusred { font-size: 1.2em; background-color: #fff; color: #a00; }
34+
fieldset label { display: block; }
35+
fieldset div#captchaimage { float: left; margin-right: 15px; }
36+
fieldset input#captcha { width: 25%; border: 1px solid #ddd; padding: 2px; }
37+
fieldset input#submit { display: block; margin: 2% 0% 0% 0%; }
38+
#captcha.success {
39+
border: 1px solid #49c24f;
40+
background: #bcffbf;
41+
}
42+
#captcha.error {
43+
border: 1px solid #c24949;
44+
background: #ffbcbc;
45+
}
46+
</style>
47+
</head>
48+
49+
<body>
50+
51+
<h1><acronym title="Asynchronous JavaScript And XML">AJAX</acronym> <acronym title="Completely Automated Public Turing test to tell Computers and Humans Apart">CAPTCHA</acronym>, based on <a href="http://psyrens.com/captcha/">http://psyrens.com/captcha/</a></h1>
52+
53+
<form id="captchaform" action="">
54+
<fieldset>
55+
<div id="captchaimage"><a href="<?php echo $_SERVER['PHP_SELF']; ?>" id="refreshimg" title="Click to refresh image"><img src="images/image.php?<?php echo time(); ?>" width="132" height="46" alt="Captcha image" /></a></div>
56+
<label for="captcha">Enter the characters as seen on the image above (case insensitive):</label>
57+
<input type="text" maxlength="6" name="captcha" id="captcha" />
58+
<input type="submit" name="submit" id="submit" value="Check" />
59+
</fieldset>
60+
</form>
61+
62+
<p>If you can&#39;t decipher the text on the image, click it to dynamically generate a new one.</p>
63+
64+
</body>
65+
6666
</html>

demo/captcha/newsession.php

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<?php
2-
3-
// Include the random string file
4-
require 'rand.php';
5-
6-
// Begin a new session
7-
session_start();
8-
9-
// Set the session contents
10-
$_SESSION['captcha_id'] = $str;
11-
1+
<?php
2+
3+
// Include the random string file
4+
require 'rand.php';
5+
6+
// Begin a new session
7+
session_start();
8+
9+
// Set the session contents
10+
$_SESSION['captcha_id'] = $str;
11+
1212
?>

demo/captcha/process.php

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
<?php
2-
3-
// Begin the session
4-
session_start();
5-
6-
// To avoid case conflicts, make the input uppercase and check against the session value
7-
// If it's correct, echo '1' as a string
8-
if(strtoupper($_GET['captcha']) == $_SESSION['captcha_id'])
9-
echo 'true';
10-
// Else echo '0' as a string
11-
else
12-
echo 'false';
13-
1+
<?php
2+
3+
// Begin the session
4+
session_start();
5+
6+
// To avoid case conflicts, make the input uppercase and check against the session value
7+
// If it's correct, echo '1' as a string
8+
if(strtoupper($_GET['captcha']) == $_SESSION['captcha_id'])
9+
echo 'true';
10+
// Else echo '0' as a string
11+
else
12+
echo 'false';
13+
1414
?>

demo/captcha/rand.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<?php
2-
3-
// Create a random string, leaving out 'o' to avoid confusion with '0'
4-
$char = strtoupper(substr(str_shuffle('abcdefghjkmnpqrstuvwxyz'), 0, 4));
5-
6-
// Concatenate the random string onto the random numbers
7-
// The font 'Anorexia' doesn't have a character for '8', so the numbers will only go up to 7
8-
// '0' is left out to avoid confusion with 'O'
9-
$str = rand(1, 7) . rand(1, 7) . $char;
10-
1+
<?php
2+
3+
// Create a random string, leaving out 'o' to avoid confusion with '0'
4+
$char = strtoupper(substr(str_shuffle('abcdefghjkmnpqrstuvwxyz'), 0, 4));
5+
6+
// Concatenate the random string onto the random numbers
7+
// The font 'Anorexia' doesn't have a character for '8', so the numbers will only go up to 7
8+
// '0' is left out to avoid confusion with 'O'
9+
$str = rand(1, 7) . rand(1, 7) . $char;
10+
1111
?>

demo/captcha/style.css

+10-10
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ p#statusred {
113113

114114
fieldset label {
115115
display: block;
116-
}
117-
118-
fieldset label.error {
119-
color: red;
120-
}
121-
122-
fieldset label.valid {
123-
color: green;
116+
}
117+
118+
fieldset label.error {
119+
color: red;
120+
}
121+
122+
fieldset label.valid {
123+
color: green;
124124
}
125125

126126
fieldset div#captchaimage {
@@ -132,8 +132,8 @@ fieldset input#captcha {
132132
width: 25%;
133133
border: 1px solid #ddd;
134134
padding: 2px;
135-
}
136-
135+
}
136+
137137
fieldset input#submit {
138138
display: block;
139139
margin: 2% 0% 0% 0%;

demo/css/cmxform.css

+40-40
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
1-
/**********************************
2-
3-
Name: cmxform Styles
4-
5-
***********************************/
6-
form.cmxform {
7-
width: 370px;
8-
font-size: 1.0em;
9-
color: #333;
10-
}
11-
12-
form.cmxform legend {
13-
padding-left: 0;
14-
}
15-
16-
form.cmxform legend, form.cmxform label {
17-
color: #333;
18-
}
19-
20-
form.cmxform fieldset {
21-
border: none;
22-
border-top: 1px solid #C9DCA6;
23-
background: url(../images/cmxform-fieldset.gif) left bottom repeat-x;
24-
background-color: #F8FDEF;
25-
}
26-
27-
form.cmxform fieldset fieldset {
28-
background: none;
29-
}
30-
31-
form.cmxform fieldset p, form.cmxform fieldset fieldset {
32-
padding: 5px 10px 7px;
33-
background: url(../images/cmxform-divider.gif) left bottom repeat-x;
34-
}
35-
1+
/**********************************
2+
3+
Name: cmxform Styles
4+
5+
***********************************/
6+
form.cmxform {
7+
width: 370px;
8+
font-size: 1.0em;
9+
color: #333;
10+
}
11+
12+
form.cmxform legend {
13+
padding-left: 0;
14+
}
15+
16+
form.cmxform legend, form.cmxform label {
17+
color: #333;
18+
}
19+
20+
form.cmxform fieldset {
21+
border: none;
22+
border-top: 1px solid #C9DCA6;
23+
background: url(../images/cmxform-fieldset.gif) left bottom repeat-x;
24+
background-color: #F8FDEF;
25+
}
26+
27+
form.cmxform fieldset fieldset {
28+
background: none;
29+
}
30+
31+
form.cmxform fieldset p, form.cmxform fieldset fieldset {
32+
padding: 5px 10px 7px;
33+
background: url(../images/cmxform-divider.gif) left bottom repeat-x;
34+
}
35+
3636
form.cmxform label.error, label.error {
37-
/* remove the next line when you have trouble in IE6 with labels in list */
38-
color: red;
39-
font-style: italic
37+
/* remove the next line when you have trouble in IE6 with labels in list */
38+
color: red;
39+
font-style: italic
4040
}
4141
div.error { display: none; }
42-
input { border: 1px solid black; }
42+
input { border: 1px solid black; }
4343
input.checkbox { border: none }
4444
input:focus { border: 1px dotted black; }
45-
input.error { border: 1px dotted red; }
45+
input.error { border: 1px dotted red; }
4646
form.cmxform .gray * { color: gray; }

0 commit comments

Comments
 (0)