<?php

namespace App\System\Model;
use App\System\Basic\beModel;

class ServerModel extends beModel {
    public $table = "be_servers";
    public $primary_key = "sid";
    //@ioncube.dk beEncrypt("be_diyocp","beGetServer") -> "c321522c156d330d0f36df052eafea79" RANDOM
    public static function beGetServer($type){
        if(is_numeric($type)){
            $server = ServerModel::beWhere("sid",$type)->beGet();
        }
        else{
            $server = ServerModel::beWhere("smodule",$type)->beGet();
        }
        if(!$server){
            return false;
        }
        $server["spassword"] = beDecryptData($server["spassword"]);
        return $server;
    }
}

?>