MastodonHelp/web/lib/getadmacc.php
2023-12-26 11:16:24 +01:00

20 خطوط
632 B
PHP
خام سرزنش تاریخچه

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
$res=mysqli_query($link,'SELECT * FROM Admins WHERE ID='.$_SESSION['AdmID'])
or muoribene(mysqli_error($link),true);
if (mysqli_num_rows($res)==1) {
$account=mysqli_fetch_assoc($res);
if ($account['Enabled']==0)
muoribene('Your account has been disabled.',true);
if ($account['Level']=='guest') {
$res=mysqli_query($link,'SELECT ID FROM Instances WHERE GuestID='.$account['ID'])
or muoribene(mysqli_error($link),true);
$account['Insts']=array();
while ($row=mysqli_fetch_assoc($res))
$account['Insts'][]=$row['ID'];
}
} else {
muoribene('Theres no account with ID='.$_SESSION['AdmID'].'.',true);
}
?>