Пример #1
0
 function common()
 {
     global $_G;
     require_once libfile('function/seccode');
     $seccode = make_seccode($_GET['sechash']);
     if (!$_G['setting']['nocacheheaders']) {
         @header("Expires: -1");
         @header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE);
         @header("Pragma: no-cache");
     }
     require_once libfile('class/seccode');
     $type = in_array($_G['setting']['seccodedata']['type'], array(2, 3)) ? 0 : $_G['setting']['seccodedata']['type'];
     $code = new seccode();
     $code->code = $seccode;
     $code->type = $type;
     $code->width = $_G['setting']['seccodedata']['width'];
     $code->height = $_G['setting']['seccodedata']['height'];
     $code->background = $_G['setting']['seccodedata']['background'];
     $code->adulterate = $_G['setting']['seccodedata']['adulterate'];
     $code->ttf = $_G['setting']['seccodedata']['ttf'];
     $code->angle = $_G['setting']['seccodedata']['angle'];
     $code->warping = $_G['setting']['seccodedata']['warping'];
     $code->scatter = $_G['setting']['seccodedata']['scatter'];
     $code->color = $_G['setting']['seccodedata']['color'];
     $code->size = $_G['setting']['seccodedata']['size'];
     $code->shadow = $_G['setting']['seccodedata']['shadow'];
     $code->animator = 0;
     $code->fontpath = DISCUZ_ROOT . './static/image/seccode/font/';
     $code->datapath = DISCUZ_ROOT . './static/image/seccode/';
     $code->includepath = DISCUZ_ROOT . './source/class/';
     $code->display();
 }
Пример #2
0
 function common()
 {
     global $_G;
     if (is_numeric($_G['setting']['seccodedata']['type'])) {
         if (in_array($_G['setting']['seccodedata']['type'], array(2, 3))) {
             exit;
         }
         $seccode = make_seccode();
         if (!$_G['setting']['nocacheheaders']) {
             @header("Expires: -1");
             @header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE);
             @header("Pragma: no-cache");
         }
         require_once libfile('class/seccode');
         $code = new seccode();
         $code->code = $seccode;
         $code->type = $_G['setting']['seccodedata']['type'];
         $code->width = $_G['setting']['seccodedata']['width'];
         $code->height = $_G['setting']['seccodedata']['height'];
         $code->background = $_G['setting']['seccodedata']['background'];
         $code->adulterate = $_G['setting']['seccodedata']['adulterate'];
         $code->ttf = $_G['setting']['seccodedata']['ttf'];
         $code->angle = $_G['setting']['seccodedata']['angle'];
         $code->warping = $_G['setting']['seccodedata']['warping'];
         $code->scatter = $_G['setting']['seccodedata']['scatter'];
         $code->color = $_G['setting']['seccodedata']['color'];
         $code->size = $_G['setting']['seccodedata']['size'];
         $code->shadow = $_G['setting']['seccodedata']['shadow'];
         $code->animator = 0;
         $code->fontpath = DISCUZ_ROOT . './static/image/seccode/font/';
         $code->datapath = DISCUZ_ROOT . './static/image/seccode/';
         $code->includepath = DISCUZ_ROOT . './source/class/';
         $code->display();
     } else {
         $etype = explode(':', $_G['setting']['seccodedata']['type']);
         if (count($etype) > 1) {
             $codefile = DISCUZ_ROOT . './source/plugin/' . $etype[0] . '/seccode/seccode_' . $etype[1] . '.php';
             $class = $etype[1];
         } else {
             $codefile = libfile('seccode/' . $_G['setting']['seccodedata']['type'], 'class');
             $class = $_G['setting']['seccodedata']['type'];
         }
         if (file_exists($codefile)) {
             @(include_once $codefile);
             $class = 'seccode_' . $class;
             if (class_exists($class)) {
                 make_seccode();
                 $code = new $class();
                 $image = $code->image($idhash, $modid);
                 if ($image) {
                     dheader('location: ' . $image);
                 }
             }
         }
     }
 }
Пример #3
0
        }
    }
    include template('common/header_ajax');
    echo lang('message', $message, array('flashcode' => $flashcode, 'idhash' => $idhash));
    include template('common/footer_ajax');
} elseif ($_G['gp_action'] == 'check') {
    include template('common/header_ajax');
    echo check_seccode($_G['gp_secverify'], $_G['gp_idhash']) ? 'succeed' : 'invalid';
    include template('common/footer_ajax');
} else {
    $refererhost = parse_url($_SERVER['HTTP_REFERER']);
    $refererhost['host'] .= !empty($refererhost['port']) ? ':' . $refererhost['port'] : '';
    if ($_G['setting']['seccodedata']['type'] < 2 && ($refererhost['host'] != $_SERVER['HTTP_HOST'] || !$_G['setting']['seccodestatus']) || $_G['setting']['seccodedata']['type'] == 2 && !extension_loaded('ming') && $_POST['fromFlash'] != 1 || $_G['setting']['seccodedata']['type'] == 3 && $_GET['fromFlash'] != 1) {
        exit('Access Denied');
    }
    $seccode = make_seccode($_G['gp_idhash']);
    if (!$_G['setting']['nocacheheaders']) {
        @header("Expires: -1");
        @header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE);
        @header("Pragma: no-cache");
    }
    require_once libfile('class/seccode');
    $code = new seccode();
    $code->code = $seccode;
    $code->type = $_G['setting']['seccodedata']['type'];
    $code->width = $_G['setting']['seccodedata']['width'];
    $code->height = $_G['setting']['seccodedata']['height'];
    $code->background = $_G['setting']['seccodedata']['background'];
    $code->adulterate = $_G['setting']['seccodedata']['adulterate'];
    $code->ttf = $_G['setting']['seccodedata']['ttf'];
    $code->angle = $_G['setting']['seccodedata']['angle'];
Пример #4
0
        }
    }
    include template('common/header_ajax');
    echo lang('message', $message, array('flashcode' => $flashcode, 'idhash' => $idhash));
    include template('common/footer_ajax');
} elseif ($_GET['action'] == 'check') {
    include template('common/header_ajax');
    echo check_seccode($_GET['secverify'], $_GET['idhash']) ? 'succeed' : 'invalid';
    include template('common/footer_ajax');
} else {
    $refererhost = parse_url($_SERVER['HTTP_REFERER']);
    $refererhost['host'] .= !empty($refererhost['port']) ? ':' . $refererhost['port'] : '';
    if ($_G['setting']['seccodedata']['type'] < 2 && ($refererhost['host'] != $_SERVER['HTTP_HOST'] || !$_G['setting']['seccodestatus']) || $_G['setting']['seccodedata']['type'] == 2 && !extension_loaded('ming') && $_POST['fromFlash'] != 1 || $_G['setting']['seccodedata']['type'] == 3 && $_GET['fromFlash'] != 1) {
        exit('Access Denied');
    }
    $seccode = make_seccode($_GET['idhash']);
    if (!$_G['setting']['nocacheheaders']) {
        @header("Expires: -1");
        @header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE);
        @header("Pragma: no-cache");
    }
    require_once libfile('class/seccode');
    $code = new seccode();
    $code->code = $seccode;
    $code->type = $_G['setting']['seccodedata']['type'];
    $code->width = $_G['setting']['seccodedata']['width'];
    $code->height = $_G['setting']['seccodedata']['height'];
    $code->background = $_G['setting']['seccodedata']['background'];
    $code->adulterate = $_G['setting']['seccodedata']['adulterate'];
    $code->ttf = $_G['setting']['seccodedata']['ttf'];
    $code->angle = $_G['setting']['seccodedata']['angle'];
Пример #5
0
        $code->color = $_G['setting']['seccodedata']['color'];
        $code->size = $_G['setting']['seccodedata']['size'];
        $code->shadow = $_G['setting']['seccodedata']['shadow'];
        $code->animator = $_G['setting']['seccodedata']['animator'];
        $code->fontpath = DISCUZ_ROOT . './static/image/seccode/font/';
        $code->datapath = DISCUZ_ROOT . './static/image/seccode/';
        $code->includepath = DISCUZ_ROOT . './source/class/';
        $code->display();
    } else {
        $etype = explode(':', $_G['setting']['seccodedata']['type']);
        if (count($etype) > 1) {
            $codefile = DISCUZ_ROOT . './source/plugin/' . $etype[0] . '/seccode/seccode_' . $etype[1] . '.php';
            $class = $etype[1];
        } else {
            $codefile = libfile('seccode/' . $_G['setting']['seccodedata']['type'], 'class');
            $class = $_G['setting']['seccodedata']['type'];
        }
        if (file_exists($codefile)) {
            @(include_once $codefile);
            $class = 'seccode_' . $class;
            if (class_exists($class)) {
                make_seccode();
                $code = new $class();
                $image = $code->image($idhash, $modid);
                if ($image) {
                    dheader('location: ' . $image);
                }
            }
        }
    }
}
Пример #6
0
<?php

if (!defined('IN_KEKE')) {
    exit('Access Denied');
}
$seccode = make_seccode();
@header("Expires: -1");
@header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE);
@header("Pragma: no-cache");
@header("Content-type: image/gif");
$code = new seccode();
$code->code = $seccode;
$code->type = 0;
$code->width = 150;
$code->height = 50;
$code->background = 0;
$code->adulterate = 0;
$code->ttf = 1;
$code->angle = 0;
$code->warping = 0;
$code->scatter = 0;
$code->color = 1;
$code->size = 0;
$code->shadow = 0;
$code->animator = 0;
$code->fontpath = S_ROOT . '/static/img/seccode/font/';
$code->datapath = S_ROOT . '/static/img/seccode/';
$code->includepath = S_ROOT . '/lib/inc/';
$code->display();
function make_seccode($hash = '')
{