objects->getFullObject($_GET['id']); $text = str_replace('header(array('page-title'=>$page['Название'])); $type = $api->db->select('class_43',' WHERE field_181 = "'.$page['Тип страницы'].'" LIMIT 1'); echo '
'; }else{ $api->header(array('page-title'=>'')); $types = $api->objects->getFullObjectsListByClass(596,43,' AND active="1" ORDER BY weight'); $typesHtml = []; foreach($types as $t){ $typesHtml[] = ''.$t['Название'].''; } $sql = ''; $type = ''; $url = ''; if(@$_GET['type']){ $typeObj = $api->objects->getFullObject($_GET['type']); $sql = ' AND field_186 = "'.$typeObj['Название'].'"'; $type = $typeObj['id']; $url = $typeObj['url']; } echo '

'.($api->auth()?'правка страницы->':'').'
Все вместе '.join("\n",$typesHtml).'
'.$api->getMedia($sql,$per_page,$type, $url).'
'; } $api->footer(); ?>