function create_error($text)
 {
     require 'classes/graphic/class.text2image.php';
     $img = new text2image();
     $img->prepare(preg_replace("/<br>/is", "\r\n", $text), 0, 8, '../fonts/trebuchet.ttf');
     $img->build(4);
     $img->output();
     exit;
 }
 function create_error($text)
 {
     require 'classes/graphic/class.text2image.php';
     $img = new text2image();
     $img->prepare($text, 0, 8);
     $img->build(4);
     $img->output();
     exit;
 }
Esempio n. 3
0
        $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) {
        $fg = $_GET['fg'];
    } else {
        $fg = '000000';
<?php

require 'class.text2image.php';
if (!empty($_REQUEST['text'])) {
    $img = new text2image();
    if (!isset($_REQUEST['angle'])) {
        $_REQUEST['angle'] = 0;
    }
    if (!isset($_REQUEST['size'])) {
        $_REQUEST['size'] = 10;
    }
    if (!empty($_REQUEST['file']) && @file_exists('../fonts/' . $_REQUEST['file'] . '.ttf')) {
        $file = $_REQUEST['file'];
    } else {
        $file = 'trebuchet';
    }
    $img->prepare($_REQUEST['text'], $_REQUEST['angle'], $_REQUEST['size'], '../fonts/' . $file . '.ttf');
    if (isset($_REQUEST['enc'])) {
        $img->base64();
    }
    $img->build(4);
    $img->output();
}
 function makeImage()
 {
     require 'classes/graphic/class.text2image.php';
     $img = new text2image();
     $img->prepare('Internal image creation not supported by reCaptcha.', 0, 8);
     $img->build(4);
     $img->output();
 }
Esempio n. 6
0
        $status = $imstatus->{$t}($d);
        if ($status) {
            $imstatus = $lang->phrase('im_status_' . $status);
        } else {
            $imstatus = $lang->phrase('im_no_connection') . '<!-- Error #' . $imstatus->error(IM_ERRNO) . ' occurred during query: ' . $imstatus->error(IM_ERRSTR) . ' -->';
        }
        ($code = $plugins->load('profile_ims_prepared')) ? eval($code) : null;
        echo $tpl->parse("profile/ims");
        ($code = $plugins->load('profile_ims_start')) ? eval($code) : null;
    }
} elseif ($_GET['action'] == 'emailimage' && $is_guest) {
    if (headers_sent()) {
        exit;
    }
    include 'classes/graphic/class.text2image.php';
    $img = new text2image();
    $img->prepare($email, 0, 10, 'classes/fonts/trebuchet.ttf');
    $img->build();
    $img->output();
    exit;
} elseif ($is_guest) {
    $breadcrumb->resetUrl();
    echo $tpl->parse("header");
    echo $tpl->parse("menu");
    $group = 'fallback_no_username';
    ($code = $plugins->load('profile_guest_prepared')) ? eval($code) : null;
    echo $tpl->parse("profile/guest");
} elseif ($is_member) {
    ($code = $plugins->load('profile_member_start')) ? eval($code) : null;
    $result = $db->query("\n\tSELECT u.*, f.* \n\tFROM {$db->pre}user AS u \n\t\tLEFT JOIN {$db->pre}userfields AS f ON u.id = f.ufid \n\tWHERE id = {$_GET['id']} \n\tLIMIT 1\n\t", __LINE__, __FILE__);
    if ($db->num_rows($result) == 1) {
Esempio n. 7
0
        $status = $imstatus->{$t}($d);
        if ($status) {
            $imstatus = $lang->phrase('im_status_' . $status);
        } else {
            $imstatus = $lang->phrase('im_no_connection') . '<!-- Error #' . $imstatus->error(IM_ERRNO) . ' occurred during query: ' . $imstatus->error(IM_ERRSTR) . ' -->';
        }
        ($code = $plugins->load('profile_ims_prepared')) ? eval($code) : null;
        echo $tpl->parse("profile/ims");
        ($code = $plugins->load('profile_ims_start')) ? eval($code) : null;
    }
} elseif ($_GET['action'] == 'emailimage' && $is_guest) {
    if (headers_sent()) {
        exit;
    }
    include 'classes/graphic/class.text2image.php';
    $img = new text2image();
    $img->prepare($email, 0, 10);
    $img->build();
    $img->output();
    exit;
} elseif ($is_guest) {
    $breadcrumb->resetUrl();
    echo $tpl->parse("header");
    echo $tpl->parse("menu");
    $group = 'fallback_no_username';
    ($code = $plugins->load('profile_guest_prepared')) ? eval($code) : null;
    echo $tpl->parse("profile/guest");
} elseif ($is_member) {
    ($code = $plugins->load('profile_member_start')) ? eval($code) : null;
    $result = $db->query("SELECT * FROM {$db->pre}user AS u LEFT JOIN {$db->pre}userfields AS f ON u.id = f.ufid WHERE u.id = {$_GET['id']}");
    $breadcrumb->resetUrl();
<?php

require 'class.text2image.php';
if (!empty($_REQUEST['text'])) {
    $img = new text2image();
    if (!isset($_REQUEST['angle'])) {
        $_REQUEST['angle'] = 0;
    }
    $img->prepare($_REQUEST['text'], $_REQUEST['angle'], 10, '../fonts/trebuchet.ttf');
    if (isset($_REQUEST['enc'])) {
        $img->base64();
    }
    $img->build(4);
    $img->output();
}
Esempio n. 9
0
    while ($row = $db->fetch_assoc($result)) {
        $votes += $row['votes'];
        $PG->x[$i] = $gpc->plain_str($row['answer'], false);
        $PG->y[$i] = $row['votes'];
        $i++;
    }
    $PG->credits = $gpc->plain_str($lang->phrase('vote_counter') . $votes, false);
    $PG->start();
} elseif ($_GET['action'] == 'captcha') {
    send_nocache_header();
    $place = $gpc->get('place', none, 'posts');
    $captcha = newCAPTCHA($place);
    $captcha->makeImage($lang->phrase('img_captcha_session_expired_error'));
} elseif ($_GET['action'] == 'textimage') {
    require 'classes/graphic/class.text2image.php';
    $img = new text2image();
    $text = $gpc->get('text', none);
    $angle = $gpc->get('angle', int);
    $size = $gpc->get('size', int);
    $bg = $gpc->get('bg');
    $fg = $gpc->get('fg');
    $file = $gpc->get('file');
    $enc = $gpc->get('enc');
    if (empty($text)) {
        $text = '-';
    } else {
        $text = substr($text, 0, 256);
    }
    if ($size < 6 || $size > 50) {
        $size = 10;
    }
Esempio n. 10
0
    while ($row = $db->fetch_assoc($result)) {
        $votes += $row['votes'];
        $PG->x[$i] = $gpc->plain_str($row['answer'], false);
        $PG->y[$i] = $row['votes'];
        $i++;
    }
    $PG->credits = $gpc->plain_str($lang->phrase('vote_counter') . $votes, false);
    $PG->start();
} elseif ($_GET['action'] == 'captcha') {
    send_nocache_header();
    $place = $gpc->get('place', none, 'posts');
    $captcha = newCAPTCHA($place);
    $captcha->makeImage();
} elseif ($_GET['action'] == 'textimage') {
    require 'classes/graphic/class.text2image.php';
    $img = new text2image();
    $text = $gpc->get('text', none, '-');
    $angle = $gpc->get('angle', int);
    $size = $gpc->get('size', int);
    $bg = $gpc->get('bg');
    $fg = $gpc->get('fg');
    $file = $gpc->get('file');
    $enc = $gpc->get('enc');
    if ($size < 6) {
        $size = 10;
    }
    if (strlen($bg) != 3 && strlen($bg) != 6) {
        $bg = 'ffffff';
    }
    if (strlen($fg) != 3 && strlen($fg) != 6) {
        $fg = '000000';