query(" SELECT link FROM _mod_news_report_contents WHERE report_id = '".$_GET['item']."' ORDER BY list_order ASC LIMIT ".$_GET['item2']." "); $nr = 1; $res = $sql->getResult(); foreach($res as $key => $row){ if($nr == $_GET['item2']){ $item = $row[0]; } $nr++; } Header( "Location: ".ROOT."/auto-zinas/".$actions->rewrite($actions->get_news_title($_GET['item']))."/".$item."/".$_GET['item']); } else { Header( "Location: https://www.whatcar.lv/"); } ?>