<?
########## Confixx(R) 3.0 Professional ############
####### Copyright SWsoft, Inc. 2004-2005 ##########
#### http://www.sw-soft.com - info@sw-soft.com ####

include_once("auth.php");

if(!$checkupdates)
{
	include("allgemein_start.php");
	exit(0);
}

include("../settings.inc.php");
include_once("../include/page_functions.php");



print_header();

$id = db_query('select * from updates order by version desc');

//$werte = db_fetch_array($id);

//$dat = explode("-", date($lang_format_datetime_long, $werte['release_date']));
$toShow=array();
$count=0;
while	($werte = db_fetch_array($id)){
	$count++;	
	if($showall || compare_confixx_version($werte['version'])){
		$toShow[]=array('id'=>$werte['id'],'version'=>$werte['version'],'release_date'=>$werte['release_date']);
	}
}
if(count($toShow)){
?>

  <table class="tblbgcolor" align="left" border="1" cellpadding="3" cellspacing="0" bordercolorlight="#CCCCCC" bordercolordark="#FFFFFF">
                 
         <tr> 
           <td  class="titel-3"><b><? echo ltext("upd_version"); ?></b></td>
           <td  class="titel-3"><b><? echo ltext("upd_releasedate"); ?></b></td>
         </tr>
<? 
		foreach ($toShow as $werte){ ?>
          <tr> 
           <td><a class="data" href="newversion.php?vid=<? echo $werte['id']; ?>"><? echo $werte['version']; ?></a></td>
           <td><? echo date($lang_format_date, $werte['release_date']); ?></td>
         </tr>
<? 	
	}
?>
</table>		
<?
} else {
	if($count){
?>
<p>
<FORM action="versions.php">
<TABLE class="tblbgcolor" align="left" border="0">
<TR><TD><?=ltext('upd_no_newer_versions')?></TD></TR>
<TR><TD><?=std_button(ltext("upd_showall"), "javascript:doChange()")?></TD></TR>
</TABLE>
<INPUT type="hidden" name="showall" value="1"> 
</FORM>
<?		
	}	else {
		echo ltext('upd_no_new_versions');	
	}
}
print_footer();
db_close();
?>
