Viewing file: renderimage.php (2.76 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/*
############################################################################
# DWmail
# - version 4.0.4
# - Copyright (c) 2003-2006 Dominion Web Design
# - http://www.dominion-web.com/products/dwmail/
############################################################################
#
# The contents of this file are subject to the DWmail License version
# 2.2 ('License'). You may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.dominion-web.com/products/dwmail/license.php
# Software distributed under the License is distributed on an "AS IS" basis,
# without warranty of any kind, either express or implied.
#
# This code is Copyright (c) 2003-2006 Dominion Web Design.
# All rights reserved.
#
# This software may not be redistributed outside the terms of the
# license agreement.
#
############################################################################
*/
require ("./includes/init.inc.php");
require ("./includes/global.inc.php");
require ("./includes/functions.inc.php");
require ("./includes/image.inc.php");
require ("./includes/config.inc.php");
$MainSettings = new GlobalInit();
$TransIDEnabled = $MainSettings->INIGet('session.use_trans_sid');
session_cache_limiter($DefaultSessionCache);
session_start();
if ($_GET['type'] == 'login') {
if ($_GET['m'] == 2) {
require ("./includes/3rdparty/captcha/php-captcha.inc.php");
$gdimg = new GDImage();
$gdimg->imgSupport();
$gdimg->ftSupport();
$aFonts = array('./includes/fonts/VeraBd.ttf', './includes/fonts/VeraIt.ttf', './includes/fonts/Vera.ttf');
$oPhpCaptcha = new PhpCaptcha($aFonts, 200, 50);
if ($gdimg->_jpgsupport == true) {
$oPhpCaptcha->SetFileType('jpeg');
}
elseif ($gdimg->_gifsupport == true) {
$oPhpCaptcha->SetFileType('gif');
}
elseif ($gdimg->_pngsupport == true) {
$oPhpCaptcha->SetFileType('png');
}
$oPhpCaptcha->UseColour(true);
$oPhpCaptcha->Create();
}
elseif ($_GET['m'] == 3) {
require ("./includes/3rdparty/captcha/php-captcha.inc.php");
$oAudioCaptcha = new AudioPhpCaptcha('/usr/bin/flite', './tmp/');
$oAudioCaptcha->Create();
}
else {
$gdimg = new GDImage();
$gdimg->imgSupport();
$gdimg->imgGenerateHash($_SESSION['verify'], "75", "15");
}
}
else {
$id = $_GET['embedid'];
if (($_SESSION['sess_u'] == "") && ($_SESSION['sess_p'] == "")) {
echo ("<p>" . $lang['SErrors']['Session'] . "</p>");
exit;
}
if ($_SESSION['ca'][$id]['type'] == "image/jpeg" || $_SESSION['ca'][$id]['type'] == "image/pjpeg") {
header("Content-type: image/jpeg");
}
elseif ($_SESSION['ca'][$id]['type'] == "image/gif") {
header("Content-type: image/gif");
}
echo ($_SESSION['ca'][$id]['contents']);
}
?>
|