<?php if(!defined('ONGPHP'))exit('Error ONGSOFT');
plus( array('p','jiami','jianli','mima','shanchu','qcurl','qfopen','x','memcc','txtcc','db','isutf8','setsession','pagec','pinyin','ip','post','funciton','sslget','sslpost','vcode','update','mysqlcc') );
$Memsession =  $Mem = new txtcc();
$Mem1 = new txtcc(ONGPHP.'/mode/');
$shezhi = $Mem1 -> g('shezhi');
setsession( $CONN['sessiontime'] );

$beijing = WZHOST.$shezhi['beijing'];
$base_name = $beijing;

list($width, $height) = getimagesize($base_name);

$left = (int)$width-220;
$left = $left/2+10;

$top = (int)$height-220;
$top = $top/2+90;

    if ($shezhi['tiaozhuan']) {
        
        $e = WZHOST.'ewm.php?data='.$shezhi['tiaozhuan'].'?shuju='.WZHOST.'tg.php?tuid='.$_SESSION['uid'].'%26fenxiao='.$_SESSION['houid'];

    }else{
        $e = WZHOST.'ewm.php?data='.WZHOST.'tg.php?tuid='.$_SESSION['uid'].'%26fenxiao='.$_SESSION['houid'];
    }

    // Content type
    header('Content-Type: image/jpeg');

    // Load
    $thumb = @imagecreatefromjpeg($base_name);
    

    if(!empty($_SESSION['houid'])){
    
        list($width, $height) = getimagesize($e);
    
    
        $e_p = imagecreatefrompng($e);
    
        imagecopyresized($thumb, $e_p, $left, $top+170, 0, 0, 220, 220, $width, $height);
    }
    // Output
    imagejpeg($thumb);
    imagedestroy($thumb);
?>




