$content .= '<div id="showmore">&raquo; Show <span class="show">' . $show_amount . '</span> more out of <span class="more"></span></div>';
$content .= '<div id="showall">&raquo; Show ALL (<span class="more"></span>)</div>';
$content .= '</div>';
// #showopt
$content .= '<div style="display:none;">';
$content .= '<div id="printstocklist" style="width:500px;height:400px;padding:10px;">';
$content .= '<div id="errornotype" class="ui-corner-all" style="position:absolute;top:35px;left:200px;border:2px solid #f00;padding:10px 20px;color:#f00;display:none;">&laquo; Please Select a Type</div>';
$content .= '<table border="0" cellpadding="0" cellspacing="0">';
$content .= '<tr><td colspan="2"><h3>Stock List Type:</h3></td></tr>';
$content .= '<tr><td><input id="rad-slt-1" type="radio" name="type" value="FULL" /></td><td><label for="rad-slt-1">Full Stock Info</label></td></tr>';
$content .= '<tr><td><input id="rad-slt-2" type="radio" name="type" value="BLANK" /></td><td><label for="rad-slt-2">Blank / No Stock Info</label></td></tr>';
$content .= '<tr><td colspan="2">&nbsp;</td></tr>';
$content .= '<tr><td colspan="2"><h3>Filter by Category:</h3></td></tr>';
$content .= '<tr><td><input id="rad-cat-0" type="radio" name="catid" value="0" /></td><td><label for="rad-cat-0">Show All Elements</label></td></tr>';
use_class('elements_attributes');
$class_ea = new elements_attributes();
$categories = $class_ea->retrieveListData('cat');
foreach ($categories as $cat) {
    $catid = $cat['element_category_id'];
    $checked = $cat['element_category_id'] == '3' ? ' checked="checked"' : '';
    $content .= '<tr><td><input id="rad-cat-' . $catid . '" type="radio" name="catid" value="' . $catid . '"' . $checked . '/></td><td><label for="rad-cat-' . $catid . '">' . $cat['name'] . '</label></td></tr>';
}
$content .= '</table>';
$content .= '<div class="buttons"><input id="printstocklist-action" type="button" value="PRINT" /></div>';
$content .= '</div>';
// #printstocklist
$content .= '</div>';
// #printstocklist hider container
$content .= '<a id="pritnstocklistlinker" class="view_inline" href="#printstocklist"></a>';
$javascript = '
            var current_pos = 0;
Exemple #2
0
<?php

use_class('elements_attributes');
$class_ea = new elements_attributes();
$sort = isset($_GET['sort']) && $_GET['sort'] != '' ? tep_db_prepare_input($_GET['sort']) : 'asc';
if (isset($_GET['attr']) && $_GET['attr'] != '') {
    $attr = $_GET['attr'] != '' ? tep_db_prepare_input($_GET['attr']) : 'mat';
    $form = $class_ea->retrieveList($attr);
    echo utf8_encode($form);
    exit;
}
//START TEMPLATE
$main_link = '?open=eams&amp;sort=' . $sort . '&amp;attr=';
$content .= '<div id="el-attributes-tab">';
$content .= '<ul>';
$headerTabs = $class_ea->elementAttributesHeader();
foreach ($headerTabs as $header_attr => $name) {
    $content .= '<li><a href="' . $main_link . $header_attr . '"><span>' . $name . '</span></a></li>';
}
$content .= '</ul>';
$content .= '</div>';
$javascript = '
                    function parseContent() {
                        $("input[readonly=readonly]").addClass("disabled");
                        $("div.draw-table").find("th,td").addClass("ui-corner-all");
                        applyFancyBox($("#el-attributes-tab"), "view_image");
                        applyFancyBox($("#el-attributes-tab"), "view_webpage");
                    }
                    $("#el-attributes-tab").tabs({
                        load: function(event, ui) {
                            parseContent();
Exemple #3
0
<?php

use_class('element');
use_class('elements_attributes');
use_class('design');
$class_ea = new elements_attributes();
$design = new design();
if (isset($_GET['id'])) {
    $elements_id = tep_db_prepare_input($_GET['id']);
} elseif (isset($_POST['elements_id'])) {
    $elements_id = tep_db_prepare_input($_POST['elements_id']);
}
if (!isset($elements_id) || $elements_id == '') {
    $elements_id = null;
}
$element = new element($elements_id);
$drafts_id = tep_db_prepare_input($_GET['drafts_id']);
//we moved this to confy, since this const also used on other modules
//define('CONST_ACCESS_DESIGNS_MANAGEMENT', 'design_mgmt');
define('CONST_ACCESS_ELEMENT_LIST', 'element_list');
if (strpos($_SERVER['HTTP_REFERER'], 'designs-manage') !== false) {
    $accessed = CONST_ACCESS_DESIGNS_MANAGEMENT;
} elseif (strpos($_SERVER['HTTP_REFERER'], 'element-list') !== false) {
    $accessed = CONST_ACCESS_ELEMENT_LIST;
} else {
    $accessed = '';
}
if (!is_null($elements_id) && is_null($element->id)) {
    $messagebox->add("Element ID: <strong>{$elements_id}</strong> not found in database");
}
if (isset($_POST['me_action'])) {
Exemple #4
0
<?php

$uploaddir = DIR_WS_IMAGES;
$minimagewidth = 500;
$el_attributes_folder = 'element_attributes/';
use_class('elements_attributes');
$class_ea = new elements_attributes();
$attributes = $class_ea->elementAttributesHeader();
$attribute_data = array();
$attr = isset($_GET['attr']) && $_GET['attr'] != '' ? $_GET['attr'] : '';
if (isset($_GET['id']) && $_GET['id'] != '') {
    $attrid = tep_db_prepare_input($_GET['id']);
} else {
    header('Location: ?open=eams');
    exit;
}
//SUBMIT ACTION
$attr_buttons = '';
$attribute_id = '';
if (isset($_POST)) {
    if ($_POST['me_action'] == 'ATTRDELETE') {
    } elseif ($_POST['me_action'] == 'ATTRSAVE') {
        //        echo "<pre>";var_dump($_POST);die();
        switch ($attr) {
            case 'cat':
                $attribute_data['name'] = $_POST['name'];
                $attribute_data['description'] = $_POST['description'];
                break;
            case 'mat':
                $material_name[2] = $_POST['name'][2] != '' ? trim($_POST['name'][2]) : '';
                $material_name[1] = $_POST['name'][1] != '' ? trim($_POST['name'][1]) : '';
<?php

use_class('element');
use_class('elements_attributes');
$class_ea = new elements_attributes();
$show_amount = 10;
$fq = '';
$header = array();
$header['img'] = 'Image';
$header['id'] = 'ID';
$header['name'] = 'Name';
$header['info'] = 'Supplier';
$header['pri'] = 'Price';
$header['act'] = 'Action';
//AJAX ACTION
$keywords = '';
$filter_attr_type = '';
$filter_attr_id = '';
if (isset($_POST['me_action'])) {
    if ($_POST['me_action'] == 'LOADROW') {
        $id = tep_db_prepare_input($_POST['grabid']);
        $row_class = tep_db_prepare_input($_POST['row_class']);
        $detail = new element($id);
        if (is_null($detail->id)) {
            $row = 'FAILED';
        } else {
            $id = $detail->id;
            $img = webImage($detail->image, '80', '80', $id);
            //$name = $detail->detail['name'];
            $name = $detail->detail['description'];
            $info = $detail->detail['supplier'];
$class_es = new elements_stock();
$jng_warehouses_id = '1';
$type = isset($_GET['type']) ? strtoupper(tep_db_prepare_input($_GET['type'])) : 'FULL';
$catid = isset($_GET['catid']) ? tep_db_prepare_input($_GET['catid']) : '0';
$catname = isset($_GET['catname']) ? tep_db_prepare_input($_GET['catid']) : '0';
$catid = intval($catid);
$elements = array();
//$stocks = $class_es->retrieveAll($jng_warehouses_id);
$q = "SELECT es.elements_id, es.stock";
$q .= " FROM elements_stock es";
$q .= " LEFT JOIN element e ON e.elements_id=es.elements_id";
$q .= " WHERE es.jng_warehouses_id={$jng_warehouses_id}";
if ($catid > 0) {
    $q .= " AND e.attribute_category_id={$catid}";
    use_class('elements_attributes');
    $class_ea = new elements_attributes();
    $ea_detail = $class_ea->retrieveDetail('cat', $catid);
    $catname = $ea_detail[0]['name'];
}
$q .= " ORDER BY e.attribute_category_id, e.elements_id";
$r = tep_db_query($q);
$stocks = array();
while ($row = tep_db_fetch_array($r)) {
    $stocks[$row['elements_id']] = $row['stock'];
}
$booked = elements_minierp::elementsAllBookedCount($jng_warehouses_id);
$stocks_table = array();
$total_qty_stock = 0;
$total_qty_booked = 0;
$total_qty_total = 0;
$total_matexp_avl = 0;
 * Description of productdetaildescription2
 *
 * @author IT TEAM BONOFACTUM
 * @created May 29, 2013 5:11:23 PM
 */
use_class('Product');
use_class('products_articles');
use_class('products_brand');
use_class('ProductMeasurement');
use_class('products_minierp');
use_class('elements_attributes');
$class_pa = new products_articles();
$class_pb = new products_brand();
$class_pmr = new ProductMeasurement();
$class_pm = new products_minierp();
$class_ea = new elements_attributes();
$products_id = tep_db_prepare_input($_GET['id']);
$product = new Product($products_id);
/* TODO: @deprecated Remove this because products description not use this.
$clasp_type = array();
$clasp_type[] = '';
$clasp_type[] = 'Agraffe';
$clasp_type[] = 'Bajonette Clasp';
$clasp_type[] = 'Clasp With Safety';
$clasp_type[] = 'Collier Clasp';
$clasp_type[] = 'Cross Clasp';
$clasp_type[] = 'Fold over clasp';
$clasp_type[] = 'Jewellery box clasp';
$clasp_type[] = 'Lobster claw clasp';
$clasp_type[] = 'Magnetic Clasp';
$clasp_type[] = 'Multi strand box clasp';
 /**
  * Return description 2 value with german text label as array key and unit as suffix for measurement related
  * @param Array $des2_data Products Description 2 data resut from function $this->retrieveDetail 'pd2'
  * @return Array
  */
 function description2_label($des2_data, $category_id = null)
 {
     //always display the selected label for each category id, unless the value is null (unset)
     $always_display_in_category = array();
     //list for necklace
     $always_display_in_category['2'] = array('length_expandable');
     //list for bracelet
     $always_display_in_category['3'] = array('length_expandable');
     use_class('elements_attributes');
     $class_ea = new elements_attributes();
     $result = array();
     if (is_array($des2_data)) {
         $pd2_alias = array();
         $pd2suffix = array();
         $pd2zerovalue = array();
         if (isset($des2_data['stone_cut'])) {
             $des2_data['stone_cut'] = $class_ea->useGermanNames('', '', $des2_data['stone_cut']);
         }
         if (isset($des2_data['stone_shape'])) {
             $des2_data['stone_shape'] = $class_ea->useGermanNames('', '', $des2_data['stone_shape']);
         }
         //ALIAS
         $pd2_alias['clasp_type'] = 'Verschluss';
         $pd2_alias['setting_type'] = 'Steinfassung';
         $pd2_alias['chain_type'] = 'Art der Kette';
         $pd2_alias['gem_type'] = 'Steinart';
         $pd2_alias['stone_total'] = 'Gesamtanzahl Steine';
         $pd2_alias['stone_cut'] = 'Steinschliff';
         $pd2_alias['stone_shape'] = 'Steinform';
         $pd2_alias['stone_size'] = 'Steingröße';
         $pd2_alias['ring_resizeable'] = 'Verstellbarer Ring';
         $pd2_alias['pearls_total'] = 'Gesamtanzahl Perlen';
         $pd2_alias['pearls_type'] = 'Perlenart';
         $pd2_alias['pearls_color'] = 'Perlenfarbe';
         $pd2_alias['pearls_size'] = 'Perlengröße';
         $pd2_alias['pearls_shine'] = 'Perlenglanz';
         $pd2_alias['pearls_shape'] = 'Perlenform';
         $pd2_alias['pearls_surface'] = 'Perlenoberfläche';
         $pd2_alias['diamond_total_weight'] = 'Gesamtgewicht der Diamanten';
         $pd2_alias['diamond_color'] = 'Farbe des Diamanten';
         $pd2_alias['diamond_clarity'] = 'Reinheit des Diamanten';
         $pd2_alias['diamond_stone_cut'] = 'Schliffart des Steins';
         $pd2_alias['diamond_girdle'] = 'Rondiste des Diamanten';
         $pd2_alias['diamond_polish'] = 'Glanz des Diamanten';
         $pd2_alias['diamond_certificate_type'] = 'Art des Zertifikats';
         $pd2_alias['length_expandable'] = 'Länge erweiterbar';
         $pd2_alias['optical_property'] = 'Optik';
         //$pd2_alias['packaging'] = 'Verpackung';
         $pd2_alias['height'] = 'Höhe';
         $pd2_alias['width'] = 'Breite';
         $pd2_alias['weight'] = 'Gewicht';
         $pd2_alias['diameter'] = 'Durchmesser';
         //VALUE SUFFIX
         $pd2suffix['diamond_total_weight'] = ' carat';
         $pd2suffix['length_expandable'] = 'cm';
         $pd2suffix['height'] = 'mm';
         $pd2suffix['width'] = 'mm';
         $pd2suffix['weight'] = 'g';
         $pd2suffix['diameter'] = 'mm';
         //VALUE TO SHOW IF EMPTY/ZERO
         //IMPORTANT: Only if column name is also
         //added in $always_display_in_category
         $pd2zerovalue['length_expandable'] = 'Nein - nicht erweiterbar';
         foreach ($des2_data as $pd2k => $pd2v) {
             $always_display = !is_null($category_id) && isset($always_display_in_category[$category_id]) && in_array($pd2k, $always_display_in_category[$category_id]);
             if (isset($pd2_alias[$pd2k]) && ($always_display && !is_null($pd2v) || $pd2v != '' && $pd2v != '0')) {
                 if ($pd2v == '' || $pd2v == '0') {
                     //only ALWAYS DISPLAY can go in here
                     if (isset($pd2zerovalue[$pd2k])) {
                         $pd2v = $pd2zerovalue[$pd2k];
                     } else {
                         $pd2v = '-';
                     }
                 } else {
                     if (isset($pd2suffix[$pd2k])) {
                         switch ($pd2suffix[$pd2k]) {
                             case 'mm':
                                 $pd2v = intval($pd2v);
                                 break;
                             case 'g':
                                 $pd2v = number_format($pd2v, 1, ',', '.');
                                 break;
                         }
                         $pd2v .= $pd2suffix[$pd2k];
                     }
                 }
                 $result[$pd2_alias[$pd2k]] = $pd2v;
             }
         }
     }
     return $result;
 }