Files
rockowa.com/admin/templates/paging.php
2023-05-08 09:03:09 +02:00

85 lines
2.3 KiB
PHP

<? global $lang; ?>
<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='index.php?bs='+bs;
}
}
function changeNumerRows()
{
var num = $("#rows").val();
num = parseInt(num);
if ( isNaN(num) )
num = 1;
document.location.href='index.php?r='+num;
}
</script>
<table id='pagin'>
<tr>
<td style='width: 225px; text-align:left; padding: 10px 5px;'>
<?=$lang -> getTrans( 'T_REKORDY' );?>: <?=$this ->_start;?> - <?=$this -> _end;?> <?=$lang -> getTrans( 'T_Z' );?> <?=$this -> _total;?>
</td>
<td>
<?=$lang -> getTrans( 'T_LICZBA_REKORDOW' );?>:
</td>
<td>
<select name='rows' onChange='changeNumerRows();' id='rows'>
<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>
</td>
<?
if ( $this -> _bs > 1 )
{
?>
<td><a href='<?=$this -> _link;?>?bs=1' class='arrow left_act_max'></a></td>
<td><a href='<?=$this -> _link;?>?bs=<?=($this -> _bs - 1);?>' class='arrow left_act'></a></td>
<?
}
else
{
?>
<td><a class='arrow left_ina_max'></a></td>
<td><a class='arrow left_ina'></a></td>
<?
}
?>
<td>
<input type='text' class="noform" value='<?=$this -> _bs;?>' style='width:20px; padding:3px; text-align:center;' id='page_bs' onKeyPress='changePage(event)'>
</td>
<?
if ( $this -> _bs < $this -> _ls )
{
?>
<td><a href='<?=$this -> _link;?>?bs=<?=($this -> _bs + 1);?>' class='arrow right_act'></a></td>
<td><a href='<?=$this -> _link;?>?bs=<?=$this -> _ls;?>' class='arrow right_act_max'></a></td>
<?
}
else
{
?>
<td><a class='arrow right_ina'></a></td>
<td><a class='arrow right_ina_max'></a></td>
<?
}
?>
</table>