コード例 #1
0
ファイル: veriword.php プロジェクト: GitKharytonov/Rebind
<?php

include_once dirname(__FILE__) . "/../../assets/cache/siteManager.php";
require_once 'protect.inc.php';
include_once 'config.inc.php';
include_once 'document.parser.class.inc.php';
$modx = new DocumentParser();
$modx->db->connect();
$modx->getSettings();
$vword = new VeriWord(148, 60);
$vword->output_image();
$vword->destroy_image();
#captchaClass.php file below
## v1 Stable ##
######
## Verification Word
######
## This class generate an image with random text
## to be used in form verification. It has visual
## elements design to confuse OCR software preventing
## the use of BOTS.
##
#######
## Author: Huda M Elmatsani
## Email:   justhuda at netrada.co.id
##
## 25/07/2004
#######
## Copyright (c) 2004 Huda M Elmatsani All rights reserved.
## This program is free for any purpose use.
########
コード例 #2
0
        $height = $config['botgfxtest_height'];
    }
    if ($_GET['type'] == 'post') {
        $width = $config['botgfxtest_posts_width'];
        $height = $config['botgfxtest_posts_height'];
    } else {
        $width = $gpc->get('width', int, 160);
        $height = $gpc->get('height', int, 40);
    }
    include "classes/graphic/class.veriword.php";
    $vword = new VeriWord();
    $vword->set_filter($config['botgfxtest_filter']);
    $vword->set_color($config['botgfxtest_colortext']);
    $vword->set_size($width, $height, $config['botgfxtest_format'], $config['botgfxtest_quality']);
    send_nocache_header();
    $vword->output_image($_GET['captcha']);
} elseif ($_GET['action'] == 'textimage') {
    require 'classes/graphic/class.text2image.php';
    $img = new text2image();
    if (empty($_GET['angle'])) {
        $_GET['angle'] = 0;
    }
    if (empty($_GET['size']) || $_GET['size'] < 6) {
        $_GET['size'] = 10;
    }
    if (!empty($_GET['bg']) && strlen($_GET['bg']) > 2) {
        $bg = $_GET['bg'];
    } else {
        $bg = 'ffffff';
    }
    if (!empty($_GET['fg']) && strlen($_GET['fg']) > 2) {
コード例 #3
0
} elseif ($_GET['action'] == 'veriword') {
    include "classes/graphic/class.veriword.php";
    $vword = new VeriWord();
    if (isset($_GET['width'])) {
        $_GET['width'] = $gpc->save_int($_GET['width']);
    } else {
        $_GET['width'] = 150;
    }
    if (isset($_GET['height'])) {
        $_GET['height'] = $gpc->save_int($_GET['height']);
    } else {
        $_GET['height'] = 33;
    }
    $vword->set_filter($config['botgfxtest_filter']);
    $vword->set_size($_GET['width'], $_GET['height']);
    $vword->output_image($_GET['fid']);
    exit;
} else {
    include "classes/graphic/class.veriword.php";
    $vword = new VeriWord();
    $veriid = $vword->set_veriword($config['register_text_verification']);
    if ($config['register_text_verification'] == 1) {
        $code = $vword->output_word($veriid);
    }
    $breadcrumb->Add($lang->phrase('register_title'));
    echo $tpl->parse("header");
    echo $tpl->parse("menu");
    $mymodules->load('register_top');
    $rules = $lang->get_words('rules');
    echo $tpl->parse("register");
    $mymodules->load('register_bottom');