@@ -253,7 +251,7 @@
- +

.

diff --git a/inc/frontpage/frontpage.index.php b/inc/frontpage/frontpage.index.php index 34fefe5..dee96bd 100644 --- a/inc/frontpage/frontpage.index.php +++ b/inc/frontpage/frontpage.index.php @@ -89,7 +89,12 @@ } unset($CHDB_EXTRA, $data); // Free up memory. - $server['moreinfo'] = $mwe_config['fp_server_more_info']; + if($mwe_config['fp_server_more_info']) + { + $server['moreinfo'] = $mwe_config['fp_server_more_info']; + $server['moreinfourl'] = mw_url('server', 'statistic', $changerealmtoparam); + } + $servers[] = $server; } } diff --git a/inc/server/server.commands.php b/inc/server/server.commands.php index 0978100..5ebc3ef 100644 --- a/inc/server/server.commands.php +++ b/inc/server/server.commands.php @@ -35,12 +35,19 @@ { $userlevel = 0; } - - $permissions = $RDB->select("SELECT `rbac_linked_permissions`.`linkedId` FROM `rbac_linked_permissions` - LEFT JOIN `rbac_default_permissions` ON (`rbac_linked_permissions`.`id` = `rbac_default_permissions`.`permissionId`) - WHERE `rbac_default_permissions`.`secId` = <= $userlevel" - ); - $permissions = join(",", $permissions); - $alltopics = $WDB->select("SELECT * FROM `command` WHERE `permission` IN ($permissions) ORDER BY `name` ASC"); + $sql = "SELECT `rbac_linked_permissions`.`linkedId` FROM `rbac_linked_permissions` + LEFT JOIN `rbac_default_permissions` ON (`rbac_linked_permissions`.`id` BETWEEN `rbac_default_permissions`.`permissionId` + 4 AND 199) + WHERE `rbac_default_permissions`.`secId` <= $userlevel"; + $permissions = $RDB->select($sql); + + $permission_id = ""; + foreach($permissions as $row) + { + $permission_id .= $row['linkedId'].","; + } + $permission_id = substr($permission_id, 0, -1); + + $sql = "SELECT * FROM `command` WHERE `permission` IN ($permission_id) ORDER BY `name` ASC"; + $alltopics = $WDB->select($sql); } ?> \ No newline at end of file diff --git a/inc/server/server.statistic.php b/inc/server/server.statistic.php index 8b78af6..33fc1ff 100644 --- a/inc/server/server.statistic.php +++ b/inc/server/server.statistic.php @@ -12,6 +12,14 @@ echo "Not Included!"; exit; } +// Check to see if the changerealm_to variable is set in the URI. If so we need to set the selected +// realm cookie and reload the page in order to pull the players online from the correct realm +if(isset($_GET['changerealm_to'])) +{ + setcookie("cur_selected_realm", $_GET['changerealm_to'], time() + (3600 * 24 * 365)); + redirect("?p=server&sub=statistic",1); +} + // build top of page navigation breadcrumbs $realm = $RDB->selectRow("SELECT * FROM realmlist WHERE `id`='".$user['cur_selected_realm']."' LIMIT 1"); $pathway_info[] = array('title' => 'Server Statistics', 'link' => '?p=server&sub=statistic'); diff --git a/templates/blizzlike/body_right.php b/templates/blizzlike/body_right.php index ef8726a..56897e6 100644 --- a/templates/blizzlike/body_right.php +++ b/templates/blizzlike/body_right.php @@ -269,7 +269,7 @@ ?>
  • - +
  • diff --git a/templates/blizzlike/server/server.commands.php b/templates/blizzlike/server/server.commands.php index b0476f7..3dca3a4 100644 --- a/templates/blizzlike/server/server.commands.php +++ b/templates/blizzlike/server/server.commands.php @@ -14,6 +14,7 @@ { $postnum++; if($hl=='alt')$hl=''; else $hl='alt'; + $topic_permission = $RDB->selectCell("SELECT `name` FROM `rbac_permissions` WHERE id IN (SELECT `id` FROM `rbac_linked_permissions` WHERE linkedId = ".$topic['permission'].")"); ?>