Exemple #1
0
                </tr>
            </thead>
            <?php 
foreach ($list as $rs) {
    ?>
            <tr>
                <td><input  type="checkbox" name="ar_id[]" value="<?php 
    echo $rs->id;
    ?>
"></td>
                <td>
                <?php 
    if ($rs->images != "") {
        ?>
                <img src="<?php 
        echo base_url_site();
        ?>
data/product/250/<?php 
        echo $rs->images;
        ?>
" width="100" alt="">
                <?php 
    }
    ?>
                </td>
                <td><?php 
    echo $rs->name;
    ?>
</td>
                <td><?php 
    echo number_format($rs->price, 0, '.', '.');
Exemple #2
0
 function cache_menu()
 {
     $this->load->helper('file');
     $list_maincat = $this->pcat->get_maincat_is_menu();
     foreach ($list_maincat as $cat) {
         $list = $this->pcat->get_list_cat($cat->catid);
         $str = '<div class="submenu">';
         $str .= "<ul>\n";
         foreach ($list as $rs) {
             $link2 = base_url_site() . 'san-pham/c' . $rs->catid . '/' . $rs->slugcat . '.html';
             $str .= "<li>\n";
             $str .= "<a href=\"" . $link2 . "\">" . $rs->name . "</a>\n";
             $str .= "</li>\n";
         }
         $str .= "</ul>";
         $str .= "<div class=\"botm\"></div>";
         $str .= "</div>";
         write_file(ROOT . 'site/config/config_menu_c' . $cat->catid . '.html', $str);
     }
 }