示例#1
0
                 <input onclick="BrowseServer('Images:/','img_url')" type="button" name="btnChonFile" id="btnChonFile" class="button_style1" value="Chọn file" />
                 </div>
                 <div class="row_form_input">
                 <input type="submit" name="btnsubmit" id="btnsubmit" class="button_style1" value="Xác Nhận" />
                 </div>	 
              </form>
              	<table width="100%" class="table_style" style="float:left; margin-top:30px">
                	<tr class="text_tr_style">
                    	<td width="30">ID</td>
                        <td width="80">Hình ảnh</td>
                        <td class="text_left">Tên sản phẩm</td>
                        <td width="120">Giá</td>
                        <td width="120">Thay đổi</td>
                    </tr>
                     <?php 
$item = product_img($pid);
while ($row_item = mysql_fetch_array($item)) {
    ob_start();
    ?>
                    <tr class="tr_style">
                    	<td width="30">[id]</td>
                        <td width="80"><img width="74" height="54" src="[product_img]"></td>
                        <td class="text_left">[product_title]</td>
                        <td width="120">[product_price]</td>
                        <td width="120">
      					<a onclick="return confirm ('Bạn có chắc là muốn xóa không?')" href="sub-pages/product-img-act.php?act=delete&id=[id]&pid=[pid]">
                        <img width="20" height="20" src="img/delete_ico.jpg"  title="Xóa" />
                        </a></td>
                    </tr>
                     <?php 
    $s = ob_get_clean();
示例#2
0
function loadImgProduk($img, $attr = '', $bg = false)
{
    if ($bg === false) {
        $tag = true;
    } else {
        $tag = false;
    }
    $def = '';
    if ($attr != '') {
        $def .= '"';
        foreach ($attr as $k => $v) {
            $def .= ' ' . $k . '="' . $v . '"';
        }
    }
    if ($tag === false) {
        $def = false;
    }
    return product_img($img, $def);
}