reorganisation des dossiers
[mtweb] / mw / libs / ptitcaptcha.php
similarity index 93%
rename from web/libs/ptitcaptcha.php
rename to mw/libs/ptitcaptcha.php
index 6e24126..0262931 100644 (file)
@@ -28,7 +28,7 @@ class PtitCaptchaHelper
         * @param string $baseuri : relative or absolute path to folder containing this file on web
         * @return IMG Tag
         */
-       function generateImgTags($baseuri)
+       static function generateImgTags($baseuri)
        {
                return "<a class=\"ptitcaptcha\" href=\"#\"><img alt=\"???\" title=\"?\"".
                        " src=\"".$baseuri."ptitcaptcha.php?pck=".$GLOBALS['ptitcaptcha_akey']."\"".
@@ -43,7 +43,7 @@ class PtitCaptchaHelper
         *
         * @return input hidden tag
         */
-       function generateHiddenTags()
+       static function generateHiddenTags()
        {
                return "<input type=\"hidden\" name=\"ptitcaptcha_key\" value=\"".$GLOBALS['ptitcaptcha_akey']."\"/>";
        }
@@ -53,7 +53,7 @@ class PtitCaptchaHelper
         *
         * @return input tag
         */
-       function generateInputTags()
+       static function generateInputTags()
        {
                return "<input type=\"text\" name=\"ptitcaptcha_entry\" id=\"ptitcaptcha_entry\" value=\"\"/>";
        }
@@ -63,7 +63,7 @@ class PtitCaptchaHelper
         *
         * @return boolean (true=correct, false=incorrect)
         */
-       function checkCaptcha()
+       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
         */
-       function _getDisplayText($pck)  // internal function
+       static function _getDisplayText($pck)   // internal function
        {
                $src=md5(PTITCAPTCHA_ENTROPY.$pck);
                $txt="";