1. Создаем в папке с СБ/pages/ файл page.adminlist.php
И вставляем в него код:
Код: Выбрать все
<div><h3>Список Администраторов</h3></div>
<?php
if(!defined("IN_SB")){echo "You should not be here. Only follow links!";die();}
else
{
function st32to64($steam_id)
{
list( , $m1, $m2) = explode(':', $steam_id, 3);
list($steam_cid, ) = explode('.', bcadd((((int) $m2 * 2) + $m1), '76561197960265728'), 2);
return $steam_cid;
}
$html = "";
$html.= "<table style=\"border-collapse: collapse;\" width=\"100%\" cellspacing=\"3\" cellpadding=\"3\" align=\"center\" border=\"1\" class=\"listtable\">";
$html.= "<tr>";
$html.= "<td padding-left=\"3\" height=\"16\" class=\"listtable_top\" align=\"center\"><b>Ник</b></td>";
$html.= "<td height=\"16\" class=\"listtable_top\" align=\"center\"><b>Steam_ID</b></td>";
$html.= "<td height=\"16\" class=\"listtable_top\" align=\"center\"><b>E-mail</b></td>";
$html.= "<td height=\"16\" class=\"listtable_top\" align=\"center\"><b>Группа</b></td>";
$html.= "<td height=\"16\" class=\"listtable_top\" align=\"center\"><b>Посл. визит</b></td>";
$html.= "</tr>";
$sb = $GLOBALS['db']->GetAll("SELECT `user`, authid, email, srv_group, lastvisit FROM sb_admins WHERE sb_admins.authid LIKE '%STEAM_0%' ORDER BY lastvisit DESC");
foreach ($sb as $res)
{
$html.= "<tr>";
$html.= "<td align=\"center\">".RemoveCode($res['user'])."</td>";
$html.= "<td align=\"center\"><a href=\"http://steamcommunity.com/profiles/".st32to64(RemoveCode($res['authid']))."\" target=\"_blank\">".RemoveCode($res['authid'])."</a></td>";
$html.= "<td align=\"center\"><a href=\"mailto:".RemoveCode($res['email'])."\">".RemoveCode($res['email'])."</a></td>";
$html.= "<td align=\"center\">".RemoveCode($res['srv_group'])."</td>";
$html.= "<td align=\"center\">".date("Y-m-d H:i",$res['lastvisit'])."</td>";
$html.= "</tr>";
}
$html.= "</table>";
echo $html;
}
?>
2. Редактируем файлы:
1) system-functions.php после 137-й строки:
Код: Выбрать все
$tab_arr[0] = "Dashboard";
$tab_arr[1] = "Ban List";
$tab_arr[2] = "Servers";
$tab_arr[3] = "Submit a ban";
$tab_arr[4] = "Protest a ban";
Изменяем на:
Код: Выбрать все
$tab_arr[0] = "Dashboard";
$tab_arr[1] = "Ban List";
$tab_arr[2] = "Servers";
$tab_arr[3] = "Submit a ban";
$tab_arr[4] = "Protest a ban";
$tab_arr[5] = "Админлист"; // Ну или на английском
После:
Код: Выбрать все
if($GLOBALS['config']['config.enableprotest']=="1")
AddTab("Protest a ban", "index.php?p=protest", "Here you can protest your ban. And prove your case as to why you should be unbanned.");
Добавляем:
Код: Выбрать все
AddTab("Админлист", "index.php?p=adminlist", "Список всех админов");
2) в /includes/page-builder.php после
Код: Выбрать все
case "protest":
RewritePageTitle("Protest a Ban");
$page = TEMPLATES_PATH . "/page.protest.php";
break;
Добавляем:
Код: Выбрать все
case "adminlist":
RewritePageTitle("Админлист");
$page = TEMPLATES_PATH . "/page.adminlist.php";
break;
Вот и всё. Всем спасибо за внимание !
Автор: root
Источник: http://css-rus.ru/forum/12-104-1