1
0
mirror of https://github.com/ShaYmez/xlxd.git synced 2024-11-18 06:01:46 -05:00
xlxd/dashboard2/pgs/class.interlink.php
Luiz Fernando Ribeiro Amaral a9911d3042 New XLX dashboard layout
- A dashboard with the new layout is contained in the dashboard2 folder.
- Enhanced the styling of the README file.
2016-07-05 11:08:29 -06:00

48 lines
1.5 KiB
PHP

<?php
class Interlink {
private $ReflectorName;
private $ReflectorAddress;
private $Modules;
public function __construct() {
$this->ReflectorName = null;
$this->ReflectorAddress = null;
$this->Modules = null;
}
public function SetName($RefName) { $this->ReflectorName = trim($RefName); }
public function SetAddress($RefAdd) { $this->ReflectorAddress = trim($RefAdd); }
public function GetName() { return $this->ReflectorName; }
public function GetAddress() { return $this->ReflectorAddress; }
public function GetModules() { return $this->Modules; }
public function AddModule($Module) {
$Module = trim($Module);
if (strlen($Module) != 1) return false;
if (strpos($this->Modules, $Module) === false) {
$this->Modules .= $Module;
}
return true;
}
public function RemoveModule($Module) {
$Module = trim($Module);
if (strlen($Module) != 1) return false;
if (strpos($this->Modules, $Module) !== false) {
$this->Modules = substr($this->Modules, 0, strpos($this->Modules, $Module)-1).substr($this->Modules, strpos($this->Modules, $Module)+1, strlen($this->Modules));
}
return true;
}
public function HasModuleEnabled($Module) {
if (strlen($Module) != 1) return false;
return (strpos($this->Modules, $Module) !== false);
}
}