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


PHP captcha::check_captcha方法代码示例

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


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

示例1: perform

 /**
  * Validate capcha public key/turing key
  *
  * @param array $data
  */
 public function perform($data = FALSE)
 {
     // Captcha privat key!!!
     $captcha_privat_key = md5(implode('', file($data['configPath'] . 'dbConnect.php')));
     // The ttf font to create turing chars images
     $captcha_ttf_font = JAPA_BASE_DIR . 'modules/common/includes/ttf_font/activa.ttf';
     // Relative folder of captcha pictures
     $captcha_pictures_folder = JAPA_PUBLIC_DIR . 'data/common/captcha';
     // Type of turing chars
     $captcha_char_type = 'num';
     // or 'hex'
     $captcha = new captcha($captcha_privat_key, JAPA_BASE_DIR, $captcha_ttf_font, $captcha_pictures_folder, $captcha_char_type);
     if (FALSE == $captcha->check_captcha($data['public_key'], $data['turing_key'])) {
         return FALSE;
     }
     return TRUE;
 }
开发者ID:BackupTheBerlios,项目名称:openpublisher-svn,代码行数:22,代码来源:ActionCommonCaptchaValidate.php

示例2: unset

    $_arr['h1'] != '' ? $title->h1 = $_arr['h1'] : ($title->h1 = $_arr['title']);
}
/***************************************************************************************
 ***************************************************************************************/
global $_str;
// check for crack!
if (isset($_GET['page'])) {
    system::count_parametr(4);
    system::isset_numeric($_GET['page']);
} else {
    system::count_parametr(3);
    $_GET['page'] = 1;
}
// добавление новости
if (system::IsPost()) {
    if (!captcha::check_captcha()) {
        //выводим сообщение
        Message::GetMessage(0, v::getI18n('message_error_captcha'));
    } else {
        // пишем в базу
        Forms::MultyInsertForm('guestbook', 0);
        // очищаем POST
        unset($_POST);
        // выводим мообщение
        Message::GetMessage(1, v::getI18n('message_add_comment_to_guestbook'));
    }
}
// check for count gallery at page
guestbook::count_guestbook_at_page();
// get limit
$limit = pager::pager_limit(guestbook::count_guestbook(), GUESTBOOK_AT_PAGE);
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:31,代码来源:guestbook.php

示例3: array

            // ищем связанные товары
            $_sql_ass = 'SELECT catalog.id, catalog.name, catalog.cost 
					FROM `catalog_ass` 
					LEFT JOIN catalog ON catalog.id=catalog_ass.id_catalog_with 
					WHERE id_catalog_who=' . $_GET['goods'] . ' or id_catalog_with=' . $_GET['goods'] . ' and catalog.id!=' . $_GET['goods'] . '
					GROUP by catalog.id
					';
            $catalog_ass = mysql::query($_sql_ass, 0);
            if ($catalog_ass) {
                $_str .= system::show_tpl(array('catalog_ass' => $catalog_ass), 'frontend/catalog/show_ass.php');
            }
        }
    } else {
        if (isset($_POST['id'])) {
            if ($_POST) {
                if (!registration::is_Autorize() and !captcha::check_captcha()) {
                    //выводим сообщение
                    Message::GetMessage(0, v::getI18n('message_error_captcha'));
                    echo "<meta http-equiv='refresh' content='2;URL=/catalog/goods/" . $_POST['id'] . "'>";
                } else {
                    //---------------------------------------------------------//
                    //---------- Отправляем мыло админу------------------------//
                    //---------------------------------------------------------//
                    // парсим тело письма
                    $_arr = ___findarray('select * from message where id=7');
                    // елементы для замены
                    $mass_element_for_parsing = array('%fio%', '%email%', '%q%', '%id%', '%link%', '%name_good%');
                    // заменяеміе значения
                    // имя товара
                    $_arr1 = ___findarray('select * from catalog where id=' . intval($_POST['id']));
                    // если неавторизован
开发者ID:AngelWayfarer,项目名称:prizvanie,代码行数:31,代码来源:catalog.php


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