X-Git-Url: http://git.dj3c1t.com/index.cgi?a=blobdiff_plain;f=mw%2Flibs%2Fptitcaptcha.php;h=0b5534a1622007187528f5a0bf96590897999d5d;hb=5abc9d5fca28ef86dee6148bb96780d1a7b670f3;hp=34e8d0e4b3cb8b9a6fedf09f0e278e8539a00619;hpb=ed558d720ebf6985290c99297f5b1d2c86d1f60a;p=mtweb diff --git a/mw/libs/ptitcaptcha.php b/mw/libs/ptitcaptcha.php index 34e8d0e..0b5534a 100644 --- a/mw/libs/ptitcaptcha.php +++ b/mw/libs/ptitcaptcha.php @@ -28,7 +28,7 @@ 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 ""; } @@ -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