Advertisement
Guest User

Untitled

a guest
Sep 21st, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.04 KB | None | 0 0
  1. <?
  2. include '../core.php';
  3.  
  4. GenerateHTML('Commands', '<div class="content">
  5.                 Commands are keywords that allow you to control STEAMp3 from Steam group chats and private messages.
  6.                 <p>Below you will find a list of all commands supported by STEAMp3.
  7.             </div>
  8.  
  9.             <div class="subtitle">All Commands: N/A</div>
  10.             <div class="content">
  11.                 ' . EchoCommands() . '
  12.             </div>
  13.  
  14.             <div class="subtitle">Media Commands: N/A</div>
  15.             <div class="content">
  16.                 Coming soon!
  17.             </div>
  18.  
  19.             <div class="subtitle">Web Commands: N/A</div>
  20.             <div class="content">
  21.                 Coming soon!
  22.             </div>
  23.  
  24.             <div class="subtitle">Misc. Commands: N/A</div>
  25.             <div class="content">
  26.                 Coming soon!
  27.             </div>');
  28.  
  29. function EchoCommands()
  30. {
  31.     $result = '';
  32.     $xml = new SimpleXMLElement(file_get_contents('commands.xml'));
  33.        
  34.     foreach ($xml->Command as $command)
  35.     {
  36.         if (!empty($command['Param'])) $result += '<p>' . $command['ID'] . ' (' . $command['Param'] . ')</p>';
  37.         else $result += "<p>" . $command["ID"] . "</p>";
  38.     }
  39.        
  40.     return $result;
  41. }
  42. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement