<?php if (isset($_POST['btn_save_lang_recipe'])) { include "get.php"; include "update.php"; // DEFINE VARIABLE $cat_recipes_id = $_POST['category_id']; $cat_recipes_name = $_POST['category_name_lang']; $cat_recipes_active = $_POST['news-category-active-status']; $cat_recipes_visibility = $_POST['news-category-visible-status']; $default_check = $_POST['custom_default_value']; $post_cat_id = $_POST['cat_id']; $post_action = $_POST['category_listing_action']; $post_action_2 = $_POST['category_listing_option']; $lang_code = $_POST['custom_lang_code']; $get_param = lang_get_param($cat_recipes_id); $dml = check_action($get_param['category_id'], $lang_code); if ($_POST['btn_save_lang_recipe'] == "Save Changes") { if (isset($default_check)) { if ($dml['rows'] > 0) { update_category_lang("default", $get_param['category_active'], $get_param['category_visibility'], $cat_recipes_id, $lang_code); $_SESSION['alert'] = "success"; $_SESSION['msg'] = "Changes has been saved."; } else { insert_category_lang("default", $get_param['category_id'], $get_param['category_active'], $get_param['category_visibility'], $lang_code, $get_param['additional']); $_SESSION['alert'] = "success"; $_SESSION['msg'] = "Changes has been saved."; } } else { if ($dml['rows'] > 0) { update_category_lang($cat_recipes_name, $get_param['category_active'], $get_param['category_visibility'], $cat_recipes_id, $lang_code);
<?php if (isset($_POST['btn_save_lang'])) { include "get.php"; include "update.php"; // DEFINE VARIABLE $category_news_id = $_POST['category_id']; $category_news_name = $_POST['category_name_lang']; $category_news_active = $_POST['news-category-active-status']; $category_news_visibility = $_POST['news-category-visible-status']; $default_check = $_POST['custom_default_value']; $post_cat_id = $_POST['cat_id']; $post_action = $_POST['category_listing_action']; $post_action_2 = $_POST['category_listing_option']; $lang_code = $_POST['custom_lang_code']; $get_param = lang_get_param($category_news_id); $dml = check_action($get_param['category_id'], $lang_code); if ($_POST['btn_save_lang'] == "Save Changes") { /*if(isset($default_check)){ if($dml['rows'] > 0){ update_category_lang($get_param['category_name'], $get_param['category_active'], $get_param['category_visibility'], $category_news_id, $lang_code); $_SESSION['alert'] = "success"; $_SESSION['msg'] = "Changes has been saved."; }else{ insert_category_lang($get_param['category_name'], $get_param['category_id'], $get_param['category_active'], $get_param['category_visibility'], $lang_code); $_SESSION['alert'] = "success"; $_SESSION['msg'] = "Changes has been saved."; }