//SUBMIT FORM $reload_list = false; if (isset($_POST['me_action'])) { $reload_list = true; if ($_POST['me_action'] == 'CATEGORYDETAILSAVE') { $cid = tep_db_prepare_input($_POST['categories_id']); $prefix = tep_db_prepare_input($_POST['prefix']); if ($cid == '0') { $cat_id_new = true; $ctid = tep_db_prepare_input($_POST['categories_top_id']); $cid = Category::createNewCategory($ctid, $prefix); $cat = new Category($cid); } else { $cat_id_new = false; $cat = new Category($cid); $cat->updateDetail($prefix); } foreach ($languages as $lid => $l) { $name = tep_db_prepare_input($_POST['categories_name'][$lid]); $seo_text = tep_db_input($_POST['seo_text'][$lid]); $cat->updateDetailLanguage($lid, $name, $seo_text); } if ($cat_id_new) { $hm = $hidemenuscript == '' ? '' : '&hidemenu=true'; header('Location: ?open=setting-category&id=' . $cat->id . $hm); exit; } } elseif ($_POST['me_action'] == 'DELETECATEGORY') { $cid = tep_db_prepare_input($_POST['categories_id']); $cat = new Category($cid); $ctid = $cat->getCategoryTop()->id;