');
print_r($Value);
echo('');
}
// Funkce formatovani vystupu
function FormatOutput($Text)
{
$Indentation = 2;
$Output = '';
$Indent = 0;
$IndentNew = 0;
while($Text != '')
{
$Start = strpos($Text, '<');
$End = strpos($Text, '>');
if($Start != 0)
{
$End = $Start - 1;
$Start = 0;
}
$Line = trim(substr($Text, $Start, $End + 1));
if(strlen($Line) > 0)
if($Line[0] == '<')
{
if($Text[$Start + 1] == '/')
{
$IndentNew = $IndentNew - $Indentation;
$Indent = $IndentNew;
} else
{
if(strpos($Line, ' ')) $Command = substr($Line, 1, strpos($Line, ' ') - 1);
else $Command = substr($Line, 1, strlen($Line) - $Indentation);
if(strpos($Text, ''.$Command.'>')) $IndentNew = $IndentNew + $Indentation;
}
}
if($Line != '') $Output .= (str_repeat(' ', $Indent).$Line."\n");
$Text = substr($Text, $End + 1, strlen($Text));
$Indent = $IndentNew;
}
return($Output);
}
function NotBlank($Text)
{
if($Text == '') return(' ');
else return($Text);
}
function MakeLink($Title, $Target)
{
return(''.$Title.'');
}
function Table($Table, $Class, $Id = '')
{
if($Id != '') $Id = ' id="'.$Id.'"';
$Result = '
';
if(array_key_exists('Header', $Table))
{
$Result .= '';
foreach($Table['Header'] as $Item)
$Result .= ''.$Item.' | ';
$Result .= '
';
}
foreach($Table['Rows'] as $Row)
{
$Result .= '';
foreach($Row as $Index => $Item)
{
if($Index == 0) $Class = ' class="Header"'; else $Class = '';
$Result .= ''.$Item.' | ';
}
$Result .= '
';
}
$Result .= '
';
return($Result);
}
// Zobrazení číselný seznamu stránek
function PageList($QueryStringVar, $Page, $TotalCount, $CountPerPage, $Around = 10)
{
$QueryStringArray = $this->System->HTTP->GetQueryStringArray();
$Count = ceil($TotalCount / $CountPerPage);
$Result = '';
if($Count > 1)
{
if($Page > 0)
{
$QueryStringArray[$QueryStringVar] = 0;
$Result .= '<< ';
$QueryStringArray[$QueryStringVar] = $Page - 1;
$Result .= '< ';
}
$PagesMax = $Count - 1;
$PagesMin = 0;
if($PagesMax > ($Page + $Around)) $PagesMax = $Page + $Around;
if($PagesMin < ($Page - $Around))
{
$Result .= ' .. ';
$PagesMin = $Page - $Around;
}
for($i = $PagesMin; $i <= $PagesMax; $i++)
{
if($i == $Page) $Result .= '';
$QueryStringArray[$QueryStringVar] = $i;
$Result .= ''.($i + 1).' ';
if($i == $Page) $Result .= '';
}
if($PagesMax < ($Count - 1)) $Result .= ' .. ';
if($Page < ($Count - 1))
{
$QueryStringArray[$QueryStringVar] = $Page + 1;
$Result .= '> ';
$QueryStringArray[$QueryStringVar] = $Count - 1;
$Result .= '>>';
}
}
return($Result);
}
function SectionReload($Id, $SectionURL, $RefreshPeriod = 5000)
{
return('');
}
}