Example #1
0
<?php

/**
 * @package EDK
 */
if (isset($_GET['int'])) {
    $thumb = new thumbInt($_GET['id'], intval($_GET['size']), slashfix($_GET['type']));
} else {
    $thumb = new thumb($_GET['id'], intval($_GET['size']), slashfix($_GET['type']));
}
$thumb->display();
Example #2
0
function goPCA($type, $id, $size = 64, $imghost = "")
{
    //TODO integrate the existing common/includes/class.thumb.php
    if ($size != 32 && $size != 64 && $size != 128 && $size != 256) {
        show404();
    }
    $year = 31536000;
    // 365 * 24 * 60 * 60
    // PHP5.3+ only
    //header_remove();
    // Instead:
    header("Cache-Control: public");
    header("Expires: " . gmdate("D, d M Y H:i:s", time() + $year) . " GMT");
    header('Last-Modified: ' . gmdate("D, d M Y H:i:s") . " GMT");
    global $mc, $config;
    include_once 'kbconfig.php';
    require_once 'common/includes/globals.php';
    $config = new Config();
    if (isset($_GET['int'])) {
        header("Location: {$imghost}?a=thumb&id={$id}&int=1&size={$size}&type={$type}");
        die;
    } else {
        $thumb = new thumb($id, $size, $type);
    }
    $thumb->display();
    die;
}