X-Git-Url: http://git.dj3c1t.com/?a=blobdiff_plain;f=mw%2Flibs%2Fptitcaptcha.php;h=0b5534a1622007187528f5a0bf96590897999d5d;hb=HEAD;hp=0262931d3f6b682be35b606f18750ea62053d5f1;hpb=36ed114046cbe3d72a3589230e9f306a54fcc79d;p=mtweb
diff --git a/mw/libs/ptitcaptcha.php b/mw/libs/ptitcaptcha.php
index 0262931..0b5534a 100644
--- a/mw/libs/ptitcaptcha.php
+++ b/mw/libs/ptitcaptcha.php
@@ -28,14 +28,14 @@ class PtitCaptchaHelper
* @param string $baseuri : relative or absolute path to folder containing this file on web
* @return IMG Tag
*/
- static function generateImgTags($baseuri)
+ public static function generateImgTags($baseuri)
{
return "\n";
+ "&z='+Math.random();return false;\" />";
}
/**
@@ -43,7 +43,7 @@ class PtitCaptchaHelper
*
* @return input hidden tag
*/
- static function generateHiddenTags()
+ public static function generateHiddenTags()
{
return "";
}
@@ -53,7 +53,7 @@ class PtitCaptchaHelper
*
* @return input tag
*/
- static function generateInputTags()
+ public static function generateInputTags()
{
return "";
}
@@ -63,7 +63,7 @@ class PtitCaptchaHelper
*
* @return boolean (true=correct, false=incorrect)
*/
- static function checkCaptcha()
+ public static function checkCaptcha()
{
if( isset($_POST['ptitcaptcha_entry']) &&
$_POST['ptitcaptcha_entry'] == PtitCaptchaHelper::_getDisplayText($_POST['ptitcaptcha_key']))
@@ -79,7 +79,7 @@ class PtitCaptchaHelper
* @param string $pck
* @return string
*/
- static function _getDisplayText($pck) // internal function
+ public static function _getDisplayText($pck) // internal function
{
$src=md5(PTITCAPTCHA_ENTROPY.$pck);
$txt="";
@@ -88,8 +88,8 @@ class PtitCaptchaHelper
return $txt;
}
}
-
-
+
+
// If script called directly : generate image
if(basename($_SERVER["SCRIPT_NAME"])=="ptitcaptcha.php" && isset($_GET["pck"]))
{
@@ -123,5 +123,3 @@ if(basename($_SERVER["SCRIPT_NAME"])=="ptitcaptcha.php" && isset($_GET["pck"]))
imagepng($image);
imagedestroy($image);
}
-
-?>
\ No newline at end of file