Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- public function administrationList() {
- $gm_status = [];
- $admins = $this->_dbExternal->prepare("SELECT mName FROM " . DB_EXTERNAL_PREFIX . "common.gmlist WHERE mAuthority IN ('IMPLAMENTATOR', 'HIGH_WIZARD', 'GOD', 'LOW_WIZARD')");
- $admins->execute();
- if(!empty($admins)) {
- foreach($admins->fetchAll() as $admin) {
- $is_online = $this->_dbExternal->prepare("SELECT name FROM " . DB_EXTERNAL_PREFIX . "player.online_list WHERE name = :name");
- $admins->execute([
- 'name' => $admin->mName
- ]);
- if($is_online->fetch()['name'] != null) {
- $gm_status[$admin->mName] = 'online';
- }
- else {
- $gm_status[$admin->mName] = 'offline';
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement