Visible = true;
$this->Enabled = true;
}
function Show(): string
{
$Output = '';
//$Output .= '#'.$this->Id;
return $Output;
}
function Prepare(): void
{
}
}
class Layout extends Element
{
public array $Items;
function Show(): string
{
if ($this->Visible)
{
$Output = parent::Show();
foreach ($this->Items as $Item)
$Output .= $Item->Show();
return $Output;
}
}
function Prepare(): void
{
foreach ($this->Items as $Item)
$Item->Prepare();
}
}
class Button extends Element
{
public string $Caption;
function Show(): string
{
if ($this->Visible)
{
return parent::Show().'';
}
}
}
class Edit extends Element
{
public string $Text;
function Show(): string
{
return parent::Show().'';
}
function Prepare(): void
{
$this->Text = ReadSessionVar($this->Id.'_Text');
}
}
class PageSelect extends Element
{
public int $Count;
public int $Position;
public int $PageSize;
function __construct()
{
parent::__construct();
$this->PageSize = 10;
$this->Position = 0;
$this->Count = 0;
}
function Show(): string
{
if (array_key_exists($this->Id.'_Page', $_GET))
$this->Position = $_GET[$this->Id.'_Page'];
if ($this->Position >= $this->Count) $this->Position = $this->Count / $this->PageSize - 1;
$Output = '';
for ($I = 0; $I < $this->Count / $this->PageSize; $I++)
{
$Text = ''.$I.' ';
if ($I == $this->Position) $Text = ''.$Text.'';
$Output .= $Text;
}
$Output .= '
';
return $Output;
}
function Prepare(): void
{
$this->Position = ReadSessionVar($this->Id.'_Page');
}
}
class ListViewColumn extends Element
{
public string $Name;
function Show(): string
{
return $this->Name;
}
}
class ListView extends Element
{
public array $Columns;
public array $Rows;
public $OnColumnClick;
public $OnColumnDraw;
function __construct()
{
parent::__construct();
$this->Rows = array();
$this->Columns = array();
}
function Show(): string
{
$Output = '
'.$Value->Show().' | '; } $Output .= '