public function getImageByName($name, $subdir, $catalog = '')
    {
        if(substr($name, 0, 1) == 'i')
            return $this->getFilePath($subdir, $catalog) . $name;
        else
            return $this->base_path . '/files/site/' . 
                substr($name, strrpos($name, '.') + 1) . '.png';
    }