// error_reporting (E_ALL);
include ("../catalog/data.php");
$t=time()-$ZTime*60;
// product
$sql2="SELECT lid, cat1, title, url, type, Date, icon from cat_main where type=1 AND Date<$t AND (cat1=744 OR cat1=441 OR cat1=717 OR cat1=743 OR cat1=442 OR cat1=710 OR cat1=443 OR cat1=444 OR cat1=735 OR cat1=709 OR cat1=947 OR cat1=736 OR cat1=445 OR cat1=737 OR cat1=446 OR cat1=738 OR cat1=447 OR cat1=739 OR cat1=449 OR cat1=450 OR cat1=451 OR cat1=648 OR cat1=452 OR cat1=758 OR cat1=759 OR cat1=750 OR cat1=752 OR cat1=753 OR cat1=754 OR cat1=755 OR cat1=756 OR cat1=757 OR cat1=751 OR cat1=807 OR cat1=808 OR cat1=809 OR cat1=386 OR cat1=803 OR cat1=804 OR cat1=805 OR cat1=806 OR cat1=471 OR cat1=975 OR cat1=472 OR cat1=424) order by rand() DESC LIMIT 0, 2";
$q2=$db->query($sql2);
$s2="";$n=0;
while ($db->next_record())
{
$Date=date("d.m.Y",$db->Record["Date"]);
$lid = $db->Record['lid']; // ID
$cat1 = $db->Record['cat1']; // Рубрика
$title = $db->Record['title']; // название
$url = preg_replace("/^[0-9]{3}/","",$db->Record['url'], 3); // производитель
$image = $db->Record['icon']; // картинка
// надо сделать проверку на наличие изображения!
if (file_exists("../product/$image")) {
$imagepr = "";
} else {$imagepr = "
"; }
$s2=$s2."
| Справочник OBORUD.INFO |