Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strpos($message_text, "/getadminpunishlog") !== false)
- {
- $parts = explode(" ", $message_text);
- if(count($parts) < 2)
- {
- vk_msg_send($peer_id, "Используйте /getadminpunishlog [Ник администратор]");
- }
- else
- {
- $name = $parts[1];
- $a_name = $dbserver->query("SELECT * from `punish_log` WHERE `admin_name` = '$name' ORDER BY admin_name DESC");
- $result = $a_name->fetch_assoc();
- $adminspunish = "";
- foreach($a_name as $admin_name)
- {
- $tapun = typeadminpunish($a_name['type']);
- $adminspunish .= "Игрок: ".$a_name['user_name']." | ".$tapun. " | Срок: ".$a_name['srok']. " | Причина: ".$a_name['reason']." | Дата и время: ".date("d.m.Y H:i:s", $a_name['time'])."\n";
- }
- if($result)
- {
- vk_msg_send($peer_id, "Наказания выданные: ".$name."\n".$adminspunish);
- }
- else
- {
- vk_msg_send($peer_id, "Администратор ".$name." не выдавал наказания");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement