} if (($_GET['gr'] || $_GET['gr'] === '0') && $PDA && !$_GET['action']) { $query_string = preg_replace('/gr=' . $_GET['gr'] . '/', '', $_SERVER['QUERY_STRING']); $query_string = preg_replace('/^&/', '', $query_string); $query_string = $query_string ? "?{$query_string}" : ''; $locUrl = $_GET['gr'] === '0' ? '/blogs/' : getFriendlyURL('blog_group', $_GET['gr']); if (trim($locUrl) == '') { $locUrl = '/404.php'; } else { $locUrl = $locUrl . $query_string; } header('HTTP/1.1 301 Moved Permanently'); header('Location: ' . $locUrl); exit; } $gr = blogs::getGroupId($_GET['grname']); if (!$gr && $_GET['grname']) { header('Location: /404.php'); exit; } else { if (BLOGS_CLOSED == true) { $commune_category = $gr + 1000; $ord2om = array('best' => 1, 'relevant' => 2, 'my' => 3); $http_query = ''; if (isset($_GET['ord']) && isset($ord2om[$_GET['ord']])) { $query['om'] = $ord2om[$_GET['ord']]; } if ($commune_category > 1000) { $query['cat'] = $commune_category; } if (isset($query)) {