<?
@session_start();
require_once('../connect/connect.php');
include_once('../lib/lib.php');
require('pdk.php');
?>
<HTML><HEAD>
<META http-equiv=content-type content="text/html; charset=utf-8">
<link rel="stylesheet" href="../style/template_adm.css" type="text/css"/>
</HEAD>
<BODY>
<?
echo '<font color=green size=+1><em>Изменяем кэш каталогов</em></font><br><br>';

if(!$_GET['o'])
$o=0;
else
$o=intval($_GET['o']);

$r = mysql_query("SELECT * FROM catalog WHERE id_catalog > ".$o." ORDER BY id_catalog LIMIT 1");
$nr=mysql_num_rows($r);
if($nr)
	{
	echo 'Каталог  '.$o;
	$rr=mysql_fetch_array($r);
	$id_catalog=$rr['id_catalog'];
	include_once('_svod_catalog.php');
	echo "<HTML><HEAD><meta http-equiv='Refresh' charset='utf-8' content='0; URL=upd_1.php?o=".$id_catalog."'></HEAD></HTML>";
	exit();
	}
else 
	{
	echo '<a href="upd_2.php">Шаг 3</a>';
	}
?> 
</BODY></HTML>