$dbtree = new dbtree(_DB_PREFIX_ . 'category', 'category', $db); $Unit = new Unit(); $Products = new Products(); $News = new News(); $Images = new Images(); $specification = new Specification(); $segmentation = new Segmentation(); if ($News->GetCommentListById($id_product)) { $tpl->Assign('list_comment', $News->list); } $pops1 = $News->GetComent(); $tpl->Assign('pops1', $pops1); $tpl->Assign('related_prods_list', $Products->GetArrayRelatedProducts($id_product)); $specification->SetListByProdId($id_product); $tpl->Assign('product_specs', $specification->list); $specification->SetList(); $tpl->Assign('specs', $specification->list); $tpl->Assign('unitslist', $Unit->GetUnitsList()); $tpl->Assign('list_segment_types', $segmentation->GetSegmentationType()); if (isset($_GET['upload']) == true) { $res = $Images->upload($_FILES, $GLOBALS['PATH_product_img'] . 'original/' . date('Y') . '/' . date('m') . '/' . date('d') . '/'); echo str_replace($GLOBALS['PATH_root'], '/', $res); exit(0); } if (isset($_GET['action']) && $_GET['action'] == "update_spec") { if ($_GET['id_spec_prod'] == '') { $specification->AddSpecToProd($_GET, $id_product); } else { $specification->UpdateSpecsInProducts($_GET); } header('Location: ' . $GLOBALS['URL_base'] . 'adm/productedit/' . $id_product);