当前位置: 首页>>代码示例>>PHP>>正文


PHP Captcha::display_form方法代码示例

本文整理汇总了PHP中Captcha::display_form方法的典型用法代码示例。如果您正苦于以下问题:PHP Captcha::display_form方法的具体用法?PHP Captcha::display_form怎么用?PHP Captcha::display_form使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Captcha的用法示例。


在下文中一共展示了Captcha::display_form方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

     $Errorh->handler($errstr, E_USER_NOTICE);
 }
 if (isset($LANG[$get_erroru])) {
     $Errorh->handler($LANG[$get_erroru], E_USER_WARNING);
 }
 $Template->assign_vars(array('C_REGISTER' => true));
 if ($CONFIG_USER['activ_mbr'] == '1') {
     $Template->assign_block_vars('activ_mbr', array('L_ACTIV_MBR' => $LANG['activ_mbr_mail']));
 } elseif ($CONFIG_USER['activ_mbr'] == '2') {
     $Template->assign_block_vars('activ_mbr', array('L_ACTIV_MBR' => $LANG['activ_mbr_admin']));
 }
 import('util/captcha');
 $Captcha = new Captcha();
 if ($Captcha->is_available() && $CONFIG_USER['verif_code'] == '1') {
     $Captcha->set_difficulty($CONFIG_USER['verif_code_difficulty']);
     $Template->assign_vars(array('C_VERIF_CODE' => true, 'VERIF_CODE' => $Captcha->display_form(), 'L_REQUIRE_VERIF_CODE' => $Captcha->js_require()));
 }
 if ($CONFIG_USER['activ_up_avatar'] == 1) {
     $Template->assign_block_vars('upload_avatar', array('WEIGHT_MAX' => $CONFIG_USER['weight_max'], 'HEIGHT_MAX' => $CONFIG_USER['height_max'], 'WIDTH_MAX' => $CONFIG_USER['width_max']));
 }
 $array_identifier = '';
 $lang_identifier = '../images/stats/other.png';
 foreach ($LANGS_CONFIG as $lang => $array_info) {
     if ($array_info['secure'] == -1) {
         $info_lang = load_ini_file('../lang/', $lang);
         $selected = '';
         if ($CONFIG['lang'] == $lang) {
             $selected = ' selected="selected"';
             $lang_identifier = '../images/stats/countries/' . $info_lang['identifier'] . '.png';
         }
         $array_identifier .= 'array_identifier[\'' . $lang . '\'] = \'' . $info_lang['identifier'] . '\';' . "\n";
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:31,代码来源:register.php

示例2: display


//.........这里部分代码省略.........
             }
             $get_error = !empty($_GET['errorh']) ? trim($_GET['errorh']) : '';
             $errno = E_USER_NOTICE;
             switch ($get_error) {
                 case 'auth':
                     $errstr = $LANG['e_unauthorized'];
                     $errno = E_USER_WARNING;
                     break;
                 case 'verif':
                     $errstr = $LANG['e_incorrect_verif_code'];
                     $errno = E_USER_WARNING;
                     break;
                 case 'l_flood':
                     $errstr = sprintf($LANG['e_l_flood'], $CONFIG_COM['max_link']);
                     break;
                 case 'l_pseudo':
                     $errstr = $LANG['e_link_pseudo'];
                     break;
                 case 'flood':
                     $errstr = $LANG['e_flood'];
                     break;
                 case 'incomplete':
                     $errstr = $LANG['e_incomplete'];
                     break;
                 default:
                     $errstr = '';
             }
             $Errorh->set_template($Template);
             if (!empty($errstr)) {
                 $Template->assign_vars(array('ERROR_HANDLER' => $Errorh->display($errstr, E_USER_NOTICE)));
             }
             if (!$this->lock_com || $User->check_level(MODO_LEVEL)) {
                 if ($captcha->is_available() && $CONFIG_COM['com_verif_code']) {
                     $Template->assign_vars(array('C_VERIF_CODE' => true, 'VERIF_CODE' => $captcha->display_form(), 'L_REQUIRE_VERIF_CODE' => $captcha->js_require()));
                 }
                 if ($User->check_level($CONFIG_COM['com_auth'])) {
                     $Template->assign_vars(array('AUTH_POST_COM' => true));
                 } else {
                     $Template->assign_vars(array('ERROR_HANDLER' => $Errorh->display($LANG['e_unauthorized'], E_USER_NOTICE)));
                 }
                 if ($User->get_attribute('user_id') !== -1) {
                     $Template->assign_vars(array('C_HIDDEN_COM' => true, 'LOGIN' => $User->get_attribute('login')));
                 } else {
                     $Template->assign_vars(array('C_VISIBLE_COM' => true, 'LOGIN' => $LANG['guest']));
                 }
             } else {
                 $Template->assign_vars(array('ERROR_HANDLER' => $Errorh->display($LANG['com_locked'], E_USER_NOTICE)));
             }
             $get_pos = strpos($_SERVER['QUERY_STRING'], '&pc');
             if ($get_pos) {
                 $get_page = substr($_SERVER['QUERY_STRING'], 0, $get_pos) . '&pc';
             } else {
                 $get_page = $_SERVER['QUERY_STRING'] . '&pc';
             }
             $is_modo = $User->check_level(MODO_LEVEL);
             $Template->assign_vars(array('C_COM_DISPLAY' => $this->get_attribute('nbr_com') > 0 ? true : false, 'C_IS_MODERATOR' => $is_modo, 'PAGINATION_COM' => $pagination->display($this->path . $vars_simple . '&pc=%d#anchor_' . $this->script, $this->nbr_com, 'pc', $CONFIG_COM['com_max'], 3), 'LANG' => get_ulang(), 'IDCOM' => '', 'IDPROV' => $this->idprov, 'SCRIPT' => $this->script, 'PATH' => SCRIPT, 'UPDATE' => $integrated_in_environment == true ? SID : '', 'VAR' => $vars_simple, 'KERNEL_EDITOR' => display_editor($this->script . 'contents', $CONFIG_COM['forbidden_tags']), 'C_BBCODE_TINYMCE_MODE' => $User->get_attribute('user_editor') == 'tinymce', 'L_XML_LANGUAGE' => $LANG['xml_lang'], 'L_TITLE' => $CONFIG['com_popup'] == 0 || $integrated_in_environment === true ? $LANG['title_com'] : '', 'THEME' => get_utheme(), 'CONTENTS' => unparse($contents), 'L_REQUIRE_LOGIN' => $LANG['require_pseudo'], 'L_REQUIRE_TEXT' => $LANG['require_text'], 'L_VERIF_CODE' => $LANG['verif_code'], 'L_DELETE_MESSAGE' => $LANG['alert_delete_msg'], 'L_ADD_COMMENT' => $LANG['add_comment'], 'L_PUNISHMENT_MANAGEMENT' => $LANG['punishment_management'], 'L_WARNING_MANAGEMENT' => $LANG['warning_management'], 'L_LOGIN' => $LANG['pseudo'], 'L_MESSAGE' => $LANG['message'], 'L_QUOTE' => $LANG['quote'], 'L_RESET' => $LANG['reset'], 'L_PREVIEW' => $LANG['preview'], 'L_SUBMIT' => $LANG['submit'], 'U_ACTION' => $this->path . sprintf($this->vars, $this->idcom) . (!empty($page_path_to_root) && !$integrated_in_environment ? '&path_to_root=' . $page_path_to_root : '') . '&token=' . $Session->get_token()));
             $array_ranks = array(-1 => $LANG['guest'], 0 => $LANG['member'], 1 => $LANG['modo'], 2 => $LANG['admin']);
             $Cache->load('ranks');
             $j = 0;
             $result = $Sql->query_while("SELECT c.idprov, c.idcom, c.login, c.timestamp, m.user_id, m.login as mlogin, m.level, m.user_mail, m.user_show_mail, m.timestamp AS registered, m.user_avatar, m.user_msg, m.user_local, m.user_web, m.user_sex, m.user_msn, m.user_yahoo, m.user_sign, m.user_warning, m.user_ban, m.user_groups, s.user_id AS connect, c.contents\n\t\t\t\tFROM " . DB_TABLE_COM . " c\n\t\t\t\tLEFT JOIN " . DB_TABLE_MEMBER . " m ON m.user_id = c.user_id\n\t\t\t\tLEFT JOIN " . DB_TABLE_SESSIONS . " s ON s.user_id = c.user_id AND s.session_time > '" . (time() - $CONFIG['site_session_invit']) . "'\n\t\t\t\tWHERE c.script = '" . $this->script . "' AND c.idprov = '" . $this->idprov . "'\n\t\t\t\tGROUP BY c.idcom\n\t\t\t\tORDER BY c.timestamp DESC\n\t\t\t\t" . $Sql->limit($pagination->get_first_msg($CONFIG_COM['com_max'], 'pc'), $CONFIG_COM['com_max']), __LINE__, __FILE__);
             while ($row = $Sql->fetch_assoc($result)) {
                 list($edit, $del) = array(false, false);
                 $is_guest = empty($row['user_id']);
                 if ($is_modo || $row['user_id'] == $User->get_attribute('user_id') && $User->get_attribute('user_id') !== -1) {
                     list($edit, $del) = array(true, true);
                 }
开发者ID:janus57,项目名称:PHPBoost_v3c,代码行数:67,代码来源:comments.class.php


注:本文中的Captcha::display_form方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。