Exemplo n.º 1
0
 public function getTitle($cat = 6, $nsx = 0)
 {
     if ($cat != 0) {
         $sql = $this->db->query("SELECT dtitle, dparent FROM " . $this->db->dbprefix('danhsach') . " WHERE did='{$cat}'");
         $row = $sql->row_array();
         if (count($row) > 0 && $row['dparent'] == 0) {
             $title_arr['text'] = array($row['dtitle']);
             if ($nsx != 0) {
                 $title_arr['link'] = array(link_cat($cat) . link_nsx($nsx));
             } else {
                 $title_arr['link'] = array(link_cat($cat));
             }
         } else {
             $sqlsub = $this->db->query("SELECT dtitle FROM " . $this->db->dbprefix('danhsach') . " WHERE did='{$row['dparent']}'");
             $rowsub = $sqlsub->row_array();
             $title_arr['text'] = array($rowsub['dtitle'], $row['dtitle']);
             if ($nsx != 0) {
                 $title_arr['link'] = array(link_cat($row['dparent'] . link_nsx($nsx)), link_cat($cat) . link_nsx($nsx));
             } else {
                 $title_arr['link'] = array(link_cat($row['dparent']), link_cat($cat));
             }
             $this->where .= " AND sploai='{$cat}'";
         }
         return $title_arr;
     }
 }
Exemplo n.º 2
0
                    <img src="<?php 
echo base_url();
?>
style/images/choncauhinh.gif" class="spac" alt="Chọn cấu hình máy tính"/>
                </a> 
                <a href="<?php 
echo base_url('khuyen-mai');
?>
" title="Chương trình khuyến mãi" />
                    <img src="<?php 
echo base_url();
?>
style/images/khuyenmai.gif" class="spac" alt="Chương trình khuyến mãi"/>
                </a> 
                <a href="<?php 
echo link_cat(2);
?>
" title="Máy tính thương hiệu" />
                    <img src="<?php 
echo base_url();
?>
style/images/thuonghieu.gif" class="spac" alt="Máy tính thương hiệu"/>
                </a> 
                <a href="<?php 
echo base_url('download');
?>
" title="Download báo giá" />
                    <img src="<?php 
echo base_url();
?>
style/images/download.gif" class="spac" alt="Download báo giá"/>
Exemplo n.º 3
0
        } else {
            $temp = "<div class=\"bline fl\"></div>";
        }
        if ($j == $check) {
            $temp = "";
        }
        echo $temp;
        $j++;
    }
}
?>
    </div>
<div style="text-align:center;">
    Bạn đang xem trang
    <select style="border:1px #c6c6c6 solid; width:50px" size="1" onchange="window.location='<?php 
echo link_cat($cat) . link_nsx($seg_nsx) . "/priceup/{$priceup}/pricedown/{$pricedown}";
?>
/page/'+this.options[this.selectedIndex].value;">
    <?php 
$j = 1;
for (; $j <= $product['num_pages']; ++$j) {
    if ($j == $page) {
        echo "<option value=\"" . $j . "\" selected style=\"font-weight:bold\">{$j}</option>";
    } else {
        echo "<option value=\"" . $j . "\">{$j}</option>";
    }
}
?>
    </select>
</div>
</div>
Exemplo n.º 4
0
    <div class="ttblock"><b>Chọn theo giá sản phẩm (VNĐ) </b></div>
    
    <?php 
if (isset($price)) {
    if ($priceup != 0) {
        $price_select = "<a href=\"" . link_cat($cat) . link_nsx($seg_nsx) . "/priceup/0/pricedown/0" . "\" title=\"Bỏ chọn\"><img src=\"" . base_url('/style/images/delicon.png') . "\" width=\"17\" style=\"cursor:pointer;margin-left:10px\" align=\"absmiddle\"></a>";
    } else {
        $price_select = "";
    }
    $price['dgia05'] = $price['dgia04'] + 1;
    if (isset($priceup) && $priceup == 0) {
        echo "<div class=\"line\"><a href=\"" . link_cat($cat) . link_nsx($seg_nsx) . "/priceup/1/pricedown/" . $price['dgia01'] . "\">Dưới " . number_format($price['dgia01'], 0, ",", ".") . "</a></div>";
        echo "<div class=\"line\"><a href=\"" . link_cat($cat) . link_nsx($seg_nsx) . "/priceup/" . $price['dgia01'] . "/pricedown/" . $price['dgia02'] . "\">" . number_format($price['dgia01'], 0, ",", ".") . " -> " . number_format($price['dgia02'], 0, ",", ".") . "</a></div>";
        echo "<div class=\"line\"><a href=\"" . link_cat($cat) . link_nsx($seg_nsx) . "/priceup/" . $price['dgia02'] . "/pricedown/" . $price['dgia03'] . "\">" . number_format($price['dgia02'], 0, ",", ".") . " -> " . number_format($price['dgia03'], 0, ",", ".") . "</a></div>";
        echo "<div class=\"line\"><a href=\"" . link_cat($cat) . link_nsx($seg_nsx) . "/priceup/" . $price['dgia03'] . "/pricedown/" . $price['dgia04'] . "\">" . number_format($price['dgia03'], 0, ",", ".") . " -> " . number_format($price['dgia04'], 0, ",", ".") . "</a></div>";
        echo "<div class=\"line\"><a href=\"" . link_cat($cat) . link_nsx($seg_nsx) . "/priceup/" . $price['dgia05'] . "/pricedown/" . $price['dgia05'] . "\">Trên " . number_format($price['dgia04'], 0, ",", ".") . "</a></div>";
    } else {
        if ($priceup == 1) {
            echo "<div class=\"line\"><a href=\"#\">Dưới " . number_format($price['dgia01'], 0, ",", ".") . "</a>{$price_select}</div>";
        }
        if ($priceup == $price['dgia01']) {
            echo "<div class=\"line\"><a href=\"#\">" . number_format($price['dgia01'], 0, ",", ".") . " -> " . number_format($price['dgia02'], 0, ",", ".") . "</a>{$price_select}</div>";
        }
        if ($priceup == $price['dgia02']) {
            echo "<div class=\"line\"><a href=\"#\">" . number_format($price['dgia02'], 0, ",", ".") . " -> " . number_format($price['dgia03'], 0, ",", ".") . "</a>{$price_select}</div>";
        }
        if ($priceup == $price['dgia03']) {
            echo "<div class=\"line\"><a href=\"#\">" . number_format($price['dgia03'], 0, ",", ".") . " -> " . number_format($price['dgia04'], 0, ",", ".") . "</a>{$price_select}</div>";
        }
        if ($priceup == $price['dgia05']) {
            echo "<div class=\"line\"><a href=\"#\">Trên " . number_format($price['dgia04'], 0, ",", ".") . "</a>{$price_select}</div>";
Exemplo n.º 5
0
?>
            	<a href="<?php 
echo link_cat(5);
?>
">Cáp & Phụ kiện</a></li>
            </ul>
    		<ul>
                  <?php 
if (isset($cat) && $cat == 4) {
    echo "<li class=\"parent-active\">";
} else {
    echo "<li>";
}
?>
                <a href="<?php 
echo link_cat(4);
?>
">Điện tử âm thanh</a></li>
            </ul>							  
            <ul>
                <?php 
if ($this->uri->segment(1) == "lien-he") {
    echo "<li class=\"parent-active\">";
} else {
    echo "<li>";
}
?>
            	<a href="<?php 
echo base_url('lien-he');
?>
">Liên Hệ</a></li>