<?php

require(dirname(__FILE__).'/config.php');

require(DEDEINC.'/dedehttpdown.class.php');


//当前软件版本锁定文件
$verLockFile = DEDEDATA.'/admin/ver.txt';
$fp = fopen($verLockFile,'r');
$upTime = trim(fread($fp,64));
fclose($fp);
 $dhd = new DedeHttpDown();
    $dhd->OpenUrl($updateHost.'/verinfo.txt');
	//echo($updateHost.'/verinfo.txt');
    $verlist = trim($dhd->GetHtml());
    $dhd->Close();

    $verlist = preg_replace("#[\r\n]{1,}#", "\n", $verlist);
    $verlists = explode("\n", $verlist);
    
    //分析数据
    $updateVers = array();
    $upitems = $lastTime = '';
	
	list($vtime, $vlang, $issafe, $vmsg) = explode(',', end($verlists));
	
	$updateClass = '';
	
	 if($vtime > $upTime){
          $updateClass = "updateTips"; 
      }
	  else{
		  $updateClass = "none"; 
		  }
die($updateClass);
#################################################################################

?>