<?
//image.php 显示附件的图片
include "config.inc.php";
include "class/member.class.php";
$member=new member();
$confirm==false;//true 会员才能看,false 都能看
$user_info = $member->member_auth();
if($user_info[user_level]=="Guest" && $confirm==true){
		error(_LANG_0949);
}else{
$imgdb = $PlusDB->prefix(images);
$id=$_GET[id];
$sql="select * from $imgdb where id=$id";
$row=$PlusDB->query_firstrow($sql);
if(!is_array($row)){	
}else{
	$url = $row[image];
	$urls=explode("/",$url);
	$filename=$urls[count($urls)-1];
	$types=explode(".",$filename);
	$filetype=strtoupper($types[count($types)-1]);
		header("Content-type: images/jpeg");
		header("Content-Disposition: inline; filename=$filename");
		readfile($url);
}
}
?>