public function init()
{
if($this->diafan->configmodules("cat"))
{
$this->rewrite_variable_names[] = 'cat';
}
if ($this->diafan->_route->show)
{
$this->model->id();
}
elseif ($this->diafan->_route->param)
{
$this->diafan->_route->sort = !empty($this->diafan->_route->sort) ? $this->diafan->_route->sort : 1;
$this->model->list_param();
}
elseif(isset($_GET["action"]) && $_GET["action"] === 'search')
{
$this->model->list_search();
}
elseif(isset($_GET["action"]) && $_GET["action"] === 'compare' && ! $this->diafan->configmodules('hide_compare', "shop"))
{
$this->model->compare();
}
elseif(isset($_GET["action"]) && $_GET["action"] === 'file' && isset($_GET["code"]))
{
$this->model->file_get();
}
elseif (! $this->diafan->configmodules("cat")|| $this->diafan->configmodules("first_page_list") || $this->diafan->_route->cat || $this->diafan->_route->brand)
{
$this->diafan->_route->sort = !empty($this->diafan->_route->sort) ? $this->diafan->_route->sort : 1;
$this->model->list_();