details_view.php 1.77 KB
<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>