• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP webImageSource函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中webImageSource函数的典型用法代码示例。如果您正苦于以下问题:PHP webImageSource函数的具体用法?PHP webImageSource怎么用?PHP webImageSource使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了webImageSource函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: tep_db_query

$cat_result = tep_db_query($cat_query);
$cat = array();
$c = array();
$c['img'] = 'Product';
$c['cl-c'] = 'Cross-Selling';
$c['cl-u'] = 'UP-selling';
$c['cl-a'] = 'Accessory';
$c['cl-d'] = 'Device';
$cat[] = $c;
while ($row = tep_db_fetch_array($cat_result)) {
    $detail_link = "?open=sp-product&id={$row['products_id']}";
    $pid = '<input type="hidden" name="products_id" value="' . $row['products_id'] . '" />';
    $c = array();
    $img = $pid;
    $img .= '<div class="pro-thumb">';
    $img .= '<div><a href="' . webImageSource($row['products_image'], '500', '500') . '" title="View Image ' . $row['products_id'] . '" class="view_image">' . webImage($row['products_image'], '80', '80') . '</a></div>';
    $img .= '<div class="bold"><a href="' . $detail_link . '" title="View and Manage Product Detail for Neckermann Catalog">' . $row['products_id'] . '</a></div>';
    $img .= '<div>' . $row['article_number'] . '</div>';
    $img .= '<div class="green">' . displayCurrency('EUR', $row['price']) . '</div>';
    $img .= '</div>';
    $c['img'] = $img;
    $c['cl-c'] = '<img src="images/ajax-load-2.gif" />';
    $c['cl-u'] = '<img src="images/ajax-load-2.gif" />';
    $c['cl-a'] = '<img src="images/ajax-load-2.gif" />';
    $c['cl-d'] = '<img src="images/ajax-load-2.gif" />';
    $c['cl-d'] = '<img src="images/ajax-load-2.gif" />';
    $cat[] = $c;
}
if (count($cat) == 1) {
    $c = array();
    foreach ($cat[0] as $key => $val) {
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:sp-products-links.php


示例2: tep_db_prepare_input

    $sda_return['return_comment_customer'] = tep_db_prepare_input(utf8_decode($_POST['comment_c']));
    $sda_return['return_comment_jng'] = tep_db_prepare_input(utf8_decode($_POST['comment_j']));
    $sda_return['shipping_paid'] = tep_db_prepare_input($_POST['shipping_paid']);
    $class_jo->returnItemUpdate($return_id, $sda_return);
    echo '<div class="green">Return detail is successfully saved</div>';
    exit;
}
//START TEMPLATE
$return_id = isset($_GET['id']) ? tep_db_prepare_input($_GET['id']) : '';
if ($return_id == '') {
    exit;
}
$return = $class_jo->retrieveReturnDetail($return_id);
$item = $class_jo->retrieveItemDetail($return['jng_sp_orders_items_id']);
$order = $class_jo->retrieveDetail($item['jng_sp_orders_id']);
$pimg = webImageSource($item['products_image'], '500');
if ($pimg != '') {
    $pimg = webImage($item['products_image'], '120', '120', '', 'img-border img-padding');
}
$content .= '<div style="float:left;">' . $pimg . '</div>';
$content .= '<div style="margin-left:150px;">';
$content .= '<table border="0" cellpadding="0" cellspacing="0">';
$order_id = $order['order_id'] == '' ? 'J&G ID: ' . $order['jng_sp_orders_id'] : $order['order_id'];
if ($return['confirm_return'] == '1') {
    $return_reason = $class_jo->returnReasonText($return['return_reason']);
    $return_qty = $return['return_quantity'];
    $comment_c = nl2br($return['return_comment_customer']);
    $comment_j = nl2br($return['return_comment_jng']);
    $shipping_status = $return['shipping_paid'] == '1' ? 'Paid' : 'Unpaid';
} else {
    $return_reason = $class_jo->returnReasonCombo('', 'input2', 'return_reason', $return['return_reason']);
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:sp-order-return.php


示例3: drawProductsImage

 function drawProductsImage($xpos, $ypos, $products_image)
 {
     if (file_exists(DIR_WS_IMAGES . $products_image)) {
         return $this->Image(webImageSource($products_image, IMAGE_SIZE_THUMBNAIL_3, IMAGE_SIZE_THUMBNAIL_3), $xpos, $ypos, 28, 28);
     }
 }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:6,代码来源:sales-report-weekly-products.php


示例4: webImage

     $stock[$a_counter] = $stock[$a_counter];
     $stock_target[$a_counter] = $stock_target[$a_counter];
     $qty_ordered[$a_counter] = $qty_ordered[$a_counter];
     $qty_missing[$a_counter] = $qty_missing[$a_counter];
     $levelling_target[$a_counter] = $levelling_target[$a_counter];
     $levelling_orders[$a_counter] = $levelling_orders[$a_counter];
     $levelling_orders_ptb[$a_counter] = $levelling_orders_ptb[$a_counter];
     $levelling_orders_os[$a_counter] = $levelling_orders_os[$a_counter];
     $total_target[$a_counter] = $total_target[$a_counter];
     $total_qty_missing[$a_counter] = $total_qty_missing[$a_counter];
     $levelling_orders_today[$a_counter] = $levelling_orders_today[$a_counter];
 }
 //$asep => Article SEParator
 $asep = '<br />';
 $image = webImage($p['image'], '80', '80');
 $imagesource = webImageSource($p['image'], '500', '500');
 if ($imagesource != '') {
     $image = '<a href="' . $imagesource . '" class="view_image">' . $image . '</a>';
 }
 $row = array();
 $info = $pid . ' / ' . $p['code'];
 $info .= '<br />' . $p['name'];
 $row['a'] = "<div>{$counter}</div>";
 $row['b'] = "<div>{$image}</div>";
 $row['c'] = "<div>{$info}</div>";
 $row['d'] = '<div>' . implode($asep, $size) . '</div>';
 $row['e'] = '<div>' . implode($asep, $ean) . '</div>';
 $row['f'] = '<div>' . implode($asep, $sold_last_month_nopromo) . '</div>';
 $row['g'] = '<div>' . implode($asep, $sold_last_month) . '</div>';
 $row['h'] = '<div>' . implode($asep, $stock) . '</div>';
 $row['i'] = '<div>' . implode($asep, $stock_target) . '</div>';
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:levelling-order-list.php


示例5: strpos

 $isnotjpg = strpos($file['type'], 'jpg') === false && strpos($file['type'], 'jpeg') === false;
 if ($isnotjpg) {
     $error = true;
     $errormsg = 'Only JPG is allowed';
 } else {
     $imagesize = 500;
     $filesize = @getimagesize($file['tmp_name']);
     if ($filesize[0] != $imagesize || $filesize[1] != $imagesize) {
         $error = true;
         $errormsg = 'Bad Size, must be ' . $imagesize . 'x' . $imagesize . ' pixels';
     } else {
         $element->uploadImage($file['tmp_name'], $file['name']);
     }
 }
 $err_status = $error ? '0' : '1';
 $image_src = webImageSource($element->image, '130', '130');
 //$image_src_ori = webImageSource($element->image);
 //$image_src_list = webImageSource($element->image, '80', '80');
 //        echo '<div id="uir_status">'.$result.'</div>';
 //        echo '<div id="uir_errmsg">'.$errormsg.'</div>';
 //        echo '<div id="uir_imgsrc">'.$image_src.'</div>';
 //echo '<div id="uir_imgsrc_ori">'.$image_src_ori.'</div>';
 //echo '<div id="uir_imgsrc_list">'.$image_src_list.'</div>';
 //echo '<div id="finalized_class">'.(($element->isFinalized()) ? 'green' : 'red').'</div>';
 $result = array();
 $result['uir_status'] = $err_status;
 $result['uir_errmsg'] = $errormsg;
 $result['uir_imgsrc'] = $image_src;
 if ($accessed == CONST_ACCESS_DESIGNS_MANAGEMENT) {
     $result['designs_id'] = $draft->designs_id;
     $result['drafts_id'] = $draft->id;
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:element.php


示例6: foreach

         } else {
             $colsize = 0;
         }
         $pdf->setXY($margin + $colsize, $pdf->ypos);
         $pdf->MultiCell($colwidth, $lineheight_header, $header, 1, 'C', true);
     }
 } else {
     $pdf->ypos += $key == 1 ? $lineheight_header + 5.2 : $lineheight;
     $pdf->setXY($margin, $pdf->ypos);
     foreach ($cols_value as $rkey => $cr) {
         if ($rkey == $col_image - 1) {
             $pdf->Cell($colwidth, $lineheight, '', 1, 0, 'C');
             //                die($cols_value[0]);
             $items = $class_pm->retrieveDetail($cols_value[0], 'p');
             $img_path = DIR_WS_IMAGES . 'imagecache/';
             $img_file = basename(webImageSource($items['p']['products_image'], IMAGE_SIZE_THUMBNAIL_1, IMAGE_SIZE_THUMBNAIL_1));
             $img = $img_path . $img_file;
             $x_col = $margin + ($col_image - 1) * $colwidth;
             $posx_image = $x_col + 3;
             $pdf->Image($img, $posx_image, $pdf->ypos + 4, 20);
             //PRINT TEXT BELOW IMAGE
             $pdf->setXY($x_col, $pdf->ypos + $lineheight - ($lineheight / 2 + 2));
             $text_under_image_height = $lineheight;
             if ($pdf->PageNo() > 1) {
                 $text_under_image_height -= 3.1;
             } else {
                 $text_under_image_height -= 2;
             }
             $pdf->Cell($colwidth, $text_under_image_height, $cr, 0, 0, 'C');
             $pdf->setXY($x_col + $colwidth, $pdf->ypos);
             //RESET BACK CELL POSITION SAME WITH CELL BEFORE
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:saveTableAsPDF.php


示例7: displayImage

 /**
  * Standard Display of Image Thumb with icons
  * @param int $width
  * @param int $height
  * @param string $additional_title
  * @param boolean $border
  * @param string $class
  * @param const $link_to IMAGE_LINKTO_BIGGER_IMAGE or IMAGE_LINKTO_PRODUCT_DETAIL
  * @return type
  */
 public function displayImage($width, $height, $additional_title = '', $border = true, $class = '', $link_to = self::IMAGE_LINKTO_BIGGER_IMAGE)
 {
     $title = "Product {$this->id}";
     if ($additional_title != '') {
         $title .= " {$additional_title}";
     }
     $popup_title = 'View Larger Image (' . $this->id . '/' . $this->code . ')';
     if ($additional_title != '') {
         $popup_title .= " {$additional_title}";
     }
     $border_class = $border ? 'img-border' : '';
     if ($border_class != $class) {
         $class .= ($class != '' ? ' ' : '') . $border_class;
     }
     //PREPARE THUMBNAIL
     $img_thumb = webImage($this->image, $width, $height, $popup_title, $class);
     $thumb_width = $width;
     $thumb_height = $height;
     if ($width == '' || $height == '') {
         $thumb_image_source = webImageSource($this->image, $width, $height);
         if ($thumb_image_source != '') {
             list($thumb_width, $thumb_height) = @getimagesize($thumb_image_source);
         }
     }
     //PREPARE LINK
     if ($link_to == self::IMAGE_LINKTO_BIGGER_IMAGE) {
         $main_image = webImageSource($this->image, IMAGE_SIZE_BIG_1);
         $link_target = $main_image != '' ? $main_image : '';
         $link_class = 'view_image';
     } else {
         $link_target = $this->getLinkProductDetail();
         $link_class = 'view_webpage';
     }
     if ($link_target != '') {
         $image = '<a href="' . $link_target . '" class="' . $link_class . '" title="' . $popup_title . '">' . $img_thumb . '</a>';
     } else {
         $image = $img_thumb;
     }
     //PREPARE ICONS
     $icons_total_width = 0;
     $icons = array();
     if ($this->isKilled()) {
         $icons[] = drawKilledIcon('Killed Product', '');
         $icons_total_width += 16;
     }
     //DIAMOND ICON
     if ($this->isUsingDiamond()) {
         $icons[] = drawDiamondIcon('Diamond Product', '');
         $icons_total_width += 16;
     }
     //GOLD ICON
     if ($this->isUsingGold()) {
         $icons[] = drawGoldIcon($this->metal_stamp_code, $this->metal_stamp_info);
         $icons_total_width += 21;
     }
     $icons_total_width += count($icons) * 2;
     //consider white space
     $icons_margin_top = $thumb_height - 16 - 1;
     //16 is default icon height, 1 is margin bottom
     $icons_margin_left = $thumb_width - $icons_total_width;
     $div_image = '<div>' . $image . '</div>';
     $div_icons = '<div style="position:absolute;margin:' . $icons_margin_top . 'px 0 0 ' . $icons_margin_left . 'px;">' . implode(' ', array_reverse($icons)) . '</div>';
     $div_stars = '<div>' . drawStars($this->stars) . '</div>';
     return '<div class="tac" style="width:' . $thumb_width . 'px;margin:0 auto;">' . $div_icons . $div_image . $div_stars . '</div>';
 }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:75,代码来源:Product.php


示例8: processReturnOld


//.........这里部分代码省略.........
                //                    $status = 'MCSCANREASON';
                //                    $reasons = $class_jo->returnReasonList();
                //                    $reasons_list = array();
                //                    foreach($reasons as $reason_id=>$val){
                //                        $reasons_list[] = $reason_id."-".$val;
                //                    }
                //                    $result['reasons'] = $reasons_list;
                //                }else{
                $returnable = $item['order_quantity'];
                $return_data = $class_jo->retrieveReturnItem($items_id);
                //                    echo "<pre>";var_dump($return_data);
                if (!is_null($return_data)) {
                    foreach ($return_data as $rd) {
                        $returnable -= $rd['return_quantity'];
                    }
                }
                if ($returnable > 0) {
                    $order_product_id = $items_id;
                    $product_barcode = "SP-{$order_product_id}";
                    $is_best_product = $class_pm->isBestProduct($item['products_id']);
                    $status = $is_best_product ? 'MCBINORRETURN' : 'MCRETURNTOBALI';
                    //CREATE RETURN
                    $return_date = date('Y-m-d H:i:s');
                    $return_qty = 1;
                    $comment_customer = '';
                    $comment_jng = '';
                    $shipping_paid = tep_db_prepare_input($_POST['shipping_paid']);
                    $return_id = $class_jo->returnItem($items_id, $return_date, $return_qty, $reason, $comment_customer, $comment_jng, $shipping_paid);
                    //CREATE PAYONE RETURN
                    //                        $return_id = '123';
                    if ($return_id != '') {
                        $class_payone->createReturnContainerSP($return_id, $return_qty, $items_id);
                        $items_q = tep_db_query("SELECT SUM(order_quantity) AS total FROM jng_sp_orders_items WHERE jng_sp_orders_id={$order_id} AND status NOT IN (10, 12)");
                        $items = tep_db_fetch_array($items_q);
                        $items_total = $items['total'];
                        $returns_total = getTotalReturnOrderSP($order_id);
                        $returnable = $items_total - $returns_total;
                    }
                }
                //                } //BLOCK reason status
            }
        }
    } elseif (strtolower($sp_type) == 'j') {
        use_class('products_ean');
        $class_pean = new products_ean();
        $items = $class_o->retrieveProducts($order_id);
        foreach ($items as $key => $item) {
            $ean = $class_pean->getEAN($item['products_id'], $item['products_articles_id']);
            $opid = $item['orders_products_id'];
            $product_code = $item['products_model'];
            $product_name = $item['products_name'];
            //            echo $ean." | ".$item['status']."<br/>";
            if ($ean == $ean_code && in_array($item['status'], $return_allowed_status)) {
                $products_id = $item['products_id'];
                $existing_return = $class_o->productReturnTotalQty($opid);
                if ($existing_return < $item['products_quantity']) {
                    $order_product_id = $opid;
                    $product_barcode = "JG-{$order_product_id}";
                    $is_best_product = $class_pm->isBestProduct($item['products_id']);
                    $status = $is_best_product ? 'MCBINORRETURN' : 'MCRETURNTOBALI';
                    //CREATE RETURN
                    $opid = $item['orders_products_id'];
                    $return_date = date('Y-m-d H:i:s');
                    $return_qty = 1;
                    $return_type = 'C';
                    $return_status = '0';
                    $return_comment = '';
                    $product_received = 1;
                    $return_id = $class_o->addReturnProduct($opid, $return_date, $return_qty, $return_type, $return_status, $return_comment, $product_received);
                    //CREATE PAYONE RETURN
                    //                    $return_id = '123';
                    if ($return_id != '') {
                        $class_payone->createReturnContainer($return_id, $return_qty, $opid);
                        $items_q = tep_db_query("SELECT SUM(products_quantity) AS total FROM orders_products WHERE orders_id={$order_id}  AND status NOT IN (10, 12)");
                        $items = tep_db_fetch_array($items_q);
                        $items_total = $items['total'];
                        $returns_total = getTotalReturnOrderJG($order_id);
                        $returnable = $items_total - $returns_total;
                    }
                }
            }
        }
    }
    $result['product_barcode'] = $product_barcode;
    $result['order_product_id'] = $order_product_id;
    $result['eancode'] = $ean_code;
    if ($products_id != '') {
        $result['product_id'] = $products_id;
        $qp = "SELECT p.*, pd.products_name FROM products p INNER JOIN products_description pd ON p.products_id = pd.products_id\n                WHERE p.products_id = {$products_id} AND pd.language_id = 2";
        $dbqp = tep_db_query($qp);
        $rp = tep_db_fetch_array($dbqp);
        $result['product_code'] = $rp['products_model'];
        $result['product_name'] = $rp['products_name'];
        $result['product_image'] = webImageSource($rp['products_image'], '80');
        //'http://www.julie-grace.de/images/imagecache/500x500_03601033.jpg';
    }
    $result['returnable'] = $returnable;
    $result['status'] = $status;
    return $result;
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:101,代码来源:mod03_product_return.php


示例9: shopifyTemplate

function shopifyTemplate($is_article, $product_id, $var_ean, $var_length, $add_images)
{
    global $class_pm, $class_pmat, $class_pa, $r;
    $product_materials_name = '';
    //    $product = $class_pm->retrieveDetail($product_id, 'p,pd,pd2,pc,pnc,cat,pei,pci');
    $product = Product::getOldProductFunction()->retrieveDetail($product_id, 'p,pd,pd2,pc,pnc,cat,pei,pci');
    $product_name = $product['pd'][3]['products_name'];
    $product_name_handle = strtolower(str_replace(' ', '-', $product_name));
    $product_articles = $class_pa->retrieveList($product_id);
    $product_articles_total = count($product_articles);
    //    $product_stock = $class_pm->stockRetrieve(WAREHOUSE_ID_PRODUCTS_HAMBURG, $product_id, '*');
    $product_stock = Product::getOldProductFunction()->stockRetrieve(WAREHOUSE_ID_PRODUCTS_HAMBURG, $product_id, '*');
    $product_obj = new Product($product_id);
    //$product_price_uvp = $product['p']['products_price_uvp'];
    $product_price_uvp = $product_obj->getPriceUVP();
    //    $product_price_default = $product['p']['products_price_default'];
    $product_price_default = $product_obj->getPriceDefault();
    $main_image = webImageSource($product['p']['products_image']);
    //    $product_gender = $class_pm->productGenderName($product['p']['products_gender']);
    $product_gender_id = $product['p']['products_gender'];
    if ($product_gender_id == 1) {
        $product_gender = 'Pria';
    } elseif ($product_gender_id == 2) {
        $product_gender = 'Wanita';
    }
    //$product_gender = Product::getOldProductFunction()->productGenderName($product['p']['products_gender']);
    //    $product_agegroup = $class_pm->productAgeGroupName($product['p']['products_agegroup']);
    $product_agegroup = Product::getOldProductFunction()->productAgeGroupName($product['p']['products_agegroup']);
    $cat_for_fashion = new Category($product['categories_id']);
    if ($product['categories_id'] < 36) {
        $product_categories = translateCategoriesToIndonesian($product['categories_id']);
    } else {
        $product_categories = $cat_for_fashion->getName('3');
    }
    //    $productLength = ($product['pc']['products_length'] !== false) ? $product['pc']['products_length']/10 : $product['pnc']['products_length']/10;
    if ($product['pc'] !== false) {
        $product_length = number_format($product['pc']['products_length'], 0);
        $length_code = '_' . number_format($product_length, 0);
        //        $product_length_for_var = 'One size'; //FOR NOW WE ALWAYS USE One Size for every Categories except ring
        if ($product['categories_id'] == 29) {
            $product_lenght_code = $product_length;
            $product_length = $product_length * 10;
            $length_code = '_' . $product_length;
        }
    } else {
        //if ($product['categories_id'] < 36) {
        //} else {
        $product_length = number_format($product['pnc']['products_length'], 0);
        $length_code = '_' . number_format($product_length, 0);
        //        $product_length_for_var = 'One size'; //FOR NOW WE ALWAYS USE One Size for every Categories except ring
        if ($product['categories_id'] == 29) {
            $product_lenght_code = $product_length;
            $product_length = $product_length * 10;
            $length_code = '_' . $product_length;
        }
        //}
    }
    if ($product_length == '0.00') {
        $length_code = '';
    }
    //    $productLength = ($product['pc'] !== false) ? $product['pc']['products_length'] : $product['pnc']['products_length'];
    if ($product['pd2']['width'] == '0.00') {
        $product_width = '';
    } else {
        $product_width = $product['pd2']['width'] / 10;
    }
    if ($product['pd2']['height'] == '0.00') {
        $product_height = '';
    } else {
        $product_height = $product['pd2']['height'] / 10;
    }
    if ($product['pd2']['weight'] == '0.00') {
        $product_weight = '';
    } else {
        $product_weight = $product['pd2']['weight'];
    }
    if ($product['pd2']['diameter'] == '0') {
        $product_diameter = '';
    } else {
        $product_diameter = $product['pd2']['diameter'] / 10;
    }
    $product_ean = $product['p']['products_ean'];
    $product_keywords = $product['pd'][3]['products_head_keywords_tag'];
    $product_description = $product['pd'][3]['products_description'];
    $product_brand = $product['p']['products_brand_name'];
    $product_selling_points = explode(';', $product['pd'][3]['products_selling_points']);
    $materials = $class_pmat->retrieveList('', 'material_name');
    //    $product_materials = $class_pm->loadProductMaterials($product_id);
    $product_materials = Product::getOldProductFunction()->loadProductMaterials($product_id);
    $separator = '';
    foreach ($materials as $mat) {
        if (in_array($mat['products_materials_id'], $product_materials)) {
            $materials_name = explode(',', $mat['material_name']);
            $product_materials_name .= $separator;
            $product_materials_name .= $materials_name[2];
            if (!$separator) {
                $separator = ',';
            }
        }
    }
//.........这里部分代码省略.........
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:101,代码来源:shopify-template-generator-csv.php


示例10: webImage

        break;
    case 'cha':
        $form .= '<tr>';
        $form .= '<td>Name</td>';
        $form .= '<td><input type="text" name="name" id="name" style="width:100%;" value="' . $attribute_data['name'] . '" /></td>';
        $form .= '</tr>';
        $form .= '<tr>';
        $form .= '<td>Description</td>';
        $form .= '<td><textarea name="description" style="width:100%;height:50px;">' . $attribute_data['description'] . '</textarea></td>';
        $form .= '</tr>';
        $form .= '<tr><td colspan="2">&nbsp;</td></tr>';
        $form .= '<tr><td colspan="2"><span class="red">* Image height must be ' . $minimagewidth . ' pixels</span></td></tr>';
        $label_text = 'Setting Image';
        $action = '';
        $label = webImage($attribute_data['chain_image'], '80', '80', $label_text, 'img-border');
        $main_image = webImageSource($attribute_data['chain_image'], '500');
        if ($main_image != '') {
            $main_image_link = '<a href="' . $main_image . '" class="view_image" title="' . $label_text . '">';
            $label = $main_image_link . $label . '</a>';
            $action .= '<div style="margin-top:5px;">&raquo; ' . $main_image_link . 'View Image</a></div>';
        }
        $form .= '<tr>';
        $form .= '<td style="width:85px;padding-bottom:10px;">' . $label . '</td>';
        $form .= '<td>';
        $form .= '<div style="font-weight:bold;">' . $label_text . '</div>';
        $form .= '<div><input type="file" name="chain_image" class="input" /></div>';
        $form .= $action;
        $form .= '</td>';
        $form .= '</tr>';
        break;
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:eam.php


示例11: tep_db_connect

<?php

global $db;
require_once '../confy.php';
require_once '../functions.php';
require_once '../functions-2.php';
require_once DIR_WS_FUNCTIONS . 'html_output.php';
tep_db_connect();
use_class('products_minierp');
$class_pm = new products_minierp();
$pids = explode(',', tep_db_prepare_input($_GET['pids']));
//$pids = array(75637, 75704, 75701);
$width = tep_db_prepare_input($_GET['width']);
if (count($pids) > 0) {
    if (isset($_GET['height'])) {
        $height = tep_db_prepare_input($_GET['height']);
    } else {
        $height = $width * 1.5;
    }
    foreach ($pids as $pid) {
        $product_data = $class_pm->retrieveDetail($pid, 'p');
        $new_image_src = webImageSource($product_data['p']['products_image'], $width, $height, true);
        echo "{$pid} => <a href = \"{$new_image_src}\">{$new_image_src}</a><br/>";
    }
} else {
    echo "No Products found";
}
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:27,代码来源:temp-image-resize.php


示例12: foreach

     $ypos += $spacing;
     $pdf->setXY($xpos, $ypos);
     foreach ($cwidth as $cwkey => $cw) {
         $pdf->setFont('Arial', 'B', '10');
         if ($cwkey + 1 == $totalcols) {
             $newline = 1;
             $ypos += $line_height;
         } else {
             $newline = 0;
         }
         $pdf->Cell($cw, $line_height, $ctitle[$cwkey], 1, $newline, 'C', true);
     }
 }
 $counter++;
 $xpos = $margin_left + $cwidth[0];
 $img_file = basename(webImageSource($e_detail->image, '', '80', '80'));
 $img = $img_path . $img_file;
 if ($img != $img_path) {
     $test = getimagesize($img);
     if ($test[2] == 2) {
         $pdf->Image($img, $xpos + $img_boxpad, $ypos + $img_boxpad, $img_size, $img_size);
     }
 }
 $unit_price = convertCurrency($e['unit_price'], $e['unit_price_currency'], $currency);
 $qty_price = $e['quantity'] * $unit_price;
 $qty_weight = $e['quantity'] * $e['unit_multiplier'] * $e['elements_weight'];
 $total_price += $qty_price;
 $cellcontent = array();
 $cellcontent[] = $counter;
 $cellcontent[] = '';
 $cellcontent[] = $e['elements_id'];
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:elements-po.php


示例13: tep_db_query

 $products_query .= $join_query;
 $products_query .= " WHERE p.products_image!='' ";
 $products_query .= $filter_query;
 $products_query .= " GROUP BY p.`products_id`";
 $products_query .= " ORDER BY p.products_model ASC ";
 //$products_query .= " ORDER BY p.`products_date_added` DESC";
 $products_result = tep_db_query($products_query);
 $p = array();
 $p['img'] = 'Product';
 $p['name'] = 'Info';
 $p['stc'] = 'Active';
 $p['sta'] = 'J&G Status';
 $p['stb'] = 'Kill Status';
 $products[] = $p;
 while ($row = tep_db_fetch_array($products_result)) {
     $imagelink = webImageSource($row['produccts_image'], '500', '500');
     $image = webImage($row['products_image'], '80', '80');
     if ($imagelink != '') {
         $image = '<a href="' . $imagelink . '" title="View Bigger Image" class="view_image">' . $image . '</a>';
     }
     $managelink = '?open=product-detail&products_id=' . $row['products_id'] . '&amp;hidemenu=true';
     $managelink_title = 'Manage Product Detail';
     $p = array();
     $info2 = "<div><strong>{$row['products_id']}";
     if ($row[products_model] != '') {
         $info2 .= " / {$row['products_model']}";
     }
     $info2 = '<a href="' . $managelink . '" title="' . $managelink_title . '" class="view_webpage_full">' . $info2 . '</a>';
     $info2 .= "</strong></div>";
     $info2 .= "<div>{$row['products_name']}</div>";
     $p['img'] = $image;
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:products-search.php


示例14: foreach

 $pdf->SetAuthor('JULIE GRACE');
 $pdf->SetCreator('k-Auto Generated PDF');
 $pdf->SetDisplayMode('real');
 $pdf->SetAutoPageBreak(false, 1);
 $counter = 0;
 foreach ($sl as $e) {
     $pdf->currentSupplier = $suppliers[$sup_id];
     $xpos = $margin_left;
     if ($counter % 5 == 0) {
         $pdf->AddPage();
         $pdf->setFont('Arial', '', '15');
         $ypos = $margin_top;
     }
     $ypos += $spacing;
     $box_pad = 2;
     $img = DIR_WS_IMAGES . 'imagecache/' . basename(webImageSource($e['image'], '', '130', '130'));
     $test = getimagesize($img);
     if ($img != '' && $test[2] == 2) {
         $pdf->Image($img, $xpos + $box_pad, $ypos + $box_pad, $img_size, $img_size);
     }
     $box_size = $img_size + 2 * $box_pad;
     $pdf->SetDrawColor(200, 200, 200);
     $pdf->SetLineWidth(0.2);
     $pdf->Rect($xpos, $ypos, $box_size, $box_size);
     $text_middling = 7;
     $xpos += $img_size + $spacing;
     $ypos += $text_middling;
     $data_array = array();
     $data_array[] = 'Code';
     $data_array[] = 'Qty';
     $data_array[] = 'Price';
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:elements-picking-list-backup.php


示例15: printProductImage

 function printProductImage($type, $image, $id, $width)
 {
     $product_image = webImageSource($image);
     if ($product_image == '' && $type == 'CP') {
         $product_image = webImageSource('products/' . $id . '.png');
     }
     if ($product_image != '') {
         $result[] = webImage($image, $width, '');
         $result_text = implode("\n", $result);
     } else {
         $result_text = '';
     }
     return $result_text;
 }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:14,代码来源:production_instruction_old.php


示例16: getDetailData

function getDetailData($products_id, $type)
{
    global $class_pm, $class_pa, $class_pb, $class_sp, $target_group, $colpats, $class_s;
    $result = array();
    $detail_is_complete = false;
    $r_dt = '';
    switch ($type) {
        case 'checkname':
            //NAME
            $r_nm = '<span class="red">Name not yet set</span>';
            $nm = $class_pm->retrieveName($products_id, '2');
            if ($nm != 'None') {
                $r_nm = "<span class=\"green\">{$nm}</span>";
            }
            $r_dt .= "&raquo; {$r_nm}<br />";
            //COLORS
            $colors = $class_pm->loadColorPatternNames($products_id, LANGUAGEID);
            $total_colors = count($colors);
            $colors_has_neon = false;
            if ($total_colors == 0) {
                $r_dt .= '&raquo; <span class="red">Color not yet set</span>';
            } else {
                $r_cp = '';
                foreach ($colors as $cpid => $cpname) {
                    if ($cpid == '22') {
                        $colors_has_neon = true;
                    }
                    $cp_img = webImageSource('color-pattern-' . $cpid . '.png');
                    $r_cp .= '<img src="' . $cp_img . '" width="20" height="20" title="' . $cpname . '" />&nbsp;';
                }
                $r_dt .= "&raquo; {$r_cp}";
                if ($total_colors == 1 && !$colors_has_neon || $total_colors == 2 && $colors_has_neon) {
                    $detail_is_complete = true;
                } else {
                    $r_dt .= '<br /><strong class="red">Only 1 color / 2 colors with Neon is allowed!</strong>';
                }
            }
            //$nm!='None'
            break;
        case 'setprofin':
            //optional step, auto set detail directly as complete
            $detail_is_complete = true;
            $styles = $class_s->getProductStyles($products_id);
            foreach ($styles as $groups => $styles_data) {
                if ($groups == ProductAttribute::GROUP_ID_PRODUCT_FINISHING) {
                    $product_finishing = $styles_data;
                    break;
                }
            }
            $total_profin = count($product_finishing);
            if ($total_profin == 0) {
                $r_profin = '&raquo; <span class="notice">' . 'No Product Finishing attached</span>';
            } else {
                $r_profin = '&raquo; <span class="green">' . implode(', ', $product_finishing) . '</span>';
            }
            $r_dt .= $r_profin;
            break;
        case 'setsubcat':
            $styles = $class_s->getProductStyles($products_id);
            $subcat = array();
            //S now substracted as S1, S2, etc. so we couldn't use this anymore
            //foreach($styles['S'] as $sbk=>$sbv) $subcat[] = $sbv;
            foreach ($styles as $groups => $styles_data) {
                if ($groups[0] == ProductAttribute::GROUP_ID_SUB_CATEGORY) {
                    foreach ($styles_data as $styles_id => $styles_name) {
                        $subcat[] = $styles_name;
                    }
                }
            }
            $total_subcat = count($subcat);
            $r_subcat = '';
            if ($total_subcat == 0) {
                $r_subcat .= '&raquo; <span class="red">Sub Category not yet set</span>';
            } elseif ($total_subcat > 1) {
                $r_subcat .= '&raquo; ' . implode('<br />&raquo; ', $subcat);
                $r_subcat .= '<br /><strong class="red">Only 1 Sub Category is allowed!</strong>';
            } else {
                $r_subcat .= '&raquo; <span class="green">' . $subcat[0] . '</span>';
                $detail_is_complete = true;
            }
            $r_dt .= $r_subcat;
            break;
        case 'setbrand':
            $product = $class_pm->retrieveDetail($products_id, 'p');
            $r_br = '<span class="red">not yet set</span>';
            if ($product['p']['products_brand_id'] != '' && $product['p']['products_brand_id'] != '0') {
                $brand = $class_pb->retrieveDetail($product['p']['products_brand_id']);
                $r_br = "<span class=\"green\">" . $brand['brand_name'] . "</span>";
                $detail_is_complete = true;
            }
            $r_dt .= "&raquo; {$r_br}";
            break;
        case 'setlength':
            $ln = '';
            $r_ln = '<span class="red">not yet set</span>';
            $product = $class_pm->retrieveDetail($products_id, 'p,pd,pnc');
            $articles = $class_pa->retrieveList($products_id);
            if ($product['pnc']['products_length'] != '') {
                $ln = '<strong>' . textLength($product['pnc']['products_length']) . '</strong> (default)';
            }
//.........这里部分代码省略.........
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:101,代码来源:designs-details.php


示例17: getImageForPDF

 function getImageForPDF($image, $width, $height)
 {
     $img_pdf = '';
     $img_path = DIR_WS_IMAGES . 'imagecache/';
     $img_file = basename(webImageSource($image, $width, $height));
     $img = $img_path . $img_file;
     if ($img != $img_path) {
         $test = getimagesize($img);
         if ($test[2] == 2) {
             $img_pdf = $img;
         }
     }
     return $img_pdf;
 }
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:14,代码来源:production_instruction_pdf.php


示例18: foreach

 $item_counter = 0;
 foreach ($items as $item) {
     $product = $class_pm->retrieveDetail($item['products_id'], 'p,pd,pnc,cat');
     if ($item['products_articles_id'] == 0) {
         $size = $product['pnc']['products_length'] > 0 ? textLength($product['pnc']['products_length']) : '-';
     } else {
         $article = $class_pa->retrieveDetail($item['products_articles_id']);
         $size = textLength($article['length']);
     }
     //            echo '<pre>';
     //            var_dump($product);
     //            echo '</pre>';
     $item_counter++;
     $img_pdf = '';
     $img_path = DIR_WS_IMAGES . 'imagecache/';
     $img_file = basename(webImageSource($product['p']['products_image'], IMAGE_SIZE_THUMBNAIL_2, IMAGE_SIZE_THUMBNAIL_2));
     $img = $img_path . $img_file;
     if ($img != $img_path) {
         $test = getimagesize($img);
         if ($test[2] == 2) {
             $img_pdf = $img;
         }
     }
     $pdf->setXY($colpos, $pdf->ypos);
     $pdf->setFont('Arial', '', $fontsize_med);
     $pdf->Cell($col_subcol_width[1], $colheight, $item_counter, 1, 0, 'C');
     $pdf->Cell($col_subcol_width[2], $colheight, '', 1, 0, 'C');
     //product image
     $pdf->Cell($col_subcol_width[3], $colheight, $size, 1, 0, 'C');
     $pdf->Cell($col_subcol_width[4], $colheight, $product_categories_name[$product['categories_id']], 1, 0, 'C');
     $pdf->Cell($col_subcol_width[5], $colheight, $product['pd']['2']['products_name'], 1, 0, 'C');
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:delivery-document-retails.php


示例19: tep_db_prepare_input

 if ($_POST['me_action'] == 'LOADROW') {
     $id = tep_db_prepare_input($_POST['grabid']);
     $row_class = tep_db_prepare_input($_POST['row_class']);
     $q = "SELECT e.elements_id, e.elements_code, CONCAT('elements/', ei.image_path, ei.image_filename) AS elements_image";
     $q .= ", ed.name AS elements_name FROM elements e";
 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP web_UserControls函数代码示例发布时间:2022-05-23
下一篇:
PHP webImage函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap