mirror of
https://github.com/e107inc/e107.git
synced 2025-08-02 12:48:26 +02:00
Added tooltip and required attribute to CAPTCHA.
This commit is contained in:
@@ -158,7 +158,7 @@ class secure_image
|
|||||||
}
|
}
|
||||||
|
|
||||||
$frm = e107::getForm();
|
$frm = e107::getForm();
|
||||||
return $frm->hidden("rand_num", $this->random_number).$frm->text("code_verify", "", 20, "","size=20");
|
return $frm->hidden("rand_num", $this->random_number).$frm->text("code_verify", "", 20, array("size"=>20,"title"=> LAN_ENTER_CODE,'required'=>1));
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderLabel()
|
function renderLabel()
|
||||||
@@ -236,14 +236,26 @@ class secure_image
|
|||||||
$secureimg['color'] = "90,90,90"; // red,green,blue
|
$secureimg['color'] = "90,90,90"; // red,green,blue
|
||||||
|
|
||||||
*/
|
*/
|
||||||
$bg_file = $secureimg['image'];
|
|
||||||
// var_dump($secureimg);
|
// var_dump($secureimg);
|
||||||
|
|
||||||
|
if(isset($secureimg['font']) && !is_readable($path.$secureimg['font']))
|
||||||
|
{
|
||||||
|
echo "Font missing"; // for debug only. translation not necessary.
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!is_readable($path.$secureimg['image'].$ext))
|
||||||
|
{
|
||||||
|
echo "Missing Background-Image: ".$secureimg['image'].$ext; // for debug only. translation not necessary.
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
$bg_file = "generic/code_bg";
|
|
||||||
$fontpath = $this->BASE_DIR.$this->FONTS_DIRECTORY;
|
$fontpath = $this->BASE_DIR.$this->FONTS_DIRECTORY;
|
||||||
|
$secureimg['image'] = "generic/code_bg";
|
||||||
$secureimg['angle'] = "0";
|
$secureimg['angle'] = "0";
|
||||||
$secureimg['color'] = "90,90,90"; // red,green,blue
|
$secureimg['color'] = "90,90,90"; // red,green,blue
|
||||||
$secureimg['x'] = "1";
|
$secureimg['x'] = "1";
|
||||||
@@ -269,21 +281,23 @@ class secure_image
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($secureimg['font']) && !is_readable($path.$secureimg['font']))
|
if(isset($secureimg['font']) && !is_readable($fontpath.$secureimg['font']))
|
||||||
{
|
{
|
||||||
echo "Font missing"; // for debug only. translation not necessary.
|
echo "Font missing"; // for debug only. translation not necessary.
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isset($secureimg['font']) && !is_readable($path.$secureimg['image'].$ext))
|
|
||||||
|
if(isset($secureimg['image']) && !is_readable($path.$secureimg['image'].$ext))
|
||||||
{
|
{
|
||||||
echo "Missing Background-Image: ".$secureimg['image'].$ext; // for debug only. translation not necessary.
|
echo "Missing Background-Image: ".$secureimg['image'].$ext; // for debug only. translation not necessary.
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$bg_file = $secureimg['image'];
|
||||||
|
|
||||||
switch($type)
|
switch($type)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user