<style>
    #span1 { background-color: #bbb;  height:100%; }
    #span1 a{color:#3A3A3A}
    #span2 { background-color: #EEE; }
    td { border: 1px solid black; width: 50px; text-align: center; margin:0; padding:0; height:100%; }
    .t { background: #cecece}
    .r { border-right: 1px solid black; height: 100%; }
    tr:nth-child(odd)    { background-color:#DDD}
    

</style>
<div id="middleContent">
    <?php
    if ($no_results == FALSE) {
        ?>
        <div class="block">
            <div class="title"> <?= lang('resultss');?></div>
            <div class="toggle_container">
                <div class="content">
                    <table class="dataGrid" cellspacing="0" cellpadding="0" border="0" >

                        <tr> 
                            <th><?= lang('SN') ?></th>
                            <th><?= lang('PIC') ?></th>
                            <th><?= lang('nc_make') ?></th>
                            <th><?= lang('nc_model') ?></th>
                            <th><?= lang('nc_year') ?></th>
                            <th><?= lang('nc_price') ?></th>

                        </tr> 


                        <?php
                        $i = 0;
                        foreach ($result1 as $row) {
                            $i++;
                            ?>
                            <tr <?php if ($i % 2 == 0) echo "class='alt'" ?> class="tableRow">
                                <td class="align-center"><?php echo $i; ?></td>
                                <td width="30%"> 
                                    <?php if ($row['nc_img'] != null) { ?>
                                        <?php if (file_exists(PUBPATH . "global/uploads/" . $row['nc_img'])) { ?>
                                            <a href="<?= base_url() ?>newcars/show/<?php echo $row['nc_id']; ?>" width="100" height="75">
                                                <img src="<?= base_url() ?>global/uploads/<?php echo $row['nc_img']; ?>" alt="<?php echo $row['nc_make'] ?> " width="50" height="50">
                                            </a>
                                        <?php } else { ?>
                                            <a href="<?= base_url(); ?>global/site/images/no-img.png" width="50" height="50">
                                                <img src="<?= base_url(); ?>global/site/images/no-img.png" alt="<?php echo $row['nc_make'] ?> " width="50" height="50">
                                            </a>
                                            <img src="<?= base_url(); ?>global/site/images/no-img.png" width="50" height="50" class="directionTop" /></a>
                                            <?php
                                        }
                                    }
                                    ?>
                                </td>
                                <td width="15%"><?= $row['nc_make'] ?></td>
                                <td><?= $row['nc_model'] ?></td>
                                <td><?= $row['nc_year'] ?></td>
                                <td>
                                    <div id="span2"> <?= $row['nc_price'] ?></div> 
                                    <div id="span1" class="t"> 
                                        <a href="<?= base_url() ?>newcars/show/<?php echo $row['nc_id']; ?>" >
                                        <?= lang('more') ?></a>
                                    </div> 
                                </td>





                            </tr>
                        <?php } ?>


                        </tr>
                    </table>
                <?php } else {
                    ?>

                    <div class="block">
                        <div class="title">نتائج البحث</div>
                        <div class="content">
                            <?php
                            echo "<p class='notice information'>عفوا لا يوجد نتائج لكلمة البحث التى قمت بإختيارها ، حاول البحث بكلمة أخرى</p>";
                        }
                        ?></div></div>
                <!-- Data Grid Block End -->
                <!-- Main Block End -->

            </div></div></div>
    <!-- Ads Area Start -->
    <!-- Ads Area End -->
