module.dashboard.php 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. <?php
  2. $_world = get_world_info();
  3. $_vars = get_world_variables();
  4. ?>
  5. <div class="row">
  6. <div class="col-sm-6 col-xl-3">
  7. <div class="p-2 bg-primary-300 rounded overflow-hidden position-relative text-white mb-g">
  8. <div class="">
  9. <h3 class="display-4 d-block l-h-n m-0 fw-500">
  10. 1
  11. <small class="m-0 l-h-n">GM Online</small>
  12. </h3>
  13. </div>
  14. <i class="fad fa-user-secret position-absolute pos-right pos-bottom opacity-15 mb-n1 mr-n1" style="font-size:6rem"></i>
  15. </div>
  16. </div>
  17. <div class="col-sm-6 col-xl-3">
  18. <div class="p-2 bg-warning-400 rounded overflow-hidden position-relative text-white mb-g">
  19. <div class="">
  20. <h3 class="display-4 d-block l-h-n m-0 fw-500">
  21. <?php echo get_character_count(); ?>
  22. <small class="m-0 l-h-n text-secondary">Player Characters</small>
  23. </h3>
  24. </div>
  25. <i class="fad fa-user-friends position-absolute pos-right pos-bottom opacity-15 mb-n1 mr-n4" style="font-size: 6rem;"></i>
  26. </div>
  27. </div>
  28. <div class="col-sm-6 col-xl-3">
  29. <div class="p-2 bg-success-200 rounded overflow-hidden position-relative text-white mb-g">
  30. <div class="">
  31. <h3 class="display-4 d-block l-h-n m-0 fw-500">
  32. 0
  33. <small class="m-0 l-h-n">Players Banned</small>
  34. </h3>
  35. </div>
  36. <i class="fal fa-lightbulb position-absolute pos-right pos-bottom opacity-15 mb-n5 mr-n6" style="font-size: 8rem;"></i>
  37. </div>
  38. </div>
  39. <div class="col-sm-6 col-xl-3">
  40. <div class="p-2 bg-info-200 rounded overflow-hidden position-relative text-white mb-g">
  41. <div class="">
  42. <h3 class="display-4 d-block l-h-n m-0 fw-500">
  43. Online
  44. <small class="m-0 l-h-n">Server Status</small>
  45. </h3>
  46. </div>
  47. <i class="fad fa-lightbulb-on position-absolute pos-right pos-bottom opacity-15 mb-n1 mr-n4" style="font-size: 6rem;"></i>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="row">
  52. <div class="col-xs-12 col-sm-7">
  53. <div id="panel-1" class="panel">
  54. <div class="panel-hdr">
  55. <h2>
  56. <i class="fad fa-cog text-success"></i>&nbsp;World <span class="fw-300"><i>Server</i></span>
  57. </h2>
  58. <div class="panel-toolbar">
  59. </div>
  60. </div>
  61. <div class="panel-container show">
  62. <div class="panel-content">
  63. <p class="text-right">
  64. <button class="btn btn-xs btn-default"><i class="fad fa-stop text-danger"></i> Stop LS</button>&nbsp;<small class="text-muted">|</small>&nbsp;
  65. <button class="btn btn-xs btn-default"><i class="fad fa-key-skeleton text-warning"></i> Restart LS</button>&nbsp;<small class="text-muted">|</small>&nbsp;
  66. <button class="btn btn-xs btn-default"><i class="fad fa-stop-circle text-danger"></i> Stop World</button>&nbsp;<small class="text-muted">|</small>&nbsp;
  67. <button class="btn btn-xs btn-default"><i class="fad fa-globe-asia text-success"></i> Restart World</button>
  68. </p>
  69. <table class="table table-bordered">
  70. <?php
  71. echo '
  72. <tr>
  73. <td> <strong>World Name</strong>: '.$_world['name'].' <small class="badge-pill badge-primary"><strong>id</strong> '.$_world['id'].'</small></td>
  74. <td>
  75. <div class="custom-control custom-switch">
  76. <input type="checkbox" class="custom-control-input" disabled="" id="customSwitchd">
  77. <label class="custom-control-label" for="customSwitchd">Disabled</label>
  78. </div>
  79. </td>
  80. <td><strong>IP Address</strong>: '.$_world['ip_address'].'</td>
  81. <td><strong>Login Version</strong>: '.$_world['login_version'].'</td>
  82. </tr>
  83. <tr>
  84. <td><strong>Account</strong>: '.$_world['account'].'</td>
  85. <td><strong>Password</strong>: <span class="text-secondary"> - <i>hidden</i> -</span></td>
  86. <td colspan="2"><strong>Last Seen</strong>: '.$_world['lastseen'].'</td>
  87. </tr>
  88. <tr>
  89. <td colspan="3"><strong>Description</strong>: '.$_world['description'].'</td>
  90. <td>
  91. <button class="btn btn-xs btn-warning"><i class="fas fa-edit"></i> Modify World</button>
  92. </td>
  93. </tr>
  94. ';
  95. ?>
  96. </table>
  97. <div class="col-xs-12">
  98. <p>World Server Console</p>
  99. <div class="console text-left text-monospace">
  100. [<strong class="text-danger">FATAL</strong>]: SERVER CRASHED!<br>
  101. [<strong class="text-warning">NOTICE</strong>]: UHH... TRUNCATING ALL TABLES TO CORRECT ISSUE!<br>
  102. [<strong class="text-info">SUCCESS</strong>]: ALL TABLES TRUNCATED!<br>
  103. [<strong class="text-warning">NOTICE</strong>]: RESTARTING WORLD SERVER!<br>
  104. [<strong class="text-danger">FATAL</strong>]: SERVER CRASHED!<br>
  105. </div>
  106. <table class="table">
  107. <tr>
  108. <th class="n-p-b va n-p-lr" valign="middle" style="width:70px;"><button class="btn btn-sm btn-default inline"><i class="fas fa-bolt text-warning"></i> Run</button></th>
  109. <td class="n-p-b"><input class="form-control" placeholder="Enter world server command to execute."/></td>
  110. </tr>
  111. </table>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. <div class="col-xs-12 col-sm-5">
  118. <div id="panel-1" class="panel">
  119. <div class="panel-hdr">
  120. <h2>
  121. <i class="fad fa-tag text-info"></i>&nbsp;Variable <span class="fw-300"><i>Configuration</i></span>
  122. </h2>
  123. </div>
  124. <div class="panel-container show">
  125. <div class="panel-content">
  126. <table class="table">
  127. <?php
  128. foreach($_vars as $vk => $v) {
  129. echo '
  130. <tr>
  131. <th class="n-p-b va variable-title" data-name="'.$vk.'" valign="middle">'.$vk.'</th>
  132. <td class="n-p-b">
  133. <input class="form-control variable-input" type="text" data-name="'.$vk.'" value="'.$v['value'].'"/>
  134. </td>
  135. <td class="n-p-b text-center">
  136. <button class="btn btn-sm btn-default edit-variable" data-name="'.$vk.'"><i class="fad fa-edit"></i></button>
  137. </td>
  138. </tr>';
  139. if(strlen($v['desc']) > 0) {
  140. echo '
  141. <tr>
  142. <td colspan="3" class="n-b-t n-p-b n-p-tb">
  143. <small class="text-muted">'.$v['desc'].'</small>
  144. </td>
  145. </tr>';
  146. }
  147. }
  148. ?>
  149. </table>
  150. </div>
  151. </div>
  152. </div>
  153. </div>
  154. </div>