Browse Source

integrated imgcaptcha with Tinyboard

pull/40/head
asiekierka 12 years ago
parent
commit
f754fcaea1
  1. 7
      imgcaptcha_im.php
  2. 5
      imgcaptcha_p.php
  3. 2
      inc/imgcaptcha.php
  4. 4
      js/imgcaptcha.js

7
imgcaptcha_im.php

@ -0,0 +1,7 @@
<?php
require_once("inc/functions.php");
require_once("inc/imgcaptcha.php");
$t = $_GET["cr"];
header("Content-Type: image/png");
generateImage($t);
?>

5
imgcaptcha_p.php

@ -0,0 +1,5 @@
<?php
require_once("inc/functions.php");
require_once("inc/imgcaptcha.php");
print generateCaptchaHash();
?>

2
inc/imgcaptcha.php

@ -39,7 +39,7 @@
$converter = new Encryption;
return $converter->encode($enctext);
}
function ac_verifyHash($enctext, $output) {
function ic_verifyHash($enctext, $output) {
//print "VERIFY: " . $enctext . " " . $output . "<br>";
$converter = new Encryption;
$dectext = split(",,",$converter->decode($enctext));

4
js/imgcaptcha.js

@ -3,9 +3,9 @@
//}
function imgcaptcha_odswiezKapcze() {
$.get("/inc/imgcaptcha_p.php", function(data) {
$.get("/imgcaptcha_p.php", function(data) {
$("#imgcaptcha_hash").val(data);
$("#imgcaptcha_img").prop("src","/inc/imgcaptcha_im.php?cr=" + data);
$("#imgcaptcha_img").prop("src","/imgcaptcha_im.php?cr=" + data);
});
}
//function resetujKapcze() {

Loading…
Cancel
Save