first commit

This commit is contained in:
2023-09-04 21:59:34 +02:00
commit 650ef5b3e1
196 changed files with 24080 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
<div class="browse">
<div class="filtr-container">
<form method='POST' id='db_filtr_yes' action='./'>
<input type='hidden' name='set_db_filtr' value='yes'>
<?
if ( is_array ( $this -> _filtr_combo ) ) foreach ( $this -> _filtr_combo as $combo )
{
?>
<div class="group">
<label><?=ucfirst( $combo['name'] );?>:</label>
<div class="content">
<select name="<?= $combo['seo_name'];?>">
<option value=''>&nbsp;</option>
<?
if ( is_array ( $combo['value'] ) ) foreach ( $combo['value'] as $key => $val )
{
?>
<option value='<?=$key;?>'
<?
if ( isset( $combo['val'] ) && $key == $combo['val'] )
{
?>selected='selected'<?
}
?>
><?=$val;?></option>
<?
}
?>
</select>
</div>
</div>
<?
}
if ( is_array( $this -> _filtr_text ) ) foreach ( $this -> _filtr_text as $text )
{
?>
<div class="group">
<label><?=ucfirst( $text['name'] );?>:</label>
<div class="content">
<input type='text' name="<?=$text['seo_name'];?>" value="<? if ( isset( $text['value'] ) ) echo $text['value'];?>">
</div>
</div>
<?
}
if ( is_array( $this -> _filtr_ttext ) ) foreach ( $this -> _filtr_ttext as $text )
{
?>
<div class="group">
<label><?=ucfirst( $text['name'] );?>:</label>
<div class="content">
<input type='text' name="<?=$text['seo_name'];?>" value="<? if ( isset( $text['value'] ) ) echo $text['value'];?>">
<?
if ( is_array( $text['select'] ) ) foreach ( $text['select'] as $key => $val )
{
?><input type='hidden' name="<?=$text['seo_name'];?>_trans[]" value="<?=htmlspecialchars( $key );?>[]<?=htmlspecialchars( $val );?>"><?
}
?>
</div>
</div>
<?
}
?>
<div class="filtr-buttons">
<a class="button button_add" onClick='$("#db_filtr_yes").submit();'>Zastosuj</a>
<a class='button button_cancel' onClick='$("#fdb_filtr_no").submit();'>Anuluj</a>
</div>
</form>
<form method='POST' id='fdb_filtr_no'>
<input type='hidden' name='set_db_filtr' value='no'>
</form>
</div>
</div>

View File

@@ -0,0 +1,79 @@
<script type='text/javascript'>
function changePage(e)
{
var charCode;
if(e && e.which)
{
charCode = e.which;
}
else if(window.event)
{
e = window.event;
charCode = e.keyCode;
}
if(charCode == 13)
{
var bs = $("#page_bs").val();
bs = parseInt(bs);
if ( isNaN(bs) )
bs = 1;
document.location.href='<?=$this -> _link;?>?bs='+bs;
}
}
function changeNumerRows()
{
var num = $("#rows").val();
num = parseInt(num);
if ( isNaN(num) )
num = 1;
document.location.href='./?r='+num;
}
</script>
<div id='pagin'>
<div id="info">
Rekordy: <?=$this -> _start;?> - <?=$this -> _end;?> z <?=$this -> _total;?>
</div>
<div id="pagings">
Liczba rekordów:
<select name='rows' onChange='changeNumerRows();' id='rows' class="select">
<option value='5' <? if ( $this -> _limit == 5 ) echo "selected='selected'";?>>5</option>
<option value='10' <? if ( $this -> _limit == 10 ) echo "selected='selected'";?>>10</option>
<option value='25' <? if ( $this -> _limit == 25 ) echo "selected='selected'";?>>25</option>
<option value='50' <? if ( $this -> _limit == 50 ) echo "selected='selected'";?>>50</option>
<option value='100' <? if ( $this -> _limit == 100 ) echo "selected='selected'";?>>100</option>
</select>
<?
if ( $this -> _bs > 1 )
{
?>
<a href='<?= $this -> _link;?>?bs=1' title="pierwsza" class='arrow'><i class="icon-left-max"></i></a>
<a href='<?= $this -> _link;?>?bs=<?= ( $this -> _bs - 1 );?>' title="poprzednia" class='arrow'><i class="icon-left"></i></a>
<?
}
else
{
?>
<a class='arrow inactive'><i class="icon-left-max"></i></a>
<a class='arrow inactive'><i class="icon-left"></i></a>
<?
}
?>
<input type='text' value='<?= $this -> _bs;?>' class="input-text center" id='page_bs' onKeyPress='changePage(event)'>
<?
if ( $this -> _bs < $this -> _ls )
{
?>
<a href='<?= $this -> _link;?>?bs=<?= ( $this -> _bs + 1 );?>' title="następna" class='arrow'><i class="icon-right"></i></a>
<a href='<?= $this -> _link;?>?bs=<?= $this -> _ls;?>' title="ostatnia" class='arrow'><i class="icon-right-max"></i></a>
<?
}
else
{
?>
<a class='arrow inactive'><i class="icon-right"></i></a>
<a class='arrow inactive'><i class="icon-right-max"></i></a>
<?
}
?>
</div>
</div>

View File

@@ -0,0 +1,134 @@
<?
if ( isset( $this -> _filtr ) )
include 'templates/data/data-browse-filtr.php';
?>
<?= $this -> _menu;?>
<div class="browse">
<form method="POST" action="./" id="sort_from">
<input type="hidden" name="s" id="s" value="" />
</form>
<table class='table_browse' style='min-width:500px;'>
<thead>
<tr>
<?
if ( is_array( $this -> _table_headers ) ) foreach ( $this -> _table_headers as $key => $val )
{
if ( $i++ == 1 && $this -> _checkbox )
echo '<th class="title" style="width: 20px;"></th>';
?>
<th class='title <? if ( $val['value'] == 'Lp.' ):?>center<? endif;?>' <? if ( !$val['value'] || $val['value'] == 'Raport' || $val['value'] == 'Lp.' || $val['value'] == 'Edytuj' || $val['value'] == 'Usuń' || $val['value'] == 'Pokaż' ) echo "style='width: 30px;'";?>
<?
if ( $val['sort'] )
{
?>
style='cursor: pointer;'
onClick="$( '#s' ).val( '<?=$val['sort'];?>' ); $( '#sort_from' ).submit();">
<?
echo ucfirst( $val['value'] );
}
else
{
?>><?=ucfirst( $val['value'] );?><?
}
?>
</th>
<?
}
?>
</tr>
</thead>
<?
if ( $this -> _row_count )
{
?>
<tbody>
<?
$i = 0;
foreach ( $this -> _table_values as $key => $val )
{
?>
<ul class="contextMenu" id="context_menu_<?= $i;?>">
<? if ( isset( $val[ 'edytuj' ] ) ):?>
<li id="open" class="context_menu"><?= $val[ 'edytuj' ]['value'];?></li>
<? endif;?>
<? if ( isset( $val [ 'pokaż' ] ) ):?>
<li id="show" class="context_menu"><?= $val[ 'pokaż' ]['value'];?></li>
<? endif;?>
<? if ( isset( $val[ 'usuń' ] ) ):?>
<li id="delete" class="context_menu"><?= $val[ 'usuń' ]['value'];?></li>
<? endif;?>
</ul>
<script type='text/javascript'>
$( document ).ready( function() {
$( '#tr_<?= $i;?>' ).contextMenu( { menu: "context_menu_<?= $i;?>" }, function( action ) {
if ( action != '' )
document.location.href='.' + action;
});
});
</script>
<tr id="tr_<?=$i;?>">
<?
foreach ( $val as $value )
{
?>
<td class='cell' style='<?=$this -> eprint( $value['style'] );?>' <?= $value['js'];?>>
<?
if ( $value['value'] )
echo stripslashes( $value['value'] );
else
echo '-';
?>
</td>
<?
}
?>
</tr>
<?
$i++;
}
?>
</tbody>
<?
}
else
{
?>
<tr>
<td colspan='<?=count( $this -> _table_headers );?>' style='text-align:center;'>
<div style='text-align: center; padding: 10px 0;'>Nie znaleziono żadnych wpisów.</div>
</td>
</tr>
<?
}
?>
</table>
<script type='text/javascript'>
$(document).ready(function(){
$("li").children("a").children("span.edit").parent('a').append( 'edytuj' );
$("li").children("a").children("span.delete").parent('a').append( 'usuń' );
$("li").children("a").children("span.show").parent('a').append( 'pokaż' );
var cssObj = {
'display' : 'block',
'height' : '30px',
'line-height' : '31px',
'color' : '#000000',
'font-size' : '10px',
'text-transform' : 'uppercase',
'font-family': 'Duru Sans, sans-serif'
};
$("li.context_menu").children("a").css( cssObj );
var cssObj2 = {
'float' : 'left',
'margin' : '7px 5px 0 0',
'color' : '#000000',
'font-size' : '10px',
'text-transform' : 'uppercase'
};
$("li.context_menu").children("a").children("span.edit").css( cssObj2 );
$("li.context_menu").children("a").children("span.delete").css( cssObj2 );
$("li.context_menu").children("a").children("span.show").css( cssObj2 );
});
</script>
</div>
<? include 'templates/data/data-browse-paging.php'; ?>

View File

@@ -0,0 +1,167 @@
<?= $this -> _menu;?>
<div class="browse">
<div class="edit-row">
<form method='POST' action='<?=$this -> _form_adress;?>' id='<?=$this -> _form_id;?>' enctype='multipart/form-data'>
<?
if ( is_array ( $this -> _hidden_tab ) ) foreach ( $this -> _hidden_tab as $hidden )
{
?><input type='hidden' name='<?=$hidden['name'];?>' value='<?=$this -> secureHTML( $hidden['value'] );?>'><?
}
if ( $this -> _form_key && $this -> _form_val )
{
?><input type='hidden' name='rw' value='db_edit_save'><?
}
else
{
?>
<input type='hidden' name='rw' value='db_edit_add_new'>
<input type='hidden' name='<?=base64_encode( 'time' );?>' value='<?=base64_encode( date( 'Y-m-d H:i:s' ) );?>'>
<?
}
if ( is_array ( $this -> _hidden_param_tab ) ) foreach ( $this -> _hidden_param_tab as $hidden )
{
?><input type='hidden' name='<?=$hidden['name'];?>' value='<?=$this -> secureHTML( $hidden['value'] );?>'><?
}
?>
<?
if ( is_array( $this -> _table_edit_tab ) ) foreach ( $this -> _table_edit_tab as $tab )
{
?>
<div class="group" id='div_<?=$tab['tr_id'];?>'>
<label <? if ( $tab['input_title'] ) echo 'class="tip" title="' . htmlspecialchars( $tab['input_title'] ) . '"';?> ><?=ucfirst( $tab['name'] );?>:</label>
<div class="content">
<?
if ( $tab['type'] == 'label' )
{
?>
<input type='hidden' id='<?=$tab['input_id'];?>' name='<?=$tab['input_id'];?>' value='<?=$this -> secureHTML( $tab['input_value'] );?>' <?=$tab['input_action'];?>><?=$tab['input_value'];?>
<?
}
if ( $tab['type'] == 'text' )
{
?>
<input type='text' id='<?=$tab['input_id'];?>' value='<?=$this -> secureHTML( $tab['input_value'] );?>' <?=$tab['input_action'];?> name='<?=$tab['input_id'];?>'>
<?
}
if ( $tab['type'] == 'textarea' )
{
?>
<textarea name='<?=$tab['input_id'];?>' id='<?=$tab['input_id'];?>' cols='70' rows='5'><?=stripslashes($tab['input_value']);?></textarea>
<?
}
if ( $tab['type'] == 'radio' )
{
foreach ( $tab['input_value'] as $key => $val )
{
?>
<input type='radio' name='<?=$tab['input_name'];?>' id="<?=$tab['input_nam'] . '_' . $val;?>" value='<?=$key;?>'
<?
if ( $tab['var'] == $key )
echo 'checked';
?>
><?=$val;?>
<?
}
}
if ( $tab['type'] == 'file' )
{
?>
<input type='file' id='<?=$tab['input_id'];?>' name='<?=$tab['input_id'];?>'>
<?
if ( $tab['input_value'] )
{
?>
<script>
$(document).ready(function(){
$('#imageshow').tooltip({
showURL: false,
opacity: 1,
bodyHandler: function() {
return $('<img/>').attr('src','../<?=$tab['input_value'];?>');
}
});
});
</script>
<div style='display:inline; margin-left:40px; margin-top:3px;' id='imageshow'>zdjęcie</div>
<?
}
}
if ( $tab['type'] == 'combo' )
{
?>
<select name='<?=$tab['input_name'];?>' <?=$tab['input_action'];?> id='<?=$tab['input_id'];?>'>
<?
foreach ( $tab['input_value'] as $key => $val )
{
?>
<option value='<?=$key;?>'
<?
if ( isset( $tab['var'] ) && $tab['var'] == $key )
{
?>selected<?
}
?>><?=$val;?>
</option><?
}
?>
</select>
<?
}
?>
</div>
<div class="clearfix"></div>
</div>
<?
}
if ( isset( $this -> _password ) )
{
?>
<div class="group">
<label>Hasło:</label>
<div class="input">
<input type='password' name='<?=$this -> _pass_name1;?>' id='<?=$this -> _pass_name1;?>' <?=$this -> _pass_action;?>>
</div>
</div>
<div class="group">
<label>Hasło - powtórz:</label>
<div class="input">
<input type='password' name='<?=$this -> _pass_name2;?>' id='<?=$this -> _pass_name2;?>' <?=$this -> _pass_action2;?>>
</div>
</div>
<?
}
?>
<?
if ( isset( $this -> _file_upload ) )
{
if ( is_array( $this -> _upload_tab ) ) foreach ( $this -> _upload_tab as $uplaod )
{
?><input type='hidden' name='<?=$uplaod['name'];?>' value='<?=$uplaod['value'];?>'><?
}
}
if ( isset( $this -> _cancel_button ) )
{
?>
<a href='<?=$this -> _cancel_adress;?>
<?
if ( $this -> _cancel_key && $this -> _cancel_val )
{
?>?<?=$this -> _cancel_key;?>=<?=$this -> _cancel_val;?><?
}
?>
' class='button'><?=$this -> _cancel_name;?></a>
<?
}
?>
</form>
</div>
</div>