|
|
@ -6,13 +6,13 @@
|
|
|
|
$themes = array(
|
|
|
|
$themes = array(
|
|
|
|
"0" => "Engelsystem light",
|
|
|
|
"0" => "Engelsystem light",
|
|
|
|
"1" => "Engelsystem dark",
|
|
|
|
"1" => "Engelsystem dark",
|
|
|
|
"2" => "Engelsystem 31c3"
|
|
|
|
"2" => "Engelsystem 31c3"
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Render glyphicon
|
|
|
|
* Render glyphicon
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string $glyph_name
|
|
|
|
* @param string $glyph_name
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function glyph($glyph_name) {
|
|
|
|
function glyph($glyph_name) {
|
|
|
|
return ' <span class="glyphicon glyphicon-' . $glyph_name . '"></span> ';
|
|
|
|
return ' <span class="glyphicon glyphicon-' . $glyph_name . '"></span> ';
|
|
|
@ -21,7 +21,7 @@ function glyph($glyph_name) {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Renders a tick or a cross by given boolean
|
|
|
|
* Renders a tick or a cross by given boolean
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param boolean $boolean
|
|
|
|
* @param boolean $boolean
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function glyph_bool($boolean) {
|
|
|
|
function glyph_bool($boolean) {
|
|
|
|
return '<span class="text-' . ($boolean ? 'success' : 'danger') . '">' . glyph($boolean ? 'ok' : 'remove') . '</span>';
|
|
|
|
return '<span class="text-' . ($boolean ? 'success' : 'danger') . '">' . glyph($boolean ? 'ok' : 'remove') . '</span>';
|
|
|
@ -39,7 +39,7 @@ function heading($content, $number = 1) {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Render a toolbar.
|
|
|
|
* Render a toolbar.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param array $items
|
|
|
|
* @param array $items
|
|
|
|
* @return string
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function toolbar($items = array(), $right = false) {
|
|
|
|
function toolbar($items = array(), $right = false) {
|
|
|
@ -49,10 +49,10 @@ function toolbar($items = array(), $right = false) {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Render a link for a toolbar.
|
|
|
|
* Render a link for a toolbar.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string $href
|
|
|
|
* @param string $href
|
|
|
|
* @param string $glyphicon
|
|
|
|
* @param string $glyphicon
|
|
|
|
* @param string $label
|
|
|
|
* @param string $label
|
|
|
|
* @param bool $selected
|
|
|
|
* @param bool $selected
|
|
|
|
* @return string
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function toolbar_item_link($href, $glyphicon, $label, $selected = false) {
|
|
|
|
function toolbar_item_link($href, $glyphicon, $label, $selected = false) {
|
|
|
@ -125,9 +125,9 @@ function form_checkboxes($name, $label, $items, $selected) {
|
|
|
|
$html = form_element($label, '');
|
|
|
|
$html = form_element($label, '');
|
|
|
|
foreach ($items as $key => $item)
|
|
|
|
foreach ($items as $key => $item)
|
|
|
|
$html .= form_checkbox($name . '_' . $key, $item, array_search($key, $selected) !== false);
|
|
|
|
$html .= form_checkbox($name . '_' . $key, $item, array_search($key, $selected) !== false);
|
|
|
|
|
|
|
|
|
|
|
|
return $html;
|
|
|
|
return $html;
|
|
|
|
|
|
|
|
|
|
|
|
$html = "<ul>";
|
|
|
|
$html = "<ul>";
|
|
|
|
foreach ($items as $key => $item) {
|
|
|
|
foreach ($items as $key => $item) {
|
|
|
|
$id = $name . '_' . $key;
|
|
|
|
$id = $name . '_' . $key;
|
|
|
@ -283,17 +283,17 @@ function table($columns, $rows_raw, $data = true) {
|
|
|
|
// If only one column is given
|
|
|
|
// If only one column is given
|
|
|
|
if (! is_array($columns)) {
|
|
|
|
if (! is_array($columns)) {
|
|
|
|
$columns = array(
|
|
|
|
$columns = array(
|
|
|
|
'col' => $columns
|
|
|
|
'col' => $columns
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
$rows = array();
|
|
|
|
$rows = array();
|
|
|
|
foreach ($rows_raw as $row)
|
|
|
|
foreach ($rows_raw as $row)
|
|
|
|
$rows[] = array(
|
|
|
|
$rows[] = array(
|
|
|
|
'col' => $row
|
|
|
|
'col' => $row
|
|
|
|
);
|
|
|
|
);
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
$rows = $rows_raw;
|
|
|
|
$rows = $rows_raw;
|
|
|
|
|
|
|
|
|
|
|
|
if (count($rows) == 0)
|
|
|
|
if (count($rows) == 0)
|
|
|
|
return info(_("No data found."), true);
|
|
|
|
return info(_("No data found."), true);
|
|
|
|
$html = "";
|
|
|
|
$html = "";
|
|
|
@ -381,7 +381,7 @@ function html_options($name, $options, $selected = "") {
|
|
|
|
$html = "";
|
|
|
|
$html = "";
|
|
|
|
foreach ($options as $value => $label)
|
|
|
|
foreach ($options as $value => $label)
|
|
|
|
$html .= '<input type="radio"' . ($value == $selected ? ' checked="checked"' : '') . ' name="' . $name . '" value="' . $value . '"> ' . $label;
|
|
|
|
$html .= '<input type="radio"' . ($value == $selected ? ' checked="checked"' : '') . ' name="' . $name . '" value="' . $value . '"> ' . $label;
|
|
|
|
|
|
|
|
|
|
|
|
return $html;
|
|
|
|
return $html;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -419,7 +419,7 @@ function ReplaceSmilies($neueckig) {
|
|
|
|
$neueckig = str_replace(";P", "<img src=\"pic/smiles/icon_mad.gif\">", $neueckig);
|
|
|
|
$neueckig = str_replace(";P", "<img src=\"pic/smiles/icon_mad.gif\">", $neueckig);
|
|
|
|
$neueckig = str_replace(";oP", "<img src=\"pic/smiles/icon_mad.gif\">", $neueckig);
|
|
|
|
$neueckig = str_replace(";oP", "<img src=\"pic/smiles/icon_mad.gif\">", $neueckig);
|
|
|
|
$neueckig = str_replace("?)", "<img src=\"pic/smiles/icon_question.gif\">", $neueckig);
|
|
|
|
$neueckig = str_replace("?)", "<img src=\"pic/smiles/icon_question.gif\">", $neueckig);
|
|
|
|
|
|
|
|
|
|
|
|
return $neueckig;
|
|
|
|
return $neueckig;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
?>
|
|
|
|