$_SESSION['msg-type'] = 'error'; unset($error); header("Location: index.php"); die; } ### if (query_numrows("SELECT `serverid` FROM `" . DBPREFIX . "server` WHERE `groupid` = '" . $groupid . "'") != 0) { $_SESSION['msg1'] = T_('Error!'); $_SESSION['msg2'] = T_('The selected group cannot be deleted as it is currently linked with a game server. The server must be deleted first.'); $_SESSION['msg-type'] = 'error'; header("Location: configgroup.php"); die; } ### if (getGroupClients($groupid) != FALSE) { $clients = getGroupClients($groupid); foreach ($clients as $key => $value) { $removeids[] = $value; } unset($clients); } ### if (isset($removeids)) { // Remove groupID from groupMember table foreach ($removeids as $key => $value) { $groupids = query_fetch_assoc("SELECT `groupids` FROM `" . DBPREFIX . "groupMember` WHERE `clientid` = '" . $value . "'"); ### $groupids['groupids'] = str_replace($groupid . ';', '', $groupids['groupids']); ### if (empty($groupids['groupids'])) { query_basic("DELETE FROM `" . DBPREFIX . "groupMember` WHERE `clientid` = '" . $value . "' LIMIT 1");
?> <a href="configgroupadd.php"> <?php echo T_('Click here'); ?> </a> <?php echo T_('to add a new group.'); ?> </div></td> </tr> <?php } while ($rowsGroups = mysql_fetch_assoc($groups)) { if (getGroupClients($rowsGroups['groupid']) == FALSE) { $counter = 0; } else { $counter = count(getGroupClients($rowsGroups['groupid'])); } ?> <tr> <td><?php echo $rowsGroups['groupid']; ?> </td> <td><?php echo htmlspecialchars($rowsGroups['name'], ENT_QUOTES); ?> </td> <td><?php echo htmlspecialchars($rowsGroups['description'], ENT_QUOTES); ?> </td>