/** * */ public function outputAudioFile() { /** * @var $lng ilLanguage */ global $lng; chdir(ilSecurImageUtil::getDirectory()); if ($lng->lang_key != 'en' && in_array($lng->lang_key, self::$supported_audio_languages)) { $this->securimage->audio_path = $this->securimage->securimage_path . '/audio/' . $lng->lang_key . '/'; } $this->securimage->outputAudioFile(); }
/** * Render output */ function render() { global $lng; $tpl = new ilTemplate("tpl.prop_captchainput.html", true, true, "Services/Captcha"); if (strlen($this->getValue())) { $tpl->setCurrentBlock("prop_text_propval"); $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($this->getValue())); $tpl->parseCurrentBlock(); } include_once "./Services/Captcha/classes/class.ilSecurImageUtil.php"; $tpl->setVariable("IMAGE_SCRIPT", ilSecurImageUtil::getImageScript()); $tpl->setVariable("POST_VAR", $this->getPostVar()); $tpl->setVariable("TXT_CONSTR_PROP", $lng->txt("cont_constrain_proportions")); // $GLOBALS["tpl"]->addJavascript("./Services/MediaObjects/js/ServiceMediaObjectPropWidthHeight.js"); return $tpl->get(); }
/** * Show image * * @param * @return */ function showImage() { chdir(ilSecurImageUtil::getDirectory()); $this->securimage->show(); }
/** * Render output */ public function render() { /** * @var $lng ilLanguage */ global $lng; $tpl = new ilTemplate('tpl.prop_captchainput.html', true, true, 'Services/Captcha'); if (strlen($this->getValue())) { $tpl->setCurrentBlock('prop_text_propval'); $tpl->setVariable('PROPERTY_VALUE', ilUtil::prepareFormOutput($this->getValue())); $tpl->parseCurrentBlock(); } $tpl->setVariable('POST_VAR', $this->getPostVar()); $tpl->setVariable('CAPTCHA_ID', $this->getFieldId()); $tpl->setVariable('SIZE', $this->getSize()); $script = ilSecurImageUtil::getImageScript(); $script = ilUtil::appendUrlParameterString($script, 'height=' . (int) $this->getImageHeight(), true); $script = ilUtil::appendUrlParameterString($script, 'width=' . (int) $this->getImageWidth(), true); $tpl->setVariable('IMAGE_SCRIPT', $script); $tpl->setVariable('AUDIO_SCRIPT', ilSecurImageUtil::getAudioScript()); $tpl->setVariable('SRC_RELOAD', ilSecurImageUtil::getDirectory() . '/images/refresh.png'); $tpl->setVariable('TXT_CAPTCHA_ALT', $lng->txt('captcha_alt_txt')); $tpl->setVariable('TXT_RELOAD', $lng->txt('captcha_code_reload')); $tpl->setVariable('TXT_CAPTCHA_AUDIO_TITLE', $lng->txt('captcha_audio_title')); $tpl->setVariable('TXT_CONSTR_PROP', $lng->txt('cont_constrain_proportions')); $tpl->setVariable('TXT_CAPTCHA_INFO', $lng->txt('captcha_code_info')); return $tpl->get(); }