<?php
if(!defined('R_P')) exit('Access Denied');
$sid = intval($_GET['id']);
$_output = qdb::queryFirst("select * from ".TABLEPRE."special where sid = '{$sid}' ");
if(empty($_output)) exit("not found special");
$channelid = $_output['channelid'];
if(!$channel[$channelid]['show']) qbase::showmsg("I'm sorry, this channel has been closed by administrator.");
$has_extend = is_array($_MODULE[$_output['mid']]['extend']) && (count($_MODULE[$_output['mid']]['extend']) > 0);
if($has_extend){
	$_extends = qdb::queryFirst("select * from ".TABLEPRE."extend_data_{$_output['mid']} where channelid = 0 and id = '{$_output['sid']}' ");
	unset($_extends['channelid'], $_extends['id']);
	if(!empty($_extends)){
		$_output = array_merge($_output , $_extends);
	}
}
$_output['data'] = getRelatedByMap('s-' . $_output['sid']);
$showphp = $_output['showphp'] ? $_output['showphp'] : $_SET['skin'] . '/special';
include qbase::template($showphp);
qbase::obHtml(4);
?>