32 lines
684 B
PHP
32 lines
684 B
PHP
|
<?php
|
||
|
|
||
|
require '../config/function.php';
|
||
|
|
||
|
$paramResult = checkParamId('id');
|
||
|
if(is_numeric($paramResult))
|
||
|
{
|
||
|
$id = validate($paramResult);
|
||
|
$admin = getById('tbl_admins',$id);
|
||
|
if($admin['status'] == 200)
|
||
|
{
|
||
|
$adminArchiveRes = deleteQuery('tbl_admins',$id, 'LIMIT 1');
|
||
|
if($adminArchiveRes)
|
||
|
{
|
||
|
redirect('admins.php','Administrator wurde erfolgreich entfernt','success');
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
redirect('admins.php','Ein Fehler ist aufgetreten','danger');
|
||
|
}
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
redirect('admins.php',$admin['message'],'danger');
|
||
|
}
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
redirect('admins.php',$paramResult,'danger');
|
||
|
}
|
||
|
|
||
|
?>
|