Advertisement
LeonMarkelov

Untitled

Jan 16th, 2024
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. if(strpos($message_text, "/getadminpunishlog") !== false)
  2. {
  3. $parts = explode(" ", $message_text);
  4. if(count($parts) < 2)
  5. {
  6. vk_msg_send($peer_id, "Используйте /getadminpunishlog [Ник администратор]");
  7. }
  8. else
  9. {
  10. $name = $parts[1];
  11. $a_name = $dbserver->query("SELECT * from `punish_log` WHERE `admin_name` = '$name' ORDER BY admin_name DESC");
  12. $result = $a_name->fetch_assoc();
  13.  
  14. $adminspunish = "";
  15.  
  16. foreach($a_name as $admin_name)
  17. {
  18. $tapun = typeadminpunish($a_name['type']);
  19. $adminspunish .= "Игрок: ".$a_name['user_name']." | ".$tapun. " | Срок: ".$a_name['srok']. " | Причина: ".$a_name['reason']." | Дата и время: ".date("d.m.Y H:i:s", $a_name['time'])."\n";
  20. }
  21. if($result)
  22. {
  23. vk_msg_send($peer_id, "Наказания выданные: ".$name."\n".$adminspunish);
  24. }
  25. else
  26. {
  27. vk_msg_send($peer_id, "Администратор ".$name." не выдавал наказания");
  28. }
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement