mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
Fixed accounts editor for OTServ, which dont have accounts.group_id
This commit is contained in:
parent
92314b8dac
commit
3090989dea
@ -204,7 +204,7 @@ else if (isset($_REQUEST['search'])) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if ($id == 0) {
|
} else if ($id == 0) {
|
||||||
$accounts_db = $db->query('SELECT `id`, `name`,' . ($hasTypeColumn ? 'type' : 'group_id') . ' FROM `accounts` ORDER BY `id` ASC');
|
$accounts_db = $db->query('SELECT `id`, `name`' . ($hasTypeColumn ? ',type' : ($hasGroupColumn ? ',group_id' : '')) . ' FROM `accounts` ORDER BY `id` ASC');
|
||||||
?>
|
?>
|
||||||
<div class="col-12 col-sm-12 col-lg-10">
|
<div class="col-12 col-sm-12 col-lg-10">
|
||||||
<div class="card card-info card-outline">
|
<div class="card card-info card-outline">
|
||||||
@ -217,7 +217,9 @@ else if (isset($_REQUEST['search'])) {
|
|||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
|
<?php if($hasTypeColumn || $hasGroupColumn): ?>
|
||||||
<th>Position</th>
|
<th>Position</th>
|
||||||
|
<?php endif; ?>
|
||||||
<th style="width: 40px">Edit</th>
|
<th style="width: 40px">Edit</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@ -226,6 +228,7 @@ else if (isset($_REQUEST['search'])) {
|
|||||||
<tr>
|
<tr>
|
||||||
<th><?php echo $account_lst['id']; ?></th>
|
<th><?php echo $account_lst['id']; ?></th>
|
||||||
<td><?php echo $account_lst['name']; ?></a></td>
|
<td><?php echo $account_lst['name']; ?></a></td>
|
||||||
|
<?php if($hasTypeColumn || $hasGroupColumn): ?>
|
||||||
<td>
|
<td>
|
||||||
<?php if ($hasTypeColumn) {
|
<?php if ($hasTypeColumn) {
|
||||||
echo $acc_type[$account_lst['type']];
|
echo $acc_type[$account_lst['type']];
|
||||||
@ -234,6 +237,7 @@ else if (isset($_REQUEST['search'])) {
|
|||||||
echo $group[$account_lst['group_id']];
|
echo $group[$account_lst['group_id']];
|
||||||
} ?>
|
} ?>
|
||||||
</td>
|
</td>
|
||||||
|
<?php endif; ?>
|
||||||
<td><a href="?p=accounts&id=<?php echo $account_lst['id']; ?>" class="btn btn-success btn-sm" title="Edit">
|
<td><a href="?p=accounts&id=<?php echo $account_lst['id']; ?>" class="btn btn-success btn-sm" title="Edit">
|
||||||
<i class="fas fa-pencil-alt"></i>
|
<i class="fas fa-pencil-alt"></i>
|
||||||
</a>
|
</a>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user