/** * User constructor */ public function __construct() { parent::__construct(); $this->name = ""; $this->table = ARCDBPREFIX . "companies"; $this->map = ["id" => "id", "name" => "name"]; $this->columns = ["id", "name"]; }
/** * UserPermission constructor */ public function __construct() { parent::__construct(); $this->groupid = 0; $this->permission = ""; $this->table = ARCDBPREFIX . 'user_permissions'; $this->map = ["id" => "id", "groupid" => "groupid", "permission" => "permission"]; $this->columns = ['id', 'groupid', 'permission']; }
public function __construct() { parent::__construct(); $this->event = date("y-m-d H:i:s"); $this->message = ""; $this->table = ARCDBPREFIX . 'logs'; $this->map = ["id" => "id", "type" => "type", "module" => "module", "event" => "event", "message" => "message"]; $this->columns = ['id', 'type', 'module', 'event', 'message']; }
/** * UserGroup constructor */ public function __construct() { parent::__construct(); $this->name = ""; $this->description = ""; $this->table = ARCDBPREFIX . 'user_groups'; $this->map = ["id" => "id", "name" => "name", "description" => "description"]; $this->columns = ['id', 'name', 'description']; }
/** * SystemSetting constructor */ public function __construct() { parent::__construct(); $this->key = ""; $this->value = ""; $this->userid = 0; $this->table = ARCDBPREFIX . "system_settings"; $this->map = ["id" => "id", "key" => "skey", "value" => "svalue", "userid" => "userid"]; $this->columns = ["id", "skey", "svalue", "userid"]; }
public function __construct(SkyBlock $plugin, $cacheSize = 0) { parent::__construct($plugin, $cacheSize); $this->db = new SQLite3($this->plugin->getDataFolder() . "plots.db"); $this->db->exec("CREATE TABLE IF NOT EXISTS plots\n (id INTEGER PRIMARY KEY AUTOINCREMENT, level TEXT, X INTEGER, Z INTEGER, name TEXT,\n owner TEXT, helpers TEXT, biome TEXT)"); $this->sqlGetPlot = $this->db->prepare("SELECT id, name, owner, helpers, biome FROM plots WHERE level = :level AND X = :X AND Z = :Z"); $this->sqlSavePlot = $this->db->prepare("INSERT OR REPLACE INTO plots (id, level, X, Z, name, owner, helpers, biome) VALUES\n ((select id from plots where level = :level AND X = :X AND Z = :Z),\n :level, :X, :Z, :name, :owner, :helpers, :biome);"); $this->sqlSavePlotById = $this->db->prepare("UPDATE plots SET name = :name, owner = :owner, helpers = :helpers, biome = :biome WHERE id = :id"); $this->sqlRemovePlot = $this->db->prepare("DELETE FROM plots WHERE level = :level AND X = :X AND Z = :Z"); $this->sqlRemovePlotById = $this->db->prepare("DELETE FROM plots WHERE id = :id"); $this->sqlGetPlotsByOwner = $this->db->prepare("SELECT * FROM plots WHERE owner = :owner"); $this->sqlGetPlotsByOwnerAndLevel = $this->db->prepare("SELECT * FROM plots WHERE owner = :owner AND level = :level"); $this->sqlGetExistingXZ = $this->db->prepare("SELECT X, Z FROM plots WHERE (\n level = :level\n AND (\n (abs(X) == :number AND abs(Z) <= :number) OR\n (abs(Z) == :number AND abs(X) <= :number)\n )\n )"); }
/** * User constructor */ public function __construct() { parent::__construct(); $this->firstname = ""; $this->lastname = ""; $this->email = ""; $this->enabled = true; $this->passwordhash = ""; $this->groups = "[\"Users\"]"; $this->company = "[]"; $this->created = date("y-m-d H:i:s"); $this->table = ARCDBPREFIX . "users"; $this->map = ["id" => "id", "firstname" => "firstname", "lastname" => "lastname", "email" => "email", "passwordhash" => "passwordhash", "created" => "created", "enabled" => "enabled", "groups" => "groups", "company" => "company"]; $this->columns = ["id", "firstname", "lastname", "email", "passwordhash", "created", "enabled", "groups", "company"]; }
/** * Page constructor */ public function __construct() { parent::__construct(); $this->title = ""; $this->content = ""; $this->metadescription = ""; $this->metakeywords = ""; $this->metatitle = ""; $this->seourl = ""; $this->sortorder = 0; $this->iconclass = ""; $this->showtitle = true; $this->hideonlogin = false; $this->hidefrommenu = false; $this->theme = "none"; $this->table = ARCDBPREFIX . "pages"; $this->map = ["id" => "id", "title" => "title", "content" => "content", "seourl" => "seourl", "metadescription" => "metadescription", "metakeywords" => "metakeywords", "sortorder" => "sortorder", "iconclass" => "iconclass", "showtitle" => "showtitle", "hideonlogin" => "hideonlogin", "hidefrommenu" => "hidefrommenu", "theme" => "theme"]; $this->columns = ["id", "title", "content", "seourl", "metadescription", "metakeywords", "sortorder", "iconclass", "showtitle", "hideonlogin", "hidefrommenu", "theme"]; }