1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Login menu shortcodes using secure-image class now.

This commit is contained in:
Cameron
2016-12-05 15:25:29 -08:00
parent 383980e0c6
commit 2bd391ecae
2 changed files with 17 additions and 7 deletions

View File

@@ -109,7 +109,7 @@ class secure_image
* @param $checkstr * @param $checkstr
* @return bool|mixed|string * @return bool|mixed|string
*/ */
function invalidCode($rec_num, $checkstr) function invalidCode($rec_num=null, $checkstr=null)
{ {
if ($user_func = e107::getOverride()->check($this,'invalidCode')) if ($user_func = e107::getOverride()->check($this,'invalidCode'))
{ {

View File

@@ -110,14 +110,21 @@ e107::getLanguage()->bcDefs($bcDefs);
} }
/**
* @deprecated use {LM_IMAGECODE_NUMBER}, {LM_IMAGECODE_BOX} instead
* @param string $parm
* @return string
*/
function sc_lm_imagecode($parm='') function sc_lm_imagecode($parm='')
{ {
//DEPRECATED - use LM_IMAGECODE_NUMBER, LM_IMAGECODE_BOX instead //DEPRECATED - use LM_IMAGECODE_NUMBER, LM_IMAGECODE_BOX instead
if($this->use_imagecode) if($this->use_imagecode)
{ {
return '<input type="hidden" name="rand_num" id="rand_num" value="'.$this->sec->random_number.'" /> return $this->sc_lm_imagecode_number()."<br />".$this->sc_lm_imagecode_box();
/*return '<input type="hidden" name="rand_num" id="rand_num" value="'.$this->sec->random_number.'" />
'.$this->sec->r_image().' '.$this->sec->r_image().'
<br /><input class="tbox login verify" type="text" name="code_verify" id="code_verify" size="15" maxlength="20" /><br />'; <br /><input class="tbox login verify" type="text" name="code_verify" id="code_verify" size="15" maxlength="20" /><br />';
*/
} }
return ''; return '';
} }
@@ -127,20 +134,23 @@ e107::getLanguage()->bcDefs($bcDefs);
{ {
if($this->use_imagecode) if($this->use_imagecode)
{ {
return '<input type="hidden" name="rand_num" id="rand_num" value="'.$this->sec->random_number.'" /> return e107::getSecureImg()->renderImage();
'.$this->sec->r_image(); /* return '<input type="hidden" name="rand_num" id="rand_num" value="'.$this->sec->random_number.'" />
'.$this->sec->r_image();*/
} }
return ''; return '';
} }
function sc_lm_imagecode_box($parm='') function sc_lm_imagecode_box($parm='')
{ {
$placeholder = LAN_ENTER_CODE;
if($this->use_imagecode) if($this->use_imagecode)
{ {
return '<input class="form-control tbox login verify" type="text" name="code_verify" id="code_verify" size="15" maxlength="20" placeholder="'.$placeholder.'" />'; return e107::getSecureImg()->renderInput();
// $placeholder = LAN_ENTER_CODE;
// return '<input class="form-control tbox login verify" type="text" name="code_verify" id="code_verify" size="15" maxlength="20" placeholder="'.$placeholder.'" />';
} }
return ''; return '';
} }