<?php

/*
*	Copyright VeryIDE,2007-2010
*	http://www.veryide.com/
*
*	$Id: ,v1 10:39 2008-7-27 Leilei $
*/


	//载入全局配置和函数包
	require("../../include/global.php");

	//module
	require("config.php");
	require("function.php");

	$keys = $_GET["keys"];
	
	$hash = unserialize(do_mdecrypt($keys,VI_START));
	
	$out  = $_GET["out"];
	
	if( $out == "true" && time() - $hash["expire"] < $Global["expire"] ){
		getReport($hash["appid"],$hash["fid"]);
		exit();
	}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $Project["charset"];?>" />
<title>分享数据 - Powered By VeryIDE</title>
<?php
echo loader_style(VI_BASE."/style/share.css","utf-8",$Project["version"]);
?>
</head>

<body>

	<div id="wrapper">
    
    	<div id="header">
        	<h2>分享数据</h2>
        </div>
        
        <div id="main">
        	
            <?php
			//var_dump($hash);
			
			//echo $out;
			
			//echo time() - $hash["expire"];
			
			if( !is_array($hash) ){
				
				echo ' <p>无效链接！</p>';
				
			}elseif( time() - $hash["expire"] > $Global["expire"] ){
				
				echo '<p>已过期链接！</p>';
				
			}else{
			?>
                <p>数据名称：<strong><?php echo $hash["name"];?></strong></p>
                <p>有效时间：<strong><?php echo date("Y-m-d H:i:s",$hash["expire"]+$Global["expire"]);?></strong></p>
                <p></p>
                <p><button type="button" onclick="location.href=location.href+'&out=true';">立即下载</button></p>
				<?php
			}
			
			?>

        </div>
        
        <div id="adsense">        
        	<?php echo $Adsense["share"];?>        
        </div>
    
    	<div id="footer">
			<?php echo $Project["powered"];?>
            <?php echo $Product["appname"];?>
            <?php echo $Product["version"];?>
        </div>
    
    
    </div>

</body>
</html>