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


PHP Securimage::getCaptchaHtml方法代码示例

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


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

示例1: getHtmlByName

function getHtmlByName($captcha)
{
    if ($captcha == 'sweet') {
        //sweet-captcha
        //$sweetcaptcha = new $sweetcaptcha(237528,'1bdea965d3b5c76f8e181497c7f13a42','22e2f639510c142c5217bc7324fb0ba2','sweetcaptcha.php');
        //require_once('sweetcaptcha.php');
        return $sweetcaptcha->get_html();
    } elseif ($captcha == 're') {
        //recaptcha
        $publickey = "6Lf3kAYTAAAAAGJpD5oRTiwMHDF2Enp5jjDCxOAh";
        $privatekey = "6Lf3kAYTAAAAAEMVCybX4IDJtl_uEpJKuQsPc8Q5";
        return recaptcha_get_html($publickey, null);
    } elseif ($captcha == 'playtrue') {
        ////playtruecaptcha stuff
        $ayah = new AYAH();
        return $ayah->getPublisherHTML();
    } elseif ($captcha == 'secureimage') {
        ///secure image suff
        $options = array();
        $options['input_name'] = 'ct_captcha';
        return Securimage::getCaptchaHtml($options);
    }
}
开发者ID:janitham,项目名称:deviceDependent,代码行数:23,代码来源:captchas.php

示例2: array

  </p>

  <div>
    <?php 
// show captcha HTML using Securimage::getCaptchaHtml()
require_once 'securimage.php';
$options = array();
$options['input_name'] = 'ct_captcha';
// change name of input element for form post
$options['disable_flash_fallback'] = false;
// allow flash fallback
if (!empty($_SESSION['ctform']['captcha_error'])) {
    // error html to show in captcha output
    $options['error_html'] = $_SESSION['ctform']['captcha_error'];
}
echo Securimage::getCaptchaHtml($options);
?>
  </div>

  <p>
    <br>
    <input type="submit" value="Submit Message">
  </p>

</form>
</fieldset>

</body>
</html>

<?php 
开发者ID:mguyromelle,项目名称:securimage,代码行数:31,代码来源:example_form.php

示例3: array

$query = "SELECT title, category FROM " . $DBPrefix . "auctions WHERE id = :auc_id";
$params = array();
$params[] = array(':auc_id', $id, 'int');
$db->query($query, $params);
if ($db->numrows() > 0) {
    $TPL_item_title = $db->result('title');
} else {
    $_SESSION['msg_title'] = $ERR_622;
    $_SESSION['msg_body'] = $ERR_623;
    header('location: message.php');
    exit;
}
$spam_html = '';
if ($system->SETTINGS['spam_reportitem'] == 1) {
    $resp = new Securimage();
    $spam_html = $resp->getCaptchaHtml();
}
if (isset($_POST['action']) && $_POST['action'] == 'reportitem') {
    // check errors
    if (empty($_POST['reason']) || isset($_POST['reason']) && $_POST['reason'] == '0') {
        $TPL_error_text = $ERR_INVALID_REPORT_REASON;
    }
    $auction_id = intval($_POST['id']);
    if ($system->SETTINGS['spam_reportitem'] == 2) {
        $resp = recaptcha_check_answer($system->SETTINGS['recaptcha_private'], $_POST['g-recaptcha-response']);
        if (!$resp) {
            $TPL_error_text = $MSG['752'];
        }
    } elseif ($system->SETTINGS['spam_reportitem'] == 1) {
        if (!$resp->check($_POST['captcha_code'])) {
            $TPL_error_text = $MSG['752'];
开发者ID:Nozlaf,项目名称:WeBid,代码行数:31,代码来源:item_report.php

示例4:

  <textarea class="form-control" rows="3" id="communicationaddress" name="communicationaddress" required></textarea>
</div>

<div class="form-group">
  <label for="permanentaddress">Permanent Address:</label>
  <textarea class="form-control" rows="3" id="permanentaddress" name="permanentaddress" required></textarea>
</div>

<div class="form-group">
  <label for="numberofpropertiesholding">Number of Properties Holding:</label>
  <input type="text" class="form-control" allow="number" id="numberofpropertiesholding" name="numberofpropertiesholding" required>
</div>

<div class="form-group">
<?php 
echo Securimage::getCaptchaHtml();
?>
</div>

<div class="form-group">
<button type="submit" class="btn btn-success m0">
 Submit
</button>
</div>



<p class="display" id="amey">Thank You Guest. Your form has been submitted.</p>
</form>

开发者ID:samtherock,项目名称:Optamac_final,代码行数:29,代码来源:customer.php

示例5: cimy_registration_form


//.........这里部分代码省略.........
            } else {
                echo $form_object;
            }
            if ($type == "date") {
                echo cimy_uef_date_picker_options($unique_id, $rules);
            }
            if ($show_type == 0 && $i == 1 && $options['password_meter']) {
                if ($input_name == $prefix . "PASSWORD") {
                    $pass1_id = $unique_id;
                }
                if ($input_name == $prefix . "PASSWORD2") {
                    echo "\n\t\t<div id=\"pass-strength-result\" class=\"hide-if-no-js\" aria-live=\"polite\">" . __('Strength indicator') . "</div>";
                    echo "\n\t\t<p class=\"description indicator-hint\">" . __('Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ &amp; ).') . "</p><br />";
                    $pass2_id = $unique_id;
                }
            }
            if (!($type != "radio" && $type != "checkbox")) {
                echo $obj_label;
            }
            echo "\n\t</p>\n";
            if ($type == "textarea-rich" || in_array($type, $cimy_uef_file_types)) {
                echo "\t<br />\n";
            }
        }
        $i++;
    }
    echo "\t<br />";
    if ($show_type != 2 && $options['captcha'] == "securimage") {
        global $cuef_securimage_webpath;
        if (is_multisite()) {
            if (is_wp_error($errors) && ($errmsg = $errors->get_error_message("securimage_code"))) {
                echo '<p class="error">' . $errmsg . '</p>';
            }
        }
        require_once $cuef_plugin_dir . '/securimage/securimage.php';
        $captcha_options = array();
        $captcha_options['image_id'] = 'captcha';
        $captcha_options['input_name'] = 'securimage_response_field';
        $captcha_options['input_text'] = __("Insert the code:", $cimy_uef_domain);
        $captcha_options['refresh_alt_text'] = __("Change image", $cimy_uef_domain);
        $captcha_options['refresh_title_text'] = __("Change image", $cimy_uef_domain);
        $captcha_options['show_audio_button'] = true;
        $captcha_options['show_refresh_button'] = true;
        echo Securimage::getCaptchaHtml($captcha_options);
    }
    if ($show_type != 2) {
        if (is_multisite() && is_wp_error($errors) && ($errmsg = $errors->get_error_message("recaptcha_code"))) {
            echo '<p class="error">' . $errmsg . '</p>';
        }
        if ($options['captcha'] == "recaptcha2" && !empty($options['recaptcha2_site_key']) && !empty($options['recaptcha2_secret_key'])) {
            ?>
			<div class="g-recaptcha" 
				data-sitekey="<?php 
            echo esc_attr($options['recaptcha2_site_key']);
            ?>
" 
				<?php 
            if (!empty($obj_tabindex)) {
                echo "data-tabindex=" . $tabindex;
            }
            $tabindex++;
            ?>
				data-size="compact"
				>
			</div>
<?php 
        }
        if ($options['captcha'] == "recaptcha" && !empty($options['recaptcha_public_key']) && !empty($options['recaptcha_private_key'])) {
            require_once $cuef_plugin_dir . '/recaptcha/recaptchalib.php';
            ?>
			<script type='text/javascript'>
				var RecaptchaOptions = {
					lang: '<?php 
            echo substr(get_locale(), 0, 2);
            ?>
'
					<?php 
            if (!empty($obj_tabindex)) {
                echo ", tabindex: " . $tabindex;
            }
            $tabindex++;
            ?>
				};
			</script>
<?php 
            // no need if Tiny MCE is present already
            if (empty($tiny_mce_objects)) {
                ?>
			<script type='text/javascript'>
				var login_div = document.getElementById("login");
				login_div.style.width = "375px";
			</script>
<?php 
            }
            echo recaptcha_get_html($options['recaptcha_public_key'], null, is_ssl());
        }
    }
    cimy_switch_current_blog(true);
    echo $end_cimy_uef_comment;
}
开发者ID:podemosfrance,项目名称:podemosfrance.info,代码行数:101,代码来源:cimy_uef_register.php

示例6:

    $q = "select username, real_name, email from user where id=" . $_SESSION['id'];
    $res =& $db->query($q);
    if (!PEAR::isError($res)) {
        if ($row = $res->fetchRow()) {
            if (isset($row['real_name'])) {
                $t->assign('name', $row['real_name']);
            } else {
                if (isset($row['username'])) {
                    $t->assign('name', $row['username']);
                }
            }
            if (isset($row['email'])) {
                $t->assign('email', $row['email']);
            }
        }
        // Free the result
        $res->free();
    }
}
if (isset($_GET['objNum'])) {
    $t->assign('subject', 'Feedback on Object: ' . $_GET['objNum']);
} else {
    $t->assign('subject', 'Feedback on Delphi');
}
if (isset($_GET['objId'])) {
    $t->assign('objId', $_GET['objId']);
} else {
    $t->assign('objId', -1);
}
$t->assign('captchaHtml', Securimage::getCaptchaHtml());
$t->display('contact.tpl');
开发者ID:khadem,项目名称:delphi-museum-project,代码行数:31,代码来源:contact.php

示例7: checkSubmitValues

function checkSubmitValues()
{
    // Errors to show if we find any
    $msg = array();
    global $t;
    // reassign vars to user input in case we need to send them back to fix something.
    $t->assign('email', cleanFormData($_POST['email']));
    $t->assign('user', cleanFormData($_POST['user']));
    if (strlen($_POST['pass']) < 6) {
        array_push($msg, "Your password must be at least 6 characters.");
    }
    if (strlen($_POST['pass']) > 25) {
        array_push($msg, "Your password cannot be more than 25 characters.");
    }
    if ($_POST['pass'] != $_POST['pass2']) {
        array_push($msg, "Your retyped password did not match the first typed password.");
    }
    /* Spruce up username, check length */
    if (strlen(stripslashes($_POST['user'])) > 40 || strlen(stripslashes($_POST['user'])) < 3) {
        array_push($msg, "Username must be between 3 and 40 characters.");
    } elseif (!preg_match('|^[a-zA-Z0-9-_]+$|i', $_POST['user'])) {
        array_push($msg, "Username can only contain letters, numbers, hyphens, and underscores");
    } elseif (usernameTaken($_POST['user'])) {
        array_push($msg, "The username \"" . cleanFormData($_POST['user']) . "\"is already taken. Please pick another one.");
    }
    /* Check if email is valid */
    if (!emailValid($_POST['email'])) {
        array_push($msg, "Email address is not valid.");
    }
    if (count($msg) <= 0) {
        /* Verify the captcha, but only if everything else is good */
        $securimage = new Securimage();
        if ($securimage->check($_POST['captcha_code']) == false) {
            array_push($msg, "The \"captcha\" text entered was incorrect.<br />Please try again.");
        }
    }
    if (count($msg) > 0) {
        $t->assign('messages', $msg);
        $t->assign('captchaHtml', Securimage::getCaptchaHtml());
        $t->display('register.tpl');
        die;
    } else {
        return true;
    }
}
开发者ID:khadem,项目名称:delphi-museum-project,代码行数:45,代码来源:register.php

示例8: lwiki_auth_securimage_generate

function lwiki_auth_securimage_generate()
{
    require_once 'securimage.php';
    $opts = array('securimage_path' => '/~murase/php/', 'image_id' => 'lwiki_simg', 'image_alt_text' => 'letters', 'input_id' => 'lwiki_simi', 'show_audio_button' => false, 'refresh_alt_text' => '別画像', 'refresh_title_text' => '別画像', 'input_text' => '上の文字:');
    return '<div class="securimage-captcha">' . Securimage::getCaptchaHtml($opts) . '</div>';
}
开发者ID:akinomyoga,项目名称:lwiki,代码行数:6,代码来源:index.php

示例9:

  </p>

  <p>
    <strong>URL:</strong><br />
    <input type="text" name="ct_URL" size="35" value="" />
  </p>

  <p>
    <strong>Message*:</strong><br />
    <textarea name="ct_message" rows="12" cols="60"></textarea>
  </p>

  <p>
    <?php 
require_once 'securimage.php';
echo Securimage::getCaptchaHtml(array('input_name' => 'ct_captcha'));
?>
  </p>

  <p>
    <br />
    <input type="submit" value="Submit Message" />
  </p>

</form>
</fieldset>

<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script type="text/javascript">
    $.noConflict();
开发者ID:J1Duran,项目名称:ph-web,代码行数:30,代码来源:example_form.ajax.php

示例10: getCaptchaHtml

/**
 * getCaptchaHtml
 */
function getCaptchaHtml($is_show_register)
{
    //    if( !$is_show_register ) return "";
    $options = array('input_text' => "画像と同じ文字を入力してください:");
    return Securimage::getCaptchaHtml($options);
}
开发者ID:ohwada,项目名称:BusMap,代码行数:9,代码来源:register.php


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