/** * @description Generating a new captcha */ function testgenerate() { config('lepton.captcha.font', 'FreeSans.ttf'); $this->captchaid = captcha::generate(); $this->assertNotNull($this->captchaid); $this->captchatext = captcha::getstring($this->captchaid); $this->assertNotNull($this->captchatext); }
require 'lib/_end.php'; } //////////////////////////////////////////////////////////////////////////////////////////////////////// //Kategorien auflisten require_once BASEDIR . 'lib/class.recursivetree.php'; $tree = new RecursiveTree(PRE . '_links_cat', 'id'); $data = $tree->getTree(array('title', 'open')); if (count($data)) { foreach ($data as $res) { ++$i; $catdata[$i]['ID'] = $res['id']; $catdata[$i]['TITLE'] = $res['title']; $catdata[$i]['LEVEL'] = $res['level']; $catdata[$i]['OPEN'] = $res['open']; } } //Captcha erstellen if ($set['links']['captcha'] && !$user->info['userid']) { require BASEDIR . 'lib/class.captcha.php'; $captcha = new captcha(); $captchacode = $captcha->generate(); } $posto = mklink('sendlink.php', 'sendlink.html'); $apx->tmpl->assign('CAPTCHA', $captchacode); $apx->tmpl->assign('CATEGORY', $catdata); $apx->tmpl->assign('POSTTO', $postto); $apx->tmpl->parse('send'); //////////////////////////////////////////////////////////////////////////////////////////////////////// require 'lib/_end.php'; /////////////////////////////////////////////////////////// SCRIPT BEENDEN /// ////////////////////////////////////////////////////////////////////////////////////////////////////////
function assign_comments($parse = false) { global $set, $db, $apx, $user; if ($parse !== false && !is_array($parse)) { $parse = array(); } if ($parse === false || in_array('COMMENT', $parse)) { $apx->tmpl->assign('COMMENT', $this->display()); } if ($parse === false || in_array('COMMENT_COUNT', $parse)) { $apx->tmpl->assign('COMMENT_COUNT', $this->count()); } if ($parse === false || in_array('COMMENT_LINK', $parse)) { $apx->tmpl->assign('COMMENT_LINK', $this->link()); } if ($parse === false || in_array('COMMENT_POSTTO', $parse)) { $apx->tmpl->assign('COMMENT_POSTTO', $this->postto()); } if ($this->set['captcha'] && !$user->info['userid'] && ($parse === false || in_array('COMMENT_CAPCHA', $parse) || in_array('COMMENT_CAPTCHA', $parse))) { require_once BASEDIR . 'lib/class.captcha.php'; $captcha = new captcha(); $captchacode = $captcha->generate(); $apx->tmpl->assign('COMMENT_CAPCHA', $captchacode); //Abwärtskompatiblität $apx->tmpl->assign('COMMENT_CAPTCHA', $captchacode); } $apx->tmpl->assign('DISPLAY_COMMENTS', 1); $apx->tmpl->assign('COMMENT_REGONLY', !$this->set['pub']); $apx->tmpl->overwrite('MID', $this->mid); $apx->tmpl->overwrite('MODULE', $this->module); }