2020-04-04 19:17:10 +02:00
|
|
|
|
<?php
|
|
|
|
|
|
2020-04-05 22:45:21 +02:00
|
|
|
|
$res=mysqli_query($link,'SELECT * FROM Admins WHERE ID='.$_SESSION['AdmID'])
|
2020-04-04 19:17:10 +02:00
|
|
|
|
or muoribene(mysqli_error($link),true);
|
2020-04-05 22:45:21 +02:00
|
|
|
|
if (mysqli_num_rows($res)==1) {
|
|
|
|
|
$account=mysqli_fetch_assoc($res);
|
2020-05-08 17:38:54 +02:00
|
|
|
|
if ($account['Enabled']==0)
|
|
|
|
|
muoribene('Your account has been disabled.',true);
|
2020-04-05 22:45:21 +02:00
|
|
|
|
if ($account['Level']=='guest') {
|
2020-05-01 06:51:22 +02:00
|
|
|
|
$res=mysqli_query($link,'SELECT ID FROM Instances WHERE GuestID='.$account['ID'])
|
2020-04-05 22:45:21 +02:00
|
|
|
|
or muoribene(mysqli_error($link),true);
|
|
|
|
|
$account['Insts']=array();
|
|
|
|
|
while ($row=mysqli_fetch_assoc($res))
|
|
|
|
|
$account['Insts'][]=$row['ID'];
|
|
|
|
|
}
|
|
|
|
|
} else {
|
2020-05-08 17:38:54 +02:00
|
|
|
|
muoribene('There’s no account with ID='.$_SESSION['AdmID'].'.',true);
|
2020-04-05 22:45:21 +02:00
|
|
|
|
}
|
2020-04-04 19:17:10 +02:00
|
|
|
|
|
|
|
|
|
?>
|