Esempio n. 1
0
 /**
  * 
  * A function that returns all gameserver, owned by this user
  * 
  * @return \Array(Gameserver)
  */
 public function getAllGameserver()
 {
     if ($this->_allGameserver == null) {
         $this->_allGameserver = GameserverManager::getAllByUserID($this->getData("id"));
     }
     return $this->_allGameserver;
 }
 public static function getAll()
 {
     return GameserverManager::getAllByUserID();
 }
 * WolfPanel (c) 2015 by Fursystems.de (Marcel Kallen)
 * 
 * WolfPanel is licensed under a
 * Creative Commons Attribution-NonCommercial 4.0 International License.
 * 
 * You should have received a copy of the license along with this
 * work. If not, see <http://creativecommons.org/licenses/by-nc/4.0/>. 
 */
include "../core.php";
// Admin Check
$user = UserManager::getLocalUser();
if (!$user->isAdmin()) {
    PageManager::displayErrorPage("access");
    return;
}
if (isset($_GET["userid"])) {
    if (UserManager::existsById($_GET['userid'])) {
        $gs = GameserverManager::getAllByUserID($_GET['userid']);
        if ($gs !== false) {
            $smarty->assign("Gameservers", $gs);
        }
    } else {
        $smarty->assign("t_Report", Reporting::error("The given user doesnt exist."));
    }
} else {
    $gs = GameserverManager::getAll();
    if ($gs !== false) {
        $smarty->assign("Gameservers", $gs);
    }
}
$smarty->display("ajax/getAdminGameserverList.tpl");