details_view.php
1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<table class="details-list" width="100%" id="isset_cars">
<thead>
<tr>
<th class="header1 headerSortDown">Марка</th>
<th class="header1">Модель</th>
<th class="header1">Модификация</th>
<th class="header1">Год выпуска</th>
<th class="header1">Объем двигателя, литров</th>
<th class="header1">kW</th>
<th class="header1">Л.силы</th>
<th class="header1">Код двигателя</th>
</tr>
</thead>
<tbody>
<?php $i=0; ?>
<?php foreach($data as $name=>$item):?>
<?php $i++;?>
<tr>
<td class="<?=($i%2)?'cell':''?>"><?=$item['MFA_BRAND']?></td>
<td class="<?=($i%2)?'cell':''?>"><?=$item['MOD_CDS_TEXT']?></td>
<td class="<?=($i%2)?'cell':''?>"><?=$item['TYP_CDS_TEXT']?></td>
<td class="<?=($i%2)?'cell':''?>">
<?=substr($item['TYP_PCON_START'],0,4)?>.<?=substr($item['TYP_PCON_START'],4,6)?>
<?php if ($item['TYP_PCON_END']):?>-<?=substr($item['TYP_PCON_END'],0,4)?>.<?=substr($item['TYP_PCON_END'],4,6)?><?php endif; ?>
</td>
<td class="<?=($i%2)?'cell':''?>"><?=$item['TYP_CCM']?></td>
<td class="<?=($i%2)?'cell':''?>"><?=$item['TYP_KW_FROM']?><?=($item['TYP_KW_UPTO'])?'-'.$item['TYP_KW_UPTO']:''?></td>
<td class="<?=($i%2)?'cell':''?>"><?=$item['TYP_HP_FROM']?><?=($item['TYP_HP_UPTO'])?'-'.$item['TYP_HP_UPTO']:''?></td>
<td class="<?=($i%2)?'cell':''?>"><?=$item['ENG_CODE']?>, <?=$item['TYP_ENGINE_DES_TEXT']?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<script type="text/javascript">
$(document).ready(function(){
$(".details-list").tablesorter();
});
</script>