first commit
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
include("../includes/common.php");
|
||||
|
||||
if($islogin2==1){}else exit("<script language='javascript'>window.location.href='./login.php';</script>");
|
||||
|
||||
$act=isset($_GET['act'])?daddslashes($_GET['act']):null;
|
||||
|
||||
switch($act){
|
||||
|
||||
case 'wximg':
|
||||
if(!checkRefererHost())exit();
|
||||
$channelid = intval($_GET['channel']);
|
||||
$subchannelid = intval($_GET['subchannel']);
|
||||
$media_id = $_GET['mediaid'];
|
||||
$channel = $subchannelid ? \lib\Channel::getSub($subchannelid) : \lib\Channel::get($channelid);
|
||||
$model = \lib\Complain\CommUtil::getModel($channel);
|
||||
$image = $model->getImage($media_id);
|
||||
if($image !== false){
|
||||
$seconds_to_cache = 3600*24*7;
|
||||
header("Cache-Control: max-age=$seconds_to_cache");
|
||||
header("Content-Type: image/jpeg");
|
||||
echo $image;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
exit('No Act');
|
||||
break;
|
||||
}
|
||||
Reference in New Issue
Block a user