first commit

This commit is contained in:
2025-04-30 23:59:49 +02:00
commit 652863d54f
117 changed files with 12276 additions and 0 deletions

37
templates/html/button.php Normal file
View File

@@ -0,0 +1,37 @@
<?
if ( $this -> params['type'] == 'submit' )
$out .= '<button ';
else
$out = '<a ';
$out .= 'class="btn ' . $this -> params['class'] . '" ';
if ( $this -> params['style'] )
$out .= 'style="' . $this -> params['style'] . '" ';
if ( $this -> params['js'] )
$out .= 'onclick="' . htmlspecialchars( $this -> params['js'] ) . '" ';
if ( $this -> params['url'] )
$out .= 'href="' . htmlspecialchars( $this -> params['url'] ) . '" ';
if ( $this -> params['id'] )
$out .= 'id="' . $this -> params['id'] . '" ';
if ( $this -> params['title'] )
$out .= 'title="' . htmlspecialchars( $this -> params['title'] ) . '" ';
if ( $this -> params['type'] == 'submit' )
$out .= 'type="submit" ';
$out .= '>';
if ( $this -> params['icon'] )
$out .= '<i class="fa ' . $this -> params['icon'] . ' mr5"></i>';
$out .= $this -> params['text'];
if ( $this -> params['type'] == 'submit' )
$out .= '</button';
else
$out .= '</a>';
echo $out;

View File

@@ -0,0 +1,8 @@
<div class="form-group">
<label class="col-lg-4 control-label"><?= $this -> params['label'];?>:</label>
<div class="col-lg-8">
<p class="form-control-static" id="<?= $this -> params['id'];?>">
<?= $this -> params['text'];?>
</p>
</div>
</div>

View File

@@ -0,0 +1,71 @@
<?
if ( $this -> params['label'] )
{
$out .= '<div class="form-group row">';
$out .= '<label class="';
if ( !$this -> params['inline'] )
$out .= 'col-md-12 text-left ';
else
$out .= 'col-md-3 ';
$out .= 'col-form-label">' . $this -> params['label'] . ':</label>';
$out .= '<div class="';
if ( !$this -> params['inline'] )
$out .= 'col-md-12';
else
$out .= 'col-md-9';
$out .= '">';
}
$out .= '<div class="input-group">';
$out .= '<input ';
$out .= 'type="' . $this -> params['type'] . '" ';
if ( $this -> params['id'] )
$out .= 'id="' . $this -> params['id'] . '" ';
else
$out .= 'id="' . $this -> params['name'] . '" ';
if ( $this -> params['class'] or $this -> params['label'] )
{
if ( $this -> params['label'] )
$out .= 'class="' . $this -> params['class'] . ' form-control" ';
else if ( $this -> params['class'] )
$out .= 'class="' . $this -> params['class'] . '" ';
}
$out .= 'name="' . $this -> params['name'] . '" ';
$out .= 'value="' . $this -> secureHTML( $this -> params['value'] ) . '" ';
if ( $this -> params['style'] )
$out .= 'style="' . $this -> params['style'] . '" ';
if ( $this -> params['readonly'] )
$out .= 'readonly="readonly" ';
if ( $this -> params['required'] )
$out .= 'required ';
if ( $this -> params['autocomplete'] == 'off' )
$out .= 'autocomplete="off" ';
$out .= ' />';
$out .= '<span class="input-group-addon ';
if ( $this -> params['icon_js'] )
$out .= 'pointer ';
$out .= '"';
if ( $this -> params['icon_js'] )
$out .= 'onclick="' . htmlspecialchars( $this -> params['icon_js'] ) . '" ';
$out .= '>';
$out .= $this -> params['icon_content'];
$out .= '</span>';
$out .= '</div>';
if ( $this -> params['label'] )
{
$out .= '</div>';
$out .= '</div>';
}
echo $out;

View File

@@ -0,0 +1,36 @@
<?
if ( $this -> params['label'] )
{
$out .= '<div class="form-group row">';
$out .= '<label class="col-md-3 col-form-label">' . $this -> params['label'] . ':</label>';
$out .= '<div class="col-md-9">';
}
$out .= '<div class="switch switch-primary round switch-inline">';
$out .= '<input ';
if ( $this -> params['id'] )
$out .= 'id="' . $this -> params['id'] . '" ';
else
$out .= 'id="' . $this -> params['name'] . '" ';
$out .= 'name="' . $this -> params['name'] . '" type="checkbox"';
if ( $this -> params['checked'] )
$out .= 'checked="checked" ';
$out .= '>';
$out .= '<label for="';
if ( $this -> params['id'] )
$out .= $this -> params['id'];
else
$out .= $this -> params['name'];
$out .= '"></label>';
$out .= '</div>';
if ( $this -> params['label'] )
{
$out .= '</div>';
$out .= '</div>';
}
echo $out;

59
templates/html/input.php Normal file
View File

@@ -0,0 +1,59 @@
<?
if ( $this -> params['label'] )
{
$out .= '<div class="form-group row">';
$out .= '<label class="';
if ( !$this -> params['inline'] )
$out .= 'col-md-12 text-left ';
else
$out .= 'col-md-3 ';
$out .= 'col-form-label">' . $this -> params['label'] . ':</label>';
$out .= '<div class="';
if ( !$this -> params['inline'] )
$out .= 'col-md-12';
else
$out .= 'col-md-9';
$out .= '">';
}
$out .= '<input ';
$out .= 'type="' . $this -> params['type'] . '" ';
if ( $this -> params['id'] )
$out .= 'id="' . $this -> params['id'] . '" ';
if ( $this -> params['class'] or $this -> params['label'] )
{
if ( $this -> params['label'] )
$out .= 'class="' . $this -> params['class'] . ' form-control" ';
else if ( $this -> params['class'] )
$out .= 'class="' . $this -> params['class'] . '" ';
}
$out .= 'name="' . $this -> params['name'] . '" ';
$out .= 'value="' . $this -> secureHTML( $this -> params['value'] ) . '" ';
if ( $this -> params['style'] )
$out .= 'style="' . $this -> params['style'] . '" ';
if ( $this -> params['readonly'] )
$out .= 'readonly="readonly" ';
if ( $this -> params['required'] )
$out .= 'required ';
if ( $this -> params['autocomplete'] == 'off' )
$out .= 'autocomplete="off" ';
if ( $this -> params['placeholder'] )
$out .= 'placeholder="' . $this -> params['placeholder'] . '" ';
$out .= ' />';
if ( $this -> params['label'] )
{
$out .= '</div>';
$out .= '</div>';
}
echo $out;

8
templates/html/panel.php Normal file
View File

@@ -0,0 +1,8 @@
<div class="panel <?= $this -> params['class'];?>">
<div class="panel-heading">
<span class="panel-title"><?= $this -> params['title'];?></span>
</div>
<div class="panel-body">
<?= $this -> params['content'];?>
</div>
</div>

56
templates/html/select.php Normal file
View File

@@ -0,0 +1,56 @@
<?
if ( $this -> params['label'] )
{
$out .= '<div class="form-group row';
if ( $this -> params['inline'] )
$out .= 'pl10 pr10';
$out .= '">';
$out .= '<label class="';
if ( !$this -> params['inline'] )
$out .= 'col-md-3 ';
if ( $this -> params['inline'] )
$out .= 'mb5 ';
$out .= 'col-form-label">' . $this -> params['label'] . ':</label>';
$out .= '<div class="';
if ( !$this -> params['inline'] )
$out .= 'col-md-9';
$out .= '">';
}
$out .= '<select ';
if ( $this -> params['id'] )
$out .= 'id="' . $this -> params['id'] . '" ';
if ( $this -> params['class'] or $this -> params['label'] )
{
if ( $this -> params['label'] )
$out .= 'class="' . $this -> params['class'] . ' form-control" ';
else if ( $this -> params['class'] )
$out .= 'class="' . $this -> params['class'] . '" ';
}
$out .= 'name="' . $this -> params['name'] . '" ';
if ( $this -> params['style'] )
$out .= 'style="' . $this -> params['style'] . '" ';
$out .= '>';
if ( $this -> params['empty'] )
$out .= '<option value="">--- ' . mb_strtolower( $this -> params['label'], 'UTF-8' ) . ' ---</option>';
if ( is_array( $this -> params['values'] ) ) foreach ( $this -> params['values'] as $key => $val )
{
$out .= '<option value="' . $key . '"'; if ( $key == $this -> params['value'] ) $out .= 'selected="selected"'; $out .='>' . $val . '</option>';
}
$out .= '</select>';
if ( $this -> params['label'] )
{
$out .= '</div>';
$out .= '</div>';
}
echo $out;

View File

@@ -0,0 +1,49 @@
<?
if ( $this -> params['label'] )
{
$out .= '<div class="form-group row';
if ( $this -> params['inline'] )
$out .= 'pl10 pr10';
$out .= '">';
$out .= '<label class="';
if ( !$this -> params['inline'] )
$out .= 'col-md-3 ';
if ( $this -> params['inline'] )
$out .= 'mb5 ';
$out .= 'col-form-label">' . $this -> params['label'] . ':</label>';
$out .= '<div class="';
if ( !$this -> params['inline'] )
$out .= 'col-md-9';
$out .= '">';
}
$out .= '<textarea ';
if ( $this -> params['id'] )
$out .= 'id="' . $this -> params['id'] . '" ';
if ( $this -> params['class'] or $this -> params['label'] )
{
if ( $this -> params['label'] )
$out .= 'class="' . $this -> params['class'] . ' form-control" ';
else if ( $this -> params['class'] )
$out .= 'class="' . $this -> params['class'] . '" ';
}
$out .= 'name="' . $this -> params['name'] . '" ';
if ( $this -> params['style'] )
$out .= 'style="' . $this -> params['style'] . '" ';
if ( $this -> params['placeholder'] )
$out .= 'placeholder="' . $this -> params['placeholder'] . '" ';
$out .= ' rows="' . $this -> params['rows'] . '">' . $this -> secureHTML( $this -> params['value'] ) . '</textarea>';
if ( $this -> params['label'] )
{
$out .= '</div>';
$out .= '</div>';
}
echo $out;