php if isset _GET id id _GET id else id id intval id if id id if catal

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
<?php
if(isset($_GET["id"]))
$id = $_GET["id"];
else
$id = 1;
$id=intval($id);
if(!$id)
{
$id=1;
}
if($catalog->checkCategory($id) == false)
$id = 1;
$catalog->createFilter($id);
$catalog->filter->runFilter();
$countgoods=$catalog->filter->countOfGoods();
$checkbox=$catalog->filter->getAttributes();
?>