
if(($product=="Thunderbird" && $update_thunderbird) || ($product=="Firefox" && $update_firefox))\{
    $updates_path = "$updates_path/$product/";
    $array_version = explode(".",$version);
	if ( count($array_version) < 3 ) \{
	array_push($array_version,"0");
	\}
    if ($array_version[2] < 10) \{
	$array_version[2] = "0" . $array_version[2];
    \}
    $version = implode(".",$array_version);
    $vers_disp = scandir($updates_path);
    sort($vers_disp);
    foreach($vers_disp as $dir)\{
	    if ($dir === '.' or $dir === '..') continue;
	    $path_vers = "$updates_path$dir";
	    if (is_dir($path_vers))\{
       	$vers_comp=substr($dir, 0, -3);
	       if(version_compare($version, $vers_comp, "<"))\{
		    $tmp_vers_comp = str_replace(".","",$vers_comp);
		    if ( in_array( ( substr( $tmp_vers_comp, 0, 2) ), $authorized_version ) ) \{
			$tmp_version = str_replace(".","",$version);
		    	if (($tmp_vers_comp - $tmp_version) > 1000) \{
			   if ($major_update_enabled)\{
				$major = true;
				$update_type = "major";
			   \}else\{
				$update = false;
				break 4;
			   \}
		       \}
		    \}else\{
			$update = false;
			break 2;
		    \}
                  $update = true;
		    $update_ver = $vers_comp;
		    break 1;
		\}
		
	    \}
       \}
\}
