Navigation Menu

Skip to content
This repository has been archived by the owner on Oct 1, 2019. It is now read-only.

Commit

Permalink
CRLF conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
jzaefferer committed May 5, 2010
1 parent c738245 commit 5bb2441
Show file tree
Hide file tree
Showing 78 changed files with 18,098 additions and 18,098 deletions.
518 changes: 259 additions & 259 deletions additional-methods.js

Large diffs are not rendered by default.

484 changes: 242 additions & 242 deletions changelog.txt

Large diffs are not rendered by default.

54 changes: 27 additions & 27 deletions demo/captcha/captcha.js
@@ -1,27 +1,27 @@
$(function(){
$("#refreshimg").click(function(){
$.post('newsession.php');
$("#captchaimage").load('image_req.php');
return false;
});

$("#captchaform").validate({
rules: {
captcha: {
required: true,
remote: "process.php"
}
},
messages: {
captcha: "Correct captcha is required. Click the captcha to generate a new one"
},
submitHandler: function() {
alert("Correct captcha!");
},
success: function(label) {
label.addClass("valid").text("Valid captcha!")
},
onkeyup: false
});

});
$(function(){
$("#refreshimg").click(function(){
$.post('newsession.php');
$("#captchaimage").load('image_req.php');
return false;
});

$("#captchaform").validate({
rules: {
captcha: {
required: true,
remote: "process.php"
}
},
messages: {
captcha: "Correct captcha is required. Click the captcha to generate a new one"
},
submitHandler: function() {
alert("Correct captcha!");
},
success: function(label) {
label.addClass("valid").text("Valid captcha!")
},
onkeyup: false
});

});
10 changes: 5 additions & 5 deletions demo/captcha/image_req.php
@@ -1,6 +1,6 @@
<?php

// Echo the image - timestamp appended to prevent caching
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>';

<?php

// Echo the image - timestamp appended to prevent caching
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>';

?>
130 changes: 65 additions & 65 deletions demo/captcha/index.php
@@ -1,66 +1,66 @@
<?php

// Make the page validate
ini_set('session.use_trans_sid', '0');

// Include the random string file
require 'rand.php';

// Begin the session
session_start();

// Set the session contents
$_SESSION['captcha_id'] = $str;

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title>AJAX CAPTCHA</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="AJAX,JHR,PHP,CAPTCHA,download,PHP CAPTCHA,AJAX CAPTCHA,AJAX PHP CAPTCHA,download AJAX CAPTCHA,download AJAX PHP CAPTCHA" />
<meta name="description" content="An AJAX CAPTCHA script, written in PHP" />

<script type="text/javascript" src="../../lib/jquery.js"></script>
<script type="text/javascript" src="../../jquery.validate.js"></script>
<script type="text/javascript" src="captcha.js"></script>

<link rel="stylesheet" type="text/css" href="style.css" />
<style type="text/css">
img { border: 1px solid #eee; }
p#statusgreen { font-size: 1.2em; background-color: #fff; color: #0a0; }
p#statusred { font-size: 1.2em; background-color: #fff; color: #a00; }
fieldset label { display: block; }
fieldset div#captchaimage { float: left; margin-right: 15px; }
fieldset input#captcha { width: 25%; border: 1px solid #ddd; padding: 2px; }
fieldset input#submit { display: block; margin: 2% 0% 0% 0%; }
#captcha.success {
border: 1px solid #49c24f;
background: #bcffbf;
}
#captcha.error {
border: 1px solid #c24949;
background: #ffbcbc;
}
</style>
</head>

<body>

<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>

<form id="captchaform" action="">
<fieldset>
<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>
<label for="captcha">Enter the characters as seen on the image above (case insensitive):</label>
<input type="text" maxlength="6" name="captcha" id="captcha" />
<input type="submit" name="submit" id="submit" value="Check" />
</fieldset>
</form>

<p>If you can&#39;t decipher the text on the image, click it to dynamically generate a new one.</p>

</body>

<?php

// Make the page validate
ini_set('session.use_trans_sid', '0');

// Include the random string file
require 'rand.php';

// Begin the session
session_start();

// Set the session contents
$_SESSION['captcha_id'] = $str;

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title>AJAX CAPTCHA</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="AJAX,JHR,PHP,CAPTCHA,download,PHP CAPTCHA,AJAX CAPTCHA,AJAX PHP CAPTCHA,download AJAX CAPTCHA,download AJAX PHP CAPTCHA" />
<meta name="description" content="An AJAX CAPTCHA script, written in PHP" />

<script type="text/javascript" src="../../lib/jquery.js"></script>
<script type="text/javascript" src="../../jquery.validate.js"></script>
<script type="text/javascript" src="captcha.js"></script>

<link rel="stylesheet" type="text/css" href="style.css" />
<style type="text/css">
img { border: 1px solid #eee; }
p#statusgreen { font-size: 1.2em; background-color: #fff; color: #0a0; }
p#statusred { font-size: 1.2em; background-color: #fff; color: #a00; }
fieldset label { display: block; }
fieldset div#captchaimage { float: left; margin-right: 15px; }
fieldset input#captcha { width: 25%; border: 1px solid #ddd; padding: 2px; }
fieldset input#submit { display: block; margin: 2% 0% 0% 0%; }
#captcha.success {
border: 1px solid #49c24f;
background: #bcffbf;
}
#captcha.error {
border: 1px solid #c24949;
background: #ffbcbc;
}
</style>
</head>

<body>

<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>

<form id="captchaform" action="">
<fieldset>
<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>
<label for="captcha">Enter the characters as seen on the image above (case insensitive):</label>
<input type="text" maxlength="6" name="captcha" id="captcha" />
<input type="submit" name="submit" id="submit" value="Check" />
</fieldset>
</form>

<p>If you can&#39;t decipher the text on the image, click it to dynamically generate a new one.</p>

</body>

</html>
22 changes: 11 additions & 11 deletions demo/captcha/newsession.php
@@ -1,12 +1,12 @@
<?php

// Include the random string file
require 'rand.php';

// Begin a new session
session_start();

// Set the session contents
$_SESSION['captcha_id'] = $str;

<?php

// Include the random string file
require 'rand.php';

// Begin a new session
session_start();

// Set the session contents
$_SESSION['captcha_id'] = $str;

?>
26 changes: 13 additions & 13 deletions demo/captcha/process.php
@@ -1,14 +1,14 @@
<?php

// Begin the session
session_start();

// To avoid case conflicts, make the input uppercase and check against the session value
// If it's correct, echo '1' as a string
if(strtoupper($_GET['captcha']) == $_SESSION['captcha_id'])
echo 'true';
// Else echo '0' as a string
else
echo 'false';

<?php

// Begin the session
session_start();

// To avoid case conflicts, make the input uppercase and check against the session value
// If it's correct, echo '1' as a string
if(strtoupper($_GET['captcha']) == $_SESSION['captcha_id'])
echo 'true';
// Else echo '0' as a string
else
echo 'false';

?>
20 changes: 10 additions & 10 deletions demo/captcha/rand.php
@@ -1,11 +1,11 @@
<?php

// Create a random string, leaving out 'o' to avoid confusion with '0'
$char = strtoupper(substr(str_shuffle('abcdefghjkmnpqrstuvwxyz'), 0, 4));

// Concatenate the random string onto the random numbers
// The font 'Anorexia' doesn't have a character for '8', so the numbers will only go up to 7
// '0' is left out to avoid confusion with 'O'
$str = rand(1, 7) . rand(1, 7) . $char;

<?php

// Create a random string, leaving out 'o' to avoid confusion with '0'
$char = strtoupper(substr(str_shuffle('abcdefghjkmnpqrstuvwxyz'), 0, 4));

// Concatenate the random string onto the random numbers
// The font 'Anorexia' doesn't have a character for '8', so the numbers will only go up to 7
// '0' is left out to avoid confusion with 'O'
$str = rand(1, 7) . rand(1, 7) . $char;

?>
20 changes: 10 additions & 10 deletions demo/captcha/style.css
Expand Up @@ -113,14 +113,14 @@ p#statusred {

fieldset label {
display: block;
}

fieldset label.error {
color: red;
}

fieldset label.valid {
color: green;
}

fieldset label.error {
color: red;
}

fieldset label.valid {
color: green;
}

fieldset div#captchaimage {
Expand All @@ -132,8 +132,8 @@ fieldset input#captcha {
width: 25%;
border: 1px solid #ddd;
padding: 2px;
}

}

fieldset input#submit {
display: block;
margin: 2% 0% 0% 0%;
Expand Down
80 changes: 40 additions & 40 deletions demo/css/cmxform.css
@@ -1,46 +1,46 @@
/**********************************
Name: cmxform Styles
***********************************/
form.cmxform {
width: 370px;
font-size: 1.0em;
color: #333;
}

form.cmxform legend {
padding-left: 0;
}

form.cmxform legend, form.cmxform label {
color: #333;
}

form.cmxform fieldset {
border: none;
border-top: 1px solid #C9DCA6;
background: url(../images/cmxform-fieldset.gif) left bottom repeat-x;
background-color: #F8FDEF;
}

form.cmxform fieldset fieldset {
background: none;
}

form.cmxform fieldset p, form.cmxform fieldset fieldset {
padding: 5px 10px 7px;
background: url(../images/cmxform-divider.gif) left bottom repeat-x;
}

/**********************************
Name: cmxform Styles
***********************************/
form.cmxform {
width: 370px;
font-size: 1.0em;
color: #333;
}

form.cmxform legend {
padding-left: 0;
}

form.cmxform legend, form.cmxform label {
color: #333;
}

form.cmxform fieldset {
border: none;
border-top: 1px solid #C9DCA6;
background: url(../images/cmxform-fieldset.gif) left bottom repeat-x;
background-color: #F8FDEF;
}

form.cmxform fieldset fieldset {
background: none;
}

form.cmxform fieldset p, form.cmxform fieldset fieldset {
padding: 5px 10px 7px;
background: url(../images/cmxform-divider.gif) left bottom repeat-x;
}

form.cmxform label.error, label.error {
/* remove the next line when you have trouble in IE6 with labels in list */
color: red;
font-style: italic
/* remove the next line when you have trouble in IE6 with labels in list */
color: red;
font-style: italic
}
div.error { display: none; }
input { border: 1px solid black; }
input { border: 1px solid black; }
input.checkbox { border: none }
input:focus { border: 1px dotted black; }
input.error { border: 1px dotted red; }
input.error { border: 1px dotted red; }
form.cmxform .gray * { color: gray; }

0 comments on commit 5bb2441

Please sign in to comment.