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;
 }
Ejemplo n.º 3
0
    }
    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';
    }
    $img->prepare($_GET['text'], $_GET['angle'], $_GET['size'], 'classes/fonts/trebuchet.ttf');
    if (!empty($_REQUEST['enc'])) {
        $img->base64();
    }
    $img->build(4, $bg, $fg);
    $img->output();
} elseif ($_GET['action'] == 'postrating' || $_GET['action'] == 'memberrating' || $_GET['action'] == 'threadrating') {
    $colors = array('FF0000', 'E44C00', 'E89A00', 'EBE700', '9EE800', '4DE400');
    if ($_GET['action'] == 'memberrating' && ($config['postrating'] == 1 || $my->p['admin'] == 1)) {
        $result = $db->query("SELECT rating FROM {$db->pre}postratings WHERE aid = '{$_GET['id']}'");
        $width = 100;
        $height = 8;
    } elseif ($_GET['action'] == 'postrating' && ($config['postrating'] == 1 || $my->p['admin'] == 1)) {
        $result = $db->query("SELECT rating FROM {$db->pre}postratings WHERE pid = '{$_GET['id']}'");
        $width = 50;
        $height = 8;
    } elseif ($_GET['action'] == 'threadrating' && ($config['postrating'] == 1 || $my->p['admin'] == 1)) {
        $result = $db->query("SELECT rating FROM {$db->pre}postratings WHERE tid = '{$_GET['id']}'");
        $width = 50;
        $height = 8;
Ejemplo n.º 4
0
<?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();
 }
Ejemplo n.º 6
0
            $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) {
        $row = $gpc->prepare($db->fetch_object($result));
        $days2 = null;