| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <?php
- error_reporting(32767 ^ 8);
- __FILE__ == '' && exit('Fatal error code: 0');
- define('IN_MYMPS', true);
- define('CURRENTDIR', dirname(__FILE__));
- define('MYMPS_DATA', dirname(__FILE__) . '/data');
- define('MAGIC_QUOTES_GPC', get_magic_quotes_gpc());
- if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) {
- exit('Request tainting attempted.');
- }
- @set_magic_quotes_runtime(0);
- if (function_exists('date_default_timezone_set')) {
- date_default_timezone_set('Hongkong');
- }
- if (defined('DEBUG_MODE') == false) {
- define('DEBUG_MODE', 0);
- }
- if (PHP_VERSION < '4.1.0') {
- $_GET = &$HTTP_GET_VARS;
- $_SERVER = &$HTTP_SERVER_VARS;
- unset($HTTP_GET_VARS);
- unset($HTTP_SERVER_VARS);
- }
- $timestamp = time();
- $part = isset($_GET['part']) ? trim($_GET['part']) : 'authcode';
- $wid = isset($_GET['wid']) ? intval($_GET['wid']) : '180';
- $mod = isset($_GET['mod']) ? trim($_GET['mod']) : '';
- !in_array($part, array('authcode', 'contact')) && exit('Access Denied');
- if ($part == 'authcode') {
- include CURRENTDIR . '/include/common.fun.php';
- include CURRENTDIR . '/include/cache.fun.php';
- include CURRENTDIR . '/include/MympsVerify.fun.php';
- $action = isset($_GET['action']) ? trim($_GET['action']) : 'action';
- if ($action == 'action') {
- session_save_path(CURRENTDIR . '/data/sessions');
- session_start();
- }
- $data = read_static_cache('authcodesettings');
- $Line = $data['line'] ? $data['line'] : false;
- $Noise = $data['noise'] ? $data['noise'] : false;
- $Type = $data['type'];
- $Distort = $data['distort'];
- $Incline = $data['incline'];
- $Close = $data['close'];
- $Number = $data['number'];
- if ($action == 'action') {
- $_SESSION['chkcode'] = GetMympsVerify($Type, $Noise, $Line, $Distort, $Incline, true, $Close, $Number);
- }
- else {
- GetMympsVerify($Type, $Noise, $Line, $Distort, $Incline, false, $Close, $Number);
- }
- }
- else if ($part == 'contact') {
- $height = '24';
- $fontfile = CURRENTDIR . '/data/ttf/number.ttf';
- $strings = base64_decode(trim($_GET['strings']));
- $image = imagecreatetruecolor($wid, $height);
- imagefilledrectangle($image, 0, 0, $wid, $height, imagecolorallocate($image, 255, 255, 255));
- $fontcolor = imagecolorallocate($image, 255, 0, 0);
- imagettftext($image, 12, 0, 0, $height * 0.69999999999999996, $fontcolor, $fontfile, $strings);
- header('Content-type: image/png');
- imagepng($image);
- imagedestroy($image);
- unset($wid);
- unset($height);
- unset($strings);
- unset($image);
- unset($black);
- unset($white);
- }
- ?>
|