From 7898de2589563b77ac52048d4af83b8656d8b2cc Mon Sep 17 00:00:00 2001 From: asiekierka Date: Sat, 22 Dec 2012 17:25:52 +0100 Subject: Added tinyboard integration stuff --- js/imgcaptcha.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 js/imgcaptcha.js (limited to 'js') diff --git a/js/imgcaptcha.js b/js/imgcaptcha.js new file mode 100644 index 00000000..dd313fad --- /dev/null +++ b/js/imgcaptcha.js @@ -0,0 +1,16 @@ +//function obecnyCzas() { +// return Math.round(new Date().getTime() / 1000); +//} + +function imgcaptcha_odswiezKapcze() { + $.get("/inc/imgcaptcha_p.php", function(data) { + $("#imgcaptcha_hash").val(data); + $("#imgcaptcha_img").prop("src","/inc/imgcaptcha_im.php?cr=" + data); + }); +} +//function resetujKapcze() { +// $("#imgcaptcha_img").prop("src","/zakrytek.png"); +//} +//$(document).ready(function(){ +// //resetujKapcze(); - to nie powinno byc na razie potrzebne +//}); -- cgit v1.3 From f754fcaea1bd4b67cd4d7a8fb90ed9f52f0605f2 Mon Sep 17 00:00:00 2001 From: asiekierka Date: Sat, 22 Dec 2012 17:44:43 +0100 Subject: integrated imgcaptcha with Tinyboard --- imgcaptcha_im.php | 7 +++++++ imgcaptcha_p.php | 5 +++++ inc/imgcaptcha.php | 2 +- js/imgcaptcha.js | 4 ++-- 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 imgcaptcha_im.php create mode 100644 imgcaptcha_p.php (limited to 'js') diff --git a/imgcaptcha_im.php b/imgcaptcha_im.php new file mode 100644 index 00000000..152d92ad --- /dev/null +++ b/imgcaptcha_im.php @@ -0,0 +1,7 @@ + diff --git a/imgcaptcha_p.php b/imgcaptcha_p.php new file mode 100644 index 00000000..9543dc6c --- /dev/null +++ b/imgcaptcha_p.php @@ -0,0 +1,5 @@ + diff --git a/inc/imgcaptcha.php b/inc/imgcaptcha.php index dae42752..77441fce 100644 --- a/inc/imgcaptcha.php +++ b/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 . "
"; $converter = new Encryption; $dectext = split(",,",$converter->decode($enctext)); diff --git a/js/imgcaptcha.js b/js/imgcaptcha.js index dd313fad..d8f922fe 100644 --- a/js/imgcaptcha.js +++ b/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() { -- cgit v1.3 From 2735e2a6449bfc3915bd6cad69308983014fb57a Mon Sep 17 00:00:00 2001 From: asiekierka Date: Sat, 22 Dec 2012 17:52:18 +0100 Subject: fixed naming --- js/imgcaptcha.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/imgcaptcha.js b/js/imgcaptcha.js index d8f922fe..8d3ed95c 100644 --- a/js/imgcaptcha.js +++ b/js/imgcaptcha.js @@ -2,7 +2,7 @@ // return Math.round(new Date().getTime() / 1000); //} -function imgcaptcha_odswiezKapcze() { +function ic_odswiezKapcze() { $.get("/imgcaptcha_p.php", function(data) { $("#imgcaptcha_hash").val(data); $("#imgcaptcha_img").prop("src","/imgcaptcha_im.php?cr=" + data); -- cgit v1.3