require_once DIR_WS_FUNCTIONS . 'html_output.php';
tep_db_connect();
use_class('logger');
$logger = new logger('cron', 'tradebyte-catalog-uploader');
use_class('xml_tools');
use_class('ProductAttribute');
use_class('Category');
use_class('products_minierp');
use_class('products_articles');
use_class('products_materials');
use_class('products_family');
use_class('jng_sp_catalog');
use_class('styles');
$class_pm = new products_minierp();
$class_pa = new products_articles();
$class_pmat = new products_materials();
$class_jc = new jng_sp_catalog();
$class_s = new styles();
$lid = '2';
$materials_name = array();
$materials_list = $class_pmat->retrieveList();
foreach ($materials_list as $mat) {
    //take only materials in german language
    $tmp_mat_name = explode(',', $mat['material_name']);
    $mat_name = trim($tmp_mat_name[0]);
    $materials_name[$mat['products_materials_id']] = $mat_name;
}
/**
 * Function to send message to responsible PIC
 * @global type $TB_CATUPLOAD_ADD_SUPERVISORS
 * @param type $messages
<?php

global $db;
require_once '../confy.php';
require_once '../functions.php';
require_once '../functions-2.php';
require_once DIR_WS_CLASSES . 'archive.php';
tep_db_connect();
use_class('products_minierp');
use_class('products_materials');
use_class('products_family');
use_class('products_articles');
$class_pm = new products_minierp();
$class_pmat = new products_materials();
$class_pa = new products_articles();
function tep_create_csv_for_LAID($data, $separator = ',', $qualifier = '"')
{
    $result = '';
    if (is_array($data)) {
        foreach ($data as $num => $row) {
            foreach ($row as $key => $value) {
                $row[$key] = $qualifier . $value . $qualifier;
            }
            $result .= implode($separator, $row);
            $result .= "\n";
        }
    }
    return $result;
}
$list_products_id = '15214,21173,21398,29244,29245,35616,43697,50315,51215,53833,54209,54307,57090,58726,59805,60206,60254,60715,61988,62515,62560,62587,62746,63399,63730,63997,64486,64487,64631,64677,65578,66268,66481,66514,66546,67031,67369,67604,68359,68565,69313,69560,70337,70505,70950,71030,71429,71710,71738,72199,72200,72499,72554,72566,72611,72654,72770,73006,73100,73190,73222,73229,73663,73726,73774,73776,73777,73790,73816,73881,73882,73885,73902,73918,73949,73975,73978,73981,73990,73995,73996,74035,74042,74078,74205,74240,74250,74257,74258,74259,74278,74351,74352,74358,74382,74402,74404,74417,74447,74456,74712,74733,74741,74746,74797,74870,74885,74889,74892,74893';
$pids = explode(',', $list_products_id);
<?php

/**
 * Description of productdetaildescription1
 *
 * @author IT TEAM BONOFACTUM
 * @created May 29, 2013 5:11:09 PM
 */
use_class('products_minierp');
use_class('products_materials');
use_class('jng_sp_catalog');
use_class('jng_sp_catalog_params');
$class_pm = new products_minierp();
$class_pmat = new products_materials();
$class_jc = new jng_sp_catalog();
$class_jcp = new jng_sp_catalog_params();
use_service('color_pattern');
$class_cp = new color_pattern();
$products_id = tep_db_prepare_input($_GET['id']);
$topic = $class_pm->getTopicList();
//POST ACTION
if (isset($_POST['me_action']) && $_POST['me_action'] != '') {
    if ($_POST['me_action'] == "SAVENAME") {
        $languages_id = tep_db_prepare_input($_POST['languages_id']);
        $name = tep_db_prepare_input($_POST['name']);
        $description = tep_db_prepare_input($_POST['description']);
        $keywords = tep_db_prepare_input($_POST['keywords']);
        $sellingpoints = tep_db_prepare_input($_POST['sellingpoints']);
        $sellingpointsamde = tep_db_prepare_input($_POST['sellingpointsamde']);
        $sellingpointslaid = tep_db_prepare_input($_POST['sellingpointslaid']);
        if ($sellingpointslaid != '') {